00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef NEWCOMMENTFORM_H
00021 #define NEWCOMMENTFORM_H
00022
00023 #include <QModelIndex>
00024 #include <QGraphicsWidget>
00025
00026 namespace Plasma
00027 {
00028 class PushButton;
00029 class LineEdit;
00030 class TextEdit;
00031 };
00032
00033 class NewCommentForm : public QGraphicsWidget
00034 {
00035 Q_OBJECT
00036 public:
00037 NewCommentForm( QGraphicsItem* parent = 0, Qt::WindowFlags wFlags = 0 );
00038 virtual ~NewCommentForm();
00039
00040 void setParentIndex( QModelIndex parentIndex );
00041
00042 private slots:
00043 void validateAndSubmit();
00044
00045 signals:
00046 void accepted( QModelIndex parentIndex, QString title, QString body );
00047 void canceled();
00048
00049 private:
00050 Plasma::LineEdit* m_titleEdit;
00051 Plasma::TextEdit* m_bodyEdit;
00052 Plasma::PushButton* m_okButton;
00053 Plasma::PushButton* m_cancelButton;
00054 QModelIndex m_parentIndex;
00055 };
00056
00057 #endif // NEWCOMMENTFORM_H