Crossfire Server, Trunk
CRETreasurePanel Class Reference

#include <TreasureListPanel.h>

+ Inheritance diagram for CRETreasurePanel:
+ Collaboration diagram for CRETreasurePanel:

Public Slots

void onGenerate (bool pressed)
 

Public Member Functions

 CRETreasurePanel (QWidget *parent)
 
virtual void setItem (AssetWrapper *asset) override
 
- Public Member Functions inherited from AssetWrapperPanel
ArchetypeComboBoxaddArchetype (const QString &label, const char *property, bool readOnly=false, bool allowNone=true)
 
void addBottomFiller ()
 
QCheckBox * addCheckBox (const QString &label, const char *property, bool readOnly=true)
 
void addFaceChoice (const QString &label, const char *property, bool readOnly=true, bool allowNone=true)
 
QLabel * addLabel (const QString &label, const char *property)
 
QLineEdit * addLineEdit (const QString &label, const char *property, bool readOnly=true)
 
QSpinBox * addSpinBox (const QString &label, const char *property, int min=0, int max=100, bool readOnly=true)
 
QTextEdit * addTextEdit (const QString &label, const char *property, bool readOnly=true)
 
TreasureListComboBoxaddTreasureList (const QString &label, const char *property, bool readOnly=true, bool allowNone=true)
 
 AssetWrapperPanel (QWidget *parent)
 
- Public Member Functions inherited from CRETPanel< AssetWrapper >
 CRETPanel (QWidget *parent)
 
- Public Member Functions inherited from CREPanel
virtual void commitData ()
 
 CREPanel (QWidget *parent)
 
virtual ~CREPanel ()
 

Protected Attributes

QSpinBox * myDifficulty
 
QTreeWidget * myGenerated
 
TreasureListWrappermyTreasure
 
QTreeWidget * myUsing
 
- Protected Attributes inherited from AssetWrapperPanel
AssetWrappermyAsset
 
QMetaObject::Connection myChanged
 
QMetaObject::Connection myDelete
 
bool myInhibit
 
QGridLayout * myLayout
 
QList< PropertyLinkmyLinks
 

Additional Inherited Members

- Protected Slots inherited from AssetWrapperPanel
void dataChanged ()
 
void itemChanged ()
 
- Protected Member Functions inherited from AssetWrapperPanel
template<class T >
T * addWidget (const QString &label, T *widget, bool sideBySide, const char *property, const char *widgetProperty)
 

Detailed Description

Definition at line 10 of file TreasureListPanel.h.

Constructor & Destructor Documentation

◆ CRETreasurePanel()

CRETreasurePanel::CRETreasurePanel ( QWidget *  parent)

Definition at line 16 of file TreasureListPanel.cpp.

References AssetWrapperPanel::addCheckBox(), myDifficulty, myGenerated, AssetWrapperPanel::myLayout, myUsing, and onGenerate().

+ Here is the call graph for this function:

Member Function Documentation

◆ onGenerate

void CRETreasurePanel::onGenerate ( bool  pressed)
slot

Definition at line 78 of file TreasureListPanel.cpp.

References create_treasure(), identify(), obj::inv, say::item, myDifficulty, myGenerated, myTreasure, object_free(), object_new(), object_remove(), CREUtils::objectNode(), and AssetTWrapper< T >::wrappedItem().

Referenced by CRETreasurePanel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setItem()

void CRETreasurePanel::setItem ( AssetWrapper asset)
overridevirtual

Field Documentation

◆ myDifficulty

QSpinBox* CRETreasurePanel::myDifficulty
protected

Definition at line 25 of file TreasureListPanel.h.

Referenced by CRETreasurePanel(), and onGenerate().

◆ myGenerated

QTreeWidget* CRETreasurePanel::myGenerated
protected

Definition at line 24 of file TreasureListPanel.h.

Referenced by CRETreasurePanel(), and onGenerate().

◆ myTreasure

TreasureListWrapper* CRETreasurePanel::myTreasure
protected

Definition at line 22 of file TreasureListPanel.h.

Referenced by onGenerate(), and setItem().

◆ myUsing

QTreeWidget* CRETreasurePanel::myUsing
protected

Definition at line 23 of file TreasureListPanel.h.

Referenced by CRETreasurePanel(), and setItem().


The documentation for this class was generated from the following files: