#include <QTidySettings.h>
Public Slots | |
| void | remove (const QString ¶m) |
| remove function see QSettings::remove | |
Public Member Functions | |
| QTidySettings (const QString &configFile=QString()) | |
| void | setValue (const QString ¶m, const QVariant &value) |
| write Function | |
| QVariant | value (const QString ¶m, const QVariant &value=QVariant()) |
| read Function | |
| QAbstractTableModel * | getTableModel (QTableView *table) |
| Configuration Model for QTableView. | |
| ctmbstr | getTidyrc () |
| full path to current Configuration file if you need a QString | |
| bool | OverWriteSettings (QTidyConfig cfg) |
| write temprary QTidyConfig to current Configuration file | |
| const QByteArray | getTextCodec (const QString &toEnc=QString("output")) |
| load Encoding set from tidyrc Load Document encoding set from tidyrc and convert it to QTextCodec. If QTextCodec didn't support the configuration value then fallback to UTF-8. | |
| const QString | TidyConfig () |
| full path to current Configuration file | |
| ~QTidySettings () | |
Static Public Member Functions | |
| static const QString | getTemplateFile () |
| search tidyrc Template file an copy it to User Home directory | |
QTidy::QTidySettings *cfg = new QTidy::QTidySettings(); QTableView *tWidget = new QTableView ( centralWidget() ); tWidget->setModel ( cfg->getTableModel ( tWidget ) ); setCentralWidget ( tWidget );
| QTidy::QTidySettings::QTidySettings | ( | const QString & | configFile = QString() |
) | [explicit] |
| configFile | optional configuration file path e.g ~/.tidyrc |
| QTidy::QTidySettings::~QTidySettings | ( | ) |
| void QTidy::QTidySettings::setValue | ( | const QString & | param, | |
| const QVariant & | value | |||
| ) |
write Function
Sets the value of setting key to value. If the parm already exists, the previous value is overwritten.
| param | Configuration Key | |
| value | Value for Key |
| QVariant QTidy::QTidySettings::value | ( | const QString & | param, | |
| const QVariant & | value = QVariant() | |||
| ) |
read Function
Returns the value for setting param. If the setting doesn't exist, returns defaultValue. If no default value is specified or unknown, a default QVariant is returned.
| param | Configuration Key | |
| value | Default value |
| QAbstractTableModel* QTidy::QTidySettings::getTableModel | ( | QTableView * | table | ) |
Configuration Model for QTableView.
QTableView *tWidget = new QTableView ( centralWidget() ); tWidget->setModel ( QTidy::QTidySettings().getTableModel ( tWidget ) );
| table | QTableView Widget |
| ctmbstr QTidy::QTidySettings::getTidyrc | ( | ) |
| bool QTidy::QTidySettings::OverWriteSettings | ( | QTidyConfig | cfg | ) |
| static const QString QTidy::QTidySettings::getTemplateFile | ( | ) | [static] |
search tidyrc Template file an copy it to User Home directory
| const QByteArray QTidy::QTidySettings::getTextCodec | ( | const QString & | toEnc = QString("output") |
) |
load Encoding set from tidyrc Load Document encoding set from tidyrc and convert it to QTextCodec. If QTextCodec didn't support the configuration value then fallback to UTF-8.
| toEnc | resticted and valid values: SET(input|char|output) |
| const QString QTidy::QTidySettings::TidyConfig | ( | ) |
full path to current Configuration file
| void QTidy::QTidySettings::remove | ( | const QString & | param | ) | [slot] |
remove function see QSettings::remove
| param | Configuration Key |