Crossfire Server, Trunk
CREStringListPanel.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef _CRESTRINGLISTPANEL_H
14 #define _CRESTRINGLISTPANEL_H
15 
16 #include <QDialog>
17 
18 class QListWidget;
19 class QListWidgetItem;
20 
24 class CREStringListPanel : public QDialog
25 {
26  Q_OBJECT
27 
28  public:
29  CREStringListPanel(QWidget* parent);
30  virtual ~CREStringListPanel();
31 
32  void setData(const QStringList& list);
33  QStringList data() const;
34 
35  private:
36  QListWidgetItem* createItem(const QString& text);
37 
38  QListWidget* myItems;
39  QStringList myOriginal;
40 
41  protected slots:
42  void onAddItem(bool);
43  void onDeleteItem(bool);
44  void onReset(bool);
45 };
46 
47 #endif /* _CRESTRINGLISTPANEL_H */
CREStringListPanel::myItems
QListWidget * myItems
Definition: CREStringListPanel.h:38
CREStringListPanel::onDeleteItem
void onDeleteItem(bool)
Definition: CREStringListPanel.cpp:79
CREStringListPanel::data
QStringList data() const
Definition: CREStringListPanel.cpp:58
guildoracle.list
list
Definition: guildoracle.py:87
CREStringListPanel
Definition: CREStringListPanel.h:24
CREStringListPanel::onAddItem
void onAddItem(bool)
Definition: CREStringListPanel.cpp:74
CREStringListPanel::CREStringListPanel
CREStringListPanel(QWidget *parent)
Definition: CREStringListPanel.cpp:17
CREStringListPanel::~CREStringListPanel
virtual ~CREStringListPanel()
Definition: CREStringListPanel.cpp:46
CREStringListPanel::setData
void setData(const QStringList &list)
Definition: CREStringListPanel.cpp:50
guild_entry.text
text
Definition: guild_entry.py:41
CREStringListPanel::createItem
QListWidgetItem * createItem(const QString &text)
Definition: CREStringListPanel.cpp:66
CREStringListPanel::myOriginal
QStringList myOriginal
Definition: CREStringListPanel.h:39
CREStringListPanel::onReset
void onReset(bool)
Definition: CREStringListPanel.cpp:86