Go to the documentation of this file.
28 addSpinBox(tr(
"Chance:"),
"chance", 0, 65535,
false);
38 myArchetypes->setHeaderLabel(tr(
"Allowed/forbidden archetypes"));
58 for (
int ing = 1; ; ing++)
78 if (!possible.contains(
arch->name))
79 possible.append(
arch->name);
85 if (possible.isEmpty())
94 myViaAlchemy->setText(tr(
"The following archetypes can be used via alchemy: %1").arg(possible.join(tr(
", "))));
108 QTreeWidgetItem*
item = NULL;
121 item = new QTreeWidgetItem(root, QStringList(name == NULL ?
"(all)" : name));
122 item->setCheckState(0, check ? Qt::Checked : Qt::Unchecked);
123 item->setFlags(item->flags() & ~Qt::ItemIsUserCheckable);
124 root->addTopLevelItem(item);
125 item->setExpanded(true);
146 if (
name[0] ==
'!') {
169 myFace->setVisible(
false);
171 if (!
current ||
current->data(0, Qt::UserRole).toString().isEmpty()) {
188 if (
obj->animation !=
nullptr) {
#define FREE_OBJ_NO_DESTROY_CALLBACK
recipelist * get_formulalist(int i)
void computeMadeViaAlchemy(const artifact *artifact) const
QTextEdit * addTextEdit(const QString &label, const char *property, bool readOnly=true)
#define QUERY_FLAG(xyz, p)
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
QLineEdit * addLineEdit(const QString &label, const char *property, bool readOnly=true)
StringBuffer * stringbuffer_new(void)
void give_artifact_abilities(object *op, const object *artifact)
std::vector< sstring > allowed
AssetsManager * getManager()
static QTreeWidgetItem * archetypeNode(const archetype *arch, QTreeWidgetItem *parent)
QLabel * addLabel(const QString &label, const char *property, bool wrapText=false)
QSpinBox * addSpinBox(const QString &label, const char *property, int min=0, int max=100, bool readOnly=true)
T * find(const Key &name)
std::string originOf(const archetype *arch) const
char * stringbuffer_finish(StringBuffer *sb)
ResourcesManager * myResources
void object_free(object *ob, int flags)
void each(std::function< void(T *)> op)
Archetypes * archetypes()
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
void artifactChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous)
archetype * find_archetype(const char *name)
static void addArchetypes(const artifact *artifact, const char *name, bool check, QTreeWidget *root)
T * addWidget(const QString &label, T *widget, bool sideBySide, const char *property, const char *widgetProperty)
void get_ob_diff(StringBuffer *sb, const object *op, const object *op2)
object * arch_to_object(archetype *at)
void object_give_identified_properties(object *op)
void setAnimation(const Animations *animation, int facings=-1)
archetype * empty_archetype
#define FREE_OBJ_FREE_INVENTORY
QTreeWidget * myArchetypes
AnimationControl * myAnimation
ArtifactPanel(QWidget *parent, ResourcesManager *resources)
virtual void updateItem() override
int legal_artifact_combination(const object *op, const artifact *art)