Widget to edit string option. More...
#include <stringoption.h>
Public Member Functions | |
| StringOption (const QString &_key=0, QWidget *parent=0, const QString &defValue=QString::null) | |
| virtual | ~StringOption () |
| virtual void | writeValue () |
| virtual void | readValue () |
| virtual QSize | sizeHint () const |
Protected Slots | |
| void | enableChange (const QString &newText) |
Protected Member Functions | |
| virtual void | resizeEvent (QResizeEvent *e) |
Protected Attributes | |
| QLineEdit * | ed |
Widget to edit string option.
Class for widget containing one editable setting of type string.
Also serves as a base class for editing some more specific types that can be represented in a string.
| gui::StringOption::StringOption | ( | const QString & | _key = 0, |
|
| QWidget * | parent = 0, |
|||
| const QString & | defValue = QString::null | |||
| ) |
Default constructor of StringOption item
| parent | parent Option Editor containing this control | |
| _key | Key in settings for this option | |
| defValue | Default value if option not found in configuration |
References ed, and enableChange().
| gui::StringOption::~StringOption | ( | ) | [virtual] |
default destructor
References ed.
| void gui::StringOption::enableChange | ( | const QString & | newText | ) | [protected, slot] |
Called when text changes
| newText | value of new text |
References gui::Option::changed.
Referenced by StringOption().
| void gui::StringOption::readValue | ( | ) | [virtual] |
read value from settings for editing (using key specified in contructor)
Implements gui::Option.
References gui::Option::changed, ed, gui::globalSettings, gui::Option::key, and gui::Settings::read().
| void gui::StringOption::resizeEvent | ( | QResizeEvent * | e | ) | [protected, virtual] |
Called on resizing of option editing control Will simply set the same fixed size to inner editbox
| e | resize event |
References ed.
| QSize gui::StringOption::sizeHint | ( | ) | const [virtual] |
| void gui::StringOption::writeValue | ( | ) | [virtual] |
write edited value to settings (using key specified in contructor)
Implements gui::Option.
References gui::Option::changed, ed, gui::globalSettings, gui::Option::key, and gui::Settings::write().
QLineEdit* gui::StringOption::ed [protected] |
one line edit control used for editing the value
Referenced by readValue(), gui::RealOption::RealOption(), resizeEvent(), sizeHint(), StringOption(), writeValue(), and ~StringOption().