nodepropertywidget.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 NODEPROPERTYWIDGET_H
00022 #define NODEPROPERTYWIDGET_H
00023 
00024 #include "src/data/node/node.h"
00025 #include "src/gui/widget/labelwidget.h"
00026 #include "src/gui/widget/syntaxbox.h"
00027 #include <QDockWidget>
00028 #include <QFormLayout>
00029 #include <QFrame>
00030 #include <QLabel>
00031 #include <klineedit.h>
00032 #include <QPushButton>
00033 #include <QTabWidget>
00034 #include <QVBoxLayout>
00035 
00036 
00046 class NodePropertyWidget : public QDockWidget
00047 {
00048     Q_OBJECT
00049     
00050     public:
00061         NodePropertyWidget(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0);
00062 
00067         ~NodePropertyWidget();
00068 
00073         void setNode(Node *node);
00074 
00078         void updateLabels();
00079 
00080     private slots:
00081         void saveNodeInfo();
00082         void saveLabels();
00083 
00084     private:
00085         Node *node;
00086         QVBoxLayout *layout;
00087         QFrame *frame;
00088         QTabWidget *tabwidget;
00089 
00090         // nodeinfotab
00091         QFormLayout *infolayout;
00092         QFrame *infoframe;
00093         KLineEdit *nodeName;
00094         QLabel *creationdate;
00095         QLabel *modificationdate;
00096         QPushButton *applyNodeInfo;
00097         SyntaxBox *syntaxbox;
00098 
00099         // labeltab
00100         QGridLayout *labellayout;
00101         QFrame *labelframe;
00102         LabelWidget *labelwidget;
00103         QPushButton *applyLabels;
00104 
00105         QWidget* createNodeInfoTab();
00106         QWidget* createLabelTab();
00107     
00108 };
00109 
00110 #endif // NODEPROPERTYWIDGET_H
00111 
Generated on Fri May 14 19:12:50 2010 for Silence by  doxygen 1.6.3