QCodeEdit 2.2
|
A minimalistic, easy to embed, format settings widget. More...
QFormatConfig (QWidget *w=0) | |
bool | isAutonomous () const |
bool | hasUnsavedChanges () const |
Check whether there are unsaved in the widget. | |
QList< QFormatScheme * > | schemes () const |
void | retranslate () |
run-time translation entry point | |
void | apply () |
Apply changes made to the currently edited scheme, if any. | |
void | cancel () |
Reset the subcontrols to reflect the data of the format scheme being edited. | |
void | restore () |
Restore default values for all subcontrols. | |
void | setAutonomous (bool y) |
Turn on "autonomous" mode. | |
void | addScheme (const QString &name, QFormatScheme *scheme) |
Add a format scheme to the config widget. | |
void | removeScheme (QFormatScheme *scheme) |
Remove a scheme from the config widget. | |
void | setCurrentScheme (QFormatScheme *scheme) |
Enforce the currently edited scheme. | |
virtual void | hideEvent (QHideEvent *e) |
A minimalistic, easy to embed, format settings widget.
void QFormatConfig::addScheme | ( | const QString & | name, |
QFormatScheme * | scheme | ||
) | [slot] |
Add a format scheme to the config widget.
Users will be able to edit that scheme (switching among schemes using a combobox if several schemes are added to the widget)
References setCurrentScheme().
void QFormatConfig::cancel | ( | ) | [slot] |
Reset the subcontrols to reflect the data of the format scheme being edited.
The name can be a bit misleading at first, it has been chosen because it directly maps to the effect a "cancel" button would have on the widget
References QFormatScheme::formatCount(), QFormatScheme::formatRef(), and QFormatScheme::id().
Referenced by setCurrentScheme().
bool QFormatConfig::isAutonomous | ( | ) | const |
void QFormatConfig::removeScheme | ( | QFormatScheme * | s | ) | [slot] |
Remove a scheme from the config widget.
void QFormatConfig::restore | ( | ) | [slot] |
Restore default values for all subcontrols.
QList< QFormatScheme * > QFormatConfig::schemes | ( | ) | const |
void QFormatConfig::setAutonomous | ( | bool | y | ) | [slot] |
Turn on "autonomous" mode.
When the format config widget is autonomous it will automatically check for changes upon hide event and ask the user whether he wishes to commit them.
void QFormatConfig::setCurrentScheme | ( | QFormatScheme * | s | ) | [slot] |
Enforce the currently edited scheme.
References cancel().
Referenced by addScheme().