summaryrefslogtreecommitdiffstats
path: root/karm/preferences.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /karm/preferences.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'karm/preferences.cpp')
-rw-r--r--karm/preferences.cpp132
1 files changed, 66 insertions, 66 deletions
diff --git a/karm/preferences.cpp b/karm/preferences.cpp
index 9316aa440..efc621802 100644
--- a/karm/preferences.cpp
+++ b/karm/preferences.cpp
@@ -1,9 +1,9 @@
#undef Unsorted // for --enable-final
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qspinbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
#include <kapplication.h> // kapp
#include <kconfig.h>
@@ -19,7 +19,7 @@
Preferences *Preferences::_instance = 0;
-Preferences::Preferences( const QString& icsFile )
+Preferences::Preferences( const TQString& icsFile )
: KDialogBase( IconList, i18n("Preferences"), Ok|Cancel, Ok )
{
@@ -36,7 +36,7 @@ Preferences::Preferences( const QString& icsFile )
}
-Preferences *Preferences::instance( const QString &icsfile )
+Preferences *Preferences::instance( const TQString &icsfile )
{
if (_instance == 0) {
_instance = new Preferences( icsfile );
@@ -46,12 +46,12 @@ Preferences *Preferences::instance( const QString &icsfile )
void Preferences::makeBehaviorPage()
{
- QPixmap icon = SmallIcon( "kcmsystem", KIcon::SizeMedium);
- QFrame* behaviorPage = addPage( i18n("Behavior"), i18n("Behavior Settings"),
+ TQPixmap icon = SmallIcon( "kcmsystem", KIcon::SizeMedium);
+ TQFrame* behaviorPage = addPage( i18n("Behavior"), i18n("Behavior Settings"),
icon );
- QVBoxLayout* topLevel = new QVBoxLayout( behaviorPage, 0, spacingHint() );
- QGridLayout* layout = new QGridLayout( topLevel, 2, 2 );
+ TQVBoxLayout* topLevel = new TQVBoxLayout( behaviorPage, 0, spacingHint() );
+ TQGridLayout* layout = new TQGridLayout( topLevel, 2, 2 );
layout->setColStretch( 1, 1 );
_doIdleDetectionW = new QCheckBox
@@ -68,29 +68,29 @@ void Preferences::makeBehaviorPage()
topLevel->addStretch();
- connect( _doIdleDetectionW, SIGNAL( clicked() ), this,
- SLOT( idleDetectCheckBoxChanged() ));
+ connect( _doIdleDetectionW, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( idleDetectCheckBoxChanged() ));
}
void Preferences::makeDisplayPage()
{
- QPixmap icon = SmallIcon( "viewmag", KIcon::SizeMedium );
- QFrame* displayPage = addPage( i18n("Display"), i18n("Display Settings"),
+ TQPixmap icon = SmallIcon( "viewmag", KIcon::SizeMedium );
+ TQFrame* displayPage = addPage( i18n("Display"), i18n("Display Settings"),
icon );
- QVBoxLayout* topLevel = new QVBoxLayout( displayPage, 0, spacingHint() );
- QGridLayout* layout = new QGridLayout( topLevel, 5, 2 );
+ TQVBoxLayout* topLevel = new TQVBoxLayout( displayPage, 0, spacingHint() );
+ TQGridLayout* layout = new TQGridLayout( topLevel, 5, 2 );
layout->setColStretch( 1, 1 );
- QLabel* _displayColumnsLabelW = new QLabel( i18n("Columns displayed:"),
+ TQLabel* _displayColumnsLabelW = new TQLabel( i18n("Columns displayed:"),
displayPage );
- _displaySessionW = new QCheckBox ( i18n("Session time"),
+ _displaySessionW = new TQCheckBox ( i18n("Session time"),
displayPage, "_displaySessionW");
- _displayTimeW = new QCheckBox ( i18n("Cumulative task time"),
+ _displayTimeW = new TQCheckBox ( i18n("Cumulative task time"),
displayPage, "_displayTimeW");
- _displayTotalSessionW = new QCheckBox( i18n("Total session time"),
+ _displayTotalSessionW = new TQCheckBox( i18n("Total session time"),
displayPage, "_displayTotalSessionW");
- _displayTotalTimeW = new QCheckBox ( i18n("Total task time"),
+ _displayTotalTimeW = new TQCheckBox ( i18n("Total task time"),
displayPage, "_displayTotalTimeW");
layout->addMultiCellWidget( _displayColumnsLabelW, 0, 0, 0, 1 );
@@ -104,28 +104,28 @@ void Preferences::makeDisplayPage()
void Preferences::makeStoragePage()
{
- QPixmap icon = SmallIcon( "kfm", KIcon::SizeMedium );
- QFrame* storagePage = addPage( i18n("Storage"), i18n("Storage Settings"),
+ TQPixmap icon = SmallIcon( "kfm", KIcon::SizeMedium );
+ TQFrame* storagePage = addPage( i18n("Storage"), i18n("Storage Settings"),
icon );
- QVBoxLayout* topLevel = new QVBoxLayout( storagePage, 0, spacingHint() );
- QGridLayout* layout = new QGridLayout( topLevel, 4, 2 );
+ TQVBoxLayout* topLevel = new TQVBoxLayout( storagePage, 0, spacingHint() );
+ TQGridLayout* layout = new TQGridLayout( topLevel, 4, 2 );
layout->setColStretch( 1, 1 );
// autosave
_doAutoSaveW = new QCheckBox
( i18n("Save tasks every"), storagePage, "_doAutoSaveW" );
- _autoSaveValueW = new QSpinBox(1, 60*24, 1, storagePage, "_autoSaveValueW");
+ _autoSaveValueW = new TQSpinBox(1, 60*24, 1, storagePage, "_autoSaveValueW");
_autoSaveValueW->setSuffix(i18n(" min"));
// iCalendar
- QLabel* _iCalFileLabel = new QLabel( i18n("iCalendar file:"), storagePage);
+ TQLabel* _iCalFileLabel = new TQLabel( i18n("iCalendar file:"), storagePage);
_iCalFileW = new KURLRequester(storagePage, "_iCalFileW");
- _iCalFileW->setFilter(QString::fromLatin1("*.ics"));
+ _iCalFileW->setFilter(TQString::fromLatin1("*.ics"));
_iCalFileW->setMode(KFile::File);
// Log time?
- _loggingW = new QCheckBox
+ _loggingW = new TQCheckBox
( i18n("Log history"), storagePage, "_loggingW" );
// add widgets to layout
@@ -138,8 +138,8 @@ void Preferences::makeStoragePage()
topLevel->addStretch();
// checkboxes disable file selection controls
- connect( _doAutoSaveW, SIGNAL( clicked() ),
- this, SLOT( autoSaveCheckBoxChanged() ));
+ connect( _doAutoSaveW, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( autoSaveCheckBoxChanged() ));
}
void Preferences::disableIdleDetection()
@@ -234,17 +234,17 @@ void Preferences::emitSignals()
emit setupChanged();
}
-QString Preferences::iCalFile() const { return _iCalFileV; }
-QString Preferences::activeCalendarFile() const { return _iCalFileV; }
+TQString Preferences::iCalFile() const { return _iCalFileV; }
+TQString Preferences::activeCalendarFile() const { return _iCalFileV; }
bool Preferences::detectIdleness() const { return _doIdleDetectionV; }
int Preferences::idlenessTimeout() const { return _idleDetectValueV; }
bool Preferences::autoSave() const { return _doAutoSaveV; }
int Preferences::autoSavePeriod() const { return _autoSaveValueV; }
bool Preferences::logging() const { return _loggingV; }
bool Preferences::promptDelete() const { return _promptDeleteV; }
-QString Preferences::setPromptDelete(bool prompt) { _promptDeleteV=prompt; return ""; }
+TQString Preferences::setPromptDelete(bool prompt) { _promptDeleteV=prompt; return ""; }
bool Preferences::displayColumn(int n) const { return _displayColumnV[n]; }
-QString Preferences::userRealName() const { return _userRealName; }
+TQString Preferences::userRealName() const { return _userRealName; }
//---------------------------------------------------------------------------
// Load and Save
@@ -253,32 +253,32 @@ void Preferences::load()
{
KConfig &config = *kapp->config();
- config.setGroup( QString::fromLatin1("Idle detection") );
- _doIdleDetectionV = config.readBoolEntry( QString::fromLatin1("enabled"),
+ config.setGroup( TQString::fromLatin1("Idle detection") );
+ _doIdleDetectionV = config.readBoolEntry( TQString::fromLatin1("enabled"),
true );
- _idleDetectValueV = config.readNumEntry(QString::fromLatin1("period"), 15);
+ _idleDetectValueV = config.readNumEntry(TQString::fromLatin1("period"), 15);
- config.setGroup( QString::fromLatin1("Saving") );
+ config.setGroup( TQString::fromLatin1("Saving") );
_iCalFileV = config.readPathEntry
- ( QString::fromLatin1("ical file"),
- locateLocal( "appdata", QString::fromLatin1( "karm.ics")));
+ ( TQString::fromLatin1("ical file"),
+ locateLocal( "appdata", TQString::fromLatin1( "karm.ics")));
_doAutoSaveV = config.readBoolEntry
- ( QString::fromLatin1("auto save"), true);
+ ( TQString::fromLatin1("auto save"), true);
_autoSaveValueV = config.readNumEntry
- ( QString::fromLatin1("auto save period"), 5);
+ ( TQString::fromLatin1("auto save period"), 5);
_promptDeleteV = config.readBoolEntry
- ( QString::fromLatin1("prompt delete"), true);
+ ( TQString::fromLatin1("prompt delete"), true);
_loggingV = config.readBoolEntry
- ( QString::fromLatin1("logging"), true);
+ ( TQString::fromLatin1("logging"), true);
_displayColumnV[0] = config.readBoolEntry
- ( QString::fromLatin1("display session time"), true);
+ ( TQString::fromLatin1("display session time"), true);
_displayColumnV[1] = config.readBoolEntry
- ( QString::fromLatin1("display time"), true);
+ ( TQString::fromLatin1("display time"), true);
_displayColumnV[2] = config.readBoolEntry
- ( QString::fromLatin1("display total session time"), true);
+ ( TQString::fromLatin1("display total session time"), true);
_displayColumnV[3] = config.readBoolEntry
- ( QString::fromLatin1("display total time"), true);
+ ( TQString::fromLatin1("display total time"), true);
KEMailSettings settings;
_userRealName = settings.getSetting( KEMailSettings::RealName );
@@ -288,44 +288,44 @@ void Preferences::save()
{
KConfig &config = *KGlobal::config();
- config.setGroup( QString::fromLatin1("Idle detection"));
- config.writeEntry( QString::fromLatin1("enabled"), _doIdleDetectionV);
- config.writeEntry( QString::fromLatin1("period"), _idleDetectValueV);
+ config.setGroup( TQString::fromLatin1("Idle detection"));
+ config.writeEntry( TQString::fromLatin1("enabled"), _doIdleDetectionV);
+ config.writeEntry( TQString::fromLatin1("period"), _idleDetectValueV);
- config.setGroup( QString::fromLatin1("Saving"));
- config.writePathEntry( QString::fromLatin1("ical file"), _iCalFileV);
- config.writeEntry( QString::fromLatin1("auto save"), _doAutoSaveV);
- config.writeEntry( QString::fromLatin1("logging"), _loggingV);
- config.writeEntry( QString::fromLatin1("auto save period"), _autoSaveValueV);
- config.writeEntry( QString::fromLatin1("prompt delete"), _promptDeleteV);
+ config.setGroup( TQString::fromLatin1("Saving"));
+ config.writePathEntry( TQString::fromLatin1("ical file"), _iCalFileV);
+ config.writeEntry( TQString::fromLatin1("auto save"), _doAutoSaveV);
+ config.writeEntry( TQString::fromLatin1("logging"), _loggingV);
+ config.writeEntry( TQString::fromLatin1("auto save period"), _autoSaveValueV);
+ config.writeEntry( TQString::fromLatin1("prompt delete"), _promptDeleteV);
- config.writeEntry( QString::fromLatin1("display session time"),
+ config.writeEntry( TQString::fromLatin1("display session time"),
_displayColumnV[0]);
- config.writeEntry( QString::fromLatin1("display time"),
+ config.writeEntry( TQString::fromLatin1("display time"),
_displayColumnV[1]);
- config.writeEntry( QString::fromLatin1("display total session time"),
+ config.writeEntry( TQString::fromLatin1("display total session time"),
_displayColumnV[2]);
- config.writeEntry( QString::fromLatin1("display total time"),
+ config.writeEntry( TQString::fromLatin1("display total time"),
_displayColumnV[3]);
config.sync();
}
// HACK: this entire config dialog should be upgraded to KConfigXT
-bool Preferences::readBoolEntry( const QString& key )
+bool Preferences::readBoolEntry( const TQString& key )
{
KConfig &config = *KGlobal::config();
return config.readBoolEntry ( key, true );
}
-void Preferences::writeEntry( const QString &key, bool value)
+void Preferences::writeEntry( const TQString &key, bool value)
{
KConfig &config = *KGlobal::config();
config.writeEntry( key, value );
config.sync();
}
-void Preferences::deleteEntry( const QString &key )
+void Preferences::deleteEntry( const TQString &key )
{
KConfig &config = *KGlobal::config();
config.deleteEntry( key );