summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/knowit.cpp54
-rw-r--r--src/knowit.h2
-rw-r--r--src/knowitedit.cpp6
-rw-r--r--src/knowitedit.h4
-rw-r--r--src/knowitlinks.cpp4
-rw-r--r--src/knowitlinks.h2
-rw-r--r--src/knowittray.cpp8
-rw-r--r--src/knowittray.h2
-rw-r--r--src/knowittree.cpp16
-rw-r--r--src/knowittree.h4
-rw-r--r--src/notes.cpp12
11 files changed, 57 insertions, 57 deletions
diff --git a/src/knowit.cpp b/src/knowit.cpp
index b4c820f..5d6a41c 100644
--- a/src/knowit.cpp
+++ b/src/knowit.cpp
@@ -252,7 +252,7 @@ Knowit::Knowit(TQWidget*, const char *name) : KMainWindow(0, name),
TQT_SLOT(slotItemEnd()), actionCollection(), "note_end");
new KAction(i18n("Go to first subnote"), "", "Alt+Right", TQT_TQOBJECT(Items),
TQT_SLOT(slotItemRight()), actionCollection(), "note_right");
- new KAction(i18n("Go to tqparent note"), "", "Alt+Left", TQT_TQOBJECT(Items),
+ new KAction(i18n("Go to parent note"), "", "Alt+Left", TQT_TQOBJECT(Items),
TQT_SLOT(slotItemLeft()), actionCollection(), "note_left");
/* Actions */
@@ -349,15 +349,15 @@ bool Knowit::open(const KURL& fname)
name = ls.readLine();
name = name.stripWhiteSpace();
if (depth == prevdepth) /* same level */
- if (depth) current = new KListViewItem(current->tqparent(), current, name);
+ if (depth) current = new KListViewItem(current->parent(), current, name);
else current = new KListViewItem(Items, current, name);
else if (depth > prevdepth) /* subnote */
current = new KListViewItem(current, name);
- else { /* tqparent note */
+ else { /* parent note */
for(uint i=depth; i<prevdepth && current; i++)
- current = current->tqparent();
- if (current && current->tqparent())
- current = new KListViewItem(current->tqparent(), current, name);
+ current = current->parent();
+ if (current && current->parent())
+ current = new KListViewItem(current->parent(), current, name);
else current = new KListViewItem(Items, current, name);
}
prevdepth = depth;
@@ -627,8 +627,8 @@ void Knowit::slotNoteAdd()
i18n("Note title:"), Options.defaultName, &Ok);
if (!Ok) return;
if (Items->currentItem())
- if (Items->currentItem()->tqparent())
- elt = new KListViewItem(Items->currentItem()->tqparent(),
+ if (Items->currentItem()->parent())
+ elt = new KListViewItem(Items->currentItem()->parent(),
Items->currentItem(), text);
else
elt = new KListViewItem(Items, Items->currentItem(), text);
@@ -672,14 +672,14 @@ void Knowit::slotNoteRemove()
"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) {
- TQListViewItem* tqparent = elt->tqparent();
+ TQListViewItem* parent = elt->parent();
Notes.removeNote(elt);
if (!Notes.count())
slotActionUpdate();
- if (!tqparent)
- tqparent = Items->firstChild();
+ if (!parent)
+ parent = Items->firstChild();
Items->prevItem = 0;
- slotNoteChanged(tqparent);
+ slotNoteChanged(parent);
}
}
@@ -722,7 +722,7 @@ void Knowit::slotNoteMoveUp()
{
TQListViewItem* elt = Items->currentItem();
if (elt && elt->itemAbove()) {
- TQListViewItem* above = elt->tqparent() ? elt->tqparent()->firstChild()
+ TQListViewItem* above = elt->parent() ? elt->parent()->firstChild()
: Items->firstChild();
if (above == elt)
return;
@@ -733,9 +733,9 @@ void Knowit::slotNoteMoveUp()
if (above)
elt->moveItem(above);
else {
- TQListViewItem* tqparent = elt->tqparent();
+ TQListViewItem* parent = elt->parent();
Items->takeNode(elt);
- Items->insertNode(tqparent, elt);
+ Items->insertNode(parent, elt);
}
slotNoteChanged(elt);
Notes.modified = true;
@@ -756,11 +756,11 @@ void Knowit::slotNoteMoveBegin()
{
TQListViewItem* elt = Items->currentItem();
if (elt) {
- TQListViewItem* tqparent = elt->tqparent();
+ TQListViewItem* parent = elt->parent();
Items->takeNode(elt);
Items->insertItem(elt);
- if (tqparent)
- Notes.find(tqparent)->updateView();
+ if (parent)
+ Notes.find(parent)->updateView();
slotNoteChanged(elt);
Notes.modified = true;
}
@@ -772,15 +772,15 @@ void Knowit::slotNoteMoveEnd()
if (!elt)
return;
TQListViewItem* last = Items->firstChild();
- TQListViewItem* tqparent = elt->tqparent();
+ TQListViewItem* parent = elt->parent();
while (last->nextSibling())
last = last->nextSibling();
if (elt && elt != last) {
Items->takeNode(elt);
Items->insertNode(0, elt, last);
slotNoteChanged(elt);
- if (tqparent)
- Notes.find(tqparent)->updateView();
+ if (parent)
+ Notes.find(parent)->updateView();
Notes.modified = true;
}
}
@@ -788,11 +788,11 @@ void Knowit::slotNoteMoveEnd()
void Knowit::slotNoteMoveLeft()
{
TQListViewItem* elt = Items->currentItem();
- TQListViewItem* tqparent = elt->tqparent();
- if (elt && tqparent) {
+ TQListViewItem* parent = elt->parent();
+ if (elt && parent) {
Items->takeNode(elt);
- Items->insertNode(tqparent->tqparent(), elt, tqparent);
- Notes.find(tqparent)->updateView();
+ Items->insertNode(parent->parent(), elt, parent);
+ Notes.find(parent)->updateView();
slotNoteChanged(elt);
Notes.modified = true;
}
@@ -811,9 +811,9 @@ void Knowit::slotNoteMoveRight()
}
else {
while (above->depth() > elt->depth()+1)
- above = above->tqparent();
+ above = above->parent();
Items->takeNode(elt);
- Items->insertNode(above->tqparent(), elt, above);
+ Items->insertNode(above->parent(), elt, above);
}
Notes.find(above)->updateView();
slotNoteChanged(elt);
diff --git a/src/knowit.h b/src/knowit.h
index e28c0db..f14891a 100644
--- a/src/knowit.h
+++ b/src/knowit.h
@@ -88,7 +88,7 @@ class Knowit : public KMainWindow
enum {StatusText = 1, StatusOvr = 2};
public:
/** Constructor of main window */
- Knowit(TQWidget* tqparent=0, const char *name=0);
+ Knowit(TQWidget* parent=0, const char *name=0);
/** Standard destructor */
~Knowit();
/** Opens document */
diff --git a/src/knowitedit.cpp b/src/knowitedit.cpp
index 7f30eb4..11f2a29 100644
--- a/src/knowitedit.cpp
+++ b/src/knowitedit.cpp
@@ -18,14 +18,14 @@
#include "knowitedit.h"
#include <kurldrag.h>
-KnowitEdit::KnowitEdit(const TQString& text, const TQString& context, TQWidget* tqparent,
- const char* name) : KTextEdit(text, context, tqparent, name), swapEOL(true)
+KnowitEdit::KnowitEdit(const TQString& text, const TQString& context, TQWidget* parent,
+ const char* name) : KTextEdit(text, context, parent, name), swapEOL(true)
{
setAcceptDrops(true);
}
-KnowitEdit::KnowitEdit(TQWidget* tqparent, const char* name) : KTextEdit(tqparent, name),
+KnowitEdit::KnowitEdit(TQWidget* parent, const char* name) : KTextEdit(parent, name),
swapEOL(true)
{
diff --git a/src/knowitedit.h b/src/knowitedit.h
index d225ac6..8438725 100644
--- a/src/knowitedit.h
+++ b/src/knowitedit.h
@@ -25,8 +25,8 @@ class KnowitEdit : public KTextEdit
public:
bool swapEOL;
KnowitEdit(const TQString& text, const TQString& context=TQString(),
- TQWidget* tqparent=0, const char* name = 0);
- KnowitEdit(TQWidget* tqparent=0, const char* name = 0);
+ TQWidget* parent=0, const char* name = 0);
+ KnowitEdit(TQWidget* parent=0, const char* name = 0);
virtual void keyPressEvent(TQKeyEvent* e);
virtual void contentsDragEnterEvent(TQDragEnterEvent* event);
virtual void contentsDropEvent(TQDropEvent* event);
diff --git a/src/knowitlinks.cpp b/src/knowitlinks.cpp
index 819fa3f..5684a55 100644
--- a/src/knowitlinks.cpp
+++ b/src/knowitlinks.cpp
@@ -19,8 +19,8 @@
#include <tqevent.h>
#include <kurldrag.h>
-KnowitLinks::KnowitLinks(TQWidget* tqparent, const char* name)
- : KListBox(tqparent, name)
+KnowitLinks::KnowitLinks(TQWidget* parent, const char* name)
+ : KListBox(parent, name)
{
setAcceptDrops(true);
}
diff --git a/src/knowitlinks.h b/src/knowitlinks.h
index 641f834..5792438 100644
--- a/src/knowitlinks.h
+++ b/src/knowitlinks.h
@@ -28,7 +28,7 @@ class KnowitLinks : public KListBox
Q_OBJECT
TQ_OBJECT
public:
- KnowitLinks(TQWidget* tqparent=0, const char* name = 0);
+ KnowitLinks(TQWidget* parent=0, const char* name = 0);
protected:
virtual void dragEnterEvent(TQDragEnterEvent* event);
virtual void dropEvent(TQDropEvent* event);
diff --git a/src/knowittray.cpp b/src/knowittray.cpp
index 0cb2e07..057a126 100644
--- a/src/knowittray.cpp
+++ b/src/knowittray.cpp
@@ -18,16 +18,16 @@
#include <kpopupmenu.h>
#include <klocale.h>
-KnowitTray::KnowitTray (TQWidget* tqparent, const char* name) :
- KSystemTray(tqparent, name)
+KnowitTray::KnowitTray (TQWidget* parent, const char* name) :
+ KSystemTray(parent, name)
{
- contextMenu()->insertItem(i18n("&Undock"), tqparent,
+ contextMenu()->insertItem(i18n("&Undock"), parent,
TQT_SLOT(slotUndock()));
}
void KnowitTray::contextMenuAboutToShow (KPopupMenu* menu)
{
menu->removeItemAt(menu->count()-1);
- menu->insertItem(i18n("&Quit"), tqparent(), TQT_SLOT(slotFileQuit()));
+ menu->insertItem(i18n("&Quit"), parent(), TQT_SLOT(slotFileQuit()));
}
diff --git a/src/knowittray.h b/src/knowittray.h
index 4236486..aa20c72 100644
--- a/src/knowittray.h
+++ b/src/knowittray.h
@@ -22,7 +22,7 @@
class KnowitTray : public KSystemTray
{
public:
- KnowitTray(TQWidget* tqparent=0, const char* name=0);
+ KnowitTray(TQWidget* parent=0, const char* name=0);
protected:
virtual void contextMenuAboutToShow (KPopupMenu* menu);
};
diff --git a/src/knowittree.cpp b/src/knowittree.cpp
index 055b1b9..b3ac8ef 100644
--- a/src/knowittree.cpp
+++ b/src/knowittree.cpp
@@ -22,8 +22,8 @@
#include <tqwhatsthis.h>
#include "knowittree.h"
-KnowitTree::KnowitTree(TQWidget* tqparent, const char* name)
- : KListView(tqparent, name)
+KnowitTree::KnowitTree(TQWidget* parent, const char* name)
+ : KListView(parent, name)
{
setMinimumSize(150, 150);
addColumn(i18n("Notes"));
@@ -44,16 +44,16 @@ KnowitTree::KnowitTree(TQWidget* tqparent, const char* name)
void KnowitTree::takeNode(TQListViewItem* item)
{
- if (item->tqparent())
- item->tqparent()->takeItem(item);
+ if (item->parent())
+ item->parent()->takeItem(item);
else
takeItem(item);
}
-void KnowitTree::insertNode(TQListViewItem* tqparent, TQListViewItem* item, TQListViewItem* after)
+void KnowitTree::insertNode(TQListViewItem* parent, TQListViewItem* item, TQListViewItem* after)
{
- if (tqparent)
- tqparent->insertItem(item);
+ if (parent)
+ parent->insertItem(item);
else
insertItem(item);
if (after)
@@ -133,7 +133,7 @@ void KnowitTree::slotItemEnd()
void KnowitTree::slotItemLeft()
{
if (currentItem())
- setCurrentItem(currentItem()->tqparent());
+ setCurrentItem(currentItem()->parent());
}
void KnowitTree::slotItemRight()
diff --git a/src/knowittree.h b/src/knowittree.h
index fb144d8..4ee08c4 100644
--- a/src/knowittree.h
+++ b/src/knowittree.h
@@ -23,10 +23,10 @@ class KnowitTree : public KListView
Q_OBJECT
TQ_OBJECT
public:
- KnowitTree(TQWidget* tqparent=0, const char* name = 0);
+ KnowitTree(TQWidget* parent=0, const char* name = 0);
TQListViewItem* prevItem;
void takeNode(TQListViewItem* item);
- void insertNode(TQListViewItem* tqparent, TQListViewItem* item, TQListViewItem* after = 0);
+ void insertNode(TQListViewItem* parent, TQListViewItem* item, TQListViewItem* after = 0);
protected:
virtual void contentsDragMoveEvent(TQDragMoveEvent* event);
public slots:
diff --git a/src/notes.cpp b/src/notes.cpp
index 2cbb170..6bf96ab 100644
--- a/src/notes.cpp
+++ b/src/notes.cpp
@@ -101,16 +101,16 @@ TNotesCollection::~TNotesCollection()
void TNotesCollection::addNote(TQListViewItem* item)
{
insert(item, new TNote(item, this));
- TQListViewItem* tqparent = item->tqparent();
- if (tqparent) find(tqparent)->updateView();
+ TQListViewItem* parent = item->parent();
+ if (parent) find(parent)->updateView();
modified = true;
}
void TNotesCollection::addNote(TQListViewItem* item, const TQString& s)
{
insert(item, new TNote(item, this, s));
- TQListViewItem* tqparent = item->tqparent();
- if (tqparent) find(tqparent)->updateView();
+ TQListViewItem* parent = item->parent();
+ if (parent) find(parent)->updateView();
modified = true;
}
@@ -119,12 +119,12 @@ void TNotesCollection::removeNote(TQListViewItem* item)
TNote* note = find(item);
if (!note) qWarning("Internal error while removing note\n");
else {
- TQListViewItem* tqparent = item->tqparent();
+ TQListViewItem* parent = item->parent();
for (TQListViewItemIterator it(item); it.current() &&
(it.current() == item || it.current()->depth() > item->depth()); ++it)
find(it.current())->destroy();
delete item;
- if (tqparent) find(tqparent)->updateView();
+ if (parent) find(parent)->updateView();
modified = true;
}
}