Falkon Develop
Cross-platform Qt-based web browser
sessionmanagerdialog.h
Go to the documentation of this file.
1/* ============================================================
2* Falkon - Qt web browser
3* Copyright (C) 2017 David Rosca <nowrep@gmail.com>
4*
5* This program is free software: you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation, either version 3 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <http://www.gnu.org/licenses/>.
17* ============================================================ */
18#ifndef SESSIONMANAGERDIALOG_H
19#define SESSIONMANAGERDIALOG_H
20
21#include <QDialog>
22
23namespace Ui {
25}
26
27class QTreeWidgetItem;
28
29class SessionManagerDialog : public QDialog
30{
31 Q_OBJECT
32
33public:
34 explicit SessionManagerDialog(QWidget *parent = nullptr);
35 ~SessionManagerDialog() override;
36
37private:
38 enum Roles {
39 SessionFileRole = Qt::UserRole + 10,
40 IsBackupSessionRole,
41 IsActiveSessionRole,
42 IsDefaultSessionRole
43 };
44
45 void newSession();
46 void renameSession();
47 void cloneSession();
48 void deleteSession();
49 void switchToSession();
50
51 void refresh();
52 void updateButtons();
53 void updateItem(QTreeWidgetItem *item);
54
55 void showEvent(QShowEvent *e) override;
56 void resizeEvent(QResizeEvent *e) override;
57 void resizeViewHeader();
58
59 Ui::SessionManagerDialog *ui;
60};
61
62#endif // SESSIONMANAGERDIALOG_H
SessionManagerDialog(QWidget *parent=nullptr)