AstRawDark
Manage your astrophoto dark frames
 All Classes Functions Variables Enumerations Enumerator Pages
prefDialog.h
1 /*
2  * AstRawDark
3  *
4  * Copyright (C) 2015 - Frédéric CORNU
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef PREFDIALOG_H
21 #define PREFDIALOG_H
22 
23 #include <QDialog>
24 
25 namespace Ui {
26 
27  class PrefDialog;
28 }
29 
30 class QListWidgetItem;
31 
35 class PrefDialog : public QDialog
36 {
37  Q_OBJECT
38 
39 public:
44  explicit PrefDialog(QWidget *parent = 0);
45 
47  ~PrefDialog();
48 
53  const QStringList& getDarkSources() const { return _darkSources; }
54 
55 protected:
60  void changeEvent(QEvent *e);
61 
62 private:
64  Ui::PrefDialog *ui;
65 
67  QStringList _darkSources;
68 
77  bool isDarkSourceValid(const QString& path, const int row = -1);
78 
79 signals:
84  void newDarkSources(const QStringList& paths);
85 
89  void createDarkScanCommand();
90 
91 private slots:
93  void on_btnAddDarkFolder_clicked();
94 
96  void on_lstDarkFolders_itemSelectionChanged();
97 
99  void on_btnRemoveDarkFolder_clicked();
100 
102  void on_btnEditDarkFolder_clicked();
103 
105  void on_lstDarkFolders_itemDoubleClicked(QListWidgetItem * item);
106 
108  virtual void accept();
109 };
110 
111 #endif // PREFDIALOG_H