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* );
50 void setHighlightCurrentLine( bool );
51 bool highlightCurrentLine() const;
53 void setTextWrapping( bool );
54 bool textWrapping() const;
56 void setCenterCursorOnScroll( bool );
57 bool centerCursorOnScroll() const;
59 void setLineNumberArea( bool );
60 bool lineNumberArea() const;
62 void setVerticalEdge( bool );
63 bool verticalEdge() const;
65 void setNumberColumns( int );
66 int numberColumns() const;
68 void setTabSpaceVisible( bool );
69 bool tabSpaceVisible() const;
71 void setTabSize( int );
74 void setFont( const QFont& );
80 void copyFrom( const PyEditor_Settings& );
83 QString option( Option );
87 bool myHighlightCurrentLine;
89 bool myCenterCursorOnScroll;
90 bool myLineNumberArea;
92 // Vertical edge settings
97 bool myTabSpaceVisible;
103 static PyEditor_Settings* myGlobalSettings;
106 #endif // PYEDITOR_SETTINGS_H