QCodeEdit  2.2
List of all members
QFormatConfig Class Reference

A minimalistic, easy to embed, format settings widget. More...

Inheritance diagram for QFormatConfig:
Inheritance graph
[legend]
 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. More...
 
void restore ()
 Restore default values for all subcontrols. More...
 
void setAutonomous (bool y)
 Turn on "autonomous" mode. More...
 
void addScheme (const QString &name, QFormatScheme *scheme)
 Add a format scheme to the config widget. More...
 
void removeScheme (QFormatScheme *scheme)
 Remove a scheme from the config widget. More...
 
void setCurrentScheme (QFormatScheme *scheme)
 Enforce the currently edited scheme. More...
 
virtual void hideEvent (QHideEvent *e)
 

Detailed Description

A minimalistic, easy to embed, format settings widget.

Member Function Documentation

◆ addScheme

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().

◆ cancel

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().

◆ isAutonomous()

bool QFormatConfig::isAutonomous ( ) const
Returns
Whether the format config widget is in "autonomous" mode

◆ removeScheme

void QFormatConfig::removeScheme ( QFormatScheme s)
slot

Remove a scheme from the config widget.

Note
No attempt is made to commit unsaved changes

◆ restore

void QFormatConfig::restore ( )
slot

Restore default values for all subcontrols.

Note
The widgets are changed but these changes are NOT applied.

◆ schemes()

QList< QFormatScheme * > QFormatConfig::schemes ( ) const
Returns
the list of format schemes this config widget "manages"

◆ setAutonomous

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.

◆ setCurrentScheme

void QFormatConfig::setCurrentScheme ( QFormatScheme s)
slot

Enforce the currently edited scheme.

Note
It is possible to pass a scheme not previously added to the widget, but it really isn't recommended.

References cancel().

Referenced by addScheme().


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