From: <ibr...@us...> - 2014-02-12 14:29:36
|
Revision: 5064 http://sourceforge.net/p/tora/code/5064 Author: ibre5041 Date: 2014-02-12 14:29:31 +0000 (Wed, 12 Feb 2014) Log Message: ----------- new config class Modified Paths: -------------- trunk/tora/src/CMakeLists.txt trunk/tora/src/core/toconfenum.h trunk/tora/src/core/toconfiguration.h trunk/tora/src/core/toconfiguration_new.cpp trunk/tora/src/core/toconfiguration_new.h trunk/tora/src/editor/tostyle.h trunk/tora/src/editor/toworksheettext.cpp trunk/tora/src/editor/toworksheettext.h trunk/tora/src/shortcuteditor/shortcutmodel.h Added Paths: ----------- trunk/tora/src/core/toconfenum.cpp Modified: trunk/tora/src/CMakeLists.txt =================================================================== --- trunk/tora/src/CMakeLists.txt 2014-02-08 08:51:14 UTC (rev 5063) +++ trunk/tora/src/CMakeLists.txt 2014-02-12 14:29:31 UTC (rev 5064) @@ -170,86 +170,87 @@ # MOC classses SET(TORA_MOC_CLASSES # Tora core sorces + #obsolete core/todatatype.h + #obsolete core/torunnable.h + #obsolete core/totaskrunner.h + #obsolete core/tothread.h + #obsolete core/tovisualize.h core/toabout.h core/tobackground.h core/tobackgroundlabel.h + core/tobarchart.h + core/tobrowserbasewidget.h # this one is used by core/todescribe.h (therefore is not in tools) + core/tocache.h + core/tochangeconnection.h + core/tocodemodel.h core/toconfenum.h core/toconfiguration.h + core/toconfiguration_new.h core/toconfigurationpriv.h core/toconnection.h + core/toconnectionimport.h + core/toconnectionmodel.h core/toconnectionregistry.h + core/todescribe.h core/todockbar.h core/todocklet.h + core/toeditablemenu.h + core/toeditmenu.h + core/toeventquery.h + core/toeventqueryworker.h + core/toglobalevent.h core/toglobalsetting.h + core/tohelp.h + core/tohelpsetup.h + core/tolinechart.h core/tomain.h core/tomainwindow.h - core/toglobalevent.h + core/tomemoeditor.h core/tomessage.h + core/tomodeleditor.h + core/tonewconnection.h + core/toparamget.h + core/topiechart.h core/topreferences.h core/topushbutton.h - #obsolete core/totaskrunner.h - core/totreewidget.h - core/utils.h - core/tonewconnection.h - core/toconnectionimport.h - core/toconnectionmodel.h - core/tohelp.h - core/tohelpsetup.h - core/totool.h core/toquery.h core/toqueryimpl.h - core/toeventquery.h - core/toeventqueryworker.h - #obsolete core/torunnable.h - core/toresultview.h core/toresult.h - core/toresultlistformat.h - core/tomemoeditor.h - core/totabwidget.h - core/toresultmodel.h - core/toresultmodeledit.h - core/toresulttableview.h - core/toresulttableviewedit.h - core/tochangeconnection.h - core/toparamget.h - core/tomodeleditor.h - core/toworkingwidget.h - core/toworkspace.h core/toresultbar.h - core/tobarchart.h - core/tolinechart.h + core/toresultcode.h core/toresultcols.h core/toresultcolscomment.h - core/toresultschema.h core/toresultcombo.h - core/toresultplan.h - core/toresultitem.h - core/toresultstats.h - core/todescribe.h - core/toresultcode.h + core/toresultdatasingle.h + core/toresultdepend.h + core/toresultextent.h core/toresultfield.h core/toresultgrants.h - core/toresultdepend.h - core/toresultextent.h - core/tocodemodel.h - core/totableselect.h - core/toresultdatasingle.h - #obsolete core/todatatype.h - #obsolete core/tovisualize.h - core/topiechart.h - core/toeditmenu.h - core/toeditablemenu.h - core/tosyntaxsetup.h - core/tocache.h - #obsolete core/tothread.h + core/toresultitem.h + core/toresultline.h + core/toresultlistformat.h core/toresultlock.h + core/toresultlong.h + core/toresultmodel.h + core/toresultmodeledit.h core/toresultparam.h - core/toresultlong.h + core/toresultplan.h + core/toresultschema.h + core/toresultstats.h + core/toresulttableview.h + core/toresulttableviewedit.h + core/toresultview.h core/tosplash.h + core/tosyntaxsetup.h + core/totableselect.h + core/totabwidget.h + core/totextview.h core/totimer.h - core/totextview.h - core/tobrowserbasewidget.h # this one is used by core/todescribe.h (therefore is not in tools) - core/toresultline.h + core/totool.h + core/totreewidget.h + core/toworkingwidget.h + core/toworkspace.h + core/utils.h parsing/tsqllexer.h parsing/tosyntaxanalyzer.h parsing/tolexeroracleapis.h @@ -391,98 +392,100 @@ ################################################################################ # sources SET(TORA_SOURCES + #obsolete core/todatatype.cpp + #obsolete core/totaskrunner.cpp + #obsolete core/tovisualize.cpp core/toabout.cpp core/tobackground.cpp core/tobackgroundlabel.cpp + core/tobarchart.cpp + core/tobrowserbasewidget.cpp # this one is used by core/todescribe.h (therefore is not in tools) core/tocache.cpp + core/tochangeconnection.cpp + core/tocodemodel.cpp + core/toconfenum.cpp core/toconfiguration.cpp + core/toconfiguration_new.cpp core/toconfigurationpriv.cpp core/toconnection.cpp + core/toconnectionimport.cpp + core/toconnectionmodel.cpp core/toconnectionoptions.cpp + core/toconnectionprovider.cpp core/toconnectionregistry.cpp core/toconnectionsub.cpp core/toconnectionsubloan.cpp - core/toconnectionprovider.cpp + core/todescribe.cpp core/todockbar.cpp core/todocklet.cpp + core/toeditablemenu.cpp core/toeditmenu.cpp core/toeditwidget.cpp + core/toeventquery.cpp + core/toeventqueryworker.cpp + core/toextract.cpp + core/toglobalevent.cpp core/toglobalsetting.cpp + core/tohelp.cpp + core/tohelpsetup.cpp core/tohtml.cpp + core/tolinechart.cpp + core/tolistviewformatter.cpp + core/tolistviewformattercsv.cpp + core/tolistviewformatterhtml.cpp + core/tolistviewformattersql.cpp + core/tolistviewformattertabdel.cpp + core/tolistviewformattertext.cpp core/tomain.cpp core/tomainwindow.cpp - core/toglobalevent.cpp - core/toworkspace.cpp + core/tomemoeditor.cpp core/tomessage.cpp + core/tomodeleditor.cpp + core/tonewconnection.cpp + core/toparamget.cpp + core/topiechart.cpp core/topreferences.cpp core/topushbutton.cpp + core/toquery.cpp core/toqvalue.cpp - core/tosql.cpp - core/totimer.cpp - core/totreewidget.cpp - core/utils.cpp - core/utils_part.cpp - core/tosplash.cpp - core/tonewconnection.cpp - core/toconnectionimport.cpp - core/toconnectionmodel.cpp - core/tohelp.cpp - core/totool.cpp - core/toquery.cpp - core/toeventquery.cpp - core/toeventqueryworker.cpp - core/toresultview.cpp core/toresult.cpp - core/toresultlistformat.cpp - core/tomemoeditor.cpp - core/totabwidget.cpp - core/tolistviewformatter.cpp - core/tolistviewformattercsv.cpp - core/tolistviewformatterhtml.cpp - core/tolistviewformattersql.cpp - core/tolistviewformattertabdel.cpp - core/tolistviewformattertext.cpp - core/toresultmodel.cpp - core/toresultmodeledit.cpp - core/toresulttableview.cpp - core/tochangeconnection.cpp - core/toparamget.cpp - core/tomodeleditor.cpp - core/toworkingwidget.cpp core/toresultbar.cpp - core/tobarchart.cpp - core/tolinechart.cpp + core/toresultcode.cpp core/toresultcols.cpp core/toresultcolscomment.cpp - core/toresultschema.cpp core/toresultcombo.cpp + core/toresultdatasingle.cpp + core/toresultdepend.cpp + core/toresultextent.cpp + core/toresultfield.cpp + core/toresultgrants.cpp + core/toresultitem.cpp + core/toresultline.cpp + core/toresultlistformat.cpp + core/toresultlock.cpp + core/toresultlong.cpp + core/toresultmodel.cpp + core/toresultmodeledit.cpp + core/toresultparam.cpp core/toresultplan.cpp - core/toresultitem.cpp + core/toresultschema.cpp core/toresultstats.cpp - core/todescribe.cpp + core/toresulttableview.cpp core/toresulttableviewedit.cpp - core/toresultcode.cpp - core/toresultfield.cpp - core/toextract.cpp - core/toresultgrants.cpp - core/toresultdepend.cpp - core/toresultextent.cpp - core/tocodemodel.cpp + core/toresultview.cpp + core/tosplash.cpp + core/tosql.cpp + core/tosyntaxsetup.cpp core/totableselect.cpp - core/toresultdatasingle.cpp - #obsolete core/todatatype.cpp - #obsolete core/tovisualize.cpp - core/topiechart.cpp - core/toeditablemenu.cpp - core/tosyntaxsetup.cpp - core/tohelpsetup.cpp - #obsolete core/totaskrunner.cpp - core/toresultlock.cpp - core/toresultparam.cpp - core/toresultlong.cpp + core/totabwidget.cpp core/totextview.cpp - core/tobrowserbasewidget.cpp # this one is used by core/todescribe.h (therefore is not in tools) - core/toresultline.cpp + core/totimer.cpp + core/totool.cpp + core/totreewidget.cpp + core/toworkingwidget.cpp + core/toworkspace.cpp + core/utils.cpp + core/utils_part.cpp editor/tobaseeditor.cpp editor/tomarkededitor.cpp Added: trunk/tora/src/core/toconfenum.cpp =================================================================== --- trunk/tora/src/core/toconfenum.cpp (rev 0) +++ trunk/tora/src/core/toconfenum.cpp 2014-02-12 14:29:31 UTC (rev 5064) @@ -0,0 +1,54 @@ + +/* BEGIN_COMMON_COPYRIGHT_HEADER + * + * TOra - An Oracle Toolkit for DBA's and developers + * + * Shared/mixed copyright is held throughout files in this product + * + * Portions Copyright (C) 2000-2001 Underscore AB + * Portions Copyright (C) 2003-2005 Quest Software, Inc. + * Portions Copyright (C) 2004-2013 Numerous Other Contributors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; only version 2 of + * the License is valid for this program. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program as the file COPYING.txt; if not, please see + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * As a special exception, you have permission to link this program + * with the Oracle Client libraries and distribute executables, as long + * as you follow the requirements of the GNU GPL in regard to all of the + * software in the executable aside from Oracle client libraries. + * + * All trademarks belong to their respective owners. + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "core/toconfenum.h" +#include "core/toConfiguration_new.h" + +namespace ToConfiguration { + +ConfigContext::ConfigContext(QString const& context, QMetaEnum const& e) + : m_configEnum(e) + , m_contextName(context) +{ + toConfigurationNewSingle::Instance().registerConfigContext(m_contextName, m_configEnum, this); +} + +ConfigContext::ConfigContext(ConfigContext const& other) + : m_configEnum(other.m_configEnum) + , m_contextName(other.m_contextName) +{ +} + +}; + Modified: trunk/tora/src/core/toconfenum.h =================================================================== --- trunk/tora/src/core/toconfenum.h 2014-02-08 08:51:14 UTC (rev 5063) +++ trunk/tora/src/core/toconfenum.h 2014-02-12 14:29:31 UTC (rev 5064) @@ -48,29 +48,20 @@ { Q_OBJECT; public: - ConfigContext(ConfigContext const& other) : m_configEnum(other.m_configEnum) {}; - ConfigContext(QMetaEnum const& e) : m_configEnum(e) {}; + ConfigContext(QString const& context, QMetaEnum const& e); + ConfigContext(ConfigContext const& other); + virtual QVariant defaultValue(int) const = 0; private: - QMetaEnum const& m_configEnum; + QMetaEnum m_configEnum; + QString m_contextName; }; - class ConfigContextHolder - { - public: - ConfigContextHolder(ConfigContext const& c) - : Context(c) - {} - virtual ~ConfigContextHolder() {}; - - ConfigContext Context; - }; - class Main : public ConfigContext { Q_OBJECT; Q_ENUMS(OptionTypeEnum); public: - Main() : ConfigContext(ENUM_REF(Main,OptionTypeEnum)) {}; + Main() : ConfigContext("Main", ENUM_REF(Main,OptionTypeEnum)) {}; enum OptionTypeEnum { LastVersion = 1000 // #define CONF_LAST_VERSION , FirstInstall // #define CONF_FIRST_INSTALL @@ -93,7 +84,7 @@ Q_OBJECT; Q_ENUMS(OptionTypeEnum); public: - Global() : ConfigContext(ENUM_REF(Global,OptionTypeEnum)) {}; + Global() : ConfigContext("Global", ENUM_REF(Global,OptionTypeEnum)) {}; enum OptionTypeEnum { // Paths SQLDictionary = 2000 // #define CONF_SQL_FILE @@ -162,7 +153,7 @@ Q_OBJECT; Q_ENUMS(OptionTypeEnum); public: - Database() : ConfigContext(ENUM_REF(Database,OptionTypeEnum)) {}; + Database() : ConfigContext("Database", ENUM_REF(Database,OptionTypeEnum)) {}; enum OptionTypeEnum { ObjectCache = 4000 // #define CONF_OBJECT_CACHE , AutoCommit // #define CONF_AUTO_COMMIT @@ -184,7 +175,7 @@ Q_OBJECT; Q_ENUMS(OptionTypeEnum); public: - Oracle() : ConfigContext(ENUM_REF(Oracle,OptionTypeEnum)) {}; + Oracle() : ConfigContext("Oracle", ENUM_REF(Oracle,OptionTypeEnum)) {}; enum OptionTypeEnum { ConfDateFormat = 5000 // #define CONF_DATE_FORMAT , ConfTimestampFormat // #define CONF_TIMESTAMP_FORMAT @@ -213,7 +204,7 @@ Q_OBJECT; Q_ENUMS(OptionTypeEnum); public: - MySQL() : ConfigContext(ENUM_REF(MySQL,OptionTypeEnum)) {}; + MySQL() : ConfigContext("MySQL", ENUM_REF(MySQL,OptionTypeEnum)) {}; enum OptionTypeEnum { BeforeCreateAction = 6000 // #define CONF_CREATE_ACTION }; @@ -224,7 +215,7 @@ Q_OBJECT; Q_ENUMS(OptionTypeEnum); public: - Worksheet() : ConfigContext(ENUM_REF(Worksheet,OptionTypeEnum)) {}; + Worksheet() : ConfigContext("Worksheet", ENUM_REF(Worksheet,OptionTypeEnum)) {}; enum OptionTypeEnum { AutoSave = 7000 // #define CONF_AUTO_SAVE , CheckSave // #define CONF_CHECK_SAVE @@ -246,7 +237,7 @@ Q_OBJECT; Q_ENUMS(OptionTypeEnum); public: - Storage() : ConfigContext(ENUM_REF(Storage,OptionTypeEnum)) {}; + Storage() : ConfigContext("Storage", ENUM_REF(Storage,OptionTypeEnum)) {}; enum OptionTypeEnum { DispTablespaces = 8000 // #define CONF_DISP_TABLESPACES , DispCoalesced // #define CONF_DISP_COALESCED @@ -260,7 +251,7 @@ Q_OBJECT; Q_ENUMS(OptionTypeEnum); public: - Browser() : ConfigContext(ENUM_REF(Browser,OptionTypeEnum)) {}; + Browser() : ConfigContext("Browser", ENUM_REF(Browser,OptionTypeEnum)) {}; enum OptionTypeEnum { FilterIgnoreCase = 9000 // #define CONF_FILTER_IGNORE_CASE , FilterInvert // #define CONF_FILTER_INVERT @@ -275,7 +266,7 @@ Q_OBJECT; Q_ENUMS(OptionTypeEnum); public: - Rollback() : ConfigContext(ENUM_REF(Rollback,OptionTypeEnum)) {}; + Rollback() : ConfigContext("Rollback", ENUM_REF(Rollback,OptionTypeEnum)) {}; enum OptionTypeEnum { NoExec = 10000 // #define CONF_NO_EXEC , NeedRead // #define CONF_NEED_READ @@ -290,7 +281,7 @@ Q_OBJECT; Q_ENUMS(OptionTypeEnum); public: - SgaTrace() : ConfigContext(ENUM_REF(SgaTrace,OptionTypeEnum)) {}; + SgaTrace() : ConfigContext("SgaTrace", ENUM_REF(SgaTrace,OptionTypeEnum)) {}; enum OptionTypeEnum { AutoUpdate = 11000 // #define CONF_AUTO_UPDATE }; @@ -301,7 +292,7 @@ Q_OBJECT; Q_ENUMS(OptionTypeEnum); public: - Output() : ConfigContext(ENUM_REF(Output,OptionTypeEnum)) {}; + Output() : ConfigContext("Output", ENUM_REF(Output,OptionTypeEnum)) {}; enum OptionTypeEnum { PollingInterval = 12000 // #define CONF_POLLING , Type // #define CONF_LOG_TYPE Modified: trunk/tora/src/core/toconfiguration.h =================================================================== --- trunk/tora/src/core/toconfiguration.h 2014-02-08 08:51:14 UTC (rev 5063) +++ trunk/tora/src/core/toconfiguration.h 2014-02-12 14:29:31 UTC (rev 5064) @@ -3,6 +3,7 @@ #include "core/tora_export.h" #include "editor/tostyle.h" +#include "shortcuteditor/shortcutmodel.h" #include <loki/Singleton.h> #include <QtCore/QStringList> @@ -17,8 +18,6 @@ typedef QMapIterator<QString, QString> ChartsMapIterator; typedef QMap<QString, QString> TemplatesMap; typedef QMapIterator<QString, QString> TemplatesMapIterator; -typedef QMap<QString, QVariant> EditorShortcutsMap; -typedef QMapIterator<QString, QVariant> EditorShortcutsMapIterator; typedef QMap<QString, QString> ConnectionColors; typedef QMapIterator<QString, QString> ConnectionColorsIterator; @@ -537,10 +536,10 @@ void setConnectionTestTimeout(int v); // shortcut editor - bool useEditorShortcuts(); - void setUseEditorShortcuts(bool v); - EditorShortcutsMap editorShortcuts(); - void setEditorShortcuts(const EditorShortcutsMap & v); + bool useEditorShortcuts(); + void setUseEditorShortcuts(bool v); + EditorShortcutsMap editorShortcuts(); + void setEditorShortcuts(const EditorShortcutsMap & v); // default encoding used when reading/writing files QString encoding(); Modified: trunk/tora/src/core/toconfiguration_new.cpp =================================================================== --- trunk/tora/src/core/toconfiguration_new.cpp 2014-02-08 08:51:14 UTC (rev 5063) +++ trunk/tora/src/core/toconfiguration_new.cpp 2014-02-12 14:29:31 UTC (rev 5064) @@ -34,9 +34,9 @@ #include "core/toConfiguration_new.h" #include "core/utils.h" +#include "core/toconf.h" +#include "ts_log/ts_log_utils.h" -#include "toconf.h" - #include <QtCore/QObject> #include <QtCore/QLocale> #include <QtCore/QSettings> @@ -44,1597 +44,53 @@ toConfigurationNew::toConfigurationNew(QObject *parent) : QObject(parent) - , d_ptr(NULL) { setQSettingsEnv(); - d_ptr = new toConfigurationNewPrivate(this); } toConfigurationNew::~toConfigurationNew() { - Q_D(toConfigurationNew); - delete d; } -// static one -void toConfigurationNew::setQSettingsEnv() +void toConfigurationNew::registerConfigContext(QString const& contextName, QMetaEnum const& fields, ToConfiguration::ConfigContext const* context) { - if (QCoreApplication::organizationName().isEmpty()) - QCoreApplication::setOrganizationName(TOORGNAME); - if (QCoreApplication::organizationDomain().isEmpty()) - QCoreApplication::setOrganizationDomain(TOORGDOMAIN); - if (QCoreApplication::applicationName().isEmpty()) - QCoreApplication::setApplicationName(TOAPPNAME); -} + Q_ASSERT_X( !m_contextSet.contains(contextName), qPrintable(__QHERE__), qPrintable(QString("Context %1 is already registered").arg(contextName))); + m_contextSet.insert(contextName, fields); -QString toConfigurationNew::customSQL() -{ - Q_D(toConfigurationNew); - return d->m_customSQL; -} -void toConfigurationNew::setCustomSQL(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_customSQL = v; -} + for(int idx = 0; idx < fields.keyCount(); idx++) + { + int intVal = fields.value(idx); + QString strVal = fields.key(idx); + Q_ASSERT_X( !m_configValues.contains(intVal), qPrintable(__QHERE__), qPrintable(QString("Context %1 value %2(%3) is already registered").arg(contextName).arg(strVal).arg(intVal))); + m_configValues.insert(intVal, QVariant()); + m_configContextPtr.insert(intVal, context); + } -QString toConfigurationNew::helpDirectory() -{ - Q_D(toConfigurationNew); - return d->m_helpDirectory; } -void toConfigurationNew::setHelpDirectory(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_helpDirectory = v; -} -QString toConfigurationNew::defaultSession() +QVariant toConfigurationNew::option(int option) { - Q_D(toConfigurationNew); - return d->m_defaultSession; + Q_ASSERT_X( m_configValues.contains(option), qPrintable(__QHERE__), qPrintable(QString("Unknown enum: %1").arg(option))); + if (m_configValues.value(option).isNull()) + { + ToConfiguration::ConfigContext const* ctx = m_configContextPtr.value(option); + QVariant val = ctx->defaultValue(option); + m_configValues[option] = val; + } + return m_configValues.value(option); } -void toConfigurationNew::setDefaultSession(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_defaultSession = v; -} - - -void toConfigurationNew::saveConfig() +// a static one +void toConfigurationNew::setQSettingsEnv() { - Q_D(toConfigurationNew); - d->saveConfig(); + if (QCoreApplication::organizationName().isEmpty()) + QCoreApplication::setOrganizationName(TOORGNAME); + if (QCoreApplication::organizationDomain().isEmpty()) + QCoreApplication::setOrganizationDomain(TOORGDOMAIN); + if (QCoreApplication::applicationName().isEmpty()) + QCoreApplication::setApplicationName(TOAPPNAME); } -void toConfigurationNew::loadMap(const QString &filename, std::map<QString, QString> &pairs) -{ - Q_D(toConfigurationNew); - d->loadMap(filename, pairs); -} - -bool toConfigurationNew::saveMap(const QString &file, std::map<QString, QString> &pairs) -{ - Q_D(toConfigurationNew); - return d->saveMap(file, pairs); -} - -bool toConfigurationNew::savePassword() -{ - Q_D(toConfigurationNew); - return d->m_savePassword; -} -void toConfigurationNew::setSavePassword(bool v) -{ - Q_D(toConfigurationNew); - d->m_savePassword = v; -} - -int toConfigurationNew::cachedConnections() -{ - Q_D(toConfigurationNew); - return d->m_cachedConnections; -} -void toConfigurationNew::setCachedConnections(int v) -{ - Q_D(toConfigurationNew); - d->m_cachedConnections = v; -} - -int toConfigurationNew::initialFetch() -{ - Q_D(toConfigurationNew); - return d->m_initialFetch; -} -void toConfigurationNew::setInitialFetch(int v) -{ - Q_D(toConfigurationNew); - d->m_initialFetch = v; -} - -int toConfigurationNew::maxColDisp() -{ - Q_D(toConfigurationNew); - return d->m_maxColDisp; -} -void toConfigurationNew::setMaxColDisp(int v) -{ - Q_D(toConfigurationNew); - d->m_maxColDisp = v; -} - -QString toConfigurationNew::planTable(QString schema) -{ - Q_D(toConfigurationNew); - if(d->m_sharedPlan || d->m_planTable.contains('.') || schema.isNull()) - return d->m_planTable; - - return schema + '.' + d->m_planTable; -} -void toConfigurationNew::setPlanTable(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_planTable = v; -} - -QString toConfigurationNew::textFontName() -{ - Q_D(toConfigurationNew); - return d->m_textFontName; -} -void toConfigurationNew::setTextFontName(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_textFontName = v; -} - -QString toConfigurationNew::codeFontName() -{ - Q_D(toConfigurationNew); - return d->m_codeFontName; -} -void toConfigurationNew::setCodeFontName(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_codeFontName = v; -} - -QString toConfigurationNew::listFontName() -{ - Q_D(toConfigurationNew); - return d->m_listFontName; -} -void toConfigurationNew::setListFontName(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_listFontName = v; -} - -QString toConfigurationNew::oracleHome() -{ - Q_D(toConfigurationNew); - return d->m_oracleHome; -} - -void toConfigurationNew::setOracleHome(QString const &v) -{ - Q_D(toConfigurationNew); - d->m_oracleHome = v; -} - -QString toConfigurationNew::dateFormat() -{ - Q_D(toConfigurationNew); - return d->m_dateFormat; -} -void toConfigurationNew::setDateFormat(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_dateFormat = v; -} - -QString toConfigurationNew::timestampFormat() -{ - Q_D(toConfigurationNew); - return d->m_timestampFormat; -} -void toConfigurationNew::setTimestampFormat(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_timestampFormat = v; -} - -QString toConfigurationNew::refresh() -{ - Q_D(toConfigurationNew); - return d->m_refresh; -} -void toConfigurationNew::setRefresh(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_refresh = v; -} - -int toConfigurationNew::syntaxHighlighting() -{ - Q_D(toConfigurationNew); - return d->m_syntaxHighlighting; -} -void toConfigurationNew::setSyntaxHighlighting(int v) -{ - Q_D(toConfigurationNew); - d->m_syntaxHighlighting = v; -} - -int toConfigurationNew::editorType() -{ - Q_D(toConfigurationNew); - return d->m_editorType; -} -void toConfigurationNew::setEditorType(int v) -{ - Q_D(toConfigurationNew); - d->m_editorType = v; -} - -bool toConfigurationNew::keywordUpper() -{ - Q_D(toConfigurationNew); - return d->m_keywordUpper; -} -void toConfigurationNew::setKeywordUpper(bool v) -{ - Q_D(toConfigurationNew); - d->m_keywordUpper = v; -} - -bool toConfigurationNew::objectNamesUpper() -{ - Q_D(toConfigurationNew); - return d->m_objectNamesUpper; -} -void toConfigurationNew::setObjectNamesUpper(bool v) -{ - Q_D(toConfigurationNew); - d->m_objectNamesUpper = v; -} - -QString toConfigurationNew::cacheDir() -{ - Q_D(toConfigurationNew); - return d->m_cacheDir; -} -void toConfigurationNew::setCacheDir(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_cacheDir = v; -} - -bool toConfigurationNew::cacheDisk() -{ - Q_D(toConfigurationNew); - return d->m_cacheDisk; -} -void toConfigurationNew::setCacheDisk(bool v) -{ - Q_D(toConfigurationNew); - d->m_cacheDisk = v; -} - -int toConfigurationNew::statusMessage() -{ - Q_D(toConfigurationNew); - return d->m_statusMessage; -} -void toConfigurationNew::setStatusMessage(int v) -{ - Q_D(toConfigurationNew); - d->m_statusMessage = v; -} - -bool toConfigurationNew::includeDbCaption() -{ - Q_D(toConfigurationNew); - return d->m_dbTitle; -} -void toConfigurationNew::setIncludeDbCaption(bool v) -{ - Q_D(toConfigurationNew); - d->m_dbTitle = v; -} - -QString toConfigurationNew::sizeUnit() -{ - Q_D(toConfigurationNew); - return d->m_sizeUnit; -} -void toConfigurationNew::setSizeUnit(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_sizeUnit = v; -} - -int toConfigurationNew::historySize() -{ - Q_D(toConfigurationNew); - return d->m_historySize; -} -void toConfigurationNew::setHistorySize(int v) -{ - Q_D(toConfigurationNew); - d->m_historySize = v; -} - -bool toConfigurationNew::autoCommit() -{ - Q_D(toConfigurationNew); - return d->m_autoCommit; -} -void toConfigurationNew::setAutoCommit(bool v) -{ - Q_D(toConfigurationNew); - d->m_autoCommit = v; -} - -bool toConfigurationNew::changeConnection() -{ - Q_D(toConfigurationNew); - return d->m_changeConnection; -} -void toConfigurationNew::setChangeConnection(bool v) -{ - Q_D(toConfigurationNew); - d->m_changeConnection = v; -} - -QString toConfigurationNew::defaultTool() -{ - Q_D(toConfigurationNew); - return d->m_defaultTool; -} -void toConfigurationNew::setDefaultTool(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_defaultTool = v; -} - -int toConfigurationNew::chartSamples() -{ - Q_D(toConfigurationNew); - return d->m_chartSamples; -} -void toConfigurationNew::setChartSamples(int v) -{ - Q_D(toConfigurationNew); - d->m_chartSamples = v; -} - -int toConfigurationNew::displaySamples() -{ - Q_D(toConfigurationNew); - return d->m_displaySamples; -} -void toConfigurationNew::setDisplaySamples(int v) -{ - Q_D(toConfigurationNew); - d->m_displaySamples = v; -} - -bool toConfigurationNew::codeCompletion() -{ - Q_D(toConfigurationNew); - return d->m_codeCompletion; -} -void toConfigurationNew::setCodeCompletion(bool v) -{ - Q_D(toConfigurationNew); - d->m_codeCompletion = v; -} - -bool toConfigurationNew::completionSort() -{ - Q_D(toConfigurationNew); - return d->m_completionSort; -} -void toConfigurationNew::setCompletionSort(bool v) -{ - Q_D(toConfigurationNew); - d->m_completionSort = v; -} - -bool toConfigurationNew::autoIndent() -{ - Q_D(toConfigurationNew); - return d->m_autoIndent; -} -void toConfigurationNew::setAutoIndent(bool v) -{ - Q_D(toConfigurationNew); - d->m_autoIndent = v; -} - -bool toConfigurationNew::dontReread() -{ - Q_D(toConfigurationNew); - return d->m_dontReread; -} -void toConfigurationNew::setDontReread(bool v) -{ - Q_D(toConfigurationNew); - d->m_dontReread = v; -} - -bool toConfigurationNew::messageStatusbar() -{ - Q_D(toConfigurationNew); - return d->m_messageStatusbar; -} -void toConfigurationNew::setMessageStatusbar(bool v) -{ - Q_D(toConfigurationNew); - d->m_messageStatusbar = v; -} - -bool toConfigurationNew::multiLineResults() -{ - Q_D(toConfigurationNew); - return d->m_multiLineResults; -} -void toConfigurationNew::setMultiLineResults(bool v) -{ - Q_D(toConfigurationNew); - d->m_multiLineResults = v; -} - -bool toConfigurationNew::colorizedConnections() -{ - Q_D(toConfigurationNew); - return d->m_colorizedConnections; -} -void toConfigurationNew::setColorizedConnections(bool v) -{ - Q_D(toConfigurationNew); - d->m_colorizedConnections = v; -} -ConnectionColors toConfigurationNew::connectionColors() -{ - Q_D(toConfigurationNew); - return d->m_connectionColors; -} -void toConfigurationNew::setConnectionColors(const ConnectionColors & v) -{ - Q_D(toConfigurationNew); - d->m_connectionColors = v; -} - -toConfigurationNew::ObjectCacheEnum toConfigurationNew::objectCache() -{ - Q_D(toConfigurationNew); - return d->m_objectCache; -} -void toConfigurationNew::setObjectCache(toConfigurationNew::ObjectCacheEnum v) -{ - Q_D(toConfigurationNew); - d->m_objectCache = v; -} - -bool toConfigurationNew::firewallMode() -{ - Q_D(toConfigurationNew); - return d->m_firewallMode; -} -void toConfigurationNew::setFirewallMode(bool v) -{ - Q_D(toConfigurationNew); - d->m_firewallMode = v; -} - -int toConfigurationNew::connTestInterval() -{ - Q_D(toConfigurationNew); - return d->m_connTestInterval; -} -void toConfigurationNew::setConnTestInterval(int v) -{ - Q_D(toConfigurationNew); - d->m_connTestInterval = v; -} - -int toConfigurationNew::initialEditorContent() -{ - Q_D(toConfigurationNew); - return d->m_initialEditorContent; -} -void toConfigurationNew::setInitialEditorContent(int v) -{ - Q_D(toConfigurationNew); - d->m_initialEditorContent = v; -} - -bool toConfigurationNew::keepPlans() -{ - Q_D(toConfigurationNew); - return d->m_keepPlans; -} -void toConfigurationNew::setKeepPlans(bool v) -{ - Q_D(toConfigurationNew); - d->m_keepPlans = v; -} - -bool toConfigurationNew::vsqlPlans() -{ - Q_D(toConfigurationNew); - return d->m_vsqlPlans; -} -void toConfigurationNew::setVsqlPlans(bool v) -{ - Q_D(toConfigurationNew); - d->m_vsqlPlans = v; -} - -bool toConfigurationNew::sharedPlan() -{ - Q_D(toConfigurationNew); - return d->m_sharedPlan; -} -void toConfigurationNew::setSharedPlan(bool v) -{ - Q_D(toConfigurationNew); - d->m_sharedPlan = v; -} - -bool toConfigurationNew::restoreSession() -{ - Q_D(toConfigurationNew); - return d->m_restoreSession; -} -void toConfigurationNew::setRestoreSession(bool v) -{ - Q_D(toConfigurationNew); - d->m_restoreSession = v; -} - - -int toConfigurationNew::defaultFormat() -{ - Q_D(toConfigurationNew); - return d->m_defaultFormat; -} -void toConfigurationNew::setDefaultFormat(int v) -{ - Q_D(toConfigurationNew); - d->m_defaultFormat = v; -} - -bool toConfigurationNew::autoIndentRo() -{ - Q_D(toConfigurationNew); - return d->m_autoIndentRo; -} -void toConfigurationNew::setAutoIndentRo(bool v) -{ - Q_D(toConfigurationNew); - d->m_autoIndentRo = v; -} - -bool toConfigurationNew::indicateEmpty() -{ - Q_D(toConfigurationNew); - return d->m_indicateEmpty; -} -void toConfigurationNew::setIndicateEmpty(bool v) -{ - Q_D(toConfigurationNew); - d->m_indicateEmpty = v; -} - -QString toConfigurationNew::indicateEmptyColor() -{ - Q_D(toConfigurationNew); - return d->m_indicateEmptyColor; -} -void toConfigurationNew::setIndicateEmptyColor(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_indicateEmptyColor = v; -} - -QString toConfigurationNew::extensions() -{ - Q_D(toConfigurationNew); - return d->m_extensions; -} -void toConfigurationNew::setExtensions(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_extensions = v; -} - -int toConfigurationNew::recentMax() -{ - Q_D(toConfigurationNew); - return d->m_recentMax; -} - -QString toConfigurationNew::lastDir() -{ - Q_D(toConfigurationNew); - return d->m_lastDir; -} -void toConfigurationNew::setLastDir(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_lastDir = v; -} - -QString toConfigurationNew::translation() -{ - Q_D(toConfigurationNew); - return d->m_translation; -} -void toConfigurationNew::setTranslation(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_translation = v; -} - -int toConfigurationNew::numberFormat() -{ - Q_D(toConfigurationNew); - return d->m_numberFormat; -} -void toConfigurationNew::setNumberFormat(int v) -{ - Q_D(toConfigurationNew); - d->m_numberFormat = v; -} - -int toConfigurationNew::numberDecimals() -{ - Q_D(toConfigurationNew); - return d->m_numberDecimals; -} -void toConfigurationNew::setNumberDecimals(int v) -{ - Q_D(toConfigurationNew); - d->m_numberDecimals = v; -} - -int toConfigurationNew::cacheTimeout() -{ - Q_D(toConfigurationNew); - return d->m_cacheTimeout; -} - -int toConfigurationNew::tabStop() -{ - Q_D(toConfigurationNew); - return d->m_tabStop; -} -void toConfigurationNew::setTabStop(int v) -{ - Q_D(toConfigurationNew); - d->m_tabStop = v; -} - -bool toConfigurationNew::useSpacesForIndent() -{ - Q_D(toConfigurationNew); - return d->m_useSpacesForIndent; -} -void toConfigurationNew::setUseSpacesForIndent(bool v) -{ - Q_D(toConfigurationNew); - d->m_useSpacesForIndent = v; -} - -bool toConfigurationNew::editDragDrop() -{ - Q_D(toConfigurationNew); - return d->m_editDragDrop; -} -void toConfigurationNew::setEditDragDrop(bool v) -{ - Q_D(toConfigurationNew); - d->m_editDragDrop = v; -} - -bool toConfigurationNew::toadBindings() -{ - Q_D(toConfigurationNew); - return d->m_toadBindings; -} -void toConfigurationNew::setToadBindings(bool v) -{ - Q_D(toConfigurationNew); - d->m_toadBindings = v; -} - -bool toConfigurationNew::displayGridlines() -{ - Q_D(toConfigurationNew); - return d->m_displayGridlines; -} -void toConfigurationNew::setDisplayGridlines(bool v) -{ - Q_D(toConfigurationNew); - d->m_displayGridlines = v; -} - -QString toConfigurationNew::style() -{ - Q_D(toConfigurationNew); - return d->m_style; -} -void toConfigurationNew::setStyle(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_style = v; -} - -int toConfigurationNew::maxLong() -{ - Q_D(toConfigurationNew); - return d->m_maxLong; -} -void toConfigurationNew::setMaxLong(int v) -{ - Q_D(toConfigurationNew); - d->m_maxLong = v; -} - -// toqsqlconnection -QString toConfigurationNew::mysqlHome() -{ - Q_D(toConfigurationNew); - return d->m_mysqlHome; -} - -void toConfigurationNew::setMysqlHome(QString const &v) -{ - Q_D(toConfigurationNew); - d->m_mysqlHome = v; -} - -QString toConfigurationNew::pgsqlHome() -{ - Q_D(toConfigurationNew); - return d->m_pgsqlHome; -} - -void toConfigurationNew::setPgsqlHome(QString const &v) -{ - Q_D(toConfigurationNew); - d->m_pgsqlHome = v; -} - -int toConfigurationNew::beforeCreateAction() -{ - Q_D(toConfigurationNew); - return d->m_beforeCreateAction; -} - -void toConfigurationNew::setBeforeCreateAction(int v) -{ - Q_D(toConfigurationNew); - d->m_beforeCreateAction = v; -} - -// main.cpp -QString toConfigurationNew::lastVersion() -{ - Q_D(toConfigurationNew); - return d->m_lastVersion; -} -void toConfigurationNew::setLastVersion(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_lastVersion = v; -} - -QString toConfigurationNew::firstInstall() -{ - Q_D(toConfigurationNew); - return d->m_firstInstall; -} -void toConfigurationNew::setFirstInstall(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_firstInstall = v; -} -// tomain.cpp -QStringList toConfigurationNew::recentFiles() -{ - Q_D(toConfigurationNew); - return d->m_recentFiles; -} -void toConfigurationNew::setRecentFiles(QStringList v) -{ - Q_D(toConfigurationNew); - d->m_recentFiles = v; -} -// tools -ToolsMap& toConfigurationNew::tools() -{ - Q_D(toConfigurationNew); - return d->m_tools; -} -void toConfigurationNew::setTools(ToolsMap &v) -{ - Q_D(toConfigurationNew); - d->m_tools = v; -} - -// toresultlistformat -QString toConfigurationNew::csvSeparator() -{ - Q_D(toConfigurationNew); - return d->m_csvSeparator; -} -QString toConfigurationNew::csvDelimiter() -{ - Q_D(toConfigurationNew); - return d->m_csvDelimiter; -} - -// toeditextensions -bool toConfigurationNew::commaBefore() -{ - Q_D(toConfigurationNew); - return d->m_commaBefore; -} -void toConfigurationNew::setCommaBefore(bool v) -{ - Q_D(toConfigurationNew); - d->m_commaBefore = v; -} - -bool toConfigurationNew::blockOpenLine() -{ - Q_D(toConfigurationNew); - return d->m_blockOpenLine; -} -void toConfigurationNew::setBlockOpenLine(bool v) -{ - Q_D(toConfigurationNew); - d->m_blockOpenLine = v; -} - -bool toConfigurationNew::operatorSpace() -{ - Q_D(toConfigurationNew); - return d->m_operatorSpace; -} -void toConfigurationNew::setOperatorSpace(bool v) -{ - Q_D(toConfigurationNew); - d->m_operatorSpace = v; -} - -bool toConfigurationNew::rightSeparator() -{ - Q_D(toConfigurationNew); - return d->m_rightSeparator; -} -void toConfigurationNew::setRightSeparator(bool v) -{ - Q_D(toConfigurationNew); - d->m_rightSeparator = v; -} - -bool toConfigurationNew::endBlockNewline() -{ - Q_D(toConfigurationNew); - return d->m_endBlockNewline; -} -void toConfigurationNew::setEndBlockNewline(bool v) -{ - Q_D(toConfigurationNew); - d->m_endBlockNewline = v; -} - -int toConfigurationNew::commentColumn() -{ - Q_D(toConfigurationNew); - return d->m_commentColumn; -} -void toConfigurationNew::setCommentColumn(int v) -{ - Q_D(toConfigurationNew); - d->m_commentColumn = v; -} - -// tobrowser -bool toConfigurationNew::filterIgnoreCase() -{ - Q_D(toConfigurationNew); - return d->m_filterIgnoreCase; -} -void toConfigurationNew::setFilterIgnoreCase(bool v) -{ - Q_D(toConfigurationNew); - d->m_filterIgnoreCase = v; -} - -bool toConfigurationNew::filterInvert() -{ - Q_D(toConfigurationNew); - return d->m_filterInvert; -} -void toConfigurationNew::setFilterInvert(bool v) -{ - Q_D(toConfigurationNew); - d->m_filterInvert = v; -} - -int toConfigurationNew::filterType() -{ - Q_D(toConfigurationNew); - return d->m_filterType; -} -void toConfigurationNew::setFilterType(int v) -{ - Q_D(toConfigurationNew); - d->m_filterType = v; -} - -int toConfigurationNew::filterTablespaceType() -{ - Q_D(toConfigurationNew); - return d->m_filterTablespaceType; -} -void toConfigurationNew::setFilterTablespaceType(int v) -{ - Q_D(toConfigurationNew); - d->m_filterTablespaceType = v; -} - -QString toConfigurationNew::filterText() -{ - Q_D(toConfigurationNew); - return d->m_filterText; -} -void toConfigurationNew::setFilterText(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_filterText = v; -} - -// tohelp -HelpsMap toConfigurationNew::additionalHelp() -{ - Q_D(toConfigurationNew); - return d->m_additionalHelp; -} -void toConfigurationNew::setAdditionalHelp(HelpsMap v) -{ - Q_D(toConfigurationNew); - d->m_additionalHelp = v; -} - -#ifdef TORA3_CHARTS -// tochartmanager -ChartsMap toConfigurationNew::chartFiles() -{ - Q_D(toConfigurationNew); - return d->m_chartFiles; -} -void toConfigurationNew::setChartFiles(ChartsMap v) -{ - Q_D(toConfigurationNew); - d->m_chartFiles = v; -} - -ChartsMap toConfigurationNew::chartAlarms() -{ - Q_D(toConfigurationNew); - return d->m_chartAlarms; -} -void toConfigurationNew::setChartAlarms(ChartsMap v) -{ - Q_D(toConfigurationNew); - d->m_chartAlarms = v; -} -#endif - -// toooutput -QString toConfigurationNew::polling() -{ - Q_D(toConfigurationNew); - return d->m_polling; -} -void toConfigurationNew::setPolling(const QString & v ) -{ - Q_D(toConfigurationNew); - d->m_polling = v; -} - -int toConfigurationNew::logType() -{ - Q_D(toConfigurationNew); - return d->m_logType; -} -void toConfigurationNew::setLogType(int v) -{ - Q_D(toConfigurationNew); - d->m_logType = v; -} - -QString toConfigurationNew::logUser() -{ - Q_D(toConfigurationNew); - return d->m_logUser; -} -void toConfigurationNew::setLogUser(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_logUser = v; -} - -// torollback -bool toConfigurationNew::noExec() -{ - Q_D(toConfigurationNew); - return d->m_noExec; -} -void toConfigurationNew::setNoExec(bool v) -{ - Q_D(toConfigurationNew); - d->m_noExec = v; -} - -bool toConfigurationNew::needRead() -{ - Q_D(toConfigurationNew); - return d->m_needRead; -} -void toConfigurationNew::setNeedRead(bool v) -{ - Q_D(toConfigurationNew); - d->m_needRead = v; -} - -bool toConfigurationNew::needTwo() -{ - Q_D(toConfigurationNew); - return d->m_needTwo; -} -void toConfigurationNew::setNeedTwo(bool v) -{ - Q_D(toConfigurationNew); - d->m_needTwo = v; -} - -bool toConfigurationNew::alignLeft() -{ - Q_D(toConfigurationNew); - return d->m_alignLeft; -} -void toConfigurationNew::setAlignLeft(bool v) -{ - Q_D(toConfigurationNew); - d->m_alignLeft = v; -} - -bool toConfigurationNew::oldEnable() -{ - Q_D(toConfigurationNew); - return d->m_oldEnable; -} -void toConfigurationNew::setOldEnable(bool v) -{ - Q_D(toConfigurationNew); - d->m_oldEnable = v; -} - -// tosgatrace -bool toConfigurationNew::autoUpdate() -{ - Q_D(toConfigurationNew); - return d->m_autoUpdate; -} -void toConfigurationNew::setAutoUpdate(bool v) -{ - Q_D(toConfigurationNew); - d->m_autoUpdate = v; -} - -// tostorage -bool toConfigurationNew::dispTablespaces() -{ - Q_D(toConfigurationNew); - return d->m_dispTablespaces; -} -void toConfigurationNew::setDispTablespaces(bool v) -{ - Q_D(toConfigurationNew); - d->m_dispTablespaces = v; -} - -bool toConfigurationNew::dispCoalesced() -{ - Q_D(toConfigurationNew); - return d->m_dispCoalesced; -} -void toConfigurationNew::setDispCoalesced(bool v) -{ - Q_D(toConfigurationNew); - d->m_dispCoalesced = v; -} - -bool toConfigurationNew::dispExtents() -{ - Q_D(toConfigurationNew); - return d->m_dispExtents; -} -void toConfigurationNew::setDispExtents(bool v) -{ - Q_D(toConfigurationNew); - d->m_dispExtents = v; -} - -bool toConfigurationNew::dispAvailableGraph() -{ - Q_D(toConfigurationNew); - return d->m_dispAvailableGraph; -} -void toConfigurationNew::setDispAvailableGraph(bool v) -{ - Q_D(toConfigurationNew); - d->m_dispAvailableGraph = v; -} - -// totemplate -TemplatesMap toConfigurationNew::templates() -{ - Q_D(toConfigurationNew); - return d->m_templates; -} -void toConfigurationNew::setTemplates(TemplatesMap v) -{ - Q_D(toConfigurationNew); - d->m_templates = v; -} - -// totuning -/*! True if there are no prefs for tuning. - It's used when there is no d->m_tuningOverview defined in prefs. */ -bool toConfigurationNew::tuningFirstRun() -{ - Q_D(toConfigurationNew); - return d->m_tuningFirstRun; -} - -bool toConfigurationNew::tuningOverview() -{ - Q_D(toConfigurationNew); - return d->m_tuningOverview; -} -void toConfigurationNew::setTuningOverview(bool v) -{ - Q_D(toConfigurationNew); - d->m_tuningOverview = v; -} - -bool toConfigurationNew::tuningFileIO() -{ - Q_D(toConfigurationNew); - return d->m_tuningFileIO; -} -void toConfigurationNew::setTuningFileIO(bool v) -{ - Q_D(toConfigurationNew); - d->m_tuningFileIO = v; -} - -bool toConfigurationNew::tuningWaits() -{ - Q_D(toConfigurationNew); - return d->m_tuningWaits; -} -void toConfigurationNew::setTuningWaits(bool v) -{ - Q_D(toConfigurationNew); - d->m_tuningWaits = v; -} - -bool toConfigurationNew::tuningCharts() -{ - Q_D(toConfigurationNew); - return d->m_tuningCharts; -} -void toConfigurationNew::setTuningCharts(bool v) -{ - Q_D(toConfigurationNew); - d->m_tuningCharts = v; -} - -// toworksheet -bool toConfigurationNew::wsAutoSave() -{ - Q_D(toConfigurationNew); - return d->m_wsAutoSave; -} -void toConfigurationNew::setWsAutoSave(bool v) -{ - Q_D(toConfigurationNew); - d->m_wsAutoSave = v; -} - -bool toConfigurationNew::wsCheckSave() -{ - Q_D(toConfigurationNew); - return d->m_wsCheckSave; -} -void toConfigurationNew::setWsCheckSave(bool v) -{ - Q_D(toConfigurationNew); - d->m_wsCheckSave = v; -} - -QString toConfigurationNew::wsAutoLoad() -{ - Q_D(toConfigurationNew); - return d->m_wsAutoLoad; -} -void toConfigurationNew::setWsAutoLoad(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_wsAutoLoad = v; -} - -bool toConfigurationNew::wsLogAtEnd() -{ - Q_D(toConfigurationNew); - return d->m_wsLogAtEnd; -} -void toConfigurationNew::setWsLogAtEnd(bool v) -{ - Q_D(toConfigurationNew); - d->m_wsLogAtEnd = v; -} - -bool toConfigurationNew::wsLogMulti() -{ - Q_D(toConfigurationNew); - return d->m_wsLogMulti; -} -void toConfigurationNew::setWsLogMulti(bool v) -{ - Q_D(toConfigurationNew); - d->m_wsLogMulti = v; -} - -bool toConfigurationNew::wsStatistics() -{ - Q_D(toConfigurationNew); - return d->m_wsStatistics; -} -void toConfigurationNew::setWsStatistics(bool v) -{ - Q_D(toConfigurationNew); - d->m_wsStatistics = v; -} - -bool toConfigurationNew::wsTimedStats() -{ - Q_D(toConfigurationNew); - return d->m_wsTimedStats; -} -void toConfigurationNew::setWsTimedStats(bool v) -{ - Q_D(toConfigurationNew); - d->m_wsTimedStats = v; -} - -bool toConfigurationNew::wsNumber() -{ - Q_D(toConfigurationNew); - return d->m_wsNumber; -} -void toConfigurationNew::setWsNumber(bool v) -{ - Q_D(toConfigurationNew); - d->m_wsNumber = v; -} - -bool toConfigurationNew::wsMoveToErr() -{ - Q_D(toConfigurationNew); - return d->m_wsMoveToErr; -} -void toConfigurationNew::setWsMoveToErr(bool v) -{ - Q_D(toConfigurationNew); - d->m_wsMoveToErr = v; -} - -bool toConfigurationNew::wsHistory() -{ - Q_D(toConfigurationNew); - return d->m_wsHistory; -} -void toConfigurationNew::setWsHistory(bool v) -{ - Q_D(toConfigurationNew); - d->m_wsHistory = v; -} - -bool toConfigurationNew::wsExecLog() -{ - Q_D(toConfigurationNew); - return d->m_wsExecLog; -} -void toConfigurationNew::setWsExecLog(bool v) -{ - Q_D(toConfigurationNew); - d->m_wsExecLog = v; -} - -bool toConfigurationNew::wsToplevelDescribe() -{ - Q_D(toConfigurationNew); - return d->m_wsToplevelDescribe; -} -void toConfigurationNew::setWsToplevelDescribe(bool v) -{ - Q_D(toConfigurationNew); - d->m_wsToplevelDescribe = v; -} - - -bool toConfigurationNew::useEditorShortcuts() -{ - Q_D(toConfigurationNew); - return d->m_useEditorShortcuts; -} - -void toConfigurationNew::setUseEditorShortcuts(bool v) -{ - Q_D(toConfigurationNew); - d->m_useEditorShortcuts = v; -} - -EditorShortcutsMap toConfigurationNew::editorShortcuts() -{ - Q_D(toConfigurationNew); - return d->m_editorShortcuts; -} - -void toConfigurationNew::setEditorShortcuts(const EditorShortcutsMap & v) -{ - Q_D(toConfigurationNew); - d->m_editorShortcuts = v; -} - -QColor toConfigurationNew::styleFgColor(int style) -{ - Q_D(toConfigurationNew); - return d->m_styles[style].FGColor; -} - -QColor toConfigurationNew::styleBgColor(int style) -{ - Q_D(toConfigurationNew); - return d->m_styles[style].BGColor; -} - -QFont toConfigurationNew::styleFont(int style) -{ - Q_D(toConfigurationNew); - return d->m_styles[style].Font; -} - -const toStylesMap& toConfigurationNew::styles() -{ - Q_D(toConfigurationNew); - return d->m_styles; -} - -void toConfigurationNew::setStyles(const toStylesMap & styles) -{ - Q_D(toConfigurationNew); - d->m_styles = styles; -} - -bool toConfigurationNew::useMaxTextWidthMark() -{ - Q_D(toConfigurationNew); - return d->m_useMaxTextWidthMark; -} - -void toConfigurationNew::setUseMaxTextWidthMark(bool v) -{ - Q_D(toConfigurationNew); - d->m_useMaxTextWidthMark = v; -} - -int toConfigurationNew::maxTextWidthMark() -{ - Q_D(toConfigurationNew); - return d->m_maxTextWidthMark; -} - -void toConfigurationNew::setMaxTextWidthMark(int v) -{ - Q_D(toConfigurationNew); - d->m_maxTextWidthMark = v; -} - -QByteArray toConfigurationNew::mainWindowGeometry() -{ - Q_D(toConfigurationNew); - return d->m_mainWindowGeometry; -} - -void toConfigurationNew::setMainWindowGeometry(QByteArray v) -{ - Q_D(toConfigurationNew); - d->m_mainWindowGeometry = v; -} - -QByteArray toConfigurationNew::mainWindowState() -{ - Q_D(toConfigurationNew); - return d->m_mainWindowState; -} - -void toConfigurationNew::setMainWindowState(QByteArray v) -{ - Q_D(toConfigurationNew); - d->m_mainWindowState = v; -} - - -void toConfigurationNew::setLeftDockbarState(QByteArray v) -{ - Q_D(toConfigurationNew); - d->m_leftDockbarState = v; -} - -QByteArray toConfigurationNew::leftDockbarState() -{ - Q_D(toConfigurationNew); - return d->m_leftDockbarState; -} - -void toConfigurationNew::setRightDockbarState(QByteArray v) -{ - Q_D(toConfigurationNew); - d->m_rightDockbarState = v; -} - -QByteArray toConfigurationNew::rightDockbarState() -{ - Q_D(toConfigurationNew); - return d->m_rightDockbarState; -} - -// Default encoding used when reading/writing files -QString toConfigurationNew::encoding() -{ - Q_D(toConfigurationNew); - return d->m_encoding; -} -void toConfigurationNew::setEncoding(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_encoding = v; -} - -// Force using a particular line end type (win, linux, mac) when saving text files -QString toConfigurationNew::forceLineEnd() -{ - Q_D(toConfigurationNew); - return d->m_forcelineend; -} -void toConfigurationNew::setForceLineEnd(const QString & v) -{ - Q_D(toConfigurationNew); - d->m_forcelineend = v; -} - -bool toConfigurationNew::extractorUseDbmsMetadata() -{ - Q_D(toConfigurationNew); - return d->m_extractorUseDbmsMetadata; -} -void toConfigurationNew::setExtractorUseDbmsMetadata(bool v) -{ - Q_D(toConfigurationNew); - d->m_extractorUseDbmsMetadata = v; -} - -bool toConfigurationNew::extractorIncludeSotrage() -{ - Q_D(toConfigurationNew); - return d->m_extractorIncludeSotrage; -} -void toConfigurationNew::setExtractorIncludeSotrage(bool v) -{ - Q_D(toConfigurationNew); - d->m_extractorIncludeSotrage = v; -} - -bool toConfigurationNew::extractorSkipOrgMonInformation() -{ - Q_D(toConfigurationNew); - return d->m_extractorSkipOrgMonInformation; -} -void toConfigurationNew::setExtractorSkipOrgMonInformation(bool v) -{ - Q_D(toConfigurationNew); - d->m_extractorSkipOrgMonInformation = v; -} - -bool toConfigurationNew::extractorSkipStorageExceptTablespaces() -{ - Q_D(toConfigurationNew); - return d->m_extractorSkipStorageExceptTablespaces; -} -void toConfigurationNew::setExtractorSkipStorageExceptTablespaces(bool v) -{ - Q_D(toConfigurationNew); - d->m_extractorSkipStorageExceptTablespaces = v; -} - -bool toConfigurationNew::extractorIncludeParallel() -{ - Q_D(toConfigurationNew); - return d->m_extractorIncludeParallel; -} -void toConfigurationNew::setExtractorIncludeParallel(bool v) -{ - Q_D(toConfigurationNew); - d->m_extractorIncludeParallel = v; -} - -bool toConfigurationNew::extractorIncludePartition() -{ - Q_D(toConfigurationNew); - return d->m_extractorIncludePartition; -} -void toConfigurationNew::setExtractorIncludePartition(bool v) -{ - Q_D(toConfigurationNew); - d->m_extractorIncludePartition = v; -} - -bool toConfigurationNew::extractorIncludeCode() -{ - Q_D(toConfigurationNew); - return d->m_extractorIncludeCode; -} -void toConfigurationNew::setExtractorIncludeCode(bool v) -{ - Q_D(toConfigurationNew); - d->m_extractorIncludeCode = v; -} - -bool toConfigurationNew::extractorIncludeHeader() -{ - Q_D(toConfigurationNew); - return d->m_extractorIncludeHeader; -} -void toConfigurationNew::setExtractorIncludeHeader(bool v) -{ - Q_D(toConfigurationNew); - d->m_extractorIncludeHeader = v; -} - -bool toConfigurationNew::extractorIncludePrompt() -{ - Q_D(toConfigurationNew); - return d->m_extractorIncludePrompt; -} -void toConfigurationNew::setExtractorIncludePrompt(bool v) -{ - Q_D(toConfigurationNew); - d->m_extractorIncludePrompt = v; -} - QString toConfigurationNew::sharePath() { #ifdef Q_OS_WIN32 Modified: trunk/tora/src/core/toconfiguration_new.h =================================================================== --- trunk/tora/src/core/toconfiguration_new.h 2014-02-08 08:51:14 UTC (rev 5063) +++ trunk/tora/src/core/toconfiguration_new.h 2014-02-12 14:29:31 UTC (rev 5064) @@ -12,104 +12,21 @@ #include <QtCore/QVariant> #include <QtGui/QApplication> -//typedef QMap<QString, bool> ToolsMap; -//typedef QMap<QString, QString> HelpsMap; -//typedef QMapIterator<QString, QString> HelpsMapIterator; -//typedef QMap<QString, QString> ChartsMap; -//typedef QMapIterator<QString, QString> ChartsMapIterator; -//typedef QMap<QString, QString> TemplatesMap; -//typedef QMapIterator<QString, QString> TemplatesMapIterator; -//typedef QMap<QString, QVariant> EditorShortcutsMap; -//typedef QMapIterator<QString, QVariant> EditorShortcutsMapIterator; -//typedef QMap<QString, QString> ConnectionColors; -//typedef QMapIterator<QString, QString> ConnectionColorsIterator; -//class toConfigurationPrivate; +namespace ToConfiguration { + class ConfigContext; +}; +class QMetaEnum; + class TORA_EXPORT toConfigurationNew: public QObject { Q_OBJECT; - - /* This enum represents various states from ObjectCache comboBox - * database settings gui(see todatabasesettingui.ui). - */ - Q_ENUMS(ObjectCacheEnum) - - // Global Settings - // Paths -// Q_PROPERTY(QString CustomSQL READ customSQL WRITE setCustomSQL) -// Q_PROPERTY(QString HelpDirectory READ helpDirectory WRITE setHelpDirectory) -// Q_PROPERTY(QString DefaultSession READ defaultSession WRITE setDefaultSession) -// Q_PROPERTY(QString CacheDir READ cacheDir WRITE setCacheDir) -// Q_PROPERTY(QString OracleHome READ oracleHome WRITE setOracleHome) -// Q_PROPERTY(QString MysqlHome READ mysqlHome WRITE setMysqlHome) -// Q_PROPERTY(QString PgsqlHome READ pgsqlHome WRITE setPgsqlHome) -// // Options (1st column) -// Q_PROPERTY(bool ChangeConnection READ changeConnection WRITE setChangeConnection) -// Q_PROPERTY(bool SavePassword READ savePassword WRITE setSavePassword) -// Q_PROPERTY(bool IncludeDbCaption READ includeDbCaption WRITE setIncludeDbCaption) -// Q_PROPERTY(bool RestoreSession READ restoreSession WRITE setRestoreSession) -// Q_PROPERTY(bool ToadBindings READ toadBindings WRITE setToadBindings) -// Q_PROPERTY(bool CacheDisk READ cacheDisk WRITE setCacheDisk) -// Q_PROPERTY(bool DisplayGridlines READ displayGridlines WRITE setDisplayGridlines) -// Q_PROPERTY(bool MultiLineResults READ multiLineResults WRITE setMultiLineResults) -// Q_PROPERTY(bool MessageStatusbar READ messageStatusbar WRITE setMessageStatusbar) -// Q_PROPERTY(bool ColorizedConnections READ colorizedConnections WRITE setColorizedConnections) -// Q_PROPERTY(ConnectionColors ConnectionColors READ connectionColors WRITE setConnectionColors) -// // Options (2nd column) -// Q_PROPERTY(int StatusMessage READ statusMessage WRITE setStatusMessage) -// Q_PROPERTY(int HistorySize READ historySize WRITE setHistorySize) -// Q_PROPERTY(int ChartSamples READ chartSamples WRITE setChartSamples) -// Q_PROPERTY(int DisplaySamples READ displaySamples WRITE setDisplaySamples) -// Q_PROPERTY(QString SizeUnit READ sizeUnit WRITE setSizeUnit) -// Q_PROPERTY(QString Refresh READ refresh WRITE setRefresh) -// Q_PROPERTY(int DefaultFormat READ defaultFormat WRITE setDefaultFormat) -// Q_PROPERTY(QString Style READ style WRITE setStyle) -// Q_PROPERTY(QString Translation READ translation WRITE setTranslation) -// -// // Editor settings -// // Options tab -// Q_PROPERTY(int SyntaxHighlighting READ syntaxHighlighting WRITE setSyntaxHighlighting) -// Q_PROPERTY(int EditorType READ editorType WRITE setEditorType) -// Q_PROPERTY(bool UseMaxTextWidthMark READ useMaxTextWidthMark WRITE setUseMaxTextWidthMark) -// Q_PROPERTY(bool KeywordUpper READ keywordUpper WRITE setKeywordUpper) -// Q_PROPERTY(bool ObjectNamesUpper READ objectNamesUpper WRITE setObjectNamesUpper) -// Q_PROPERTY(bool CodeCompletion READ codeCompletion WRITE setCodeCompletion) -// Q_PROPERTY(bool CompletionSort READ completionSort WRITE setCompletionSort) -// Q_PROPERTY(bool UseEditorShortcuts READ useEditorShortcuts WRITE setUseEditorShortcuts) -// Q_PROPERTY(EditorShortcutsMap EditorShortcuts READ editorShortcuts WRITE setEditorShortcuts) -// Q_PROPERTY(bool AutoIndent READ autoIndent WRITE setAutoIndent) -// Q_PROPERTY(bool UseSpacesForIndent READ useSpacesForIndent WRITE setUseSpacesForIndent) -// Q_PROPERTY(int TabStop READ tabStop WRITE setTabStop) -// Q_PROPERTY(QString TextFontName READ textFontName WRITE setTextFontName) -// Q_PROPERTY(QString CodeFontName READ codeFontName WRITE setCodeFontName) -// Q_PROPERTY(QString ListFontName READ listFontName WRITE setListFontName) -// Q_PROPERTY(QString Extensions READ extensions WRITE setExtensions) -// // Syntax tab -// // everything is disabled ATM on the Syntax tab -// -// // Database settings -// Q_PROPERTY(toConfiguration::ObjectCacheEnum ObjectCache READ objectCache WRITE setObjectCache) -// Q_PROPERTY(bool AutoCommit READ autoCommit WRITE setAutoCommit) -// Q_PROPERTY(bool FirewallMode READ firewallMode WRITE setFirewallMode) -// Q_PROPERTY(int ConnTestInterval READ connTestInterval WRITE setConnTestInterval) -// Q_PROPERTY(int CachedConnections READ cachedConnections WRITE setCachedConnections) -// Q_PROPERTY(int InitialFetch READ initialFetch WRITE setInitialFetch) -// Q_PROPERTY(int InitialEditorContent READ initialEditorContent WRITE setInitialEditorContent) -// Q_PROPERTY(bool IndicateEmpty READ indicateEmpty WRITE setIndicateEmpty) -// Q_PROPERTY(QString IndicateEmptyColor READ indicateEmptyColor WRITE setIndicateEmptyColor) -// Q_PROPERTY(int NumberFormat READ numberFormat WRITE setNumberFormat) -// Q_PROPERTY(int NumberDecimals READ numberDecimals WRITE setNumberDecimals) + friend class ::ToConfiguration::ConfigContext; public: toConfigurationNew(QObject *parent = 0); - ~toConfigurationNew(); + virtual ~toConfigurationNew(); - enum ObjectCacheEnum - { - WHEN_NEEDED = 0, - ON_CONNECT = 1, - UNTIL_MANDATORY = 2, - NEVER = 3 - }; + QVariant option(int option); /*! \brief Set the QSettings access strings. QSettings uses these. It's used in the main.cpp before @@ -119,473 +36,15 @@ QSettings constructor (maybe due the Loki lib?) */ static void setQSettingsEnv(); - /** - * Save configuration to file. - */ - void saveConfig(void); - /** - * Load a string to string map from file saved by the @ref saveMap function. - * @param filename Filename to load - * @param map Reference to the map to fill with the new values. - */ - void loadMap(const QString &filename, std::map<QString, QString> &map); - - /** - * A map containing the available configuration settings. By convention the - * character ':' is used to separate parts of the path. - * - * @see globalConfig - * @see globalSetConfig - * @see config - * @see setConfig - */ - bool saveMap(const QString &file, std::map<QString, QString> &pairs); - - bool savePassword(); - void setSavePassword(bool v); - - int cachedConnections(); - void setCachedConnections(int v); - - int initialFetch(); - void setInitialFetch(int v); - - int maxColDisp(); - void setMaxColDisp(int v); - - QString textFontName(); - void setTextFontName(const QString & v); - - QString codeFontName(); - void setCodeFontName(const QString & v); - - QString listFontName(); - void setListFontName(const QString & v); - - QString refresh(); - void setRefresh(const QString & v); - - int syntaxHighlighting(); - void setSyntaxHighlighting(int v); - - int editorType(); - void setEditorType(int v); - - bool keywordUpper(); - void setKeywordUpper(bool v); - - bool objectNamesUpper(); - void setObjectNamesUpper(bool v); - - QString cacheDir(); - void setCacheDir... [truncated message content] |