1 /* ============================================================
2 * QuiteRSS is a open-source cross-platform RSS/Atom news feeds reader
3 * Copyright (C) 2011-2020 QuiteRSS Team <quiterssteam@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 <https://www.gnu.org/licenses/>.
17 * ============================================================ */
18 #ifndef CUSTOMIZETOOLBARDIALOG_H
19 #define CUSTOMIZETOOLBARDIALOG_H
20 
21 #include "dialog.h"
22 
23 class CustomizeToolbarDialog : public Dialog
24 {
25   Q_OBJECT
26 public:
27   explicit CustomizeToolbarDialog(QWidget *parent, QToolBar *toolbar);
28 
29 private slots:
30   void acceptDialog();
31   void closeDialog();
32 
33   void showMenuAddButton();
34   void addShortcut(QAction *action);
35   void removeShortcut();
36   void moveUpShortcut();
37   void moveDownShortcut();
38   void defaultShortcut();
39 
40   void slotCurrentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *);
41 
42 private:
43   QToolBar *toolbar_;
44   QTreeWidget *shortcutTree_;
45 
46   QComboBox *styleBox_;
47   QComboBox *iconBox_;
48 
49   QMenu *addButtonMenu_;
50 
51   QPushButton *addButton_;
52   QPushButton *removeButton_;
53   QPushButton *moveUpButton_;
54   QPushButton *moveDownButton_;
55 
56 };
57 
58 #endif // CUSTOMIZETOOLBARDIALOG_H
59