rename the following methods:

tqparent parent
tqmask mask


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knowit@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 99be31af98
commit 87db6e5db5

@ -252,7 +252,7 @@ Knowit::Knowit(TQWidget*, const char *name) : KMainWindow(0, name),
TQT_SLOT(slotItemEnd()), actionCollection(), "note_end"); TQT_SLOT(slotItemEnd()), actionCollection(), "note_end");
new KAction(i18n("Go to first subnote"), "", "Alt+Right", TQT_TQOBJECT(Items), new KAction(i18n("Go to first subnote"), "", "Alt+Right", TQT_TQOBJECT(Items),
TQT_SLOT(slotItemRight()), actionCollection(), "note_right"); 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"); TQT_SLOT(slotItemLeft()), actionCollection(), "note_left");
/* Actions */ /* Actions */
@ -349,15 +349,15 @@ bool Knowit::open(const KURL& fname)
name = ls.readLine(); name = ls.readLine();
name = name.stripWhiteSpace(); name = name.stripWhiteSpace();
if (depth == prevdepth) /* same level */ 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 current = new KListViewItem(Items, current, name);
else if (depth > prevdepth) /* subnote */ else if (depth > prevdepth) /* subnote */
current = new KListViewItem(current, name); current = new KListViewItem(current, name);
else { /* tqparent note */ else { /* parent note */
for(uint i=depth; i<prevdepth && current; i++) for(uint i=depth; i<prevdepth && current; i++)
current = current->tqparent(); current = current->parent();
if (current && current->tqparent()) if (current && current->parent())
current = new KListViewItem(current->tqparent(), current, name); current = new KListViewItem(current->parent(), current, name);
else current = new KListViewItem(Items, current, name); else current = new KListViewItem(Items, current, name);
} }
prevdepth = depth; prevdepth = depth;
@ -627,8 +627,8 @@ void Knowit::slotNoteAdd()
i18n("Note title:"), Options.defaultName, &Ok); i18n("Note title:"), Options.defaultName, &Ok);
if (!Ok) return; if (!Ok) return;
if (Items->currentItem()) if (Items->currentItem())
if (Items->currentItem()->tqparent()) if (Items->currentItem()->parent())
elt = new KListViewItem(Items->currentItem()->tqparent(), elt = new KListViewItem(Items->currentItem()->parent(),
Items->currentItem(), text); Items->currentItem(), text);
else else
elt = new KListViewItem(Items, Items->currentItem(), text); elt = new KListViewItem(Items, Items->currentItem(), text);
@ -672,14 +672,14 @@ void Knowit::slotNoteRemove()
"and its subnotes?</qt>") : "and its subnotes?</qt>") :
i18n("<qt>Are you sure you want to delete note<br><b>%1</b>?</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.tqarg(elt->text(0))) == KMessageBox::Yes) {
TQListViewItem* tqparent = elt->tqparent(); TQListViewItem* parent = elt->parent();
Notes.removeNote(elt); Notes.removeNote(elt);
if (!Notes.count()) if (!Notes.count())
slotActionUpdate(); slotActionUpdate();
if (!tqparent) if (!parent)
tqparent = Items->firstChild(); parent = Items->firstChild();
Items->prevItem = 0; Items->prevItem = 0;
slotNoteChanged(tqparent); slotNoteChanged(parent);
} }
} }
@ -722,7 +722,7 @@ void Knowit::slotNoteMoveUp()
{ {
TQListViewItem* elt = Items->currentItem(); TQListViewItem* elt = Items->currentItem();
if (elt && elt->itemAbove()) { if (elt && elt->itemAbove()) {
TQListViewItem* above = elt->tqparent() ? elt->tqparent()->firstChild() TQListViewItem* above = elt->parent() ? elt->parent()->firstChild()
: Items->firstChild(); : Items->firstChild();
if (above == elt) if (above == elt)
return; return;
@ -733,9 +733,9 @@ void Knowit::slotNoteMoveUp()
if (above) if (above)
elt->moveItem(above); elt->moveItem(above);
else { else {
TQListViewItem* tqparent = elt->tqparent(); TQListViewItem* parent = elt->parent();
Items->takeNode(elt); Items->takeNode(elt);
Items->insertNode(tqparent, elt); Items->insertNode(parent, elt);
} }
slotNoteChanged(elt); slotNoteChanged(elt);
Notes.modified = true; Notes.modified = true;
@ -756,11 +756,11 @@ void Knowit::slotNoteMoveBegin()
{ {
TQListViewItem* elt = Items->currentItem(); TQListViewItem* elt = Items->currentItem();
if (elt) { if (elt) {
TQListViewItem* tqparent = elt->tqparent(); TQListViewItem* parent = elt->parent();
Items->takeNode(elt); Items->takeNode(elt);
Items->insertItem(elt); Items->insertItem(elt);
if (tqparent) if (parent)
Notes.find(tqparent)->updateView(); Notes.find(parent)->updateView();
slotNoteChanged(elt); slotNoteChanged(elt);
Notes.modified = true; Notes.modified = true;
} }
@ -772,15 +772,15 @@ void Knowit::slotNoteMoveEnd()
if (!elt) if (!elt)
return; return;
TQListViewItem* last = Items->firstChild(); TQListViewItem* last = Items->firstChild();
TQListViewItem* tqparent = elt->tqparent(); TQListViewItem* parent = elt->parent();
while (last->nextSibling()) while (last->nextSibling())
last = last->nextSibling(); last = last->nextSibling();
if (elt && elt != last) { if (elt && elt != last) {
Items->takeNode(elt); Items->takeNode(elt);
Items->insertNode(0, elt, last); Items->insertNode(0, elt, last);
slotNoteChanged(elt); slotNoteChanged(elt);
if (tqparent) if (parent)
Notes.find(tqparent)->updateView(); Notes.find(parent)->updateView();
Notes.modified = true; Notes.modified = true;
} }
} }
@ -788,11 +788,11 @@ void Knowit::slotNoteMoveEnd()
void Knowit::slotNoteMoveLeft() void Knowit::slotNoteMoveLeft()
{ {
TQListViewItem* elt = Items->currentItem(); TQListViewItem* elt = Items->currentItem();
TQListViewItem* tqparent = elt->tqparent(); TQListViewItem* parent = elt->parent();
if (elt && tqparent) { if (elt && parent) {
Items->takeNode(elt); Items->takeNode(elt);
Items->insertNode(tqparent->tqparent(), elt, tqparent); Items->insertNode(parent->parent(), elt, parent);
Notes.find(tqparent)->updateView(); Notes.find(parent)->updateView();
slotNoteChanged(elt); slotNoteChanged(elt);
Notes.modified = true; Notes.modified = true;
} }
@ -811,9 +811,9 @@ void Knowit::slotNoteMoveRight()
} }
else { else {
while (above->depth() > elt->depth()+1) while (above->depth() > elt->depth()+1)
above = above->tqparent(); above = above->parent();
Items->takeNode(elt); Items->takeNode(elt);
Items->insertNode(above->tqparent(), elt, above); Items->insertNode(above->parent(), elt, above);
} }
Notes.find(above)->updateView(); Notes.find(above)->updateView();
slotNoteChanged(elt); slotNoteChanged(elt);

@ -88,7 +88,7 @@ class Knowit : public KMainWindow
enum {StatusText = 1, StatusOvr = 2}; enum {StatusText = 1, StatusOvr = 2};
public: public:
/** Constructor of main window */ /** Constructor of main window */
Knowit(TQWidget* tqparent=0, const char *name=0); Knowit(TQWidget* parent=0, const char *name=0);
/** Standard destructor */ /** Standard destructor */
~Knowit(); ~Knowit();
/** Opens document */ /** Opens document */

@ -18,14 +18,14 @@
#include "knowitedit.h" #include "knowitedit.h"
#include <kurldrag.h> #include <kurldrag.h>
KnowitEdit::KnowitEdit(const TQString& text, const TQString& context, TQWidget* tqparent, KnowitEdit::KnowitEdit(const TQString& text, const TQString& context, TQWidget* parent,
const char* name) : KTextEdit(text, context, tqparent, name), swapEOL(true) const char* name) : KTextEdit(text, context, parent, name), swapEOL(true)
{ {
setAcceptDrops(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) swapEOL(true)
{ {

@ -25,8 +25,8 @@ class KnowitEdit : public KTextEdit
public: public:
bool swapEOL; bool swapEOL;
KnowitEdit(const TQString& text, const TQString& context=TQString(), KnowitEdit(const TQString& text, const TQString& context=TQString(),
TQWidget* tqparent=0, const char* name = 0); TQWidget* parent=0, const char* name = 0);
KnowitEdit(TQWidget* tqparent=0, const char* name = 0); KnowitEdit(TQWidget* parent=0, const char* name = 0);
virtual void keyPressEvent(TQKeyEvent* e); virtual void keyPressEvent(TQKeyEvent* e);
virtual void contentsDragEnterEvent(TQDragEnterEvent* event); virtual void contentsDragEnterEvent(TQDragEnterEvent* event);
virtual void contentsDropEvent(TQDropEvent* event); virtual void contentsDropEvent(TQDropEvent* event);

@ -19,8 +19,8 @@
#include <tqevent.h> #include <tqevent.h>
#include <kurldrag.h> #include <kurldrag.h>
KnowitLinks::KnowitLinks(TQWidget* tqparent, const char* name) KnowitLinks::KnowitLinks(TQWidget* parent, const char* name)
: KListBox(tqparent, name) : KListBox(parent, name)
{ {
setAcceptDrops(true); setAcceptDrops(true);
} }

@ -28,7 +28,7 @@ class KnowitLinks : public KListBox
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
KnowitLinks(TQWidget* tqparent=0, const char* name = 0); KnowitLinks(TQWidget* parent=0, const char* name = 0);
protected: protected:
virtual void dragEnterEvent(TQDragEnterEvent* event); virtual void dragEnterEvent(TQDragEnterEvent* event);
virtual void dropEvent(TQDropEvent* event); virtual void dropEvent(TQDropEvent* event);

@ -18,16 +18,16 @@
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <klocale.h> #include <klocale.h>
KnowitTray::KnowitTray (TQWidget* tqparent, const char* name) : KnowitTray::KnowitTray (TQWidget* parent, const char* name) :
KSystemTray(tqparent, name) KSystemTray(parent, name)
{ {
contextMenu()->insertItem(i18n("&Undock"), tqparent, contextMenu()->insertItem(i18n("&Undock"), parent,
TQT_SLOT(slotUndock())); TQT_SLOT(slotUndock()));
} }
void KnowitTray::contextMenuAboutToShow (KPopupMenu* menu) void KnowitTray::contextMenuAboutToShow (KPopupMenu* menu)
{ {
menu->removeItemAt(menu->count()-1); menu->removeItemAt(menu->count()-1);
menu->insertItem(i18n("&Quit"), tqparent(), TQT_SLOT(slotFileQuit())); menu->insertItem(i18n("&Quit"), parent(), TQT_SLOT(slotFileQuit()));
} }

@ -22,7 +22,7 @@
class KnowitTray : public KSystemTray class KnowitTray : public KSystemTray
{ {
public: public:
KnowitTray(TQWidget* tqparent=0, const char* name=0); KnowitTray(TQWidget* parent=0, const char* name=0);
protected: protected:
virtual void contextMenuAboutToShow (KPopupMenu* menu); virtual void contextMenuAboutToShow (KPopupMenu* menu);
}; };

@ -22,8 +22,8 @@
#include <tqwhatsthis.h> #include <tqwhatsthis.h>
#include "knowittree.h" #include "knowittree.h"
KnowitTree::KnowitTree(TQWidget* tqparent, const char* name) KnowitTree::KnowitTree(TQWidget* parent, const char* name)
: KListView(tqparent, name) : KListView(parent, name)
{ {
setMinimumSize(150, 150); setMinimumSize(150, 150);
addColumn(i18n("Notes")); addColumn(i18n("Notes"));
@ -44,16 +44,16 @@ KnowitTree::KnowitTree(TQWidget* tqparent, const char* name)
void KnowitTree::takeNode(TQListViewItem* item) void KnowitTree::takeNode(TQListViewItem* item)
{ {
if (item->tqparent()) if (item->parent())
item->tqparent()->takeItem(item); item->parent()->takeItem(item);
else else
takeItem(item); takeItem(item);
} }
void KnowitTree::insertNode(TQListViewItem* tqparent, TQListViewItem* item, TQListViewItem* after) void KnowitTree::insertNode(TQListViewItem* parent, TQListViewItem* item, TQListViewItem* after)
{ {
if (tqparent) if (parent)
tqparent->insertItem(item); parent->insertItem(item);
else else
insertItem(item); insertItem(item);
if (after) if (after)
@ -133,7 +133,7 @@ void KnowitTree::slotItemEnd()
void KnowitTree::slotItemLeft() void KnowitTree::slotItemLeft()
{ {
if (currentItem()) if (currentItem())
setCurrentItem(currentItem()->tqparent()); setCurrentItem(currentItem()->parent());
} }
void KnowitTree::slotItemRight() void KnowitTree::slotItemRight()

@ -23,10 +23,10 @@ class KnowitTree : public KListView
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
KnowitTree(TQWidget* tqparent=0, const char* name = 0); KnowitTree(TQWidget* parent=0, const char* name = 0);
TQListViewItem* prevItem; TQListViewItem* prevItem;
void takeNode(TQListViewItem* item); void takeNode(TQListViewItem* item);
void insertNode(TQListViewItem* tqparent, TQListViewItem* item, TQListViewItem* after = 0); void insertNode(TQListViewItem* parent, TQListViewItem* item, TQListViewItem* after = 0);
protected: protected:
virtual void contentsDragMoveEvent(TQDragMoveEvent* event); virtual void contentsDragMoveEvent(TQDragMoveEvent* event);
public slots: public slots:

@ -101,16 +101,16 @@ TNotesCollection::~TNotesCollection()
void TNotesCollection::addNote(TQListViewItem* item) void TNotesCollection::addNote(TQListViewItem* item)
{ {
insert(item, new TNote(item, this)); insert(item, new TNote(item, this));
TQListViewItem* tqparent = item->tqparent(); TQListViewItem* parent = item->parent();
if (tqparent) find(tqparent)->updateView(); if (parent) find(parent)->updateView();
modified = true; modified = true;
} }
void TNotesCollection::addNote(TQListViewItem* item, const TQString& s) void TNotesCollection::addNote(TQListViewItem* item, const TQString& s)
{ {
insert(item, new TNote(item, this, s)); insert(item, new TNote(item, this, s));
TQListViewItem* tqparent = item->tqparent(); TQListViewItem* parent = item->parent();
if (tqparent) find(tqparent)->updateView(); if (parent) find(parent)->updateView();
modified = true; modified = true;
} }
@ -119,12 +119,12 @@ void TNotesCollection::removeNote(TQListViewItem* item)
TNote* note = find(item); TNote* note = find(item);
if (!note) qWarning("Internal error while removing note\n"); if (!note) qWarning("Internal error while removing note\n");
else { else {
TQListViewItem* tqparent = item->tqparent(); TQListViewItem* parent = item->parent();
for (TQListViewItemIterator it(item); it.current() && for (TQListViewItemIterator it(item); it.current() &&
(it.current() == item || it.current()->depth() > item->depth()); ++it) (it.current() == item || it.current()->depth() > item->depth()); ++it)
find(it.current())->destroy(); find(it.current())->destroy();
delete item; delete item;
if (tqparent) find(tqparent)->updateView(); if (parent) find(parent)->updateView();
modified = true; modified = true;
} }
} }

Loading…
Cancel
Save