summaryrefslogtreecommitdiffstats
path: root/src/basket.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
commit631d7b9b0878ca3842496b5719f9c5803335e150 (patch)
treed09fe0c8cd6edfd28c9c7947b0af60ccc75fbb8d /src/basket.cpp
parent33f08e93132a53bf14f41f5f1e567eeea832b336 (diff)
downloadbasket-631d7b9b0878ca3842496b5719f9c5803335e150.tar.gz
basket-631d7b9b0878ca3842496b5719f9c5803335e150.zip
rename the following methods:
tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/basket@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/basket.cpp')
-rw-r--r--src/basket.cpp118
1 files changed, 59 insertions, 59 deletions
diff --git a/src/basket.cpp b/src/basket.cpp
index 488fd80..ff60117 100644
--- a/src/basket.cpp
+++ b/src/basket.cpp
@@ -109,8 +109,8 @@ NoteSelection* NoteSelection::nextStacked()
}
}
- // And finally, in the tqparent:
- NoteSelection *node = tqparent;
+ // And finally, in the parent:
+ NoteSelection *node = parent;
while (node)
if (node->next)
if (node->next->note && node->next->note->content())
@@ -118,7 +118,7 @@ NoteSelection* NoteSelection::nextStacked()
else
return node->next->nextStacked();
else
- node = node->tqparent;
+ node = node->parent;
// Not found:
return 0;
@@ -149,7 +149,7 @@ void NoteSelection::append(NoteSelection *node)
firstChild = node;
while (node) {
- node->tqparent = this;
+ node->parent = this;
node = node->next;
}
}
@@ -176,7 +176,7 @@ TQValueList<Note*> NoteSelection::parentGroups()
// For each note:
for (NoteSelection *node = firstStacked(); node; node = node->nextStacked())
- // For each tqparent groups of the note:
+ // For each parent groups of the note:
for (Note *note = node->note->parentNote(); note; note = note->parentNote())
// Add it (if it was not already in the list):
if (!note->isColumn() && !groups.contains(note))
@@ -187,8 +187,8 @@ TQValueList<Note*> NoteSelection::parentGroups()
/** Class DecoratedBasket: */
-DecoratedBasket::DecoratedBasket(TQWidget *tqparent, const TQString &folderName, const char *name, WFlags fl)
- : TQWidget(tqparent, name, fl)
+DecoratedBasket::DecoratedBasket(TQWidget *parent, const TQString &folderName, const char *name, WFlags fl)
+ : TQWidget(parent, name, fl)
{
m_layout = new TQVBoxLayout(this);
m_filter = new FilterBar(this);
@@ -217,14 +217,14 @@ void DecoratedBasket::setFilterBarPosition(bool onTop)
m_layout->remove(m_filter);
if (onTop) {
m_layout->insertWidget(0, m_filter);
- setTabOrder(this/*(TQWidget*)tqparent()*/, m_filter);
+ setTabOrder(this/*(TQWidget*)parent()*/, m_filter);
setTabOrder(m_filter, m_basket);
- setTabOrder(m_basket, (TQWidget*)tqparent());
+ setTabOrder(m_basket, (TQWidget*)parent());
} else {
m_layout->addWidget(m_filter);
- setTabOrder(this/*(TQWidget*)tqparent()*/, m_basket);
+ setTabOrder(this/*(TQWidget*)parent()*/, m_basket);
setTabOrder(m_basket, m_filter);
- setTabOrder(m_filter, (TQWidget*)tqparent());
+ setTabOrder(m_filter, (TQWidget*)parent());
}
}
@@ -261,9 +261,9 @@ TransparentWidget::TransparentWidget(Basket *basket)
basket->viewport()->installEventFilter(this);
}
-/*void TransparentWidget::reparent(TQWidget *tqparent, WFlags f, const TQPoint &p, bool showIt)
+/*void TransparentWidget::reparent(TQWidget *parent, WFlags f, const TQPoint &p, bool showIt)
{
- TQWidget::reparent(tqparent, TQt::WNoAutoErase, p, showIt);
+ TQWidget::reparent(parent, TQt::WNoAutoErase, p, showIt);
}*/
void TransparentWidget::setPosition(int x, int y)
@@ -296,7 +296,7 @@ void TransparentWidget::mouseMoveEvent(TQMouseEvent *event)
bool TransparentWidget::eventFilter(TQObject */*object*/, TQEvent *event)
{
- // If the tqparent basket viewport has changed, we should change too:
+ // If the parent basket viewport has changed, we should change too:
if (event->type() == TQEvent::Paint)
update();
@@ -497,7 +497,7 @@ void Basket::appendNoteBefore(Note *note, Note *before)
DecoratedBasket* Basket::decoration()
{
- return (DecoratedBasket*)tqparent();
+ return (DecoratedBasket*)parent();
}
void Basket::preparePlug(Note *note)
@@ -510,7 +510,7 @@ void Basket::preparePlug(Note *note)
Note *last = 0;
for (Note *n = note; n; n = n->next()) {
if (m_loaded)
- n->setSelectedRecursivly(true); // Notes should have a tqparent basket (and they have, so that's OK).
+ n->setSelectedRecursivly(true); // Notes should have a parent basket (and they have, so that's OK).
count += n->count();
founds += n->newFilter(decoration()->filterData());
last = n;
@@ -562,11 +562,11 @@ void Basket::unplugNote(Note *note)
note->parentNote()->setFirstChild( note->next() );
if (!note->parentNote()->isColumn()) {
- // Ungroup if still 0 note inside tqparent group:
+ // Ungroup if still 0 note inside parent group:
if ( ! note->parentNote()->firstChild() )
unplugNote(note->parentNote()); // TODO delete
- // Ungroup if still 1 note inside tqparent group:
+ // Ungroup if still 1 note inside parent group:
else if ( ! note->parentNote()->firstChild()->next() )
ungroupNote(note->parentNote());
}
@@ -696,7 +696,7 @@ void Basket::groupNoteAfter(Note *note, Note *with)
signalCountsChanged();
}
-void Basket::loadNotes(const TQDomElement &notes, Note *tqparent)
+void Basket::loadNotes(const TQDomElement &notes, Note *parent)
{
Note *note;
for (TQDomNode n = notes.firstChild(); !n.isNull(); n = n.nextSibling()) {
@@ -709,8 +709,8 @@ void Basket::loadNotes(const TQDomElement &notes, Note *tqparent)
note = new Note(this); // 1. Create the group...
loadNotes(e, note); // 3. ... And populate it with child notes.
int noteCount = note->count();
- if (noteCount > 0 || (tqparent == 0 && !isFreeLayout())) { // But don't remove columns!
- appendNoteIn(note, tqparent); // 2. ... Insert it... FIXME: Initially, the if() the insrtion was the step 2. Was it on purpose?
+ if (noteCount > 0 || (parent == 0 && !isFreeLayout())) { // But don't remove columns!
+ appendNoteIn(note, parent); // 2. ... Insert it... FIXME: Initially, the if() the insrtion was the step 2. Was it on purpose?
// The notes in the group are counted two times (it's why appendNoteIn() was called before loadNotes):
m_count -= noteCount;// TODO: Recompute note count every time noteCount() is emitted!
m_countFounds -= noteCount;
@@ -722,7 +722,7 @@ void Basket::loadNotes(const TQDomElement &notes, Note *tqparent)
NoteFactory__loadNode(XMLWork::getElement(e, "content"), e.attribute("type"), note, /*lazyLoad=*/m_finishLoadOnFirstShow); // ... Populate it with content...
if (e.attribute("type") == "text")
m_shouldConvertPlainTextNotes = true; // Convert Pre-0.6.0 baskets: plain text notes should be converted to rich text ones once all is loaded!
- appendNoteIn(note, tqparent); // ... And insert it.
+ appendNoteIn(note, parent); // ... And insert it.
// Load dates:
if (e.hasAttribute("added"))
note->setAddedDate( TQDateTime::fromString(e.attribute("added"), Qt::ISODate));
@@ -759,9 +759,9 @@ void Basket::loadNotes(const TQDomElement &notes, Note *tqparent)
}
}
-void Basket::saveNotes(TQDomDocument &document, TQDomElement &element, Note *tqparent)
+void Basket::saveNotes(TQDomDocument &document, TQDomElement &element, Note *parent)
{
- Note *note = (tqparent ? tqparent->firstChild() : firstNote());
+ Note *note = (parent ? parent->firstChild() : firstNote());
while (note) {
// Create Element:
TQDomElement noteElement = document.createElement(note->isGroup() ? "group" : "note");
@@ -1329,8 +1329,8 @@ void Basket::countsChangedTimeOut()
}
-Basket::Basket(TQWidget *tqparent, const TQString &folderName)
- : TQScrollView(tqparent),
+Basket::Basket(TQWidget *parent, const TQString &folderName)
+ : TQScrollView(parent),
TQToolTip(viewport()),
m_noActionOnMouseRelease(false), m_ignoreCloseEditorOnNextMouseRelease(false), m_pressPos(-100, -100), m_canDrag(false),
m_firstNote(0), m_columnsCount(1), m_mindMap(false), m_resizingNote(0L), m_pickedResizer(0), m_movingNote(0L), m_pickedHandle(0, 0),
@@ -2563,16 +2563,16 @@ void Basket::selectAll()
else if (m_editor->lineEdit())
m_editor->lineEdit()->selectAll();
} else {
- // First select all in the group, then in the tqparent group...
+ // First select all in the group, then in the parent group...
Note *child = m_focusedNote;
- Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
- while (tqparent) {
- if (!tqparent->allSelected()) {
- tqparent->setSelectedRecursivly(true);
+ Note *parent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
+ while (parent) {
+ if (!parent->allSelected()) {
+ parent->setSelectedRecursivly(true);
return;
}
- child = tqparent;
- tqparent = tqparent->parentNote();
+ child = parent;
+ parent = parent->parentNote();
}
// Then, select all:
FOR_EACH_NOTE (note)
@@ -3968,7 +3968,7 @@ NoteSelection* Basket::selectedNotes()
return 0;
for (NoteSelection *node = selection.firstChild; node; node = node->next)
- node->tqparent = 0;
+ node->parent = 0;
// If the top-most groups are columns, export only childs of those groups
// (because user is not consciencious that columns are groups, and don't care: it's not what she want):
@@ -3982,12 +3982,12 @@ NoteSelection* Basket::selectedNotes()
for (NoteSelection *subNode = node->firstChild; subNode; subNode = nextSubNode) {
nextSubNode = subNode->next;
tmpSelection.append(subNode);
- subNode->tqparent = 0;
+ subNode->parent = 0;
subNode->next = 0;
}
} else {
tmpSelection.append(node);
- node->tqparent = 0;
+ node->parent = 0;
node->next = 0;
}
}
@@ -4432,7 +4432,7 @@ void Basket::noteGroup()
insertNote(group, first, Note::TopInsert, TQPoint(), /*animateNewPosition=*/false);
}
- // Put a FAKE UNSELECTED note in the new group, so if the new group is inside an allSelected() group, the tqparent group is not moved inside the new group!
+ // Put a FAKE UNSELECTED note in the new group, so if the new group is inside an allSelected() group, the parent group is not moved inside the new group!
Note *fakeNote = NoteFactory::createNoteColor(TQt::red, this);
insertNote(fakeNote, group, Note::BottomColumn, TQPoint(), /*animateNewPosition=*/false);
@@ -4503,7 +4503,7 @@ void Basket::selectSelection(NoteSelection *selection)
void Basket::noteMoveOnTop()
{
- // TODO: Get the group containing the selected notes and first move inside the group, then inside tqparent group, then in the basket
+ // TODO: Get the group containing the selected notes and first move inside the group, then inside parent group, then in the basket
// TODO: Move on top/bottom... of the column or basjet
NoteSelection *selection = selectedNotes();
@@ -4531,7 +4531,7 @@ void Basket::noteMoveOnBottom()
// TODO: Duplicate code: void noteMoveOn();
- // TODO: Get the group containing the selected notes and first move inside the group, then inside tqparent group, then in the basket
+ // TODO: Get the group containing the selected notes and first move inside the group, then inside parent group, then in the basket
// TODO: Move on top/bottom... of the column or basjet
NoteSelection *selection = selectedNotes();
@@ -4816,12 +4816,12 @@ Note* Basket::noteOn(NoteOn side)
Note* Basket::firstNoteInGroup()
{
Note *child = m_focusedNote;
- Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
- while (tqparent) {
- if (tqparent->firstChild() != child && !tqparent->isColumn())
- return tqparent->firstRealChild();
- child = tqparent;
- tqparent = tqparent->parentNote();
+ Note *parent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
+ while (parent) {
+ if (parent->firstChild() != child && !parent->isColumn())
+ return parent->firstRealChild();
+ child = parent;
+ parent = parent->parentNote();
}
return 0;
}
@@ -4830,12 +4830,12 @@ Note* Basket::noteOnHome()
{
// First try to find the first note of the group containing the focused note:
Note *child = m_focusedNote;
- Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
- while (tqparent) {
- if (tqparent->nextShownInStack() != m_focusedNote)
- return tqparent->nextShownInStack();
- child = tqparent;
- tqparent = tqparent->parentNote();
+ Note *parent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
+ while (parent) {
+ if (parent->nextShownInStack() != m_focusedNote)
+ return parent->nextShownInStack();
+ child = parent;
+ parent = parent->parentNote();
}
// If it was not found, then focus the very first note in the basket:
@@ -4857,10 +4857,10 @@ Note* Basket::noteOnHome()
Note* Basket::noteOnEnd()
{
Note *child = m_focusedNote;
- Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
+ Note *parent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
Note *lastChild;
- while (tqparent) {
- lastChild = tqparent->lastRealChild();
+ while (parent) {
+ lastChild = parent->lastRealChild();
if (lastChild && lastChild != m_focusedNote) {
if (lastChild->isShown())
return lastChild;
@@ -4868,8 +4868,8 @@ Note* Basket::noteOnEnd()
if (lastChild && lastChild->isShown() && lastChild != m_focusedNote)
return lastChild;
}
- child = tqparent;
- tqparent = tqparent->parentNote();
+ child = parent;
+ parent = parent->parentNote();
}
if (isFreeLayout()) {
Note *last;
@@ -5395,7 +5395,7 @@ bool Basket::saveToFile(const TQString& fullPath, const TQByteArray& array, TQ_U
(openSuccess
? i18n("Please remove files on the disk <b>%1</b> to let the application safely save your changes.")
.tqarg(KIO::findPathMountPoint(fullPath))
- : i18n("File permissions are bad for <b>%1</b>. Please check that you have write access to it and the tqparent folders.")
+ : i18n("File permissions are bad for <b>%1</b>. Please check that you have write access to it and the parent folders.")
.tqarg(fullPath)
),
TQT_TQWIDGET(kapp->activeWindow())
@@ -5430,9 +5430,9 @@ bool Basket::saveToFile(const TQString& fullPath, const TQByteArray& array, TQ_U
return safelySaveToFile(fullPath, array, array.size());
}
-DiskErrorDialog::DiskErrorDialog(const TQString &titleMessage, const TQString &message, TQWidget *tqparent)
+DiskErrorDialog::DiskErrorDialog(const TQString &titleMessage, const TQString &message, TQWidget *parent)
: KDialogBase(KDialogBase::Plain, i18n("Save Error"),
- (KDialogBase::ButtonCode)0, (KDialogBase::ButtonCode)0, tqparent, /*name=*/"DiskError")
+ (KDialogBase::ButtonCode)0, (KDialogBase::ButtonCode)0, parent, /*name=*/"DiskError")
{
//enableButtonCancel(false);
//enableButtonClose(false);