summaryrefslogtreecommitdiffstats
path: root/src/libgui/global_config.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/libgui/global_config.cpp
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/libgui/global_config.cpp')
-rw-r--r--src/libgui/global_config.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/libgui/global_config.cpp b/src/libgui/global_config.cpp
index 8424450..8d246fc 100644
--- a/src/libgui/global_config.cpp
+++ b/src/libgui/global_config.cpp
@@ -17,30 +17,30 @@
#include "tools/list/tool_list.h"
const BaseGlobalConfig::Data BaseGlobalConfig::DATA[Nb_Types] = {
- { "auto_rebuild_modified", I18N_NOOP("Automatically rebuild project before programming if it is modified."), QVariant(true, 0) },
- { "program_after_build", I18N_NOOP("Program device after successful build."), QVariant(false, 0) },
- { "user_id_set_to_checksum", I18N_NOOP("Set User Ids to unprotected checksum (if User Ids are empty)."), QVariant(false, 0) },
- { "show_tab_close_buttons", I18N_NOOP("Show close buttons on tabs (need restart to take effect)."), QVariant(true, 0) }
+ { "auto_rebuild_modified", I18N_NOOP("Automatically rebuild project before programming if it is modified."), TQVariant(true, 0) },
+ { "program_after_build", I18N_NOOP("Program device after successful build."), TQVariant(false, 0) },
+ { "user_id_set_to_checksum", I18N_NOOP("Set User Ids to unprotected checksum (if User Ids are empty)."), TQVariant(false, 0) },
+ { "show_tab_close_buttons", I18N_NOOP("Show close buttons on tabs (need restart to take effect)."), TQVariant(true, 0) }
};
PURL::Url GlobalConfig::openedProject()
{
- GenericConfig config(QString::null);
- return PURL::Url::fromPathOrUrl(config.readEntry("project", QString::null));
+ GenericConfig config(TQString::null);
+ return PURL::Url::fromPathOrUrl(config.readEntry("project", TQString::null));
}
void GlobalConfig::writeOpenedProject(const PURL::Url &p)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
config.writeEntry("project", p.filepath());
}
PURL::UrlList GlobalConfig::openedFiles()
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
PURL::UrlList files;
uint i = 0;
for (;;) {
- QString file = config.readEntry(QString("file%1").arg(i), QString::null);
+ TQString file = config.readEntry(TQString("file%1").tqarg(i), TQString::null);
if ( file.isEmpty() ) break;
files += PURL::Url::fromPathOrUrl(file);
i++;
@@ -49,22 +49,22 @@ PURL::UrlList GlobalConfig::openedFiles()
}
void GlobalConfig::writeOpenedFiles(const PURL::UrlList &files)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
for (uint i=0; i<=files.count(); i++) {
- QString s = (i==files.count() ? QString::null : files[i].filepath());
- config.writeEntry(QString("file%1").arg(i), s);
+ TQString s = (i==files.count() ? TQString::null : files[i].filepath());
+ config.writeEntry(TQString("file%1").tqarg(i), s);
}
}
void GlobalConfig::writeProgrammerGroup(const Programmer::Group &group)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
config.writeEntry("programmer", group.name());
}
const Programmer::Group &GlobalConfig::programmerGroup()
{
- GenericConfig config(QString::null);
- QString s = config.readEntry("programmer");
+ GenericConfig config(TQString::null);
+ TQString s = config.readEntry("programmer");
const Programmer::Group *group = Programmer::lister().group(s);
if ( group==0 ) return *Programmer::lister().begin().data();
return *group;
@@ -72,23 +72,23 @@ const Programmer::Group &GlobalConfig::programmerGroup()
void GlobalConfig::writeDebugLevel(Log::DebugLevel level)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
config.writeEnumEntry<Log::DebugLevel>("log_debug_level", level);
}
Log::DebugLevel GlobalConfig::debugLevel()
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
return config.readEnumEntry<Log::DebugLevel>("log_debug_level", Log::DebugLevel::Normal);
}
void GlobalConfig::writeLogOutputType(Log::OutputType type)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
config.writeEntry("log_output_type", type);
}
Log::OutputType GlobalConfig::logOutputType()
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
uint output = config.readUIntEntry("log_output_type", Log::GuiOnly);
if ( output>=Log::Nb_OutputTypes ) return Log::GuiOnly;
return Log::OutputType(output);
@@ -96,11 +96,11 @@ Log::OutputType GlobalConfig::logOutputType()
void GlobalConfig::writeShowLineNumbers(bool show)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
config.writeEntry("show_line_numbers", show);
}
bool GlobalConfig::showLineNumbers()
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
return config.readBoolEntry("show_line_numbers", false);
}