13 #ifndef MAGICSMOKE_FLAGEDIT_H
14 #define MAGICSMOKE_FLAGEDIT_H
17 #include <QStringList>
22 class QStandardItemModel;
25 class QAbstractButton;
33 static QString
edit(QWidget*parent,QString flags,QString label=QString());
36 MFlagEditor(QWidget*parent,QString flags,QString label=QString());
45 QList<MOFlag>allflags;
47 QStandardItemModel*model;
60 MFlagWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
64 MFlagWidget(QStringList flags,QWidget* parent = 0, Qt::WindowFlags f = 0);
67 QString
flags()
const{
return m_flags;}
69 QString
text()
const{
return m_flags;}
93 QString m_flags,m_label;
95 QAbstractButton*m_btn;
QString originalFlags() const
returns the original string with which the editor was initialized
Definition: flagedit.cpp:137
Definition: flagedit.cpp:40
MFlagEditor(QWidget *parent, QString flags, QString label=QString())
creates an editor window
Definition: flagedit.cpp:78
enables the user to edit flags attached to an entity as defined by MagicSmoke
Definition: flagedit.h:28
static QString edit(QWidget *parent, QString flags, QString label=QString())
convenience function: opens a flag editor and returns the result or the original string if unchanged ...
Definition: flagedit.cpp:69
QString currentFlags() const
returns the flag string corresponding to the current state of the editor
Definition: flagedit.cpp:118