1 /*
2     Copyright (c) 2020, Lukas Holecek <hluk@email.cz>
3 
4     This file is part of CopyQ.
5 
6     CopyQ 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     CopyQ 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 CopyQ.  If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef IMPORTEXPORTDIALOG_H
21 #define IMPORTEXPORTDIALOG_H
22 
23 #include <QDialog>
24 
25 namespace Ui {
26 class ImportExportDialog;
27 }
28 
29 class ImportExportDialog final : public QDialog
30 {
31 public:
32     explicit ImportExportDialog(QWidget *parent = nullptr);
33     ~ImportExportDialog();
34 
35     void setTabs(const QStringList &tabs);
36     void setCurrentTab(const QString &tabName);
37 
38     void setHasConfiguration(bool hasConfiguration);
39     void setHasCommands(bool hasCommands);
40 
41     void setConfigurationEnabled(bool enabled);
42     void setCommandsEnabled(bool enabled);
43 
44     QStringList selectedTabs() const;
45     bool isConfigurationEnabled() const;
46     bool isCommandsEnabled() const;
47 
48 private:
49     void onCheckBoxAllClicked(bool checked);
50 
51     void update();
52 
53     bool canAccept() const;
54 
55     Ui::ImportExportDialog *ui;
56 };
57 
58 #endif // IMPORTEXPORTDIALOG_H
59