#include <QTidyConfig.h>
Public Member Functions | |
| QTidyConfig (const QString &tidyrc=0, QObject *parent=0) | |
| bool | qtidyLoadConfig (const QString &tidyrc) |
| Load Tidy Configuration with absoluteFilePath. | |
| bool | qtidyLoadConfig (const QByteArray &tidyrc) |
| Load Tidy Configuration with absoluteFilePath. | |
| TidyOptionId | qtidyOptGetIdForName (const QString &key) |
| find TidyOptionId by given tidyrc configuration param | |
| const QMap< QString, QVariant > | qtidyGetOptionList () |
| read complete tidyrc into QMap | |
| TidyOption | qtidyGetNextOption (QTidyIterator *it) |
| read next option | |
| TidyOption | qtidyGetOption (TidyOptionId optId) |
| get option from TidyOptionId | |
| TidyOption | qtidyGetOptionByName (const QString &key) |
| find TidyOption by given tidyrc configuration param | |
| TidyOptionId | qtidyOptGetId (TidyOption opt) |
| get TidyOptionId by TidyOption | |
| const QString | qtidyOptGetName (TidyOption opt) |
| find param from given tidyrc | |
| const QVariant | qtidyOptGetType (TidyOption opt) |
| Search for string, uint or bool. | |
| bool | qtidyOptIsReadOnly (TidyOption opt) |
| if current option only isReadable() | |
| const QVariant | qtidyOptGetDefault (TidyOption opt) |
| get default value of given TidyOption as a QVariant | |
| const QVariant | qtidyOptGetValue (TidyOption opt) |
| read value from given TidyOption | |
| const QVariant | qtidyGetValue (const QString &key) |
| read value from given key | |
| bool | qtidySetValue (const QString &key, const QVariant &val) |
| write value to given tidyrc | |
| bool | qtidySetValue (TidyOptionId optId, const QVariant &val) |
| write value to given tidyrc | |
| bool | qtidyResetToDefault (const QString &key) |
| reset given param to default value | |
| bool | qtidyResetAllToDefault () |
| reset all values | |
| bool | qtidySnapshot () |
| Take a snapshot of current config settings. | |
| bool | qtidyDiffThanDefault () |
| Any settings different than default? | |
| bool | qtidyDiffThanSnapshot () |
| Any settings different than snapshot? | |
| bool | qtidyCopyConfig (TidyDoc copyTo) |
| Copy current configuration settings from one document to another. | |
| const QString | qtidyGetEncName (const QString &key) |
| Get character encoding name. Used with TidyCharEncoding, TidyOutCharEncoding, TidyInCharEncoding. | |
| const QStringList | qtidyGetPickList (const QString &key) |
| get "pick list" by param | |
| const QString | qtidyGetCurrPickFromList (const QString &key) |
| current value for ordered key. | |
| const QList< QString > | qtidyGetOptionKeys () |
| create complete key list from given tidyrc | |
| const QStringList | qtidyDeclaredTags (const QString &key) |
| get user declared tag list | |
| const QString | qtidyGetDescription (const QString &key) |
| get description for given key | |
| const QStringList | qtidyDescriptionList () |
| complete param Description list | |
| ~QTidyConfig () | |
Static Public Member Functions | |
| static const QVariant | qtidyGetValue (TidyDoc doc, TidyOptionId optId) |
| read value from given key | |
| static bool | qtidySetValue (TidyDoc doc, TidyOptionId optId, const QVariant &val) |
| write value to given tidyrc with TidyOptionId | |
Protected Member Functions | |
| QTidyIterator | qtidyOptGetPickList (TidyOption opt) |
| Iterate over Option "pick list". | |
| const QString | qtidyOptGetNextPick (TidyOption opt, QTidyIterator *it) |
| get next QString value of Option "pick list" | |
| QTidyIterator | qtidyGetDeclTagList () |
| Iterate over user declared tags. | |
| const QString | qtidyGetNextDeclTag (TidyOption opt, QTidyIterator *it) |
| Get next declared tag of specified type: TidyInlineTags, TidyBlockTags, TidyEmptyTags, TidyPreTags. | |
| TidyConfigCategory | qtidyOptGetCategory (TidyOption opt) |
| get category of given TidyOption | |
QTidy::QTidyConfig rc( "~/.tidyrc" ); qDebug() << "READ:" << rc.qtidyGetValue ( "tab-size" ); qDebug() << "WRITE:" << rc.qtidySetValue ( "tab-size", 2 ); qDebug() << "RESET:" << rc.qtidyResetToDefault ( "tab-size" ); qDebug() << "READ:" << rc.qtidyGetValue ( "tab-size" );
| QTidy::QTidyConfig::QTidyConfig | ( | const QString & | tidyrc = 0, |
|
| QObject * | parent = 0 | |||
| ) | [explicit] |
| tidyrc | optional configuration file path e.g ~/.tidyrc | |
| parent | Parent Object |
| QTidy::QTidyConfig::~QTidyConfig | ( | ) |
| bool QTidy::QTidyConfig::qtidyLoadConfig | ( | const QString & | tidyrc | ) |
Load Tidy Configuration with absoluteFilePath.
| bool QTidy::QTidyConfig::qtidyLoadConfig | ( | const QByteArray & | tidyrc | ) |
Load Tidy Configuration with absoluteFilePath.
| TidyOptionId QTidy::QTidyConfig::qtidyOptGetIdForName | ( | const QString & | key | ) |
find TidyOptionId by given tidyrc configuration param
| key | valid configuration param |
| const QMap<QString,QVariant> QTidy::QTidyConfig::qtidyGetOptionList | ( | ) |
read complete tidyrc into QMap
| TidyOption QTidy::QTidyConfig::qtidyGetNextOption | ( | QTidyIterator * | it | ) |
read next option
| TidyOption QTidy::QTidyConfig::qtidyGetOption | ( | TidyOptionId | optId | ) |
get option from TidyOptionId
| TidyOption QTidy::QTidyConfig::qtidyGetOptionByName | ( | const QString & | key | ) |
find TidyOption by given tidyrc configuration param
| key | valid configuration param |
| TidyOptionId QTidy::QTidyConfig::qtidyOptGetId | ( | TidyOption | opt | ) |
get TidyOptionId by TidyOption
| opt | reference to current TidyOption |
| const QString QTidy::QTidyConfig::qtidyOptGetName | ( | TidyOption | opt | ) |
find param from given tidyrc
| opt | reference to current TidyOption |
| const QVariant QTidy::QTidyConfig::qtidyOptGetType | ( | TidyOption | opt | ) |
Search for string, uint or bool.
| opt | reference to current TidyOption |
| bool QTidy::QTidyConfig::qtidyOptIsReadOnly | ( | TidyOption | opt | ) |
if current option only isReadable()
| opt | reference to current TidyOption |
| const QVariant QTidy::QTidyConfig::qtidyOptGetDefault | ( | TidyOption | opt | ) |
get default value of given TidyOption as a QVariant
| opt | reference to current TidyOption |
| const QVariant QTidy::QTidyConfig::qtidyOptGetValue | ( | TidyOption | opt | ) |
read value from given TidyOption
| opt | reference to current TidyOption |
| const QVariant QTidy::QTidyConfig::qtidyGetValue | ( | const QString & | key | ) |
read value from given key
QTidy::QTidyConfig rc( configFile ); qDebug() << rc.qtidyGetValue ( "tab-size" );
| static const QVariant QTidy::QTidyConfig::qtidyGetValue | ( | TidyDoc | doc, | |
| TidyOptionId | optId | |||
| ) | [static] |
read value from given key
QTidy::QTidyConfig::qtidyGetValue ( p_TidyDoc, TidyXmlTags );
| bool QTidy::QTidyConfig::qtidySetValue | ( | const QString & | key, | |
| const QVariant & | val | |||
| ) |
write value to given tidyrc
QTidy::QTidyConfig rc( configFile ); qDebug() << rc.qtidySetValue ( "tab-size", QVariant(2) );
| bool QTidy::QTidyConfig::qtidySetValue | ( | TidyOptionId | optId, | |
| const QVariant & | val | |||
| ) |
write value to given tidyrc
QTidy::QTidyConfig rc( configFile ); qDebug() << rc.qtidySetValue ( TidyXmlTags, true );
| static bool QTidy::QTidyConfig::qtidySetValue | ( | TidyDoc | doc, | |
| TidyOptionId | optId, | |||
| const QVariant & | val | |||
| ) | [static] |
write value to given tidyrc with TidyOptionId
doc = tidyCreate(); QTidy::QTidyConfig::qtidySetValue ( doc, TidyXmlTags, true );
| bool QTidy::QTidyConfig::qtidyResetToDefault | ( | const QString & | key | ) |
reset given param to default value
| bool QTidy::QTidyConfig::qtidyResetAllToDefault | ( | ) |
reset all values
| bool QTidy::QTidyConfig::qtidySnapshot | ( | ) |
Take a snapshot of current config settings.
| bool QTidy::QTidyConfig::qtidyDiffThanDefault | ( | ) |
Any settings different than default?
| bool QTidy::QTidyConfig::qtidyDiffThanSnapshot | ( | ) |
Any settings different than snapshot?
| bool QTidy::QTidyConfig::qtidyCopyConfig | ( | TidyDoc | copyTo | ) |
Copy current configuration settings from one document to another.
QTidy::QTidyConfig rc( configFile ); TidyDoc backup; qDebug() << rc.qtidyCopyConfig( backup );
| const QString QTidy::QTidyConfig::qtidyGetEncName | ( | const QString & | key | ) |
Get character encoding name. Used with TidyCharEncoding, TidyOutCharEncoding, TidyInCharEncoding.
QTidy::QTidyConfig rc( configFile ); qDebug() << rc.qtidyGetEncName( "input-encoding" );
| const QStringList QTidy::QTidyConfig::qtidyGetPickList | ( | const QString & | key | ) |
get "pick list" by param
QTidy::QTidyConfig rc( configFile ); QComboBox *box = new QComboBox( this ); box->addItems ( rc.qtidyGetPickList ( "char-encoding" ) );
| key | reference to current TidyOption |
| const QString QTidy::QTidyConfig::qtidyGetCurrPickFromList | ( | const QString & | key | ) |
current value for ordered key.
QTidy::QTidyConfig rc( configFile ); qDebug() << rc.qtidyGetCurrPickFromList( "accessibility-check" );
| const QList<QString> QTidy::QTidyConfig::qtidyGetOptionKeys | ( | ) |
create complete key list from given tidyrc
| const QStringList QTidy::QTidyConfig::qtidyDeclaredTags | ( | const QString & | key | ) |
get user declared tag list
| key | reference to current TidyOption QTidy::QTidyConfig rc( configFile ); qDebug() << rc.qtidyDeclaredTags ( "new-inline-tags" ); |
| const QString QTidy::QTidyConfig::qtidyGetDescription | ( | const QString & | key | ) |
get description for given key
QTidy::QTidyConfig rc( configFile ); QComboBox *box = new QComboBox( this ); box->addItems ( rc.qtidyGetPickList ( "char-encoding" ) ); box->setToolTip ( rc.qtidyGetDescription ( "char-encoding" ) );
| const QStringList QTidy::QTidyConfig::qtidyDescriptionList | ( | ) |
complete param Description list
| QTidyIterator QTidy::QTidyConfig::qtidyOptGetPickList | ( | TidyOption | opt | ) | [protected] |
Iterate over Option "pick list".
| const QString QTidy::QTidyConfig::qtidyOptGetNextPick | ( | TidyOption | opt, | |
| QTidyIterator * | it | |||
| ) | [protected] |
get next QString value of Option "pick list"
| QTidyIterator QTidy::QTidyConfig::qtidyGetDeclTagList | ( | ) | [protected] |
Iterate over user declared tags.
| const QString QTidy::QTidyConfig::qtidyGetNextDeclTag | ( | TidyOption | opt, | |
| QTidyIterator * | it | |||
| ) | [protected] |
Get next declared tag of specified type: TidyInlineTags, TidyBlockTags, TidyEmptyTags, TidyPreTags.
| TidyConfigCategory QTidy::QTidyConfig::qtidyOptGetCategory | ( | TidyOption | opt | ) | [protected] |
get category of given TidyOption
| opt | reference to current TidyOption |