Salome HOME
5c98cfab3ac5f2eaacb71d8b8816f2c1af667d07
[modules/gui.git] / tools / PyEditor / src / PyEditor_SettingsDlg.h
1 // Copyright (C) 2015-2021  OPEN CASCADE
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // File   : PyEditor_SettingsDlg.h
20 // Author : Maxim GLIBIN, Open CASCADE S.A.S. (maxim.glibin@opencascade.com)
21 //
22
23 #ifndef PYEDITOR_SETTINGSDLG_H
24 #define PYEDITOR_SETTINGSDLG_H
25
26 #include <QDialog>
27 #include "PyEditor.h"
28
29 class PyEditor_Editor;
30 class QCheckBox;
31 class QComboBox;
32 class QFontComboBox;
33 class QLabel;
34 class QSpinBox;
35
36 class PYEDITOR_EXPORT PyEditor_SettingsDlg : public QDialog
37 {
38   Q_OBJECT
39
40 public:
41   PyEditor_SettingsDlg( PyEditor_Editor*, bool = false, QWidget* = 0 );
42   virtual ~PyEditor_SettingsDlg();
43
44 private Q_SLOTS:
45   void onVerticalEdgeChecked();
46   void onFontChanged();
47   void onOk();
48   void onDefault();
49   void onHelp();
50
51 Q_SIGNALS:
52   void help();
53
54 private:
55   void settingsToGui();
56   void settingsFromGui();
57   void setFontSize( const QString& );
58   
59   QCheckBox*        myHighlightCurrentLine;
60   QCheckBox*        myTextWrapping;
61   QCheckBox*        myCenterCursorOnScroll;
62   QCheckBox*        myLineNumberArea;
63
64   QCheckBox*        myTabSpaceVisible;
65   QSpinBox*         myTabSize;
66
67   QCheckBox*        myVerticalEdge;
68   QSpinBox*         myNumberColumns;
69   QLabel*           myNumberColumnsLbl;
70
71   QFontComboBox*    myFontFamily;
72   QComboBox*        myFontSize;
73
74   QComboBox*        myCompletionPolicy;
75
76   QCheckBox*        myDefaultCheck;
77
78   PyEditor_Editor*  myEditor;
79 };
80
81 #endif // PYEDITOR_SETTINGSDLG_H