summaryrefslogtreecommitdiffstats
path: root/src/knowit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/knowit.cpp')
-rw-r--r--src/knowit.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/knowit.cpp b/src/knowit.cpp
index b587824..2443313 100644
--- a/src/knowit.cpp
+++ b/src/knowit.cpp
@@ -16,11 +16,11 @@
***************************************************************************/
#include <tqtimer.h>
-#include <tqclipboard.h>
+#include <clipboard.h>
#include <tqdatetime.h>
#include <tqdir.h>
#include <tqfile.h>
-#include <tqtextstream.h>
+#include <textstream.h>
#include <tqpainter.h>
#include <tqpaintdevicemetrics.h>
#include <tqwhatsthis.h>
@@ -76,7 +76,7 @@ Knowit::Knowit(TQWidget*, const char *name) : KMainWindow(0, name),
setAutoSaveSettings();
setCentralWidget(Layout);
- TQWhatsThis::add(Layout, i18n("Move it to change tree/edit tqlayout."));
+ TQWhatsThis::add(Layout, i18n("Move it to change tree/edit layout."));
connect(Items, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
TQT_TQOBJECT(this), TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)));
connect(Items, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this,
@@ -271,7 +271,7 @@ Knowit::Knowit(TQWidget*, const char *name) : KMainWindow(0, name),
/* System tray */
systray = new KnowitTray(this, "Systray");
systray->setPixmap(Notes.Pixmaps[1]);
- systray->tqsetAlignment(TQt::AlignHCenter | TQt::AlignVCenter);
+ systray->setAlignment(TQt::AlignHCenter | TQt::AlignVCenter);
/* Autosave */
AutosaveTimer = new TQTimer(this);
@@ -326,7 +326,7 @@ bool Knowit::open(const KURL& fname)
TQFile file(fname.path());
if (!file.open(IO_ReadOnly)) {
KMessageBox::error(0, i18n("<qt>Cannot open file<br><b>%1</b></qt>")
- .tqarg(fname.url()));
+ .arg(fname.url()));
if (filename == fname)
filename = "";
return false;
@@ -376,7 +376,7 @@ bool Knowit::open(const KURL& fname)
slotNoteChanged(active);
Edit->setModified(false);
actionRecent->addURL(filename);
- slotStatusMsg(i18n("File %1 opened.").tqarg(filename.fileName()));
+ slotStatusMsg(i18n("File %1 opened.").arg(filename.fileName()));
slotActionUpdate();
file.close();
@@ -392,7 +392,7 @@ bool Knowit::save(const KURL& fname)
TQFile file(fname.path());
if (!file.open(IO_WriteOnly)) {
KMessageBox::error(0, i18n("<qt>Cannot save file<br><b>%1</b></qt>")
- .tqarg(fname.url()));
+ .arg(fname.url()));
return false;
}
if (Items->prevItem && Edit->isModified())
@@ -407,7 +407,7 @@ bool Knowit::save(const KURL& fname)
Notes.modified = false;
Edit->setModified(false);
actionRecent->addURL(filename);
- slotStatusMsg(i18n("File %1 saved.").tqarg(filename.fileName()));
+ slotStatusMsg(i18n("File %1 saved.").arg(filename.fileName()));
if (Options.autosave)
AutosaveTimer->start(Options.autosave * 60 * 1000, true);
return true;
@@ -443,13 +443,13 @@ bool Knowit::queryClose()
else if (Options.unconditionalSave) {
slotFileSave();
return shuttingDown = filename.isEmpty() || !modified() || (KMessageBox::questionYesNo(0,
- i18n("<qt>File <b>%1</b><br>\ncannot be saved. Quit anyway?</qt>").tqarg(filename.fileName()))
+ i18n("<qt>File <b>%1</b><br>\ncannot be saved. Quit anyway?</qt>").arg(filename.fileName()))
== KMessageBox::Yes);
}
else
switch (KMessageBox::questionYesNoCancel(0,
i18n("<qt>File <b>%1</b><br>\nwas modified. Do you want to save it?</qt>")
- .tqarg(filename.isEmpty() ? Untitled : filename.fileName()))) {
+ .arg(filename.isEmpty() ? Untitled : filename.fileName()))) {
case KMessageBox::Yes:
slotFileSave();
return shuttingDown = !modified();
@@ -491,7 +491,7 @@ void Knowit::find(TQListViewItem* start)
}
it++;
}
- KMessageBox::information(0, i18n("<qt>Sought text:<br><b>%1</b><br>not found.</qt>").tqarg(soughtText));
+ KMessageBox::information(0, i18n("<qt>Sought text:<br><b>%1</b><br>not found.</qt>").arg(soughtText));
}
@@ -671,7 +671,7 @@ void Knowit::slotNoteRemove()
i18n("<qt>Are you sure you want to delete note<br><b>%1</b><br> "
"and its subnotes?</qt>") :
i18n("<qt>Are you sure you want to delete note<br><b>%1</b>?</qt>");
- if (KMessageBox::questionYesNo(0, msg.tqarg(elt->text(0))) == KMessageBox::Yes) {
+ if (KMessageBox::questionYesNo(0, msg.arg(elt->text(0))) == KMessageBox::Yes) {
TQListViewItem* parent = elt->parent();
Notes.removeNote(elt);
if (!Notes.count())
@@ -884,7 +884,7 @@ void Knowit::slotFileSaveAs()
TQFileInfo fileinfo(url.path());
if (fileinfo.exists() && KMessageBox::questionYesNo(0,
i18n("<qt>File<br><b>%1</b><br>already exists. Overwrite it?</qt>")
- .tqarg(url.path())) == KMessageBox::No)
+ .arg(url.path())) == KMessageBox::No)
return;
save(url);
}
@@ -901,8 +901,8 @@ void Knowit::slotFileInfo()
}
KMessageBox::information(0, i18n("<qt><h1>%1</h1>"
"Document path: %2<br>"
- "Number of notes: %3</qt>").tqarg(filename.fileName())
- .tqarg(filename.path()).tqarg(count));
+ "Number of notes: %3</qt>").arg(filename.fileName())
+ .arg(filename.path()).arg(count));
}
@@ -926,7 +926,7 @@ void Knowit::slotFilePrint()
TQRect view(body);
int page = 1;
while (true) {
- richText.draw(&p, body.left(), body.top(), view, tqcolorGroup());
+ richText.draw(&p, body.left(), body.top(), view, colorGroup());
view.moveBy(0, body.height());
p.translate( 0 , -body.height());
p.setFont(Edit->font());
@@ -976,7 +976,7 @@ void Knowit::slotFileExport()
TQFileInfo fileinfo(url.path());
if (fileinfo.exists() && KMessageBox::questionYesNo(0,
i18n("<qt>File<br><b>%1</b><br>already exists. Overwrite it?</qt>")
- .tqarg(url.path())) == KMessageBox::No)
+ .arg(url.path())) == KMessageBox::No)
return;
int choice = ChooserDlg.getChoice();
TQListViewItem* start = (choice & KnowitChooser::SaveAll) ?
@@ -985,8 +985,8 @@ void Knowit::slotFileExport()
TQString style;
if (choice & KnowitChooser::Style)
style = TQString("body {font-family: \"%1\"; color: %2; background-color: %3}")
- .tqarg(Edit->family()).tqarg(Edit->paletteForegroundColor().name())
- .tqarg(Edit->paletteBackgroundColor().name());
+ .arg(Edit->family()).arg(Edit->paletteForegroundColor().name())
+ .arg(Edit->paletteBackgroundColor().name());
Notes.find(start)->saveHTML(url, origname, style, choice);
Options.exportFlags = choice;
}
@@ -1031,22 +1031,22 @@ void Knowit::slotEditNormal()
void Knowit::slotEditAlignLeft()
{
- Edit->tqsetAlignment(TQt::AlignLeft);
+ Edit->setAlignment(TQt::AlignLeft);
}
void Knowit::slotEditAlignRight()
{
- Edit->tqsetAlignment(TQt::AlignRight);
+ Edit->setAlignment(TQt::AlignRight);
}
void Knowit::slotEditAlignJustify()
{
- Edit->tqsetAlignment(TQt::AlignJustify);
+ Edit->setAlignment(TQt::AlignJustify);
}
void Knowit::slotEditAlignCenter()
{
- Edit->tqsetAlignment(TQt::AlignCenter);
+ Edit->setAlignment(TQt::AlignCenter);
}
void Knowit::slotEditListBullet()
@@ -1114,7 +1114,7 @@ void Knowit::slotEditInsertDate()
Edit->setUnderline(Options.insertDateUnderline);
Edit->setColor(TQColor(Options.insertDateColor));
Edit->insert(TQString("%1")
- .tqarg(TQDateTime::tqcurrentDateTime().toString(Options.insertDateFormat)));
+ .arg(TQDateTime::currentDateTime().toString(Options.insertDateFormat)));
Edit->setItalic(ii);
Edit->setBold(ib);
Edit->setUnderline(iu);
@@ -1134,7 +1134,7 @@ void Knowit::slotEditInsertFile()
TQFile file(url.path());
if (!file.open(IO_ReadOnly)) {
KMessageBox::error(0, i18n("<qt>Cannot open file<br><b>%1</b></qt>")
- .tqarg(url.url()));
+ .arg(url.url()));
return;
}
TQTextStream ts(&file);
@@ -1165,10 +1165,10 @@ void Knowit::slotEditChanged()
actionBold->setChecked(Edit->bold());
actionItalic->setChecked(Edit->italic());
actionUnderline->setChecked(Edit->underline());
- actionEditAlignLeft->setChecked(Edit->tqalignment() == TQt::AlignLeft);
- actionEditAlignRight->setChecked(Edit->tqalignment() == TQt::AlignRight);
- actionEditAlignCenter->setChecked(Edit->tqalignment() == TQt::AlignCenter);
- actionEditAlignJustify->setChecked(Edit->tqalignment() == TQt::AlignJustify);
+ actionEditAlignLeft->setChecked(Edit->alignment() == TQt::AlignLeft);
+ actionEditAlignRight->setChecked(Edit->alignment() == TQt::AlignRight);
+ actionEditAlignCenter->setChecked(Edit->alignment() == TQt::AlignCenter);
+ actionEditAlignJustify->setChecked(Edit->alignment() == TQt::AlignJustify);
}
void Knowit::slotEditCursorChanged(int, int)
@@ -1277,7 +1277,7 @@ void Knowit::slotLinkRemove()
{
TQString msg = i18n("<qt>Are you sure you want to remove link:<br><b>%1</b>?</qt>");
if (Links->currentItem() != -1 && KMessageBox::questionYesNo(0,
- msg.tqarg(Links->currentText())) == KMessageBox::Yes) {
+ msg.arg(Links->currentText())) == KMessageBox::Yes) {
currentNote()->removeLink(Links->currentItem());
Links->removeItem(Links->currentItem());
if (!Links->count())
@@ -1322,7 +1322,7 @@ void Knowit::slotLinkCopy()
{
if (Links->currentItem() == -1) return;
TNoteLink link = currentNote()->link(Links->currentItem());
- kapp->tqclipboard()->setText(link.link, TQClipboard::Clipboard);
- kapp->tqclipboard()->setText(link.link, TQClipboard::Selection);
+ kapp->clipboard()->setText(link.link, TQClipboard::Clipboard);
+ kapp->clipboard()->setText(link.link, TQClipboard::Selection);
}