1 // Copyright (C) 2015-2016 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
30 class PYEDITOR_EXPORT PyEditor_Settings
33 enum Option { snEditor,
34 snHighlightCurrentLine,
36 snCenterCursorOnScroll,
45 static PyEditor_Settings* settings();
46 static void setSettings( PyEditor_Settings* );
49 virtual ~PyEditor_Settings() {}
51 void setHighlightCurrentLine( bool );
52 bool highlightCurrentLine() const;
54 void setTextWrapping( bool );
55 bool textWrapping() const;
57 void setCenterCursorOnScroll( bool );
58 bool centerCursorOnScroll() const;
60 void setLineNumberArea( bool );
61 bool lineNumberArea() const;
63 void setVerticalEdge( bool );
64 bool verticalEdge() const;
66 void setNumberColumns( int );
67 int numberColumns() const;
69 void setTabSpaceVisible( bool );
70 bool tabSpaceVisible() const;
72 void setTabSize( int );
75 void setFont( const QFont& );
81 void copyFrom( const PyEditor_Settings& );
84 QString option( Option );
88 bool myHighlightCurrentLine;
90 bool myCenterCursorOnScroll;
91 bool myLineNumberArea;
93 // Vertical edge settings
98 bool myTabSpaceVisible;
104 static PyEditor_Settings* myGlobalSettings;
107 #endif // PYEDITOR_SETTINGS_H