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");
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);

@ -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 */

@ -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)
{

@ -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);

@ -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);
}

@ -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);

@ -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()));
}

@ -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);
};

@ -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()

@ -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:

@ -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;
}
}

Loading…
Cancel
Save