Debian Codegraph @

src/Gui/Dialogs/DlgCustomizeImp.h

raw
1 /***************************************************************************
2 * Copyright (c) 2004 Werner Mayer <wmayer[at]users.sourceforge.net> *
3 * *
4 * This file is part of the FreeCAD CAx development system. *
5 * *
6 * This library is free software; you can redistribute it and/or *
7 * modify it under the terms of the GNU Library General Public *
8 * License as published by the Free Software Foundation; either *
9 * version 2 of the License, or (at your option) any later version. *
10 * *
11 * This library 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 Library General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Library General Public *
17 * License along with this library; see the file COPYING.LIB. If not, *
18 * write to the Free Software Foundation, Inc., 59 Temple Place, *
19 * Suite 330, Boston, MA 02111-1307, USA *
20 * *
21 ***************************************************************************/
22
23
24 #ifndef GUI_DIALOG_DLGCUSTOMIZE_IMP_H
25 #define GUI_DIALOG_DLGCUSTOMIZE_IMP_H
26
27 #include <QDialog>
28
29 class QTabWidget;
30 class QGridLayout;
31 class QHBoxLayout;
32
33 namespace Gui
34 {
35 namespace Dialog
36 {
37
38 /**
39 * Dialog which contains several tab pages to customize
40 * the changeable toolbars and commandbars or to define
41 * own macro actions.
42 *
43 * You can extend the existing toolbars or commandbars with
44 * several commands just by drag and drop.
45 * @see DlgCustomCommandsImp
46 * @see DlgCustomToolbarsImp
47 * @see DlgCustomCmdbarsImp
48 * @see DlgCustomActionsImp
49 * \author Werner Mayer
50 */
51 class DlgCustomizeImp: public QDialog
52 {
53 Q_OBJECT
54
55 public:
56 explicit DlgCustomizeImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
57 ~DlgCustomizeImp() override;
58
59 static void addPage(const char* className);
60 void addPage(QWidget* w);
61
62 Q_SIGNALS:
63 void addMacroAction(const QByteArray&);
64 void removeMacroAction(const QByteArray&);
65 void modifyMacroAction(const QByteArray&);
66
67 protected:
68 void changeEvent(QEvent* e) override;
69
70 private:
71 /** @name for internal use only */
72 //@{
73 QPushButton* buttonHelp; /**< the help button */
74 QPushButton* buttonClose; /**< the cancel button */
75 QTabWidget* tabWidget; /**< tab widgets containing all pages */
76 QGridLayout* customLayout; /**< layout */
77 QHBoxLayout* layout; /** horizontal layout */
78 static QList<QByteArray> _pages; /**< Name of all registered preference pages */
79 //@}
80 };
81
82 } // namespace Dialog
83 } // namespace Gui
84
85 #endif // GUI_DIALOG_DLGCUSTOMIZE_IMP_H