Crossfire Server, Trunk  R22010
CREResourcesWindow.h
Go to the documentation of this file.
1 #ifndef CRERESOURCESWINDOW_H
2 #define CRERESOURCESWINDOW_H
3 
4 #include <QObject>
5 #include <QtWidgets>
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,
34 };
35 
36 class CREResourcesWindow : public QWidget
37 {
38  Q_OBJECT
39 
40  public:
42  virtual ~CREResourcesWindow();
43 
44  void deleteQuest(Quest* quest);
45 
46  const ResourcesManager* resourcesManager() const;
47 
48  public slots:
49  void updateFilters();
50  void updateReports();
51  void commitData();
52 
53  signals:
54  void filtersModified();
55  void reportsModified();
56 
57  protected:
58  QTreeWidget* myTree;
60  QHash<QString, QPointer<CREPanel> > myPanels;
61  QSplitter* mySplitter;
69  QList<QObject*> myDisplayedItems;
70  QPushButton* myFilterButton;
71  QMenu* myFiltersMenu;
72  QSignalMapper myFiltersMapper;
74  QMenu* myReportsMenu;
75  QSignalMapper myReportsMapper;
77  QList<CRETreeItem*> myTreeItems;
78 
79  void fillData();
80  void fillAnimations();
81  void fillTreasures();
82  void fillArchetypes();
83  void fillFormulae();
84  void fillArtifacts();
85  void fillFaces();
86  void fillMaps();
87  void fillQuests();
88  void fillMessages();
89  void fillScripts();
90  void fillRandomMaps();
91  void fillGeneralMessages();
92  void addPanel(QString name, CREPanel* panel);
93  void fillItem(const QPoint& pos, QMenu* menu);
94 
95  protected slots:
96  void tree_currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*);
97  void onFilter();
98  void onFilterChange(QObject* object);
99  void onQuickFilter();
100  void clearFilter();
101  void onReport();
102  void onReportChange(QObject* object);
103  void treeCustomMenu(const QPoint & pos);
104  void addQuest(bool);
105  void addMessage(bool);
106 };
107 
108 #endif // CRERESOURCESWINDOW_H
void deleteQuest(Quest *quest)
QHash< QString, QPointer< CREPanel > > myPanels
Definition: Quest.h:32
void tree_currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)
QSignalMapper myFiltersMapper
CREMapInformationManager * myStore
void onReportChange(QObject *object)
CREFilterDefinitionManager myFilters
QList< CRETreeItem * > myTreeItems
void onFilterChange(QObject *object)
MessageManager * myMessages
const ResourcesManager * resourcesManager() const
QSignalMapper myReportsMapper
CREResourcesWindow(CREMapInformationManager *store, QuestManager *quests, MessageManager *messages, ResourcesManager *resources, ScriptFileManager *scripts, QWidget *parent, DisplayMode mode=DisplayAll)
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
Definition: quest.c:97
CREReportDefinitionManager myReports
void fillItem(const QPoint &pos, QMenu *menu)