#include <question.h>
Inheritance diagram for Question:

Public Slots | |
| virtual bool | setValue (QVariant newValue) |
| Has the side-effect of emitting a valueChanged() signal. | |
Public Member Functions | |
| Question (QString name, QString label, QVariant defaultValue=QString(), QVariant::Type type=QVariant::String) | |
| A question is a thing you ask the user. | |
| Question () | |
| virtual Qt::ItemFlags | flags () const |
| virtual QString | toString () const |
| virtual QVariant | defaultValue () const |
| virtual QVariant | value () const |
| virtual QVariant::Type | type () const |
| |
| virtual QStringList | choices () const |
| For some Questions, there is a list of valid answers. | |
| QString | label () const |
| virtual | ~Question () |
Protected Member Functions | |
| void | setType (QVariant::Type type) |
| void | setLabel (QString label) |
Protected Attributes | |
| QString | m_Label |
| QVariant | m_Value |
| QVariant::Type | m_Type |
| QVariant | m_DefaultValue |
Friends | |
| class | FormFactory |
Still experimental.
Definition at line 16 of file question.h.
| Question::Question | ( | QString | name, | |
| QString | label, | |||
| QVariant | defaultValue = QString(), |
|||
| QVariant::Type | type = QVariant::String | |||
| ) |
A question is a thing you ask the user.
| name | - the property name | |
| label | - the prompt or label you want the user to see | |
| defaultValue | - the default value (if any) for this question | |
| type | - the type of the answer you want to get back |
Definition at line 9 of file question.cpp.
| QVariant::Type Question::type | ( | ) | const [virtual] |
If this is QVariant::StringList, it is used to hold a single String value, but the type is used to constrain the values to a list of strings. see choices()
Definition at line 34 of file question.cpp.
References m_Type.
Referenced by FormFactory::createEditor().
| QStringList Question::choices | ( | ) | const [virtual] |
For some Questions, there is a list of valid answers.
Reimplemented in ChoiceQuestion.
Definition at line 43 of file question.cpp.
Referenced by FormFactory::createEditor().
| bool Question::setValue | ( | QVariant | newValue | ) | [virtual, slot] |
Has the side-effect of emitting a valueChanged() signal.
Reimplemented in PropQuestion, and SettingsQuestion.
Definition at line 28 of file question.cpp.
References m_Value.
Referenced by FormModel::setProperty(), and FormModel::setValues().
1.5.1