Crossfire Server, Trunk  R20513
CREReplyPanel.h
Go to the documentation of this file.
1 #ifndef _CREREPLYPANEL_H
2 #define _CREREPLYPANEL_H
3 
4 #include <QWidget>
5 
6 class QTreeWidget;
7 class QLineEdit;
8 class QComboBox;
9 class QTreeWidgetItem;
10 
14 class CREReplyPanel : public QWidget
15 {
16  Q_OBJECT
17 
18  public:
19  CREReplyPanel(QWidget* parent);
20  virtual ~CREReplyPanel();
21 
22  void setData(const QList<QStringList>& data);
23  QList<QStringList> getData();
24 
25  signals:
27  void dataModified();
28 
29  private:
31  QList<QStringList> myData;
33  QTreeWidget* myReplies;
35  QLineEdit* myText;
37  QLineEdit* myMessage;
39  QComboBox* myType;
40 
46  void setText(QTreeWidgetItem* item, QStringList data);
50  void updateItem();
51 
52  private slots:
53  void currentReplyChanged(QTreeWidgetItem*, QTreeWidgetItem*);
54  void onAddItem(bool);
55  void onDeleteItem(bool);
56  void onTextChanged(const QString&);
57  void onTypeChanged(int);
58 };
59 
60 #endif /* _CREREPLYPANEL_H */
This panel is the &#39;replies&#39; subpanel in the messages panel.
Definition: CREReplyPanel.h:14
void onAddItem(bool)
void dataModified()
Emitted when the data this panel manages changes .
QList< QStringList > myData
The data this panel is working on.
Definition: CREReplyPanel.h:31
void onTypeChanged(int)
void setData(const QList< QStringList > &data)
void onTextChanged(const QString &)
void onDeleteItem(bool)
virtual ~CREReplyPanel()
CREReplyPanel(QWidget *parent)
QLineEdit * myMessage
Zone to edit the message the NPC will say.
Definition: CREReplyPanel.h:37
void currentReplyChanged(QTreeWidgetItem *, QTreeWidgetItem *)
void updateItem()
Update the currently being edited reply with data in the various fields.
QComboBox * myType
Available reply type.
Definition: CREReplyPanel.h:39
QTreeWidget * myReplies
Display for the replies.
Definition: CREReplyPanel.h:33
void setText(QTreeWidgetItem *item, QStringList data)
Fill a line of myReplies with the data.
QList< QStringList > getData()
QLineEdit * myText
Zone to edit the reply keyword.
Definition: CREReplyPanel.h:35