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 2443313..b587824 100644
--- a/src/knowit.cpp
+++ b/src/knowit.cpp
@@ -16,11 +16,11 @@
***************************************************************************/
#include <tqtimer.h>
-#include <clipboard.h>
+#include <tqclipboard.h>
#include <tqdatetime.h>
#include <tqdir.h>
#include <tqfile.h>
-#include <textstream.h>
+#include <tqtextstream.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 layout."));
+ TQWhatsThis::add(Layout, i18n("Move it to change tree/edit tqlayout."));
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->setAlignment(TQt::AlignHCenter | TQt::AlignVCenter);
+ systray->tqsetAlignment(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>")
- .arg(fname.url()));
+ .tqarg(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.").arg(filename.fileName()));
+ slotStatusMsg(i18n("File %1 opened.").tqarg(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>")
- .arg(fname.url()));
+ .tqarg(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.").arg(filename.fileName()));
+ slotStatusMsg(i18n("File %1 saved.").tqarg(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>").arg(filename.fileName()))
+ i18n("<qt>File <b>%1</b><br>\ncannot be saved. Quit anyway?</qt>").tqarg(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>")
- .arg(filename.isEmpty() ? Untitled : filename.fileName()))) {
+ .tqarg(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>").arg(soughtText));
+ KMessageBox::information(0, i18n("<qt>Sought text:<br><b>%1</b><br>not found.</qt>").tqarg(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.arg(elt->text(0))) == KMessageBox::Yes) {
+ if (KMessageBox::questionYesNo(0, msg.tqarg(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>")
- .arg(url.path())) == KMessageBox::No)
+ .tqarg(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>").arg(filename.fileName())
- .arg(filename.path()).arg(count));
+ "Number of notes: %3</qt>").tqarg(filename.fileName())
+ .tqarg(filename.path()).tqarg(count));
}
@@ -926,7 +926,7 @@ void Knowit::slotFilePrint()
TQRect view(body);
int page = 1;
while (true) {
- richText.draw(&p, body.left(), body.top(), view, colorGroup());
+ richText.draw(&p, body.left(), body.top(), view, tqcolorGroup());
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>")
- .arg(url.path())) == KMessageBox::No)
+ .tqarg(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}")
- .arg(Edit->family()).arg(Edit->paletteForegroundColor().name())
- .arg(Edit->paletteBackgroundColor().name());
+ .tqarg(Edit->family()).tqarg(Edit->paletteForegroundColor().name())
+ .tqarg(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->setAlignment(TQt::AlignLeft);
+ Edit->tqsetAlignment(TQt::AlignLeft);
}
void Knowit::slotEditAlignRight()
{
- Edit->setAlignment(TQt::AlignRight);
+ Edit->tqsetAlignment(TQt::AlignRight);
}
void Knowit::slotEditAlignJustify()
{
- Edit->setAlignment(TQt::AlignJustify);
+ Edit->tqsetAlignment(TQt::AlignJustify);
}
void Knowit::slotEditAlignCenter()
{
- Edit->setAlignment(TQt::AlignCenter);
+ Edit->tqsetAlignment(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")
- .arg(TQDateTime::currentDateTime().toString(Options.insertDateFormat)));
+ .tqarg(TQDateTime::tqcurrentDateTime().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>")
- .arg(url.url()));
+ .tqarg(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->alignment() == TQt::AlignLeft);
- actionEditAlignRight->setChecked(Edit->alignment() == TQt::AlignRight);
- actionEditAlignCenter->setChecked(Edit->alignment() == TQt::AlignCenter);
- actionEditAlignJustify->setChecked(Edit->alignment() == TQt::AlignJustify);
+ actionEditAlignLeft->setChecked(Edit->tqalignment() == TQt::AlignLeft);
+ actionEditAlignRight->setChecked(Edit->tqalignment() == TQt::AlignRight);
+ actionEditAlignCenter->setChecked(Edit->tqalignment() == TQt::AlignCenter);
+ actionEditAlignJustify->setChecked(Edit->tqalignment() == 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.arg(Links->currentText())) == KMessageBox::Yes) {
+ msg.tqarg(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->clipboard()->setText(link.link, TQClipboard::Clipboard);
- kapp->clipboard()->setText(link.link, TQClipboard::Selection);
+ kapp->tqclipboard()->setText(link.link, TQClipboard::Clipboard);
+ kapp->tqclipboard()->setText(link.link, TQClipboard::Selection);
}