Crossfire Server, Trunk
CREPrePostList.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 CREPREPOSTLIST_H
14
#define CREPREPOSTLIST_H
15
16
#include <QDialog>
17
18
class
QListWidget;
19
class
MessageManager
;
20
21
class
PrePostWidget
:
public
QWidget {
22
Q_OBJECT
23
24
Q_PROPERTY(QList<QStringList>
data
READ
data
WRITE
setData
)
25
26
public
:
27
enum
Mode
{
PreConditions
,
PostConditions
,
SetWhen
};
28
29
PrePostWidget
(QWidget* parent,
Mode
mode,
const
MessageManager
*
manager
);
30
31
QList<QStringList>
data
()
const
;
32
void
setData
(
const
QList<QStringList>&
data
);
33
34
signals:
35
void
dataModified
();
36
37
private
slots:
38
void
onAddCondition
(
bool
);
39
void
onDeleteCondition
(
bool
);
40
void
onReset
(
bool
);
41
42
private
:
43
void
addItem
(
const
QStringList&
item
);
44
QListWidget*
myList
;
45
QList<QStringList>
myOriginal
;
46
Mode
myMode
;
47
};
48
53
class
CREPrePostList
:
public
QDialog
54
{
55
Q_OBJECT
56
57
public
:
58
CREPrePostList
(QWidget* parent,
PrePostWidget::Mode
mode,
const
MessageManager
*
manager
);
59
60
QList<QStringList>
data
()
const
{
return
myWidget
->
data
(); }
61
void
setData
(
const
QList<QStringList>&
data
) {
myWidget
->
setData
(
data
); }
62
63
private
:
64
PrePostWidget
*
myWidget
;
65
};
66
67
#endif
/* CREPREPOSTLIST_H */
68
CREPrePostList::data
QList< QStringList > data() const
Definition:
CREPrePostList.h:60
PrePostWidget::onDeleteCondition
void onDeleteCondition(bool)
Definition:
CREPrePostList.cpp:91
PrePostWidget::myList
QListWidget * myList
Definition:
CREPrePostList.h:44
PrePostWidget::PostConditions
@ PostConditions
Definition:
CREPrePostList.h:27
CREPrePostList
Definition:
CREPrePostList.h:53
PrePostWidget::onReset
void onReset(bool)
Definition:
CREPrePostList.cpp:100
CREPrePostList::myWidget
PrePostWidget * myWidget
Definition:
CREPrePostList.h:64
PrePostWidget::dataModified
void dataModified()
PrePostWidget::SetWhen
@ SetWhen
Definition:
CREPrePostList.h:27
PrePostWidget::PreConditions
@ PreConditions
Definition:
CREPrePostList.h:27
PrePostWidget
Definition:
CREPrePostList.h:21
CREPrePostList::CREPrePostList
CREPrePostList(QWidget *parent, PrePostWidget::Mode mode, const MessageManager *manager)
Definition:
CREPrePostList.cpp:108
PrePostWidget::myOriginal
QList< QStringList > myOriginal
Definition:
CREPrePostList.h:45
CREPrePostList::setData
void setData(const QList< QStringList > &data)
Definition:
CREPrePostList.h:61
PrePostWidget::PrePostWidget
PrePostWidget(QWidget *parent, Mode mode, const MessageManager *manager)
Definition:
CREPrePostList.cpp:17
MessageManager
Definition:
MessageManager.h:25
PrePostWidget::onAddCondition
void onAddCondition(bool)
Definition:
CREPrePostList.cpp:81
item
Definition:
item.py:1
PrePostWidget::Mode
Mode
Definition:
CREPrePostList.h:27
PrePostWidget::setData
void setData(const QList< QStringList > &data)
Definition:
CREPrePostList.cpp:69
PrePostWidget::data
QList< QStringList > data
Definition:
CREPrePostList.h:24
PrePostWidget::myMode
Mode myMode
Definition:
CREPrePostList.h:46
manager
static AssetsManager * manager
Definition:
assets.cpp:60
PrePostWidget::addItem
void addItem(const QStringList &item)
Definition:
CREPrePostList.cpp:57
crossfire-crossfire-server
utils
cre
CREPrePostList.h
Generated by
1.8.17