|
QCodeEdit 2.2
|
A storage/configuration class for shared highlighting formats. More...

Protected Attributes | |
| QString | m_settings |
| QVector< QString > | m_formatKeys |
| QVector< QFormat > | m_formatValues |
| QFormatScheme (QObject *p=0) | |
| Constructor. | |
| QFormatScheme (const QString &f, QObject *p=0) | |
| Constructor. | |
| virtual | ~QFormatScheme () |
| Destructor. | |
| void | clear () |
| Re-initialize the format scheme. | |
| virtual void | load (const QString &filename) |
| Load format settings from a file. | |
| virtual void | save (const QString &filename=QString()) const |
| Save the format settings to a file. | |
| virtual void | load (const QDomElement &doc, bool ignoreNewIds=false) |
| virtual void | save (QDomElement &elem) const |
| virtual void | load (QSettings &s, bool ignoreNewIds=false) |
| Load format data from a QSettings object. | |
| virtual void | save (QSettings &s) const |
| int | formatCount () const |
| QStringList | formats () const |
| virtual QString | id (int ifid) const |
| virtual int | id (const QString &sfid) const |
| virtual QFormat & | formatRef (int ifid) |
| virtual QFormat & | formatRef (const QString &sfid) |
| virtual QFormat | format (int ifid) const |
| virtual QFormat | format (const QString &sfid) const |
| virtual void | setFormat (const QString &fid, const QFormat &fmt) |
| Set text format for key. | |
A storage/configuration class for shared highlighting formats.
It stores text formats used by highlighters interfaces and provides a default serializing format in QXF format (XML-based).
| QFormatScheme::QFormatScheme | ( | const QString & | f, |
| QObject * | p = 0 |
||
| ) |
| void QFormatScheme::clear | ( | ) |
Re-initialize the format scheme.
Calling this method leaves the format scheme with only one format : the "normal" one, set to a default-constructed QFormat
References setFormat().
Referenced by load().
| QFormat QFormatScheme::format | ( | int | ifid | ) | const [virtual] |
Referenced by format().
| QFormat QFormatScheme::format | ( | const QString & | sfid | ) | const [virtual] |
References format().
| int QFormatScheme::formatCount | ( | ) | const |
Referenced by QFormatConfig::apply(), and QFormatConfig::cancel().
| QFormat & QFormatScheme::formatRef | ( | const QString & | sfid | ) | [virtual] |
References id().
| QFormat & QFormatScheme::formatRef | ( | int | ifid | ) | [virtual] |
Referenced by QFormatConfig::apply(), and QFormatConfig::cancel().
| QStringList QFormatScheme::formats | ( | ) | const |
| int QFormatScheme::id | ( | const QString & | sfid | ) | const [virtual] |
| QString QFormatScheme::id | ( | int | ifid | ) | const [virtual] |
Referenced by QFormatConfig::apply(), QFormatConfig::cancel(), formatRef(), QNFADefinition::match(), QDocumentSearch::next(), and QDocumentSearch::setOption().
| void QFormatScheme::load | ( | const QString & | f | ) | [virtual] |
Load format settings from a file.
| f | file to load data from |
The default implementation loads data in QXF format (XML-based)
References clear().
Referenced by QFormatScheme().
| void QFormatScheme::load | ( | const QDomElement & | elem, |
| bool | ignoreNewIds = false |
||
| ) | [virtual] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| elem | Source element to scan |
| ignoreNewIds | whether unknown format identifiers should be ignored |
The given dom element must contain a proper version attribute and format data as child elements (<format> tags)
References setFormat().
| void QFormatScheme::load | ( | QSettings & | s, |
| bool | ignoreNewIds = false |
||
| ) | [virtual] |
Load format data from a QSettings object.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| s | QSettings object from which data will be fetched |
| ignoreNewIds | whether unknown format identifiers should be ignored |
The QSettings object is assumed to be initialized properly and to point to a correct location.
References setFormat().
| void QFormatScheme::save | ( | QDomElement & | elem | ) | const [virtual] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void QFormatScheme::save | ( | QSettings & | s | ) | const [virtual] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void QFormatScheme::save | ( | const QString & | f = QString() | ) | const [virtual] |
Save the format settings to a file.
| f | target file (if none specified, last value passed to load is used) |
The default implementation saves data in QXF format (XML-based)
Referenced by QFormatConfig::apply().
| void QFormatScheme::setFormat | ( | const QString & | fid, |
| const QFormat & | fmt | ||
| ) | [virtual, slot] |
Set text format for key.
| fid | Format key |
| fmt | Format value |
Referenced by clear(), load(), and QFormatScheme().
1.7.4