labelmanagementdialog.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef LABELMANAGEMENTDIALOG_H
00022 #define LABELMANAGEMENTDIALOG_H
00023
00024 #include "src/data/model/labelmodel.h"
00025 #include <QAction>
00026 #include <QDialog>
00027 #include <QGridLayout>
00028 #include <QGroupBox>
00029 #include <QLabel>
00030 #include <QPushButton>
00031 #include <QToolBar>
00032 #include <QTreeView>
00033 #include "src/gui/widget/inputwidget.h"
00034
00035
00043 class LabelManagementDialog : public QDialog
00044 {
00045 Q_OBJECT
00046
00047 public:
00054 LabelManagementDialog(QWidget *parent = 0, Qt::WindowFlags f = 0);
00055
00060 ~LabelManagementDialog();
00061
00062 private slots:
00063 void showTreeContextMenu();
00064 void addLabel();
00065 void addRow();
00066 void addSublabel();
00067 void removeLabel();
00068 void selectItem();
00069 void updateActions();
00070
00071 private:
00072 QGridLayout *layout;
00073 QToolBar *toolbar;
00074 QAction *addRowAction,
00075 *addChildAction,
00076 *removeAction;
00077 QTreeView *tree;
00078 LabelModel *model;
00079 QPushButton *closeBtn;
00080
00081 InputWidget *inputwidget;
00082
00083
00084 QGroupBox *deleteFrame;
00085 QGridLayout *deleteLayout;
00086 QLabel *icon,
00087 *messageLbl;
00088 QPushButton *yesBtn,
00089 *noBtn;
00090
00091 QModelIndex newLabelParent;
00092 int newLabelRow;
00093
00094 QWidget* createDeleteFrame();
00095 };
00096
00097 #endif // LABELMANAGEMENTDIALOG_H
00098