DlgToolbarsImp.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef GUI_DIALOG_DLGTOOLBARS_IMP_H
00025 #define GUI_DIALOG_DLGTOOLBARS_IMP_H
00026
00027 #include "ui_DlgToolbars.h"
00028 #include "PropertyPage.h"
00029
00030 namespace Gui {
00031 namespace Dialog {
00032
00041 class DlgCustomToolbars : public CustomizeActionPage, public Ui_DlgCustomToolbars
00042 {
00043 Q_OBJECT
00044
00045 protected:
00046 enum Type { Toolbar, Toolboxbar };
00047
00048 DlgCustomToolbars(Type, QWidget* parent = 0);
00049 virtual ~DlgCustomToolbars();
00050
00051 protected Q_SLOTS:
00052 void on_categoryBox_activated(int index);
00053 void on_workbenchBox_activated(int index);
00054 void on_moveActionRightButton_clicked();
00055 void on_moveActionLeftButton_clicked();
00056 void on_moveActionUpButton_clicked();
00057 void on_moveActionDownButton_clicked();
00058 void on_newButton_clicked();
00059 void on_renameButton_clicked();
00060 void on_deleteButton_clicked();
00061 void onAddMacroAction(const QByteArray&);
00062 void onRemoveMacroAction(const QByteArray&);
00063 void onModifyMacroAction(const QByteArray&);
00064
00065 protected:
00066 void changeEvent(QEvent *e);
00067 void hideEvent(QHideEvent * event);
00068 virtual void addCustomToolbar(const QString&);
00069 virtual void removeCustomToolbar(const QString&);
00070 virtual void renameCustomToolbar(const QString&, const QString&);
00071 virtual void addCustomCommand(const QString&, const QByteArray&);
00072 virtual void removeCustomCommand(const QString&, const QByteArray&);
00073 virtual void moveUpCustomCommand(const QString&, const QByteArray&);
00074 virtual void moveDownCustomCommand(const QString&, const QByteArray&);
00075
00076 private:
00077 void importCustomToolbars(const QByteArray&);
00078 void exportCustomToolbars(const QByteArray&);
00079
00080 private:
00081 Type type;
00082 };
00083
00089 class DlgCustomToolbarsImp : public DlgCustomToolbars
00090 {
00091 Q_OBJECT
00092
00093 public:
00094 DlgCustomToolbarsImp(QWidget* parent = 0);
00095 ~DlgCustomToolbarsImp();
00096
00097 protected:
00098 void changeEvent(QEvent *e);
00099 virtual void addCustomToolbar(const QString&);
00100 virtual void removeCustomToolbar(const QString&);
00101 virtual void renameCustomToolbar(const QString&, const QString&);
00102 virtual void addCustomCommand(const QString&, const QByteArray&);
00103 virtual void removeCustomCommand(const QString&, const QByteArray&);
00104 virtual void moveUpCustomCommand(const QString&, const QByteArray&);
00105 virtual void moveDownCustomCommand(const QString&, const QByteArray&);
00106 };
00107
00117 class DlgCustomToolBoxbarsImp : public DlgCustomToolbars
00118 {
00119 Q_OBJECT
00120
00121 public:
00122 DlgCustomToolBoxbarsImp(QWidget* parent = 0);
00123 ~DlgCustomToolBoxbarsImp();
00124
00125 protected:
00126 void changeEvent(QEvent *e);
00127 };
00128
00129 }
00130 }
00131
00132 #endif // GUI_DIALOG_DLGTOOLBARS_IMP_H