labelmanagementdialog.h

00001 /*
00002  * Silence
00003  *
00004  * Copyright (C) 2009 Manuel Unglaub
00005  *
00006  * This file is part of Silence.
00007  *
00008  * Silence is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, version GPLv2 only of the License.
00011  *
00012  * Silence is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016 
00017  * You should have received a copy of the GNU General Public License
00018  * along with Silence.  If not, see <http://www.gnu.org/licenses/>.
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         // DeleteFrame
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 
Generated on Fri May 14 19:12:50 2010 for Silence by  doxygen 1.6.3