Crossfire Server, Trunk
CREQuestPanel.cpp
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 "CREQuestPanel.h"
14 #include "HelpManager.h"
15 #include "CREPrePostList.h"
16 
18  addSpinBox(tr("Step:"), "step", 0, 60000, false);
19  addLineEdit(tr("Description:"), "description", false);
20  addCheckBox(tr("End of quest:"), "isEnd", false);
21  auto w = addWidget(tr("Conditions"), new PrePostWidget(this, PrePostWidget::SetWhen, messages), false, "conditions", "data");
22  connect(w, SIGNAL(dataModified()), this, SLOT(dataChanged()));
24 }
25 
26 CREQuestPanel::CREQuestPanel(AssetModel *model, QWidget* parent) : AssetWrapperPanel(parent)
27 {
28  addTab(tr("Details"));
29  addLineEdit(tr("Code:"), "code");
30  addLineEdit(tr("Title:"), "title", false);
31  addFaceChoice(tr("Face:"), "face", false);
32  addQuestChoice(tr("Parent:"), "questParent", false);
33  addCheckBox(tr("Can be done multiple times"), "canRestart", false);
34  addCheckBox(tr("System quest:"), "isSystem", false);
35  addTextEdit(tr("Description:"), "description", false);
36  addTextEdit(tr("Comment:"), "comment", false);
38 
39  addTab(tr("Use"));
40  addAssetUseTree(QString(), model, "self");
41 
42  HelpManager::setHelpId(this, "quests");
43 }
AssetWrapperPanel
Definition: AssetWrapperPanel.h:29
CREPrePostList.h
AssetWrapperPanel::addTextEdit
QTextEdit * addTextEdit(const QString &label, const char *property, bool readOnly=true)
Definition: AssetWrapperPanel.cpp:84
AssetWrapperPanel::addTab
void addTab(const QString &title)
Definition: AssetWrapperPanel.cpp:36
AssetWrapperPanel::addLineEdit
QLineEdit * addLineEdit(const QString &label, const char *property, bool readOnly=true)
Definition: AssetWrapperPanel.cpp:74
QuestStepPanel::QuestStepPanel
QuestStepPanel(MessageManager *messages, QWidget *parent)
Definition: CREQuestPanel.cpp:17
AssetWrapperPanel::addAssetUseTree
AssetUseTree * addAssetUseTree(const QString &label, AssetModel *assets, const char *property)
Definition: AssetWrapperPanel.cpp:150
AssetWrapperPanel::addQuestChoice
void addQuestChoice(const QString &label, const char *property, bool readOnly=true, bool allowNone=true)
Definition: AssetWrapperPanel.cpp:113
PrePostWidget::SetWhen
@ SetWhen
Definition: CREPrePostList.h:27
AssetWrapperPanel::addSpinBox
QSpinBox * addSpinBox(const QString &label, const char *property, int min=0, int max=100, bool readOnly=true)
Definition: AssetWrapperPanel.cpp:118
PrePostWidget
Definition: CREPrePostList.h:21
AssetWrapperPanel::dataChanged
void dataChanged()
Definition: AssetWrapperPanel.cpp:160
HelpManager.h
AssetWrapperPanel::addBottomFiller
void addBottomFiller()
Definition: AssetWrapperPanel.cpp:154
AssetModel
Definition: AssetModel.h:29
CREQuestPanel.h
MessageManager
Definition: MessageManager.h:25
HelpManager::setHelpId
static void setHelpId(QWidget *widget, const QString &id)
Definition: HelpManager.cpp:58
navar-midane_apply.messages
list messages
Definition: navar-midane_apply.py:8
AssetWrapperPanel::addWidget
T * addWidget(const QString &label, T *widget, bool sideBySide, const char *property, const char *widgetProperty)
Definition: AssetWrapperPanel.h:64
CREQuestPanel::CREQuestPanel
CREQuestPanel(AssetModel *model, QWidget *parent)
Definition: CREQuestPanel.cpp:26
connect
Definition: connect.py:1
AssetWrapperPanel::addCheckBox
QCheckBox * addCheckBox(const QString &label, const char *property, bool readOnly=true)
Definition: AssetWrapperPanel.cpp:94
AssetWrapperPanel::addFaceChoice
void addFaceChoice(const QString &label, const char *property, bool readOnly=true, bool allowNone=true)
Definition: AssetWrapperPanel.cpp:104