Go to the documentation of this file.
39 QList<QStringList> ret;
44 Q_ASSERT(ret.back().size() == 2);
105 if (steps.size() < 2) {
114 for (
auto single : dropped) {
115 if (single.first !=
code()) {
119 if (single.second < 0 || single.second >=
static_cast<int>(steps.size()) || single.second == row) {
124 auto step = steps[single.second];
125 steps.erase(steps.begin() + single.second);
127 if (row > single.second) {
132 steps.insert(steps.begin() + row, step);
141 connect(menu->addAction(tr(
"Add step")), &QAction::triggered, [
this] () {
addStep(); });
146 [] (
const auto &left,
const auto &right) { return left->step < right->step; });
quest_step_definition * myWrappedItem
quest_step_definition * quest_create_step(void)
virtual int childrenCount() const override
void quest_write_condition(char *buf, size_t len, const quest_condition *cond)
QList< QPair< QString, int > > extractQuestSteps(const QMimeData *data)
void questModified(quest_definition *quest)
ArchetypeWrapper * wrap(archetype *arch, AssetWrapper *parent)
static const char * QuestStep
virtual void removeChild(AssetWrapper *)
virtual void drop(const QMimeData *, int) override
virtual bool canDrop(const QMimeData *, int) const override
void addQuestStep(QMimeData *data, QString code, int index)
virtual void removeChild(AssetWrapper *child) override
virtual AssetWrapper * child(int) override
virtual void wasModified(AssetWrapper *asset, ChangeType type, int extra) override
virtual void fillMenu(QMenu *)
ResourcesManager * myResources
void quest_destroy_condition(quest_condition *condition)
virtual int childIndex(AssetWrapper *)
virtual bool canDrop(const QMimeData *, int) const override
virtual void drop(const QMimeData *, int)
virtual void fillMenu(QMenu *menu) override
virtual void fillMenu(QMenu *menu) override
QList< QStringList > conditions
virtual void wasModified(AssetWrapper *asset, ChangeType type, int extra)
void setConditions(const QList< QStringList > &conditions)
virtual PossibleUse uses(const AssetWrapper *asset, std::string &) const override
virtual void drop(const QMimeData *, int) override
void markModified(ChangeType change, int extra=0)
std::vector< quest_condition * > conditions
void quest_destroy_step(quest_step_definition *step)
static std::vector< std::string > split(const std::string &field, const std::string &by)
virtual int childIndex(AssetWrapper *) override
int quest_condition_from_string(quest_condition *condition, const char *buffer)
quest_condition * quest_create_condition(void)
virtual void drag(QMimeData *) const override
std::vector< quest_step_definition * > steps