summaryrefslogtreecommitdiffstats
path: root/src/knowitpref.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:31:18 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:31:18 -0600
commit58ed6eb0cbce97f0c662eaafc536fd0399466ede (patch)
tree8c59dbc70711b7354dcfcffe1c0613424ff186e6 /src/knowitpref.cpp
parent9ef287f39039c26a478bbc1a304dca91f03f55d6 (diff)
downloadknowit-58ed6eb0cbce97f0c662eaafc536fd0399466ede.tar.gz
knowit-58ed6eb0cbce97f0c662eaafc536fd0399466ede.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/knowitpref.cpp')
-rw-r--r--src/knowitpref.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/knowitpref.cpp b/src/knowitpref.cpp
index f48deb0..342b91f 100644
--- a/src/knowitpref.cpp
+++ b/src/knowitpref.cpp
@@ -23,7 +23,7 @@
#include <tqtoolbutton.h>
#include <tqspinbox.h>
#include <tqdatetime.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqwhatsthis.h>
#include <tqstring.h>
#include <tqlabel.h>
@@ -132,17 +132,17 @@ KnowitPreferences::KnowitPreferences()
: KDialogBase(IconList, i18n("KnowIt Preferences"), Ok|Cancel, Ok)
{
TQFrame* page;
- TQVBoxLayout* tqlayout;
+ TQVBoxLayout* layout;
/* first page: General */
page = addPage(i18n("General"), i18n("General options"),
KGlobal::iconLoader()->loadIcon(TQString("configure"), KIcon::Toolbar, KIcon::SizeMedium));
- tqlayout = new TQVBoxLayout(page, 0, spacingHint());
- tqlayout->addWidget(docked = new TQCheckBox(i18n("&Dock in System tray"), page, "Dock"));
- tqlayout->addWidget(reopen = new TQCheckBox(i18n("Open &last file on startup"), page, "Reopen"));
+ layout = new TQVBoxLayout(page, 0, spacingHint());
+ layout->addWidget(docked = new TQCheckBox(i18n("&Dock in System tray"), page, "Dock"));
+ layout->addWidget(reopen = new TQCheckBox(i18n("Open &last file on startup"), page, "Reopen"));
TQHBox* autosaveBox = new TQHBox(page);
- tqlayout->addWidget(autosaveBox);
+ layout->addWidget(autosaveBox);
new TQLabel(i18n("Autosave:"), autosaveBox);
autosave = new TQSpinBox(0, 120, 5, autosaveBox, "Autosave");
autosave->setPrefix(i18n("every "));
@@ -151,32 +151,32 @@ KnowitPreferences::KnowitPreferences()
TQWhatsThis::add(autosave, i18n("Current file will be automatically saved "
"after the specified interval. Set to <i>never</i> to disable autosave."));
- tqlayout->addWidget(unconditionalSave = new TQCheckBox(i18n("Automatically save file on e&xit"),
+ layout->addWidget(unconditionalSave = new TQCheckBox(i18n("Automatically save file on e&xit"),
page, "UnconditionalSave"));
TQWhatsThis::add(unconditionalSave, i18n("Current file will be automatically saved "
"on exit without confirmation."));
- tqlayout->addWidget(backup = new TQCheckBox(i18n("Create &backups"),
+ layout->addWidget(backup = new TQCheckBox(i18n("Create &backups"),
page, "Backup"));
TQWhatsThis::add(backup, i18n("Create backup of current document before it is saved."));
- tqlayout->addWidget(multipleInstances = new TQCheckBox(i18n("Allow &multiple instances of KnowIt"),
+ layout->addWidget(multipleInstances = new TQCheckBox(i18n("Allow &multiple instances of KnowIt"),
page, "Instances"));
TQWhatsThis::add(multipleInstances, i18n("If this option is disabled, only one "
"instance of KnowIt will be allowed. If there is another instance already running, "
"it will be automatically activated instead of running new one."));
- tqlayout->addStretch(1);
+ layout->addStretch(1);
/* second page: Interface */
page = addPage(i18n("Interface"), i18n("Interface options"),
KGlobal::iconLoader()->loadIcon(TQString("misc"), KIcon::Toolbar, KIcon::SizeMedium));
- tqlayout = new TQVBoxLayout(page, 0, spacingHint());
- tqlayout->addWidget(horizontalSplit = new TQCheckBox(i18n("Split window &horizontally"), page, "Split"));
+ layout = new TQVBoxLayout(page, 0, spacingHint());
+ layout->addWidget(horizontalSplit = new TQCheckBox(i18n("Split window &horizontally"), page, "Split"));
TQWhatsThis::add(horizontalSplit, i18n("If this option is set, notes tree will "
"be displayed on the left and the editor on the right (this is default).<br>"
"Otherwise notes tree will be displayed at the top and the editor at the bottom."));
TQHBox* defaultNameBox = new TQHBox(page);
- tqlayout->addWidget(defaultNameBox);
+ layout->addWidget(defaultNameBox);
new TQLabel(i18n("Default note name:"), defaultNameBox);
defaultName = new KLineEdit(defaultNameBox, "DefaultName");
TQWhatsThis::add(defaultName, i18n("Default name for new notes. It would be "
@@ -184,7 +184,7 @@ KnowitPreferences::KnowitPreferences()
"consider setting default name to none."));
TQHBox* linkBox = new TQHBox(page);
- tqlayout->addWidget(linkBox);
+ layout->addWidget(linkBox);
new TQLabel(i18n("Link format:"), linkBox);
linkFormat = new KComboBox(linkBox, "LinkFormat");
linkFormat->insertItem(i18n("Description (link)"));
@@ -193,31 +193,31 @@ KnowitPreferences::KnowitPreferences()
linkFormat->insertItem(i18n("Description only"));
TQHBox* alternateBox = new TQHBox(page);
- tqlayout->addWidget(alternateBox);
+ layout->addWidget(alternateBox);
alternateTree = new TQCheckBox(i18n("Alternate colors in tree"), alternateBox, "Alternate");
alternateColor = new KColorButton(TQColor("White"), alternateBox, "AlternateColor");
- tqlayout->addWidget(autoCollapse = new TQCheckBox(i18n("Automatically collapse other notes"), page, "AutoCollapse"));
+ layout->addWidget(autoCollapse = new TQCheckBox(i18n("Automatically collapse other notes"), page, "AutoCollapse"));
TQWhatsThis::add(autoCollapse, i18n("If this option is set, only current subtree "
"will be visible, other notes will be automatically collapsed."));
- tqlayout->addStretch(1);
+ layout->addStretch(1);
/* third page: Editor */
page = addPage(i18n("Editor"), i18n("Editor options"),
KGlobal::iconLoader()->loadIcon(TQString("edit"), KIcon::Toolbar, KIcon::SizeMedium));
- tqlayout = new TQVBoxLayout(page, 0, spacingHint());
- tqlayout->addWidget(wordwrap = new TQCheckBox(i18n("Use &word wrap"),
+ layout = new TQVBoxLayout(page, 0, spacingHint());
+ layout->addWidget(wordwrap = new TQCheckBox(i18n("Use &word wrap"),
page, "WordWrap"));
- tqlayout->addWidget(enterBreakLine = new TQCheckBox(i18n("'Enter' ends current line, not paragraph"),
+ layout->addWidget(enterBreakLine = new TQCheckBox(i18n("'Enter' ends current line, not paragraph"),
page, "EnterLineBreak"));
- tqlayout->addWidget(tabfocus = new TQCheckBox(i18n("'Tab' in editor changes focus"),
+ layout->addWidget(tabfocus = new TQCheckBox(i18n("'Tab' in editor changes focus"),
page, "TabFocus"));
#if TDE_VERSION_MAJOR == 3 && TDE_VERSION_MINOR < 1
tabfocus->hide();
#endif
TQHBox* colorBox = new TQHBox(page);
- tqlayout->addWidget(colorBox);
+ layout->addWidget(colorBox);
customColors = new TQCheckBox(i18n("Use &custom colors"), colorBox, "CustomColors");
editColors = new KDualColorButton(colorBox);
@@ -226,7 +226,7 @@ KnowitPreferences::KnowitPreferences()
KFontChooser::getFontList(fontList, false);
TQHBox* fontBox = new TQHBox(page);
- tqlayout->addWidget(fontBox);
+ layout->addWidget(fontBox);
customFont = new TQCheckBox(i18n("Use custom font:"), fontBox, "customFont");
fontFamily = new KComboBox(true, fontBox);
fontFamily->insertStringList(fontList);
@@ -235,13 +235,13 @@ KnowitPreferences::KnowitPreferences()
fontSize->insertItem(TQString(TQString().setNum(fontSizes[i])),i);
}
- tqlayout->addStretch(1);
+ layout->addStretch(1);
/* fourth page: Templates */
page = addPage(i18n("Templates"), i18n("Templates configuration"),
KGlobal::iconLoader()->loadIcon(TQString("wizard"), KIcon::Toolbar, KIcon::SizeMedium));
- tqlayout = new TQVBoxLayout(page, 0, spacingHint());
+ layout = new TQVBoxLayout(page, 0, spacingHint());
TQWhatsThis::add(page, i18n("<html>\n"
"<p>These expressions may be used: </p>\n"
"<table>\n"
@@ -266,13 +266,13 @@ KnowitPreferences::KnowitPreferences()
"</table></html>"));
TQHBox* topBox = new TQHBox(page);
- tqlayout->addWidget(topBox);
+ layout->addWidget(topBox);
TQLabel * label1 = new TQLabel(i18n("Date Format: "), topBox);
- label1->setFixedSize(label1->tqsizeHint());
+ label1->setFixedSize(label1->sizeHint());
insertDatePreview = new TQLabel("", topBox);
TQHBox *tmpBox = new TQHBox(page);
- tqlayout->addWidget(tmpBox);
+ layout->addWidget(tmpBox);
insertDateColorButton = new KColorButton(TQColor("Blue"), tmpBox, "InsertDateColorButton");
insertDateFormatEdit = new KLineEdit(tmpBox, "InsertDateFormatEdit");
insertDateItalicButton = new TQToolButton(tmpBox,"InsertDateItalicButton");
@@ -284,9 +284,9 @@ KnowitPreferences::KnowitPreferences()
insertDateUnderlineButton = new TQToolButton(tmpBox, "InsertDateUnderlineButton");
insertDateUnderlineButton->setIconSet(TQIconSet(KGlobal::iconLoader()->loadIcon("text_under", KIcon::Toolbar)));
insertDateUnderlineButton->setToggleButton(true);
- insertDateColorButton->setFixedSize(insertDateBoldButton->tqsizeHint());
- insertDateFormatEdit->setMinimumWidth(6*insertDateBoldButton->tqsizeHint().width());
- tqlayout->addStretch(1);
+ insertDateColorButton->setFixedSize(insertDateBoldButton->sizeHint());
+ insertDateFormatEdit->setMinimumWidth(6*insertDateBoldButton->sizeHint().width());
+ layout->addStretch(1);
setIconListAllVisible(true);
}
@@ -379,7 +379,7 @@ void KnowitPreferences::slotUpdateDatePreview()
if(insertDateItalicButton->isOn()) str +="<i>";
if(insertDateUnderlineButton->isOn()) str += "<u>";
str += "<font COLOR=\""+insertDateColorButton->color().name()+"\">";
- str += TQString("%1").tqarg(TQDateTime::tqcurrentDateTime().toString(insertDateFormatEdit->text()));
+ str += TQString("%1").arg(TQDateTime::currentDateTime().toString(insertDateFormatEdit->text()));
str += "</font>";
if(insertDateUnderlineButton->isOn()) str += "</u>";
if(insertDateItalicButton->isOn()) str +="</i>";