ZIMA CAD Parts
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
settingsdialog.h
Go to the documentation of this file.
1 /*
2  ZIMA-CAD-Parts
3  http://www.zima-construction.cz/software/ZIMA-Parts
4 
5  Copyright (C) 2011-2012 Jakub Skokan <aither@havefun.cz>
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef SETTINGSDIALOG_H
22 #define SETTINGSDIALOG_H
23 
24 #include <QDialog>
25 #include <QMultiHash>
26 #include <QTranslator>
27 #include <QSignalMapper>
28 #include <QList>
29 #include <QLineEdit>
30 
31 #include "zima-cad-parts.h"
32 #include "basedatasource.h"
33 #include "ftpdatasource.h"
34 #include "localdatasource.h"
35 
36 
37 class QListWidgetItem;
38 
39 namespace Ui {
40 class SettingsDialog;
41 }
42 
43 class SettingsDialog : public QDialog {
44  Q_OBJECT
45  Q_DISABLE_COPY(SettingsDialog)
46 public:
47  enum Section {
54  };
55 
56  explicit SettingsDialog(QTranslator **translator, QWidget *parent = 0);
57  virtual ~SettingsDialog();
58 
59  void setSection(Section s);
60 
61 protected:
62  virtual void changeEvent(QEvent *e);
63  virtual void accept();
64 
65 private slots:
66  void addDataSource();
67  void editDataSource();
68  void removeDataSource();
69  void datasourceUpButton_clicked();
70  void datasourceDownButton_clicked();
71  void pruneCache(QString path = QString());
72  void setZimaUtilPath(int util);
73  void proeButton_clicked();
74  void productViewButton_clicked();
75 
76 private:
77  Ui::SettingsDialog *m_ui;
78  QTranslator **translator;
79  QSignalMapper *zimaUtilSignalMapper;
80  QList<QLineEdit*> zimaUtilLineEdits;
81 
82  void setupDatasourceList();
83 };
84 
85 #endif // SETTINGSDIALOG_H
Definition: settingsdialog.h:50
Definition: settingsdialog.h:51
Section
Definition: settingsdialog.h:47
Definition: settingsdialog.h:43
Definition: settingsdialog.h:52
SettingsDialog(QTranslator **translator, QWidget *parent=0)
Definition: settingsdialog.cpp:58
Definition: settingsdialog.h:53
Definition: settingsdialog.h:48
virtual void accept()
Definition: settingsdialog.cpp:140
virtual ~SettingsDialog()
Definition: settingsdialog.cpp:119
Definition: settingsdialog.h:49
virtual void changeEvent(QEvent *e)
Definition: settingsdialog.cpp:124
void setSection(Section s)
Definition: settingsdialog.cpp:135