diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
commit | 631d7b9b0878ca3842496b5719f9c5803335e150 (patch) | |
tree | d09fe0c8cd6edfd28c9c7947b0af60ccc75fbb8d /src/note.cpp | |
parent | 33f08e93132a53bf14f41f5f1e567eeea832b336 (diff) | |
download | basket-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/note.cpp')
-rw-r--r-- | src/note.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/note.cpp b/src/note.cpp index 5c07de4..94eab87 100644 --- a/src/note.cpp +++ b/src/note.cpp @@ -68,12 +68,12 @@ int Note::TAG_ARROW_WIDTH = 5; int Note::EMBLEM_SIZE = 16; int Note::MIN_HEIGHT = 2*NOTE_MARGIN + EMBLEM_SIZE; -Note::Note(Basket *tqparent) +Note::Note(Basket *parent) : m_prev(0), m_next(0), m_x(0), m_y(-1), m_width(-1), m_height(-1), m_groupWidth(250), m_isFolded(false), m_firstChild(0L), m_parentNote(0), - m_basket(tqparent), m_content(0), m_addedDate(TQDateTime::tqcurrentDateTime()), m_lastModificationDate(TQDateTime::tqcurrentDateTime()), + m_basket(parent), m_content(0), m_addedDate(TQDateTime::tqcurrentDateTime()), m_lastModificationDate(TQDateTime::tqcurrentDateTime()), m_computedAreas(false), m_onTop(false), m_deltaX(0), m_deltaY(0), m_deltaHeight(0), m_collapseFinished(true), m_expandingFinished(true), m_hovered(false), m_hoveredZone(Note::None), m_focused(false), m_selected(false), m_wasInLastSelectionRect(false), @@ -422,7 +422,7 @@ NoteSelection* Note::selectedNotes() NoteSelection *reducedSelection = selection->firstChild; // delete selection; // TODO: Cut all connexions of 'selection' before deleting it! for (NoteSelection *node = reducedSelection; node; node = node->next) - node->tqparent = 0; + node->parent = 0; return reducedSelection; } } else { @@ -1132,7 +1132,7 @@ void Note::relayoutAt(int x, int y, bool animate) } else // In case the user collapse a group, then move it and then expand it: child->setXRecursivly(x + width()); // notes SHOULD have a good X coordonate, and not the old one! // For future animation when re-match, but on bottom of already matched notes! - // Find tqparent primary note and set the Y to THAT y: + // Find parent primary note and set the Y to THAT y: if (!child->matching()) child->setY(parentPrimaryNote()->y()); child = child->next(); @@ -1153,7 +1153,7 @@ void Note::relayoutAt(int x, int y, bool animate) // and NEED RELAYOUT } - // Set the basket area limits (but not for child notes: no need, because they will look for theire tqparent note): + // Set the basket area limits (but not for child notes: no need, because they will look for theire parent note): if (!parentNote()) { if (basket()->tmpWidth < finalRightLimit() + (hasResizer() ? RESIZER_WIDTH : 0)) basket()->tmpWidth = finalRightLimit() + (hasResizer() ? RESIZER_WIDTH : 0); @@ -2385,12 +2385,12 @@ TQRect Note::visibleRect() TQValueList<TQRect> areas; areas.append(rect()); - // When we are folding a tqparent group, if this note is bigger than the first real note of the group, cut the top of this: - Note *tqparent = parentNote(); - while (tqparent) { - if (tqparent->expandingOrCollapsing()) - substractRectOnAreas(TQRect(x(), tqparent->y() - height(), width(), height()), areas, true); - tqparent = tqparent->parentNote(); + // When we are folding a parent group, if this note is bigger than the first real note of the group, cut the top of this: + Note *parent = parentNote(); + while (parent) { + if (parent->expandingOrCollapsing()) + substractRectOnAreas(TQRect(x(), parent->y() - height(), width(), height()), areas, true); + parent = parent->parentNote(); } if (areas.count() > 0) @@ -2404,8 +2404,8 @@ void Note::recomputeBlankRects(TQValueList<TQRect> &blankAreas) if (!matching()) return; - // visibleRect() instead of rect() because if we are folding/expanding a smaller tqparent group, then some part is hidden! - // But anyway, a resizer is always a primary note and is never hidden by a tqparent group, so no visibleResizerRect() method! + // visibleRect() instead of rect() because if we are folding/expanding a smaller parent group, then some part is hidden! + // But anyway, a resizer is always a primary note and is never hidden by a parent group, so no visibleResizerRect() method! substractRectOnAreas(visibleRect(), blankAreas, true); if (hasResizer()) substractRectOnAreas(resizerRect(), blankAreas, true); @@ -2490,7 +2490,7 @@ Note* Note::nextInStack() else return next()->nextInStack(); - // And finally, in the tqparent: + // And finally, in the parent: Note *note = parentNote(); while (note) if (note->next()) @@ -2645,40 +2645,40 @@ void Note::groupIn(Note *group) bool Note::tryExpandParent() { - Note *tqparent = parentNote(); + Note *parent = parentNote(); Note *child = this; - while (tqparent) { - if (tqparent->firstChild() != child) + while (parent) { + if (parent->firstChild() != child) return false; - if (tqparent->isColumn()) + if (parent->isColumn()) return false; - if (tqparent->isFolded()) { - tqparent->toggleFolded(true); + if (parent->isFolded()) { + parent->toggleFolded(true); basket()->relayoutNotes(true); return true; } - child = tqparent; - tqparent = tqparent->parentNote(); + child = parent; + parent = parent->parentNote(); } return false; } bool Note::tryFoldParent() // TODO: withCtrl ? withShift ? { - Note *tqparent = parentNote(); + Note *parent = parentNote(); Note *child = this; - while (tqparent) { - if (tqparent->firstChild() != child) + while (parent) { + if (parent->firstChild() != child) return false; - if (tqparent->isColumn()) + if (parent->isColumn()) return false; - if (!tqparent->isFolded()) { - tqparent->toggleFolded(true); + if (!parent->isFolded()) { + parent->toggleFolded(true); basket()->relayoutNotes(true); return true; } - child = tqparent; - tqparent = tqparent->parentNote(); + child = parent; + parent = parent->parentNote(); } return false; } |