Crossfire Server, Branches 1.12
R18729
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
CREMainWindow.cpp
Go to the documentation of this file.
1
#include <Qt>
2
#include <QtGui>
3
#include <
CREMainWindow.h
>
4
#include <
CREResourcesWindow.h
>
5
6
extern
"C"
{
7
#include "
global.h
"
8
}
9
10
CREMainWindow::CREMainWindow
()
11
{
12
myArea
=
new
QMdiArea();
13
setCentralWidget(
myArea
);
14
15
createActions
();
16
createMenus
();
17
18
statusBar()->showMessage(tr(
"Ready"
));
19
20
setWindowTitle(tr(
"Crossfire Resource Editor"
));
21
}
22
23
void
CREMainWindow::createActions
()
24
{
25
myOpenArtifacts
=
new
QAction(tr(
"Artifacts"
),
this
);
26
connect(
myOpenArtifacts
, SIGNAL(triggered()),
this
, SLOT(
onOpenArtifacts
()));
27
28
myOpenArchetypes
=
new
QAction(tr(
"Archetypes"
),
this
);
29
connect(
myOpenArchetypes
, SIGNAL(triggered()),
this
, SLOT(
onOpenArchetypes
()));
30
31
myOpenTreasures
=
new
QAction(tr(
"Treasures"
),
this
);
32
connect(
myOpenTreasures
, SIGNAL(triggered()),
this
, SLOT(
onOpenTreasures
()));
33
34
myOpenAnimations
=
new
QAction(tr(
"Animations"
),
this
);
35
connect(
myOpenAnimations
, SIGNAL(triggered()),
this
, SLOT(
onOpenAnimations
()));
36
37
myOpenFormulae
=
new
QAction(tr(
"Formulae"
),
this
);
38
connect(
myOpenFormulae
, SIGNAL(triggered()),
this
, SLOT(
onOpenFormulae
()));
39
40
myOpenResources
=
new
QAction(tr(
"Resources"
),
this
);
41
connect(
myOpenResources
, SIGNAL(triggered()),
this
, SLOT(
onOpenResources
()));
42
43
myOpenFaces
=
new
QAction(tr(
"Faces"
),
this
);
44
connect(
myOpenFaces
, SIGNAL(triggered()),
this
, SLOT(
onOpenFaces
()));
45
46
mySaveFormulae
=
new
QAction(tr(
"Formulae"
),
this
);
47
connect(
mySaveFormulae
, SIGNAL(triggered()),
this
, SLOT(
onSaveFormulae
()));
48
}
49
50
void
CREMainWindow::createMenus
()
51
{
52
myOpenMenu
= menuBar()->addMenu(tr(
"&Open"
));
53
myOpenMenu
->addAction(
myOpenResources
);
54
myOpenMenu
->addAction(
myOpenArtifacts
);
55
myOpenMenu
->addAction(
myOpenArchetypes
);
56
myOpenMenu
->addAction(
myOpenTreasures
);
57
myOpenMenu
->addAction(
myOpenAnimations
);
58
myOpenMenu
->addAction(
myOpenFormulae
);
59
myOpenMenu
->addAction(
myOpenFaces
);
60
61
mySaveMenu
= menuBar()->addMenu(tr(
"&Save"
));
62
mySaveMenu
->addAction(
mySaveFormulae
);
63
}
64
65
void
CREMainWindow::onOpenArtifacts
()
66
{
67
QWidget* artifacts =
new
CREResourcesWindow
(
DisplayArtifacts
);
68
myArea
->addSubWindow(artifacts);
69
artifacts->show();
70
}
71
72
void
CREMainWindow::onOpenArchetypes
()
73
{
74
QWidget* archetypes =
new
CREResourcesWindow
(
DisplayArchetypes
);
75
myArea
->addSubWindow(archetypes);
76
archetypes->show();
77
}
78
79
void
CREMainWindow::onOpenTreasures
()
80
{
81
QWidget* myTreasures =
new
CREResourcesWindow
(
DisplayTreasures
);
82
myArea
->addSubWindow(myTreasures);
83
myTreasures->show();
84
}
85
86
void
CREMainWindow::onOpenAnimations
()
87
{
88
QWidget* myAnimations =
new
CREResourcesWindow
(
DisplayAnimations
);
89
myArea
->addSubWindow(myAnimations);
90
myAnimations->show();
91
}
92
93
void
CREMainWindow::onOpenFormulae
()
94
{
95
QWidget* myFormulae =
new
CREResourcesWindow
(
DisplayFormulae
);
96
myArea
->addSubWindow(myFormulae);
97
myFormulae->show();
98
}
99
100
void
CREMainWindow::onOpenFaces
()
101
{
102
QWidget* myResources =
new
CREResourcesWindow
(
DisplayFaces
);
103
myArea
->addSubWindow(myResources);
104
myResources->show();
105
}
106
107
void
CREMainWindow::onOpenResources
()
108
{
109
QWidget* myResources =
new
CREResourcesWindow
();
110
myArea
->addSubWindow(myResources);
111
myResources->show();
112
}
113
114
void
CREMainWindow::onSaveFormulae
()
115
{
116
}
DisplayFaces
Definition:
CREResourcesWindow.h:7
CREMainWindow::onOpenArchetypes
void onOpenArchetypes()
Definition:
CREMainWindow.cpp:72
CREMainWindow::myArea
QMdiArea * myArea
Definition:
CREMainWindow.h:23
CREMainWindow::myOpenAnimations
QAction * myOpenAnimations
Definition:
CREMainWindow.h:34
CREMainWindow::onOpenFormulae
void onOpenFormulae()
Definition:
CREMainWindow.cpp:93
CREMainWindow::createMenus
void createMenus()
Definition:
CREMainWindow.cpp:50
CREMainWindow::myOpenMenu
QMenu * myOpenMenu
Definition:
CREMainWindow.h:28
CREResourcesWindow
Definition:
CREResourcesWindow.h:9
CREMainWindow.h
CREMainWindow::myOpenFormulae
QAction * myOpenFormulae
Definition:
CREMainWindow.h:35
DisplayFormulae
Definition:
CREResourcesWindow.h:7
CREMainWindow::onOpenTreasures
void onOpenTreasures()
Definition:
CREMainWindow.cpp:79
global.h
CREMainWindow::myOpenTreasures
QAction * myOpenTreasures
Definition:
CREMainWindow.h:33
DisplayArchetypes
Definition:
CREResourcesWindow.h:7
CREMainWindow::onOpenArtifacts
void onOpenArtifacts()
Definition:
CREMainWindow.cpp:65
DisplayTreasures
Definition:
CREResourcesWindow.h:7
CREMainWindow::onOpenAnimations
void onOpenAnimations()
Definition:
CREMainWindow.cpp:86
CREMainWindow::myOpenArtifacts
QAction * myOpenArtifacts
Definition:
CREMainWindow.h:31
CREResourcesWindow.h
DisplayAnimations
Definition:
CREResourcesWindow.h:7
CREMainWindow::myOpenResources
QAction * myOpenResources
Definition:
CREMainWindow.h:37
CREMainWindow::myOpenArchetypes
QAction * myOpenArchetypes
Definition:
CREMainWindow.h:32
CREMainWindow::mySaveMenu
QMenu * mySaveMenu
Definition:
CREMainWindow.h:29
CREMainWindow::CREMainWindow
CREMainWindow()
Definition:
CREMainWindow.cpp:10
CREMainWindow::onSaveFormulae
void onSaveFormulae()
Definition:
CREMainWindow.cpp:114
DisplayArtifacts
Definition:
CREResourcesWindow.h:7
CREMainWindow::onOpenFaces
void onOpenFaces()
Definition:
CREMainWindow.cpp:100
CREMainWindow::myOpenFaces
QAction * myOpenFaces
Definition:
CREMainWindow.h:36
CREMainWindow::onOpenResources
void onOpenResources()
Definition:
CREMainWindow.cpp:107
CREMainWindow::mySaveFormulae
QAction * mySaveFormulae
Definition:
CREMainWindow.h:38
CREMainWindow::createActions
void createActions()
Definition:
CREMainWindow.cpp:23
crossfire-code
server
branches
1.12
utils
cre
CREMainWindow.cpp
Generated on Sun Nov 18 2018 02:40:30 for Crossfire Server, Branches 1.12 by
1.8.6