SciDAVis  1.D4
ConfigDialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : ConfigDialog.h
3  Project : SciDAVis
4  --------------------------------------------------------------------
5  Copyright : (C) 2006 by Ion Vasilief, Tilman Benkert
6  Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net
7  Description : Preferences dialog
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 #ifndef ConfigDialog_H
30 #define ConfigDialog_H
31 
32 #include <QDialog>
33 #include <QCheckBox>
34 
35 class QGroupBox;
36 class QPushButton;
37 class QTabWidget;
38 class QStackedWidget;
39 class QWidget;
40 class QComboBox;
41 class QSpinBox;
42 class QLabel;
43 class QRadioButton;
44 class QListWidget;
45 class ColorButton;
46 class ColorBox;
47 
48 #ifndef TS_PATH
49 #define TS_PATH (qApp->applicationDirPath() + "/translations")
50 #endif
51 
53 class ConfigDialog : public QDialog
54 {
55  Q_OBJECT
56 
57 public:
59 
63  ConfigDialog( QWidget* parent, Qt::WFlags fl = 0 );
64 
65 public slots:
66  virtual void languageChange();
67  void insertLanguagesList();
68 
69  void accept();
70  void apply();
71 
72  void setCurrentPage(int index);
73  void setColumnSeparator(const QString& sep);
74  //table colors
75  void pickBgColor();
76  void pickTextColor();
77  void pickHeaderColor();
78 
79  //table fonts
80  void pickTextFont();
81  void pickHeaderFont();
82 
83  //graph fonts
84  void pickAxesFont();
85  void pickNumbersFont();
86  void pickLegendFont();
87  void pickTitleFont();
88 
89  void enableScaleFonts();
90  void showFrameWidth(bool ok);
91 
92  //application
93  void pickApplicationFont();
94  void pickPanelsTextColor();
95  void pickPanelsColor();
96  void pickWorkspaceColor();
97 
98  //2D curves
99  int curveStyle();
100 
101  void pickDataMaxColor();
102  void pickDataMinColor();
103  void pick3DBackgroundColor();
104  void pickMeshColor();
105  void pickGridColor();
106  void pick3DAxesColor();
107  void pick3DNumbersColor();
108  void pick3DLabelsColor();
109  void pick3DTitleFont();
110  void pick3DNumbersFont();
111  void pick3DAxesFont();
112 
113  //Fitting
114  void showPointsBox(bool);
115 
116  void switchToLanguage(int param);
117 
118 private slots:
120  void updateDecSepPreview();
121 
122 private:
123  void initPlotsPage();
124  void initAppPage();
125  void initCurvesPage();
126  void initPlots3DPage();
127  void initTablesPage();
128  void initConfirmationsPage();
129  void initFittingPage();
130 
133  QStringList plot3DColors;
134 
138  QPushButton *btnFromColor, *btnToColor, *btnGrid;
143  QStackedWidget * generalDialog;
157  QSpinBox *boxUndoLimit;
159  QListWidget * itemsList;
162  QGroupBox *groupBoxConfirm;
168  QLabel *lblUndoLimit;
171  QGroupBox *groupBoxMultiPeak;
176 };
177 
178 #endif // CONFIGDIALOG_H