Crossfire Server, Trunk
CREMainWindow.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 #include <Qt>
14 
15 #include <QMainWindow>
16 
17 #include "CREResourcesWindow.h"
18 
19 class QMdiArea;
20 class QAction;
21 class QMenu;
22 class QLabel;
23 class CREArtifactWindow;
24 class CREArchetypeWindow;
25 class CRETreasureWindow;
26 class CREAnimationWindow;
27 class CREFormulaeWindow;
28 class CREMapInformation;
30 class QuestManager;
31 class MessageManager;
32 class ResourcesManager;
33 class ScriptFileManager;
34 class AssetWrapper;
35 class AllAssets;
36 class AssetModel;
37 class ChangesDock;
38 class HelpManager;
39 
40 class CREMainWindow : public QMainWindow
41 {
42  Q_OBJECT
43 
44  public:
45  CREMainWindow(const QString &helpRoot);
46 
47  signals:
48  void updateFilters();
49  void updateReports();
50 
51  private:
52  QMdiArea* myArea;
55 
56  void createActions();
57  void createMenus();
58 
59  QMenu* myOpenMenu;
60  QMenu* mySaveMenu;
61 
62  QAction* mySaveFormulae;
63  QMenu* myToolsMenu;
64  QActionGroup *myFacesetsGroup;
66  QAction* myClearMapCache;
67  QMenu *myWindows;
75 
76  protected:
77  void closeEvent(QCloseEvent* event);
78  void doResourceWindow(int assets, const QByteArray& position = QByteArray());
79  void fillFacesets();
80  template <typename F>
81  QAction *createAction(const QString &title, const QString &statusTip, F functor, bool waitMaps = false);
82  QAction *createAction(const QString &title, const QString &statusTip);
83 
84  private slots:
85  void onOpenExperience(const QByteArray& position = QByteArray());
86  void onSaveFormulae();
87  void onSaveQuests();
88  void onSaveMessages();
89  void onReportDuplicate();
90  void onReportSpellDamage();
91  void onReportAlchemy();
92  void onReportAlchemyGraph();
93  void onReportSpells();
94  void onReportPlayer();
95  void onReportSummon();
96  void onReportShops();
97  void onReportQuests();
98  void onReportMaterials();
99  void onReportArchetypes();
100  void onReportLicenses();
101  void onReportResetGroups();
102  void onToolEditMonsters();
103  void onToolSmooth();
104  void onToolCombatSimulator();
105  void onToolBarMaker();
106  void onToolFaceMaker();
107  void onToolFaceset(QAction* action);
109  void onToolReloadAssets();
110  void onToolSounds();
111  void onWindowsShowing();
112  void browsingMap(const QString& path);
113  void browsingFinished();
114  void onFiltersModified();
115  void onReportsModified();
116  void onClearCache();
117 
119 };
ScriptFileManager
Definition: ScriptFileManager.h:26
CREMainWindow::onSaveFormulae
void onSaveFormulae()
Definition: CREMainWindow.cpp:371
CREMainWindow::browsingMap
void browsingMap(const QString &path)
Definition: CREMainWindow.cpp:385
CREMainWindow::closeEvent
void closeEvent(QCloseEvent *event)
Definition: CREMainWindow.cpp:112
CREMainWindow::onReportAlchemyGraph
void onReportAlchemyGraph()
Definition: CREMainWindow.cpp:781
CREMainWindow::myClearMapCache
QAction * myClearMapCache
Definition: CREMainWindow.h:66
CREMainWindow::onFiltersModified
void onFiltersModified()
Definition: CREMainWindow.cpp:397
ResourcesManager
Definition: ResourcesManager.h:80
CREMainWindow::createMenus
void createMenus()
Definition: CREMainWindow.cpp:207
CREMainWindow::onSaveQuests
void onSaveQuests()
Definition: CREMainWindow.cpp:375
CREMainWindow::onReportMaterials
void onReportMaterials()
Definition: CREMainWindow.cpp:1558
CREMainWindow::myMapBrowseStatus
QLabel * myMapBrowseStatus
Definition: CREMainWindow.h:68
CREMainWindow::onReportLicenses
void onReportLicenses()
Definition: CREMainWindow.cpp:1648
CREMainWindow::onReportSpellDamage
void onReportSpellDamage()
Definition: CREMainWindow.cpp:591
CREMainWindow::myResourcesManager
ResourcesManager * myResourcesManager
Definition: CREMainWindow.h:71
CREMapInformation
Definition: CREMapInformation.h:27
CREMainWindow::onSaveMessages
void onSaveMessages()
Definition: CREMainWindow.cpp:380
CREMainWindow::onToolCombatSimulator
void onToolCombatSimulator()
Definition: CREMainWindow.cpp:1791
CREMainWindow::myModel
AssetModel * myModel
Definition: CREMainWindow.h:53
CREMainWindow::updateReports
void updateReports()
CREMainWindow::onReportResetGroups
void onReportResetGroups()
Definition: CREMainWindow.cpp:1726
disinfect.map
map
Definition: disinfect.py:4
CREMainWindow::onToolSounds
void onToolSounds()
Definition: CREMainWindow.cpp:1844
CREMainWindow::doResourceWindow
void doResourceWindow(int assets, const QByteArray &position=QByteArray())
Definition: CREMainWindow.cpp:312
CREMainWindow::onToolFaceset
void onToolFaceset(QAction *action)
Definition: CREMainWindow.cpp:1824
CREMainWindow::CREMainWindow
CREMainWindow(const QString &helpRoot)
Definition: CREMainWindow.cpp:50
AssetWrapper
Definition: AssetWrapper.h:25
CREMainWindow::onWindowsShowing
void onWindowsShowing()
Definition: CREMainWindow.cpp:1855
CREMainWindow::createAction
QAction * createAction(const QString &title, const QString &statusTip, F functor, bool waitMaps=false)
Definition: CREMainWindow.cpp:152
python_init.path
path
Definition: python_init.py:8
CREMainWindow::onToolFacesetUseFallback
void onToolFacesetUseFallback()
Definition: CREMainWindow.cpp:1829
convert.action
action
Definition: convert.py:25
CREMainWindow::browsingFinished
void browsingFinished()
Definition: CREMainWindow.cpp:390
CREMainWindow::fillFacesets
void fillFacesets()
Definition: CREMainWindow.cpp:347
AssetModel
Definition: AssetModel.h:29
title
Definition: readable.cpp:108
CREMainWindow::onToolReloadAssets
void onToolReloadAssets()
Definition: CREMainWindow.cpp:1834
CREMainWindow::createActions
void createActions()
Definition: CREMainWindow.cpp:189
MessageManager
Definition: MessageManager.h:25
CREMainWindow::myScriptManager
ScriptFileManager * myScriptManager
Definition: CREMainWindow.h:72
CREMainWindow::myAssets
AllAssets * myAssets
Definition: CREMainWindow.h:54
CREMainWindow::mySaveMenu
QMenu * mySaveMenu
Definition: CREMainWindow.h:60
CREMainWindow::myMapManager
CREMapInformationManager * myMapManager
Definition: CREMainWindow.h:69
ChangesDock
Definition: ChangesDock.h:24
CREMainWindow::myChanges
ChangesDock * myChanges
Definition: CREMainWindow.h:73
CREMainWindow::onToolEditMonsters
void onToolEditMonsters()
Definition: CREMainWindow.cpp:1779
CREMainWindow
Definition: CREMainWindow.h:40
CREMainWindow::onReportSpells
void onReportSpells()
Definition: CREMainWindow.cpp:902
CREMainWindow::onReportAlchemy
void onReportAlchemy()
Definition: CREMainWindow.cpp:736
CREMainWindow::myArea
QMdiArea * myArea
Definition: CREMainWindow.h:52
CREMainWindow::onReportDuplicate
void onReportDuplicate()
Definition: CREMainWindow.cpp:413
CREMainWindow::myFacesetsGroup
QActionGroup * myFacesetsGroup
Definition: CREMainWindow.h:64
CREMainWindow::mySaveFormulae
QAction * mySaveFormulae
Definition: CREMainWindow.h:62
CREMainWindow::onReportsModified
void onReportsModified()
Definition: CREMainWindow.cpp:402
CREMainWindow::myToolsMenu
QMenu * myToolsMenu
Definition: CREMainWindow.h:63
HelpManager
Definition: HelpManager.h:23
AllAssets
Definition: AllAssets.h:23
CREMainWindow::onReportSummon
void onReportSummon()
Definition: CREMainWindow.cpp:1279
CREMainWindow::onReportShops
void onReportShops()
Definition: CREMainWindow.cpp:1396
CREMainWindow::myHelpManager
HelpManager * myHelpManager
Definition: CREMainWindow.h:74
CREMainWindow::myMessageManager
MessageManager * myMessageManager
Definition: CREMainWindow.h:70
CREMainWindow::updateFilters
void updateFilters()
animate.event
event
DIALOGCHECK MINARGS 1 MAXARGS 2
Definition: animate.py:17
CREMainWindow::myOpenMenu
QMenu * myOpenMenu
Definition: CREMainWindow.h:59
CREMainWindow::myToolFacesetUseFallback
QAction * myToolFacesetUseFallback
Definition: CREMainWindow.h:65
CREMainWindow::onReportArchetypes
void onReportArchetypes()
Definition: CREMainWindow.cpp:1600
CREMainWindow::onReportPlayer
void onReportPlayer()
Definition: CREMainWindow.cpp:1152
CREMainWindow::mapAdded
void mapAdded(CREMapInformation *map)
Definition: CREMainWindow.cpp:1887
CREMainWindow::onToolBarMaker
void onToolBarMaker()
Definition: CREMainWindow.cpp:1797
CREMapInformationManager
Definition: CREMapInformationManager.h:27
CREResourcesWindow.h
CREMainWindow::onOpenExperience
void onOpenExperience(const QByteArray &position=QByteArray())
Definition: CREMainWindow.cpp:337
CREMainWindow::myWindows
QMenu * myWindows
Definition: CREMainWindow.h:67
CREMainWindow::onReportQuests
void onReportQuests()
Definition: CREMainWindow.cpp:1487
CREMainWindow::onClearCache
void onClearCache()
Definition: CREMainWindow.cpp:1809
CREMainWindow::onToolSmooth
void onToolSmooth()
Definition: CREMainWindow.cpp:1785
CREMainWindow::onToolFaceMaker
void onToolFaceMaker()
Definition: CREMainWindow.cpp:1803