Crossfire Server, Trunk  R20513
CREResourcesWindow.h
Go to the documentation of this file.
1 #ifndef CRERESOURCESWINDOW_H
2 #define CRERESOURCESWINDOW_H
3 
4 #include <QObject>
5 #include <QtGui>
6 
7 #include "CREFilter.h"
10 #include "CREPanel.h"
11 #include "CRETreeItem.h"
12 
14 class Quest;
15 class QuestManager;
16 class MessageManager;
17 class ResourcesManager;
18 class ScriptFileManager;
19 
21  DisplayAll = 0xFFFF,
33 };
34 
35 class CREResourcesWindow : public QWidget
36 {
37  Q_OBJECT
38 
39  public:
41  virtual ~CREResourcesWindow();
42 
43  void deleteQuest(Quest* quest);
44 
45  const ResourcesManager* resourcesManager() const;
46 
47  public slots:
48  void updateFilters();
49  void updateReports();
50  void commitData();
51 
52  signals:
53  void filtersModified();
54  void reportsModified();
55 
56  protected:
57  QTreeWidget* myTree;
59  QHash<QString, QPointer<CREPanel> > myPanels;
60  QSplitter* mySplitter;
68  QList<QObject*> myDisplayedItems;
69  QPushButton* myFilterButton;
70  QMenu* myFiltersMenu;
71  QSignalMapper myFiltersMapper;
73  QMenu* myReportsMenu;
74  QSignalMapper myReportsMapper;
76  QList<CRETreeItem*> myTreeItems;
77 
78  void fillData();
79  void fillAnimations();
80  void fillTreasures();
81  void fillArchetypes();
82  void fillFormulae();
83  void fillArtifacts();
84  void fillFaces();
85  void fillMaps();
86  void fillQuests();
87  void fillMessages();
88  void fillScripts();
89  void fillRandomMaps();
90  void addPanel(QString name, CREPanel* panel);
91  void fillItem(const QPoint& pos, QMenu* menu);
92 
93  protected slots:
94  void tree_currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*);
95  void onFilter();
96  void onFilterChange(QObject* object);
97  void onQuickFilter();
98  void clearFilter();
99  void onReport();
100  void onReportChange(QObject* object);
101  void treeCustomMenu(const QPoint & pos);
102  void addQuest(bool);
103  void addMessage(bool);
104 };
105 
106 #endif // CRERESOURCESWINDOW_H
void deleteQuest(Quest *quest)
QHash< QString, QPointer< CREPanel > > myPanels
CREResourcesWindow(CREMapInformationManager *store, QuestManager *quests, MessageManager *messages, ResourcesManager *resources, ScriptFileManager *scripts, DisplayMode mode=DisplayAll)
Definition: Quest.h:32
void tree_currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)
Manage scripts for items.
QSignalMapper myFiltersMapper
CREMapInformationManager * myStore
void onReportChange(QObject *object)
CREFilterDefinitionManager myFilters
QList< CRETreeItem * > myTreeItems
void onFilterChange(QObject *object)
MessageManager * myMessages
QSignalMapper myReportsMapper
QuestManager * myQuests
void addPanel(QString name, CREPanel *panel)
QList< QObject * > myDisplayedItems
ScriptFileManager * myScripts
ResourcesManager * myResources
void treeCustomMenu(const QPoint &pos)
DisplayMode
QPushButton * myFilterButton
static quest_definition * quests
All known quests.
Definition: quest.c:93
const ResourcesManager * resourcesManager() const
CREReportDefinitionManager myReports
void fillItem(const QPoint &pos, QMenu *menu)