1 // Copyright (C) 2015 OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // File : PyEditor_Settings.h
20 // Author : Maxim GLIBIN, Open CASCADE S.A.S. (maxim.glibin@opencascade.com)
23 #ifndef PYEDITOR_SETTINGS_H
24 #define PYEDITOR_SETTINGS_H
32 const char* const PY_EDITOR = "PythonEditor";
33 const char* const HIGHLIGHT_CURRLINE = "HighlightCurrentLine";
34 const char* const LINE_NUMBER_AREA = "LineNumberArea";
35 const char* const TEXT_WRAP = "TextWrapping";
36 const char* const CURSOR_SCROLL = "CenterCursorOnScroll";
37 const char* const TAB_WHITESPACES = "TabSpaceVisible";
38 const char* const TAB_SIZE = "TabSize";
39 const char* const VERTICAL_EDGE = "VerticalEdge";
40 const char* const NUM_COLUMNS = "NumberColumns";
41 const char* const FONT_FAMILY = "FontFamily";
42 const char* const FONT_SIZE = "FontSize";
44 class PYEDITOR_EXPORT PyEditor_Settings
47 PyEditor_Settings( QtxResourceMgr* = 0 , bool isSingle = true );
52 void fromSettings( const QString& );
53 void toSettings( const QString& ) const;
55 void readPreferences();
56 void writePreferences();
61 bool p_HighlightCurrentLine;
63 bool p_CenterCursorOnScroll;
64 bool p_LineNumberArea;
66 // Vertical edge settings
71 bool p_TabSpaceVisible;
78 QSettings* m_Settings;
79 QtxResourceMgr* m_ResourceMgr;
83 #endif // PYEDITOR_SETTINGS_H