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,
46 static PyEditor_Settings* settings();
47 static void setSettings( PyEditor_Settings* );
50 virtual ~PyEditor_Settings() {}
52 void setHighlightCurrentLine( bool );
53 bool highlightCurrentLine() const;
55 void setTextWrapping( bool );
56 bool textWrapping() const;
58 void setCenterCursorOnScroll( bool );
59 bool centerCursorOnScroll() const;
61 void setLineNumberArea( bool );
62 bool lineNumberArea() const;
64 void setVerticalEdge( bool );
65 bool verticalEdge() const;
67 void setNumberColumns( int );
68 int numberColumns() const;
70 void setTabSpaceVisible( bool );
71 bool tabSpaceVisible() const;
73 void setTabSize( int );
76 void setFont( const QFont& );
79 void setCompletionPolicy( int );
80 int completionPolicy() const;
85 void copyFrom( const PyEditor_Settings& );
88 QString option( Option );
92 bool myHighlightCurrentLine;
94 bool myCenterCursorOnScroll;
95 bool myLineNumberArea;
97 // Vertical edge settings
102 bool myTabSpaceVisible;
108 // Completion settings
109 int myCompletionPolicy;
111 static PyEditor_Settings* myGlobalSettings;
114 #endif // PYEDITOR_SETTINGS_H