Go to the documentation of this file.
20 QGridLayout*
layout =
new QGridLayout(
this);
22 QLabel* label =
new QLabel(
this);
23 label->setText(
"Name:");
24 layout->addWidget(label, 1, 1);
25 myName =
new QLineEdit(
this);
29 label =
new QLabel(
this);
30 label->setText(
"Chance:");
31 layout->addWidget(label, 2, 1);
36 label =
new QLabel(
this);
37 label->setText(
"Type:");
38 layout->addWidget(label, 3, 1);
39 myType =
new QLineEdit(
this);
47 layout->addWidget(
new QLabel(tr(
"Values:"),
this), 5, 1, 1, 2);
54 myArchetypes->setHeaderLabel(
"Allowed/forbidden archetypes");
59 layout->addWidget(
new QLabel(tr(
"Result:"),
this), 7, 2);
77 for (
int ing = 1; ; ing++)
97 if (!possible.contains(
arch->name))
98 possible.append(
arch->name);
104 if (possible.isEmpty())
105 myViaAlchemy->setText(tr(
"Can't be made via alchemy."));
113 myViaAlchemy->setText(tr(
"The following archetypes can be used via alchemy: %1").arg(possible.join(tr(
", "))));
127 QTreeWidgetItem*
item = NULL;
141 item = new QTreeWidgetItem(root, QStringList(name == NULL ?
"(all)" : name));
142 item->setCheckState(0, check ? Qt::Checked : Qt::Unchecked);
143 root->addTopLevelItem(item);
144 item->setExpanded(true);
171 name = allowed->name;
199 myFace->setVisible(
false);
201 if (!
current ||
current->data(0, Qt::UserRole).toString().isEmpty())
EXTERN archetype * empty_archetype
struct artifactstruct artifact
#define FREE_OBJ_NO_DESTROY_CALLBACK
recipelist * get_formulalist(int i)
void object_free(object *ob, int flags)
StringBuffer * stringbuffer_new(void)
void give_artifact_abilities(object *op, const object *artifact)
#define QUERY_FLAG(xyz, p)
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
void setAnimation(const Animations *animation, int facings=-1)
static QTreeWidgetItem * archetypeNode(QTreeWidgetItem *parent)
void get_ob_diff(StringBuffer *sb, const object *op, const object *op2)
void artifactChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous)
const artifact * myArtifact
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
AssetsManager * getManager()
CREAnimationControl * myAnimation
static void addArchetypes(const artifact *artifact, const char *name, bool check, QTreeWidget *root)
void computeMadeViaAlchemy(const artifact *artifact) const
char * stringbuffer_finish(StringBuffer *sb)
struct linked_char * next
CREAnimationWidget * myFace
void object_give_identified_properties(object *op)
QTreeWidget * myArchetypes
void each(std::function< void(T *)> op)
const Animations * animation
Archetypes * archetypes()
virtual void setItem(const artifact *artifact) override
archetype * find_archetype(const char *name)
struct recipestruct * next
object * arch_to_object(archetype *at)
CREArtifactPanel(QWidget *parent)
archetype * try_find_archetype(const char *name)
#define FREE_OBJ_FREE_INVENTORY
int legal_artifact_combination(const object *op, const artifact *art)
struct recipestruct recipe