]> git.mxchange.org Git - flightgear.git/blob - src/GUI/PathsDialog.hxx
Code cleanups, code updates and fix at least on (possible) devide-by-zero
[flightgear.git] / src / GUI / PathsDialog.hxx
1 #ifndef PATHSDIALOG_HXX
2 #define PATHSDIALOG_HXX
3
4 #include <QDialog>
5
6 #include <simgear/package/Root.hxx>
7
8
9 namespace Ui {
10 class AddOnsPage;
11 }
12
13 class CatalogListModel;
14
15 class AddOnsPage : public QWidget
16 {
17     Q_OBJECT
18
19 public:
20     explicit AddOnsPage(QWidget *parent, simgear::pkg::RootRef root);
21     ~AddOnsPage();
22
23     static void addDefaultCatalog(QWidget* pr);
24     
25 signals:
26     void downloadDirChanged();
27     void sceneryPathsChanged();
28     
29 private slots:
30     void onAddSceneryPath();
31     void onRemoveSceneryPath();
32
33     void onAddAircraftPath();
34     void onRemoveAircraftPath();
35
36     void onAddCatalog();
37     void onRemoveCatalog();
38     void onAddDefaultCatalog();
39
40     void onChangeDownloadDir();
41     void onClearDownloadDir();
42
43     void onChangeDataDir();
44 private:
45     void updateUi();
46     void setDownloadDir();
47
48     void saveAircraftPaths();
49     void saveSceneryPaths();
50
51     Ui::AddOnsPage* m_ui;
52     CatalogListModel* m_catalogsModel;
53     simgear::pkg::RootRef m_packageRoot;
54     QString m_downloadDir;
55     
56 };
57
58 #endif // PATHSDIALOG_HXX