summaryrefslogtreecommitdiffstats
path: root/src/note.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-09 02:23:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-09 02:23:29 +0000
commitf24ac211b8e67f545e757a50da4a00252d092869 (patch)
tree113a9b3b91d929b658082587b6e10f647570f775 /src/note.cpp
parent2ebe91d378b798914b9fd5e741f81bac4ab3ef08 (diff)
downloadbasket-f24ac211b8e67f545e757a50da4a00252d092869.tar.gz
basket-f24ac211b8e67f545e757a50da4a00252d092869.zip
Remove the tq in front of these incorrectly TQt4-converted methods/data members:
tqrepaint[...] tqinvalidate[...] tqparent[...] tqmask[...] tqlayout[...] tqalignment[...] git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/basket@1240522 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/note.cpp')
-rw-r--r--src/note.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/note.cpp b/src/note.cpp
index 54bb90d..12ff890 100644
--- a/src/note.cpp
+++ b/src/note.cpp
@@ -454,7 +454,7 @@ bool Note::tqcontains(Note *note)
if (note == this)
return true;
else
- note = note->tqparentNote();
+ note = note->parentNote();
// FOR_EACH_CHILD (child)
// if (child->tqcontains(note))
@@ -520,18 +520,18 @@ int Note::yExpander()
bool Note::isFree()
{
- return tqparentNote() == 0 && basket()->isFreeLayout();
+ return parentNote() == 0 && basket()->isFreeLayout();
}
bool Note::isColumn()
{
- return tqparentNote() == 0 && basket()->isColumnsLayout();
+ return parentNote() == 0 && basket()->isColumnsLayout();
}
bool Note::hasResizer()
{
// "isFree" || "isColmun but not the last"
- return tqparentNote() == 0 && (basket()->isFreeLayout() || m_next != 0L);
+ return parentNote() == 0 && (basket()->isFreeLayout() || m_next != 0L);
}
int Note::resizerHeight()
@@ -733,7 +733,7 @@ void Note::setCursor(Zone zone)
case Note::None: basket()->viewport()->unsetCursor(); break;
default:
State *state = stateForEmblemNumber(zone - Emblem0);
- if (state && state->tqparentTag()->states().count() > 1)
+ if (state && state->parentTag()->states().count() > 1)
basket()->viewport()->setCursor(TQt::PointingHandCursor);
else
basket()->viewport()->unsetCursor();
@@ -857,7 +857,7 @@ void Note::requestRetqlayout()
{
m_width = 0;
unbufferize();
- basket()->retqlayoutNotes(true); // TODO: A signal that will retqlayout ONCE and DELAYED if called several times
+ basket()->relayoutNotes(true); // TODO: A signal that will retqlayout ONCE and DELAYED if called several times
}
void Note::setWidth(int width) // TODO: inline ?
@@ -998,7 +998,7 @@ void Note::toggleFolded(bool animate)
if (basket()->isLoaded() && !m_isFolded) {
//basket()->setFocusedNote(this);
- basket()->retqlayoutNotes(true);
+ basket()->relayoutNotes(true);
basket()->ensureNoteVisible(this);
}
@@ -1090,7 +1090,7 @@ bool Note::showSubNotes()
return !m_isFolded || !m_collapseFinished || basket()->isFiltering();
}
-void Note::retqlayoutAt(int x, int y, bool animate)
+void Note::relayoutAt(int x, int y, bool animate)
{
if (!matching())
return;
@@ -1127,14 +1127,14 @@ void Note::retqlayoutAt(int x, int y, bool animate)
bool first = true;
while (child) {
if (child->matching() && (!m_isFolded || first || basket()->isFiltering())) { // Don't use showSubNotes() but use !m_isFolded because we don't want a retqlayout for the animated collapsing notes
- child->retqlayoutAt(x + width(), y+h, animate);
+ child->relayoutAt(x + width(), y+h, animate);
h += child->finalHeight();
} 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:
if (!child->matching())
- child->setY(tqparentPrimaryNote()->y());
+ child->setY(parentPrimaryNote()->y());
child = child->next();
first = false;
}
@@ -1154,7 +1154,7 @@ void Note::retqlayoutAt(int x, int y, bool animate)
}
// Set the basket area limits (but not for child notes: no need, because they will look for theire tqparent note):
- if (!tqparentNote()) {
+ if (!parentNote()) {
if (basket()->tmpWidth < finalRightLimit() + (hasResizer() ? RESIZER_WIDTH : 0))
basket()->tmpWidth = finalRightLimit() + (hasResizer() ? RESIZER_WIDTH : 0);
if (basket()->tmpHeight < finalY() + finalHeight())
@@ -1203,8 +1203,8 @@ int Note::rightLimit()
{
if (isColumn() && m_next == 0L) // The last column
return TQMAX(x() + minWidth(), basket()->visibleWidth());
- else if (tqparentNote())
- return tqparentNote()->rightLimit();
+ else if (parentNote())
+ return parentNote()->rightLimit();
else
return m_x + m_groupWidth;
}
@@ -1213,8 +1213,8 @@ int Note::finalRightLimit()
{
if (isColumn() && m_next == 0L) // The last column
return TQMAX(finalX() + minWidth(), basket()->visibleWidth());
- else if (tqparentNote())
- return tqparentNote()->finalRightLimit();
+ else if (parentNote())
+ return parentNote()->finalRightLimit();
else
return finalX() + m_groupWidth;
}
@@ -2088,18 +2088,18 @@ void Note::addState(State *state, bool orReplace)
if (!content())
return;
- Tag *tag = state->tqparentTag();
+ Tag *tag = state->parentTag();
State::List::iterator itStates = m_states.begin();
// Browse all tags, see if the note has it, increment itSates if yes, and then insert the state at this position...
// For each existing tags:
for (Tag::List::iterator it = Tag::all.begin(); it != Tag::all.end(); ++it) {
// If the current tag isn't the one to assign or the current one on the note, go to the next tag:
- if (*it != tag && itStates != m_states.end() && *it != (*itStates)->tqparentTag())
+ if (*it != tag && itStates != m_states.end() && *it != (*itStates)->parentTag())
continue;
// We found the tag to insert:
if (*it == tag) {
// And the note already have the tag:
- if (itStates != m_states.end() && *it == (*itStates)->tqparentTag()) {
+ if (itStates != m_states.end() && *it == (*itStates)->parentTag()) {
// We replace the state if wanted:
if (orReplace) {
itStates = m_states.insert(itStates, state);
@@ -2114,7 +2114,7 @@ void Note::addState(State *state, bool orReplace)
return;
}
// The note has this tag:
- if (itStates != m_states.end() && *it == (*itStates)->tqparentTag())
+ if (itStates != m_states.end() && *it == (*itStates)->parentTag())
++itStates;
}
}
@@ -2197,7 +2197,7 @@ void Note::removeState(State *state)
void Note::removeTag(Tag *tag)
{
for (State::List::iterator it = m_states.begin(); it != m_states.end(); ++it)
- if ((*it)->tqparentTag() == tag) {
+ if ((*it)->parentTag() == tag) {
m_states.remove(it);
recomputeStyle();
return;
@@ -2254,7 +2254,7 @@ void Note::addStateToSelectedNotes(State *state, bool orReplace)
void Note::changeStateOfSelectedNotes(State *state)
{
- if (content() && isSelected() && hasTag(state->tqparentTag()))
+ if (content() && isSelected() && hasTag(state->parentTag()))
addState(state);
FOR_EACH_CHILD (child)
@@ -2283,7 +2283,7 @@ bool Note::hasState(State *state)
bool Note::hasTag(Tag *tag)
{
for (State::List::iterator it = m_states.begin(); it != m_states.end(); ++it)
- if ((*it)->tqparentTag() == tag)
+ if ((*it)->parentTag() == tag)
return true;
return false;
}
@@ -2291,7 +2291,7 @@ bool Note::hasTag(Tag *tag)
State* Note::stateOfTag(Tag *tag)
{
for (State::List::iterator it = m_states.begin(); it != m_states.end(); ++it)
- if ((*it)->tqparentTag() == tag)
+ if ((*it)->parentTag() == tag)
return *it;
return 0;
}
@@ -2354,8 +2354,8 @@ void Note::inheritTagsOf(Note *note)
return;
for (State::List::iterator it = note->states().begin(); it != note->states().end(); ++it)
- if ((*it)->tqparentTag() && (*it)->tqparentTag()->inheritedBySiblings())
- addTag((*it)->tqparentTag());
+ if ((*it)->parentTag() && (*it)->parentTag()->inheritedBySiblings())
+ addTag((*it)->parentTag());
}
void Note::unbufferizeAll()
@@ -2386,11 +2386,11 @@ TQRect Note::visibleRect()
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 = tqparentNote();
+ Note *tqparent = parentNote();
while (tqparent) {
if (tqparent->expandingOrCollapsing())
substractRectOnAreas(TQRect(x(), tqparent->y() - height(), width(), height()), areas, true);
- tqparent = tqparent->tqparentNote();
+ tqparent = tqparent->parentNote();
}
if (areas.count() > 0)
@@ -2453,7 +2453,7 @@ Note* Note::noteForFullPath(const TQString &path)
void Note::listUsedTags(TQValueList<Tag*> &list)
{
for (State::List::Iterator it = m_states.begin(); it != m_states.end(); ++it) {
- Tag *tag = (*it)->tqparentTag();
+ Tag *tag = (*it)->parentTag();
if (!list.tqcontains(tag))
list.append(tag);
}
@@ -2491,7 +2491,7 @@ Note* Note::nextInStack()
return next()->nextInStack();
// And finally, in the tqparent:
- Note *note = tqparentNote();
+ Note *note = parentNote();
while (note)
if (note->next())
if (note->next()->content())
@@ -2499,7 +2499,7 @@ Note* Note::nextInStack()
else
return note->next()->nextInStack();
else
- note = note->tqparentNote();
+ note = note->parentNote();
// Not found:
return 0;
@@ -2518,8 +2518,8 @@ Note* Note::prevInStack()
return note;
}
- if (tqparentNote())
- return tqparentNote()->prevInStack();
+ if (parentNote())
+ return parentNote()->prevInStack();
else
return 0;
}
@@ -2554,13 +2554,13 @@ bool Note::isShown()
return true;
// So, here we go to the complexe case: if the note is inside a collapsed group:
- Note *group = tqparentNote();
+ Note *group = parentNote();
Note *child = this;
while (group) {
if (group->isFolded() && group->firstChild() != child)
return false;
child = group;
- group = group->tqparentNote();
+ group = group->parentNote();
}
return true;
}
@@ -2645,7 +2645,7 @@ void Note::groupIn(Note *group)
bool Note::tryExpandParent()
{
- Note *tqparent = tqparentNote();
+ Note *tqparent = parentNote();
Note *child = this;
while (tqparent) {
if (tqparent->firstChild() != child)
@@ -2654,18 +2654,18 @@ bool Note::tryExpandParent()
return false;
if (tqparent->isFolded()) {
tqparent->toggleFolded(true);
- basket()->retqlayoutNotes(true);
+ basket()->relayoutNotes(true);
return true;
}
child = tqparent;
- tqparent = tqparent->tqparentNote();
+ tqparent = tqparent->parentNote();
}
return false;
}
bool Note::tryFoldParent() // TODO: withCtrl ? withShift ?
{
- Note *tqparent = tqparentNote();
+ Note *tqparent = parentNote();
Note *child = this;
while (tqparent) {
if (tqparent->firstChild() != child)
@@ -2674,11 +2674,11 @@ bool Note::tryFoldParent() // TODO: withCtrl ? withShift ?
return false;
if (!tqparent->isFolded()) {
tqparent->toggleFolded(true);
- basket()->retqlayoutNotes(true);
+ basket()->relayoutNotes(true);
return true;
}
child = tqparent;
- tqparent = tqparent->tqparentNote();
+ tqparent = tqparent->parentNote();
}
return false;
}
@@ -2754,11 +2754,11 @@ int Note::distanceOnTopBottom(Note *note, int side)
return int(sqrt(pow(noteCenterX - thisCenterX, 2) + pow(noteCenterY - thisCenterY, 2)) + angle);
}
-Note* Note::tqparentPrimaryNote()
+Note* Note::parentPrimaryNote()
{
Note *primary = this;
- while (primary->tqparentNote())
- primary = primary->tqparentNote();
+ while (primary->parentNote())
+ primary = primary->parentNote();
return primary;
}