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
v3.5.13-sru
tpearson 14 years ago
parent 2ebe91d378
commit f24ac211b8

@ -170,14 +170,14 @@ int NoteSelection::count()
return count; return count;
} }
TQValueList<Note*> NoteSelection::tqparentGroups() TQValueList<Note*> NoteSelection::parentGroups()
{ {
TQValueList<Note*> groups; TQValueList<Note*> groups;
// For each note: // For each note:
for (NoteSelection *node = firstStacked(); node; node = node->nextStacked()) for (NoteSelection *node = firstStacked(); node; node = node->nextStacked())
// For each tqparent groups of the note: // For each tqparent groups of the note:
for (Note *note = node->note->tqparentNote(); note; note = note->tqparentNote()) for (Note *note = node->note->parentNote(); note; note = note->parentNote())
// Add it (if it was not already in the list): // Add it (if it was not already in the list):
if (!note->isColumn() && !groups.tqcontains(note)) if (!note->isColumn() && !groups.tqcontains(note))
groups.append(note); groups.append(note);
@ -430,7 +430,7 @@ void Basket::appendNoteAfter(Note *note, Note *after)
if (after) { if (after) {
// The normal case: // The normal case:
for (Note *n = note; n; n = n->next()) for (Note *n = note; n; n = n->next())
n->setParentNote(after->tqparentNote()); n->setParentNote(after->parentNote());
note->setPrev(after); note->setPrev(after);
last->setNext(after->next()); last->setNext(after->next());
after->setNext(note); after->setNext(note);
@ -470,15 +470,15 @@ void Basket::appendNoteBefore(Note *note, Note *before)
if (before) { if (before) {
// The normal case: // The normal case:
for (Note *n = note; n; n = n->next()) for (Note *n = note; n; n = n->next())
n->setParentNote(before->tqparentNote()); n->setParentNote(before->parentNote());
note->setPrev(before->prev()); note->setPrev(before->prev());
last->setNext(before); last->setNext(before);
before->setPrev(last); before->setPrev(last);
if (note->prev()) if (note->prev())
note->prev()->setNext(note); note->prev()->setNext(note);
else { else {
if (note->tqparentNote()) if (note->parentNote())
note->tqparentNote()->setFirstChild(note); note->parentNote()->setFirstChild(note);
else else
m_firstNote = note; m_firstNote = note;
} }
@ -556,19 +556,19 @@ void Basket::unplugNote(Note *note)
if (note->next()) if (note->next())
note->next()->setPrev(note->prev()); note->next()->setPrev(note->prev());
if (note->tqparentNote()) { if (note->parentNote()) {
// If it was the first note of a group, change the first note of the group: // If it was the first note of a group, change the first note of the group:
if (note->tqparentNote()->firstChild() == note) if (note->parentNote()->firstChild() == note)
note->tqparentNote()->setFirstChild( note->next() ); note->parentNote()->setFirstChild( note->next() );
if (!note->tqparentNote()->isColumn()) { if (!note->parentNote()->isColumn()) {
// Ungroup if still 0 note inside tqparent group: // Ungroup if still 0 note inside tqparent group:
if ( ! note->tqparentNote()->firstChild() ) if ( ! note->parentNote()->firstChild() )
unplugNote(note->tqparentNote()); // TODO delete unplugNote(note->parentNote()); // TODO delete
// Ungroup if still 1 note inside tqparent group: // Ungroup if still 1 note inside tqparent group:
else if ( ! note->tqparentNote()->firstChild()->next() ) else if ( ! note->parentNote()->firstChild()->next() )
ungroupNote(note->tqparentNote()); ungroupNote(note->parentNote());
} }
} }
@ -593,7 +593,7 @@ void Basket::ungroupNote(Note *group)
lastGroupedNote->next()->setPrev(note); lastGroupedNote->next()->setPrev(note);
note->setNext(lastGroupedNote->next()); note->setNext(lastGroupedNote->next());
lastGroupedNote->setNext(note); lastGroupedNote->setNext(note);
note->setParentNote(group->tqparentNote()); note->setParentNote(group->parentNote());
note->setPrev(lastGroupedNote); note->setPrev(lastGroupedNote);
note->setGroupWidth(group->groupWidth() - Note::GROUP_WIDTH); note->setGroupWidth(group->groupWidth() - Note::GROUP_WIDTH);
@ -605,7 +605,7 @@ void Basket::ungroupNote(Note *group)
group->setFirstChild(0); group->setFirstChild(0);
unplugNote(group); // TODO: delete unplugNote(group); // TODO: delete
retqlayoutNotes(true); relayoutNotes(true);
} }
void Basket::groupNoteBefore(Note *note, Note *with) void Basket::groupNoteBefore(Note *note, Note *with)
@ -627,11 +627,11 @@ void Basket::groupNoteBefore(Note *note, Note *with)
group->setNext(with->next()); group->setNext(with->next());
group->setX(with->x()); group->setX(with->x());
group->setY(with->y()); group->setY(with->y());
if (with->tqparentNote() && with->tqparentNote()->firstChild() == with) if (with->parentNote() && with->parentNote()->firstChild() == with)
with->tqparentNote()->setFirstChild(group); with->parentNote()->setFirstChild(group);
else if (m_firstNote == with) else if (m_firstNote == with)
m_firstNote = group; m_firstNote = group;
group->setParentNote(with->tqparentNote()); group->setParentNote(with->parentNote());
group->setFirstChild(note); group->setFirstChild(note);
group->setGroupWidth(with->groupWidth() + Note::GROUP_WIDTH); group->setGroupWidth(with->groupWidth() + Note::GROUP_WIDTH);
@ -671,11 +671,11 @@ void Basket::groupNoteAfter(Note *note, Note *with)
group->setNext(with->next()); group->setNext(with->next());
group->setX(with->x()); group->setX(with->x());
group->setY(with->y()); group->setY(with->y());
if (with->tqparentNote() && with->tqparentNote()->firstChild() == with) if (with->parentNote() && with->parentNote()->firstChild() == with)
with->tqparentNote()->setFirstChild(group); with->parentNote()->setFirstChild(group);
else if (m_firstNote == with) else if (m_firstNote == with)
m_firstNote = group; m_firstNote = group;
group->setParentNote(with->tqparentNote()); group->setParentNote(with->parentNote());
group->setFirstChild(with); group->setFirstChild(with);
group->setGroupWidth(with->groupWidth() + Note::GROUP_WIDTH); group->setGroupWidth(with->groupWidth() + Note::GROUP_WIDTH);
@ -983,11 +983,11 @@ void Basket::setDisposition(int disposition, int columnCount)
} }
if (columnCount != m_columnsCount) { if (columnCount != m_columnsCount) {
m_columnsCount = (columnCount <= 0 ? 1 : columnCount); m_columnsCount = (columnCount <= 0 ? 1 : columnCount);
equalizeColumnSizes(); // Will retqlayoutNotes() equalizeColumnSizes(); // Will relayoutNotes()
} }
} else if (currentDisposition == COLUMNS_LAYOUT && (disposition == FREE_LAYOUT || disposition == MINDMAPS_LAYOUT)) { } else if (currentDisposition == COLUMNS_LAYOUT && (disposition == FREE_LAYOUT || disposition == MINDMAPS_LAYOUT)) {
Note *column = firstNote(); Note *column = firstNote();
m_columnsCount = 0; // Now, so retqlayoutNotes() will not retqlayout the free notes as if they were columns! m_columnsCount = 0; // Now, so relayoutNotes() will not retqlayout the free notes as if they were columns!
while (column) { while (column) {
// Move all childs on the first level: // Move all childs on the first level:
Note *nextColumn = column->next(); Note *nextColumn = column->next();
@ -996,7 +996,7 @@ void Basket::setDisposition(int disposition, int columnCount)
} }
unselectAll(); unselectAll();
m_mindMap = (disposition == MINDMAPS_LAYOUT); m_mindMap = (disposition == MINDMAPS_LAYOUT);
retqlayoutNotes(true); relayoutNotes(true);
} else if ((currentDisposition == FREE_LAYOUT || currentDisposition == MINDMAPS_LAYOUT) && disposition == COLUMNS_LAYOUT) { } else if ((currentDisposition == FREE_LAYOUT || currentDisposition == MINDMAPS_LAYOUT) && disposition == COLUMNS_LAYOUT) {
if (firstNote()) { if (firstNote()) {
// TODO: Reorder notes! // TODO: Reorder notes!
@ -1031,7 +1031,7 @@ void Basket::setDisposition(int disposition, int columnCount)
} }
} }
m_columnsCount = (columnCount <= 0 ? 1 : columnCount); m_columnsCount = (columnCount <= 0 ? 1 : columnCount);
equalizeColumnSizes(); // Will retqlayoutNotes() equalizeColumnSizes(); // Will relayoutNotes()
} }
} }
@ -1041,7 +1041,7 @@ void Basket::equalizeColumnSizes()
return; return;
// Necessary to know the available space; // Necessary to know the available space;
retqlayoutNotes(true); relayoutNotes(true);
int availableSpace = visibleWidth(); int availableSpace = visibleWidth();
int columnWidth = (visibleWidth() - (columnsCount()-1)*Note::GROUP_WIDTH) / columnsCount(); int columnWidth = (visibleWidth() - (columnsCount()-1)*Note::GROUP_WIDTH) / columnsCount();
@ -1067,7 +1067,7 @@ void Basket::equalizeColumnSizes()
column = column->next(); column = column->next();
} }
retqlayoutNotes(true); relayoutNotes(true);
} }
void Basket::enableActions() void Basket::enableActions()
@ -1117,7 +1117,7 @@ void Basket::aboutToBeActivated()
FOR_EACH_NOTE (note) FOR_EACH_NOTE (note)
note->finishLazyLoad(); note->finishLazyLoad();
//retqlayoutNotes(/*animate=*/false); //relayoutNotes(/*animate=*/false);
setFocusedNote(0); // So that during the focusInEvent that will come shortly, the FIRST note is focused. setFocusedNote(0); // So that during the focusInEvent that will come shortly, the FIRST note is focused.
if (Settings::playAnimations() && !decoration()->filterBar()->filterData().isFiltering && Global::bnpView->currentBasket() == this) // No animation when filtering all! if (Settings::playAnimations() && !decoration()->filterBar()->filterData().isFiltering && Global::bnpView->currentBasket() == this) // No animation when filtering all!
@ -1205,7 +1205,7 @@ void Basket::load()
m_columnsCount = columnsCount; m_columnsCount = columnsCount;
} }
retqlayoutNotes(false); relayoutNotes(false);
// On application start, the current basket is not focused yet, so the focus rectangle is not shown when calling focusANote(): // On application start, the current basket is not focused yet, so the focus rectangle is not shown when calling focusANote():
if (Global::bnpView->currentBasket() == this) if (Global::bnpView->currentBasket() == this)
@ -1243,7 +1243,7 @@ void Basket::newFilter(const FilterData &data, bool andEnsureVisible/* = true*/)
for (Note *note = firstNote(); note; note = note->next()) for (Note *note = firstNote(); note; note = note->next())
m_countFounds += note->newFilter(data); m_countFounds += note->newFilter(data);
retqlayoutNotes(true); relayoutNotes(true);
signalCountsChanged(); signalCountsChanged();
if (hasFocus()) // if (!hasFocus()), focusANote() will be called at focusInEvent() if (hasFocus()) // if (!hasFocus()), focusANote() will be called at focusInEvent()
@ -1351,7 +1351,7 @@ Basket::Basket(TQWidget *tqparent, const TQString &folderName)
m_doNotCloseEditor(false), m_editParagraph(0), m_editIndex(0), m_doNotCloseEditor(false), m_editParagraph(0), m_editIndex(0),
m_isDuringDrag(false), m_draggedNotes(), m_isDuringDrag(false), m_draggedNotes(),
m_focusedNote(0), m_startOfShiftSelectionNote(0), m_focusedNote(0), m_startOfShiftSelectionNote(0),
m_finishLoadOnFirstShow(false), m_retqlayoutOnNextShow(false) m_finishLoadOnFirstShow(false), m_relayoutOnNextShow(false)
{ {
TQString sAction = "local_basket_activate_" + folderName; TQString sAction = "local_basket_activate_" + folderName;
m_action = new KAction("FAKE TEXT", "FAKE ICON", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(activatedShortcut()), Global::bnpView->actionCollection(), sAction); m_action = new KAction("FAKE TEXT", "FAKE ICON", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(activatedShortcut()), Global::bnpView->actionCollection(), sAction);
@ -1554,7 +1554,7 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event)
// Folding/Unfolding group: // Folding/Unfolding group:
if (zone == Note::GroupExpander) { if (zone == Note::GroupExpander) {
clicked->toggleFolded(Settings::playAnimations()); clicked->toggleFolded(Settings::playAnimations());
retqlayoutNotes(true); relayoutNotes(true);
m_noActionOnMouseRelease = true; m_noActionOnMouseRelease = true;
return; return;
} }
@ -1847,7 +1847,7 @@ void Basket::insertNote(Note *note, Note *clicked, int zone, const TQPoint &pos,
appendNoteAfter(note, lastNote()); appendNoteAfter(note, lastNote());
} }
retqlayoutNotes(true); relayoutNotes(true);
} }
void Basket::clickedToInsert(TQMouseEvent *event, Note *clicked, /*Note::Zone*/int zone) void Basket::clickedToInsert(TQMouseEvent *event, Note *clicked, /*Note::Zone*/int zone)
@ -1938,7 +1938,7 @@ void Basket::contentsDropEvent(TQDropEvent *event)
// Do NOT check the bottom&right borders. // Do NOT check the bottom&right borders.
// Because imagine someone drag&drop a big note from the top to the bottom of a big basket (with big vertical scrollbars), // Because imagine someone drag&drop a big note from the top to the bottom of a big basket (with big vertical scrollbars),
// the note is first removed, and retqlayoutNotes() compute the new height that is smaller // the note is first removed, and relayoutNotes() compute the new height that is smaller
// Then noteAt() is called for the mouse pointer position, because the basket is now smaller, the cursor is out of boundaries!!! // Then noteAt() is called for the mouse pointer position, because the basket is now smaller, the cursor is out of boundaries!!!
// Should, of course, not return 0: // Should, of course, not return 0:
Note *clicked = noteAt(event->pos().x(), event->pos().y()); Note *clicked = noteAt(event->pos().x(), event->pos().y());
@ -2428,7 +2428,7 @@ void Basket::contentsMouseMoveEvent(TQMouseEvent *event)
if (m_resizingNote) { if (m_resizingNote) {
int groupWidth = event->pos().x() - m_resizingNote->x() - m_pickedResizer; int groupWidth = event->pos().x() - m_resizingNote->x() - m_pickedResizer;
int minRight = m_resizingNote->minRight(); int minRight = m_resizingNote->minRight();
int maxRight = 100 * contentsWidth(); // A big enough value (+infinity) for free tqlayouts. int maxRight = 100 * contentsWidth(); // A big enough value (+infinity) for free layouts.
Note *nextColumn = m_resizingNote->next(); Note *nextColumn = m_resizingNote->next();
if (m_resizingNote->isColumn()) { if (m_resizingNote->isColumn()) {
if (nextColumn) if (nextColumn)
@ -2452,7 +2452,7 @@ void Basket::contentsMouseMoveEvent(TQMouseEvent *event)
column->setGroupWidth(column->groupWidth() - delta); column->setGroupWidth(column->groupWidth() - delta);
} }
} }
retqlayoutNotes(true); relayoutNotes(true);
} }
// Moving a Note: // Moving a Note:
@ -2463,8 +2463,8 @@ void Basket::contentsMouseMoveEvent(TQMouseEvent *event)
if (y < 0) y = 0; if (y < 0) y = 0;
m_movingNote->setX(x); m_movingNote->setX(x);
m_movingNote->setY(y); m_movingNote->setY(y);
m_movingNote->retqlayoutAt(x, y, / *animate=* /false); m_movingNote->relayoutAt(x, y, / *animate=* /false);
retqlayoutNotes(true); relayoutNotes(true);
} }
*/ */
@ -2565,14 +2565,14 @@ void Basket::selectAll()
} else { } else {
// First select all in the group, then in the tqparent group... // First select all in the group, then in the tqparent group...
Note *child = m_focusedNote; Note *child = m_focusedNote;
Note *tqparent = (m_focusedNote ? m_focusedNote->tqparentNote() : 0); Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
while (tqparent) { while (tqparent) {
if (!tqparent->allSelected()) { if (!tqparent->allSelected()) {
tqparent->setSelectedRecursivly(true); tqparent->setSelectedRecursivly(true);
return; return;
} }
child = tqparent; child = tqparent;
tqparent = tqparent->tqparentNote(); tqparent = tqparent->parentNote();
} }
// Then, select all: // Then, select all:
FOR_EACH_NOTE (note) FOR_EACH_NOTE (note)
@ -2687,7 +2687,7 @@ void Basket::doHoverEffects(const TQPoint &pos)
// Don't do hover effects when a popup menu is opened. // Don't do hover effects when a popup menu is opened.
// Primarily because the basket area will only receive mouseEnterEvent and mouveLeaveEvent. // Primarily because the basket area will only receive mouseEnterEvent and mouveLeaveEvent.
// It willn't be noticed of mouseMoveEvent, which would result in a aptqparently broken application state: // It willn't be noticed of mouseMoveEvent, which would result in a apparently broken application state:
if (kapp->activePopupWidget()) if (kapp->activePopupWidget())
underMouse = false; underMouse = false;
@ -2933,7 +2933,7 @@ Note* Basket::noteAt(int x, int y)
//NO: //NO:
// // Do NOT check the bottom&right borders. // // Do NOT check the bottom&right borders.
// // Because imagine someone drag&drop a big note from the top to the bottom of a big basket (with big vertical scrollbars), // // Because imagine someone drag&drop a big note from the top to the bottom of a big basket (with big vertical scrollbars),
// // the note is first removed, and retqlayoutNotes() compute the new height that is smaller // // the note is first removed, and relayoutNotes() compute the new height that is smaller
// // Then noteAt() is called for the mouse pointer position, because the basket is now smaller, the cursor is out of boundaries!!! // // Then noteAt() is called for the mouse pointer position, because the basket is now smaller, the cursor is out of boundaries!!!
// // Should, of course, not return 0: // // Should, of course, not return 0:
if (x < 0 || x > contentsWidth() || y < 0 || y > contentsHeight()) if (x < 0 || x > contentsWidth() || y < 0 || y > contentsHeight())
@ -2957,7 +2957,7 @@ Note* Basket::noteAt(int x, int y)
note = note->next(); note = note->next();
} }
// If the basket is tqlayouted in columns, return one of the columns to be able to add notes in them: // If the basket is layouted in columns, return one of the columns to be able to add notes in them:
if (isColumnsLayout()) { if (isColumnsLayout()) {
Note *column = m_firstNote; Note *column = m_firstNote;
while (column) { while (column) {
@ -2984,7 +2984,7 @@ Basket::~Basket()
void Basket::viewportResizeEvent(TQResizeEvent *event) void Basket::viewportResizeEvent(TQResizeEvent *event)
{ {
retqlayoutNotes(true); relayoutNotes(true);
//cornerWidget()->setShown(horizontalScrollBar()->isShown() && verticalScrollBar()->isShown()); //cornerWidget()->setShown(horizontalScrollBar()->isShown() && verticalScrollBar()->isShown());
if (horizontalScrollBar()->isShown() && verticalScrollBar()->isShown()) { if (horizontalScrollBar()->isShown() && verticalScrollBar()->isShown()) {
if (!cornerWidget()) if (!cornerWidget())
@ -3254,7 +3254,7 @@ void Basket::unsetNotesWidth()
} }
} }
void Basket::retqlayoutNotes(bool animate) void Basket::relayoutNotes(bool animate)
{ {
if (Global::bnpView->currentBasket() != this) if (Global::bnpView->currentBasket() != this)
return; // Optimize load time, and basket will be relaid out when activated, anyway return; // Optimize load time, and basket will be relaid out when activated, anyway
@ -3273,12 +3273,12 @@ void Basket::retqlayoutNotes(bool animate)
Note *note = m_firstNote; Note *note = m_firstNote;
while (note) { while (note) {
if (note->matching()) { if (note->matching()) {
note->retqlayoutAt(0, h, animate); note->relayoutAt(0, h, animate);
if (note->hasResizer()) { if (note->hasResizer()) {
int minGroupWidth = note->minRight() - note->finalX(); int minGroupWidth = note->minRight() - note->finalX();
if (note->groupWidth() < minGroupWidth) { if (note->groupWidth() < minGroupWidth) {
note->setGroupWidth(minGroupWidth); note->setGroupWidth(minGroupWidth);
retqlayoutNotes(animate); // Redo the thing, but this time it should not recurse relayoutNotes(animate); // Redo the thing, but this time it should not recurse
return; return;
} }
} }
@ -3343,7 +3343,7 @@ void Basket::animateObjects()
if (m_underMouse) if (m_underMouse)
doHoverEffects(); doHoverEffects();
recomputeBlankRects(); recomputeBlankRects();
//retqlayoutNotes(true); // In case an animated note was to the contents view boundaries, resize the view! //relayoutNotes(true); // In case an animated note was to the contents view boundaries, resize the view!
updateContents(); updateContents();
// If the drawing of the last frame was too long, we skip the drawing of the current and do the next one: // If the drawing of the last frame was too long, we skip the drawing of the current and do the next one:
} else { } else {
@ -3368,7 +3368,7 @@ void Basket::popupEmblemMenu(Note *note, int emblemNumber)
m_tagPopupNote = note; m_tagPopupNote = note;
State *state = note->stateForEmblemNumber(emblemNumber); State *state = note->stateForEmblemNumber(emblemNumber);
State *nextState = state->nextState(/*cycle=*/false); State *nextState = state->nextState(/*cycle=*/false);
Tag *tag = state->tqparentTag(); Tag *tag = state->parentTag();
m_tagPopup = tag; m_tagPopup = tag;
TQKeySequence sequence = tag->shortcut().operator TQKeySequence(); TQKeySequence sequence = tag->shortcut().operator TQKeySequence();
@ -3863,7 +3863,7 @@ bool Basket::closeEditor()
m_rightEditorBorder = 0; m_rightEditorBorder = 0;
Note *note = m_editor->note(); Note *note = m_editor->note();
note->setWidth(0); // For retqlayoutNotes() to succeed to take care of the change note->setWidth(0); // For relayoutNotes() to succeed to take care of the change
// Delete the editor BEFORE unselecting the note because unselecting the note would trigger closeEditor() recursivly: // Delete the editor BEFORE unselecting the note because unselecting the note would trigger closeEditor() recursivly:
bool isEmpty = m_editor->isEmpty(); bool isEmpty = m_editor->isEmpty();
@ -4005,7 +4005,7 @@ void Basket::showEditedNoteWhileFiltering()
Note *note = m_editor->note(); Note *note = m_editor->note();
filterAgain(); filterAgain();
note->setSelected(true); note->setSelected(true);
retqlayoutNotes(false); relayoutNotes(false);
note->setX(note->finalX()); note->setX(note->finalX());
note->setY(note->finalY()); note->setY(note->finalY());
filterAgainDelayed(); filterAgainDelayed();
@ -4136,7 +4136,7 @@ void Basket::focusANonSelectedNoteBelow(bool inSameColumn)
while (next && next->isSelected()) while (next && next->isSelected())
next = next->nextShownInStack(); next = next->nextShownInStack();
if (next) { if (next) {
if (inSameColumn && isColumnsLayout() && m_focusedNote->tqparentPrimaryNote() == next->tqparentPrimaryNote()) { if (inSameColumn && isColumnsLayout() && m_focusedNote->parentPrimaryNote() == next->parentPrimaryNote()) {
setFocusedNote(next); setFocusedNote(next);
m_startOfShiftSelectionNote = next; m_startOfShiftSelectionNote = next;
} }
@ -4152,7 +4152,7 @@ void Basket::focusANonSelectedNoteAbove(bool inSameColumn)
while (prev && prev->isSelected()) while (prev && prev->isSelected())
prev = prev->prevShownInStack(); prev = prev->prevShownInStack();
if (prev) { if (prev) {
if (inSameColumn && isColumnsLayout() && m_focusedNote->tqparentPrimaryNote() == prev->tqparentPrimaryNote()) { if (inSameColumn && isColumnsLayout() && m_focusedNote->parentPrimaryNote() == prev->parentPrimaryNote()) {
setFocusedNote(prev); setFocusedNote(prev);
m_startOfShiftSelectionNote = prev; m_startOfShiftSelectionNote = prev;
} }
@ -4190,7 +4190,7 @@ void Basket::noteDeleteWithoutConfirmation(bool deleteFilesToo)
note = next; note = next;
} }
retqlayoutNotes(true); // FIXME: filterAgain()? relayoutNotes(true); // FIXME: filterAgain()?
save(); save();
} }
@ -4452,7 +4452,7 @@ void Basket::noteGroup()
unselectAll(); unselectAll();
group->setSelectedRecursivly(true); // Notes were unselected by unplugging group->setSelectedRecursivly(true); // Notes were unselected by unplugging
retqlayoutNotes(true); relayoutNotes(true);
save(); save();
} }
@ -4522,7 +4522,7 @@ void Basket::noteMoveOnTop()
insertSelection(selection, fakeNote); insertSelection(selection, fakeNote);
unplugNote(fakeNote); unplugNote(fakeNote);
selectSelection(selection); selectSelection(selection);
retqlayoutNotes(true); relayoutNotes(true);
save(); save();
} }
@ -4547,7 +4547,7 @@ void Basket::noteMoveOnBottom()
insertSelection(selection, fakeNote); insertSelection(selection, fakeNote);
unplugNote(fakeNote); unplugNote(fakeNote);
selectSelection(selection); selectSelection(selection);
retqlayoutNotes(true); relayoutNotes(true);
save(); save();
} }
@ -4566,7 +4566,7 @@ void Basket::moveSelectionTo(Note *here, bool below/* = true*/)
insertSelection(selection, fakeNote); insertSelection(selection, fakeNote);
unplugNote(fakeNote); unplugNote(fakeNote);
selectSelection(selection); selectSelection(selection);
retqlayoutNotes(true); relayoutNotes(true);
save(); save();
} }
@ -4603,7 +4603,7 @@ void Basket::linkLookChanged()
note->linkLookChanged(); note->linkLookChanged();
note = note->next(); note = note->next();
} }
retqlayoutNotes(true); relayoutNotes(true);
} }
void Basket::slotCopyingDone2(KIO::Job *job) void Basket::slotCopyingDone2(KIO::Job *job)
@ -4795,7 +4795,7 @@ Note* Basket::noteOn(NoteOn side)
int bestDistance = contentsWidth() * contentsHeight() * 10; int bestDistance = contentsWidth() * contentsHeight() * 10;
Note *note = firstNoteShownInStack(); Note *note = firstNoteShownInStack();
Note *primary = m_focusedNote->tqparentPrimaryNote(); Note *primary = m_focusedNote->parentPrimaryNote();
while (note) { while (note) {
switch (side) { switch (side) {
case LEFT_SIDE: distance = m_focusedNote->distanceOnLeftRight(note, LEFT_SIDE); break; case LEFT_SIDE: distance = m_focusedNote->distanceOnLeftRight(note, LEFT_SIDE); break;
@ -4803,7 +4803,7 @@ Note* Basket::noteOn(NoteOn side)
case TOP_SIDE: distance = m_focusedNote->distanceOnTopBottom(note, TOP_SIDE); break; case TOP_SIDE: distance = m_focusedNote->distanceOnTopBottom(note, TOP_SIDE); break;
case BOTTOM_SIDE: distance = m_focusedNote->distanceOnTopBottom(note, BOTTOM_SIDE); break; case BOTTOM_SIDE: distance = m_focusedNote->distanceOnTopBottom(note, BOTTOM_SIDE); break;
} }
if ((side == TOP_SIDE || side == BOTTOM_SIDE || primary != note->tqparentPrimaryNote()) && note != m_focusedNote && distance > 0 && distance < bestDistance) { if ((side == TOP_SIDE || side == BOTTOM_SIDE || primary != note->parentPrimaryNote()) && note != m_focusedNote && distance > 0 && distance < bestDistance) {
bestNote = note; bestNote = note;
bestDistance = distance; bestDistance = distance;
} }
@ -4816,12 +4816,12 @@ Note* Basket::noteOn(NoteOn side)
Note* Basket::firstNoteInGroup() Note* Basket::firstNoteInGroup()
{ {
Note *child = m_focusedNote; Note *child = m_focusedNote;
Note *tqparent = (m_focusedNote ? m_focusedNote->tqparentNote() : 0); Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
while (tqparent) { while (tqparent) {
if (tqparent->firstChild() != child && !tqparent->isColumn()) if (tqparent->firstChild() != child && !tqparent->isColumn())
return tqparent->firstRealChild(); return tqparent->firstRealChild();
child = tqparent; child = tqparent;
tqparent = tqparent->tqparentNote(); tqparent = tqparent->parentNote();
} }
return 0; return 0;
} }
@ -4830,12 +4830,12 @@ Note* Basket::noteOnHome()
{ {
// First try to find the first note of the group containing the focused note: // First try to find the first note of the group containing the focused note:
Note *child = m_focusedNote; Note *child = m_focusedNote;
Note *tqparent = (m_focusedNote ? m_focusedNote->tqparentNote() : 0); Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
while (tqparent) { while (tqparent) {
if (tqparent->nextShownInStack() != m_focusedNote) if (tqparent->nextShownInStack() != m_focusedNote)
return tqparent->nextShownInStack(); return tqparent->nextShownInStack();
child = tqparent; child = tqparent;
tqparent = tqparent->tqparentNote(); tqparent = tqparent->parentNote();
} }
// If it was not found, then focus the very first note in the basket: // If it was not found, then focus the very first note in the basket:
@ -4857,7 +4857,7 @@ Note* Basket::noteOnHome()
Note* Basket::noteOnEnd() Note* Basket::noteOnEnd()
{ {
Note *child = m_focusedNote; Note *child = m_focusedNote;
Note *tqparent = (m_focusedNote ? m_focusedNote->tqparentNote() : 0); Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
Note *lastChild; Note *lastChild;
while (tqparent) { while (tqparent) {
lastChild = tqparent->lastRealChild(); lastChild = tqparent->lastRealChild();
@ -4869,7 +4869,7 @@ Note* Basket::noteOnEnd()
return lastChild; return lastChild;
} }
child = tqparent; child = tqparent;
tqparent = tqparent->tqparentNote(); tqparent = tqparent->parentNote();
} }
if (isFreeLayout()) { if (isFreeLayout()) {
Note *last; Note *last;
@ -5555,7 +5555,7 @@ void Basket::delNote(Note *note, bool askForMirroredFile)
if (note->isSelected()) if (note->isSelected())
note->setSelected(false); //removeSelectedNote(); note->setSelected(false); //removeSelectedNote();
retqlayoutNotes(); relayoutNotes();
recolorizeNotes(); recolorizeNotes();
resetInsertTo(); // If we delete the first or the last, pointer to it is invalid resetInsertTo(); // If we delete the first or the last, pointer to it is invalid
save(); save();

@ -101,7 +101,7 @@ class NoteSelection
void append(NoteSelection *node); void append(NoteSelection *node);
int count(); int count();
TQValueList<Note*> tqparentGroups(); TQValueList<Note*> parentGroups();
}; };
/** This store all needed information when exporting to HTML /** This store all needed information when exporting to HTML
@ -215,7 +215,7 @@ class Basket : public TQScrollView, public TQToolTip
int tmpHeight; int tmpHeight;
public: public:
void unsetNotesWidth(); void unsetNotesWidth();
void retqlayoutNotes(bool animate); void relayoutNotes(bool animate);
Note* noteAt(int x, int y); Note* noteAt(int x, int y);
inline Note* firstNote() { return m_firstNote; } inline Note* firstNote() { return m_firstNote; }
inline int columnsCount() { return m_columnsCount; } inline int columnsCount() { return m_columnsCount; }
@ -673,7 +673,7 @@ public slots:
/// SPEED OPTIMIZATION /// SPEED OPTIMIZATION
private: private:
bool m_finishLoadOnFirstShow; bool m_finishLoadOnFirstShow;
bool m_retqlayoutOnNextShow; bool m_relayoutOnNextShow;
public: public:
void aboutToBeActivated(); void aboutToBeActivated();
}; };

@ -35,7 +35,7 @@
typedef KParts::GenericFactory< BasketPart > BasketFactory; typedef KParts::GenericFactory< BasketPart > BasketFactory;
K_EXPORT_COMPONENT_FACTORY( libbasketpart, BasketFactory ) K_EXPORT_COMPONENT_FACTORY( libbasketpart, BasketFactory )
BasketPart::BasketPart( TQWidget *tqparentWidget, const char *, BasketPart::BasketPart( TQWidget *parentWidget, const char *,
TQObject *tqparent, const char *name, const TQStringList & ) TQObject *tqparent, const char *name, const TQStringList & )
: KParts::ReadWritePart(tqparent, name) : KParts::ReadWritePart(tqparent, name)
{ {
@ -44,7 +44,7 @@ BasketPart::BasketPart( TQWidget *tqparentWidget, const char *,
BasketStatusBar* bar = new BasketStatusBar(new KParts::StatusBarExtension(this)); BasketStatusBar* bar = new BasketStatusBar(new KParts::StatusBarExtension(this));
// this should be your custom internal widget // this should be your custom internal widget
m_view = new BNPView(tqparentWidget, "BNPViewPart", this, actionCollection(), bar); m_view = new BNPView(parentWidget, "BNPViewPart", this, actionCollection(), bar);
connect(m_view, TQT_SIGNAL(setWindowCaption(const TQString &)), this, TQT_SLOT(setCaption(const TQString &))); connect(m_view, TQT_SIGNAL(setWindowCaption(const TQString &)), this, TQT_SLOT(setCaption(const TQString &)));
connect(m_view, TQT_SIGNAL(showPart()), this, TQT_SIGNAL(showPart())); connect(m_view, TQT_SIGNAL(showPart()), this, TQT_SIGNAL(showPart()));
m_view->setFocusPolicy(TQ_ClickFocus); m_view->setFocusPolicy(TQ_ClickFocus);

@ -46,7 +46,7 @@ public:
/** /**
* Default constructor * Default constructor
*/ */
BasketPart(TQWidget *tqparentWidget, const char *widgetName, BasketPart(TQWidget *parentWidget, const char *widgetName,
TQObject *tqparent, const char *name, const TQStringList &); TQObject *tqparent, const char *name, const TQStringList &);
/** /**

@ -555,11 +555,11 @@ void BNPView::setupActions()
// At this stage, main.cpp has not set kapp->mainWidget(), so Global::runInsideKontact() // At this stage, main.cpp has not set kapp->mainWidget(), so Global::runInsideKontact()
// returns true. We do it ourself: // returns true. We do it ourself:
bool runInsideKontact = true; bool runInsideKontact = true;
TQWidget *tqparentWidget = (TQWidget*) tqparent(); TQWidget *parentWidget = (TQWidget*) tqparent();
while (tqparentWidget) { while (parentWidget) {
if (tqparentWidget->inherits("MainWindow")) if (parentWidget->inherits("MainWindow"))
runInsideKontact = false; runInsideKontact = false;
tqparentWidget = (TQWidget*) tqparentWidget->tqparent(); parentWidget = (TQWidget*) parentWidget->tqparent();
} }
// Use the "basket" incon in Kontact so it is consistent with the Kontact "New..." icon // Use the "basket" incon in Kontact so it is consistent with the Kontact "New..." icon
@ -697,15 +697,15 @@ void BNPView::save()
// } // }
} }
void BNPView::save(TQListViewItem *firstItem, TQDomDocument &document, TQDomElement &tqparentElement) void BNPView::save(TQListViewItem *firstItem, TQDomDocument &document, TQDomElement &parentElement)
{ {
TQListViewItem *item = firstItem; TQListViewItem *item = firstItem;
while (item) { while (item) {
// Basket *basket = ((BasketListViewItem*)item)->basket(); // Basket *basket = ((BasketListViewItem*)item)->basket();
TQDomElement basketElement = this->basketElement(item, document, tqparentElement); TQDomElement basketElement = this->basketElement(item, document, parentElement);
/* /*
TQDomElement basketElement = document.createElement("basket"); TQDomElement basketElement = document.createElement("basket");
tqparentElement.appendChild(basketElement); parentElement.appendChild(basketElement);
// Save Attributes: // Save Attributes:
basketElement.setAttribute("folderName", basket->folderName()); basketElement.setAttribute("folderName", basket->folderName());
if (item->firstChild()) // If it can be expanded/folded: if (item->firstChild()) // If it can be expanded/folded:
@ -725,11 +725,11 @@ void BNPView::save(TQListViewItem *firstItem, TQDomDocument &document, TQDomElem
} }
} }
TQDomElement BNPView::basketElement(TQListViewItem *item, TQDomDocument &document, TQDomElement &tqparentElement) TQDomElement BNPView::basketElement(TQListViewItem *item, TQDomDocument &document, TQDomElement &parentElement)
{ {
Basket *basket = ((BasketListViewItem*)item)->basket(); Basket *basket = ((BasketListViewItem*)item)->basket();
TQDomElement basketElement = document.createElement("basket"); TQDomElement basketElement = document.createElement("basket");
tqparentElement.appendChild(basketElement); parentElement.appendChild(basketElement);
// Save Attributes: // Save Attributes:
basketElement.setAttribute("folderName", basket->folderName()); basketElement.setAttribute("folderName", basket->folderName());
if (item->firstChild()) // If it can be expanded/folded: if (item->firstChild()) // If it can be expanded/folded:
@ -743,9 +743,9 @@ TQDomElement BNPView::basketElement(TQListViewItem *item, TQDomDocument &documen
return basketElement; return basketElement;
} }
void BNPView::saveSubHierarchy(TQListViewItem *item, TQDomDocument &document, TQDomElement &tqparentElement, bool recursive) void BNPView::saveSubHierarchy(TQListViewItem *item, TQDomDocument &document, TQDomElement &parentElement, bool recursive)
{ {
TQDomElement element = basketElement(item, document, tqparentElement); TQDomElement element = basketElement(item, document, parentElement);
if (recursive && item->firstChild()) if (recursive && item->firstChild())
save(item->firstChild(), document, element); save(item->firstChild(), document, element);
} }
@ -832,11 +832,11 @@ bool BNPView::canExpand()
return item->firstChild(); return item->firstChild();
} }
BasketListViewItem* BNPView::appendBasket(Basket *basket, TQListViewItem *tqparentItem) BasketListViewItem* BNPView::appendBasket(Basket *basket, TQListViewItem *parentItem)
{ {
BasketListViewItem *newBasketItem; BasketListViewItem *newBasketItem;
if (tqparentItem) if (parentItem)
newBasketItem = new BasketListViewItem(tqparentItem, ((BasketListViewItem*)tqparentItem)->lastChild(), basket); newBasketItem = new BasketListViewItem(parentItem, ((BasketListViewItem*)parentItem)->lastChild(), basket);
else { else {
TQListViewItem *child = m_tree->firstChild(); TQListViewItem *child = m_tree->firstChild();
TQListViewItem *lastChild = 0; TQListViewItem *lastChild = 0;
@ -1106,7 +1106,7 @@ Basket* BNPView::currentBasket()
return 0; return 0;
} }
Basket* BNPView::tqparentBasketOf(Basket *basket) Basket* BNPView::parentBasketOf(Basket *basket)
{ {
BasketListViewItem *item = (BasketListViewItem*)(listViewItemForBasket(basket)->tqparent()); BasketListViewItem *item = (BasketListViewItem*)(listViewItemForBasket(basket)->tqparent());
if (item) if (item)
@ -1134,7 +1134,7 @@ void BNPView::setCurrentBasket(Basket *basket)
// If the window has changed size, only the current basket receive the event, // If the window has changed size, only the current basket receive the event,
// the others will receive ony one just before they are shown. // the others will receive ony one just before they are shown.
// But this triggers unwanted animations, so we eliminate it: // But this triggers unwanted animations, so we eliminate it:
basket->retqlayoutNotes(/*animate=*/false); basket->relayoutNotes(/*animate=*/false);
basket->openBasket(); basket->openBasket();
setCaption(item->basket()->basketName()); setCaption(item->basket()->basketName());
countsChanged(basket); countsChanged(basket);
@ -1192,14 +1192,14 @@ void BNPView::setTreePlacement(bool onLeft)
kapp->postEvent( this, new TQResizeEvent(size(), size()) ); kapp->postEvent( this, new TQResizeEvent(size(), size()) );
} }
void BNPView::retqlayoutAllBaskets() void BNPView::relayoutAllBaskets()
{ {
TQListViewItemIterator it(m_tree); TQListViewItemIterator it(m_tree);
while (it.current()) { while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current()); BasketListViewItem *item = ((BasketListViewItem*)it.current());
//item->basket()->unbufferizeAll(); //item->basket()->unbufferizeAll();
item->basket()->unsetNotesWidth(); item->basket()->unsetNotesWidth();
item->basket()->retqlayoutNotes(true); item->basket()->relayoutNotes(true);
++it; ++it;
} }
} }
@ -1211,7 +1211,7 @@ void BNPView::recomputeAllStyles()
BasketListViewItem *item = ((BasketListViewItem*)it.current()); BasketListViewItem *item = ((BasketListViewItem*)it.current());
item->basket()->recomputeAllStyles(); item->basket()->recomputeAllStyles();
item->basket()->unsetNotesWidth(); item->basket()->unsetNotesWidth();
item->basket()->retqlayoutNotes(true); item->basket()->relayoutNotes(true);
++it; ++it;
} }
} }
@ -1905,7 +1905,7 @@ void BNPView::askNewSubBasket()
void BNPView::askNewSiblingBasket() void BNPView::askNewSiblingBasket()
{ {
askNewBasket( /*tqparent=*/tqparentBasketOf(currentBasket()), /*pickPropertiesOf=*/currentBasket() ); askNewBasket( /*tqparent=*/parentBasketOf(currentBasket()), /*pickPropertiesOf=*/currentBasket() );
} }
void BNPView::globalPasteInCurrentBasket() void BNPView::globalPasteInCurrentBasket()

@ -65,7 +65,7 @@ class BNPView : public TQSplitter, virtual public BasketDcopInterface
~BNPView(); ~BNPView();
/// MANAGE CONFIGURATION EVENTS!: /// MANAGE CONFIGURATION EVENTS!:
void setTreePlacement(bool onLeft); void setTreePlacement(bool onLeft);
void retqlayoutAllBaskets(); void relayoutAllBaskets();
void recomputeAllStyles(); void recomputeAllStyles();
void removedStates(const TQValueList<State*> &deletedStates); void removedStates(const TQValueList<State*> &deletedStates);
void linkLookChanged(); void linkLookChanged();
@ -73,7 +73,7 @@ class BNPView : public TQSplitter, virtual public BasketDcopInterface
/// MANAGE BASKETS: /// MANAGE BASKETS:
BasketListViewItem* listViewItemForBasket(Basket *basket); BasketListViewItem* listViewItemForBasket(Basket *basket);
Basket* currentBasket(); Basket* currentBasket();
Basket* tqparentBasketOf(Basket *basket); Basket* parentBasketOf(Basket *basket);
void setCurrentBasket(Basket *basket); void setCurrentBasket(Basket *basket);
void removeBasket(Basket *basket); void removeBasket(Basket *basket);
/// For NewBasketDialog (and later some other classes): /// For NewBasketDialog (and later some other classes):
@ -86,7 +86,7 @@ class BNPView : public TQSplitter, virtual public BasketDcopInterface
void enableActions(); void enableActions();
private: private:
TQDomElement basketElement(TQListViewItem *item, TQDomDocument &document, TQDomElement &tqparentElement); TQDomElement basketElement(TQListViewItem *item, TQDomDocument &document, TQDomElement &parentElement);
public slots: public slots:
void countsChanged(Basket *basket); void countsChanged(Basket *basket);
void notesStateChanged(); void notesStateChanged();
@ -94,8 +94,8 @@ class BNPView : public TQSplitter, virtual public BasketDcopInterface
void updateBasketListViewItem(Basket *basket); void updateBasketListViewItem(Basket *basket);
void save(); void save();
void save(TQListViewItem *firstItem, TQDomDocument &document, TQDomElement &tqparentElement); void save(TQListViewItem *firstItem, TQDomDocument &document, TQDomElement &parentElement);
void saveSubHierarchy(TQListViewItem *item, TQDomDocument &document, TQDomElement &tqparentElement, bool recursive); void saveSubHierarchy(TQListViewItem *item, TQDomDocument &document, TQDomElement &parentElement, bool recursive);
void load(); void load();
void load(KListView *listView, TQListViewItem *item, const TQDomElement &baskets); void load(KListView *listView, TQListViewItem *item, const TQDomElement &baskets);
void loadNewBasket(const TQString &folderName, const TQDomElement &properties, Basket *tqparent); void loadNewBasket(const TQString &folderName, const TQDomElement &properties, Basket *tqparent);
@ -279,7 +279,7 @@ class BNPView : public TQSplitter, virtual public BasketDcopInterface
public: public:
Basket* loadBasket(const TQString &folderName); // Public only for class Archive Basket* loadBasket(const TQString &folderName); // Public only for class Archive
BasketListViewItem* appendBasket(Basket *basket, TQListViewItem *tqparentItem); // Public only for class Archive BasketListViewItem* appendBasket(Basket *basket, TQListViewItem *parentItem); // Public only for class Archive
Basket* basketForFolderName(const TQString &folderName); Basket* basketForFolderName(const TQString &folderName);
TQPopupMenu* popupMenu(const TQString &menuName); TQPopupMenu* popupMenu(const TQString &menuName);

@ -219,14 +219,14 @@ TQDomElement FormatImporter::importBasket(const TQString &folderName)
XMLWork::addElement(*document, e, "tags", (isChecked ? "todo_done" : "todo_unchecked")); XMLWork::addElement(*document, e, "tags", (isChecked ? "todo_done" : "todo_unchecked"));
} }
// Import annotations as folded groups: // Import annotations as folded groups:
TQDomElement tqparentE = column; TQDomElement parentE = column;
TQString annotations = XMLWork::getElementText(e, "annotations", ""); TQString annotations = XMLWork::getElementText(e, "annotations", "");
if (!annotations.isEmpty()) { if (!annotations.isEmpty()) {
TQDomElement annotGroup = document->createElement("group"); TQDomElement annotGroup = document->createElement("group");
column.insertBefore(annotGroup, e); column.insertBefore(annotGroup, e);
annotGroup.setAttribute("folded", "true"); annotGroup.setAttribute("folded", "true");
annotGroup.appendChild(e); annotGroup.appendChild(e);
tqparentE = annotGroup; parentE = annotGroup;
// Create the text note and add it to the DOM tree: // Create the text note and add it to the DOM tree:
TQDomElement annotNote = document->createElement("note"); TQDomElement annotNote = document->createElement("note");
annotNote.setAttribute("type", "text"); annotNote.setAttribute("type", "text");
@ -271,7 +271,7 @@ TQDomElement FormatImporter::importBasket(const TQString &folderName)
} }
// Add the element to the DOM: // Add the element to the DOM:
TQDomElement launcherElem = document->createElement("note"); TQDomElement launcherElem = document->createElement("note");
tqparentE.insertBefore(launcherElem, e); parentE.insertBefore(launcherElem, e);
launcherElem.setAttribute("type", "launcher"); launcherElem.setAttribute("type", "launcher");
XMLWork::addElement(*document, launcherElem, "content", launcherFileName); XMLWork::addElement(*document, launcherElem, "content", launcherFileName);
} }

@ -520,22 +520,22 @@ TQPixmap KColorCombo2::colorRectPixmap(const TQColor &color, bool isDefault, int
TQPixmap pixmap(width, height); TQPixmap pixmap(width, height);
TQBitmap tqmask(width, height); TQBitmap tqmask(width, height);
TQPainter painter(&pixmap); TQPainter painter(&pixmap);
TQPainter tqmaskPainter(&tqmask); TQPainter maskPainter(&tqmask);
// Draw pixmap: // Draw pixmap:
drawColorRect(painter, 0, 0, color, isDefault, width, height); drawColorRect(painter, 0, 0, color, isDefault, width, height);
// Draw tqmask (make the four corners transparent): // Draw tqmask (make the four corners transparent):
tqmaskPainter.fillRect(0, 0, width, height, TQt::color1); // opaque maskPainter.fillRect(0, 0, width, height, TQt::color1); // opaque
tqmaskPainter.setPen(TQt::color0); // transparent maskPainter.setPen(TQt::color0); // transparent
tqmaskPainter.drawPoint(0, 0); maskPainter.drawPoint(0, 0);
tqmaskPainter.drawPoint(0, height - 1); maskPainter.drawPoint(0, height - 1);
tqmaskPainter.drawPoint(width - 1, height - 1); maskPainter.drawPoint(width - 1, height - 1);
tqmaskPainter.drawPoint(width - 1, 0); maskPainter.drawPoint(width - 1, 0);
// Finish: // Finish:
painter.end(); painter.end();
tqmaskPainter.end(); maskPainter.end();
pixmap.setMask(tqmask); pixmap.setMask(tqmask);
return pixmap; return pixmap;
} }

@ -232,7 +232,7 @@
<tabstop>browseButton</tabstop> <tabstop>browseButton</tabstop>
<tabstop>searchLine</tabstop> <tabstop>searchLine</tabstop>
</tabstops> </tabstops>
<tqlayoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<includehints> <includehints>
<includehint>klistbox.h</includehint> <includehint>klistbox.h</includehint>
<includehint>kiconcanvas.h</includehint> <includehint>kiconcanvas.h</includehint>

@ -84,7 +84,7 @@ NewBasketDefaultProperties::NewBasketDefaultProperties()
/** class NewBasketDialog: */ /** class NewBasketDialog: */
NewBasketDialog::NewBasketDialog(Basket *tqparentBasket, const NewBasketDefaultProperties &defaultProperties, TQWidget *tqparent) NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultProperties &defaultProperties, TQWidget *tqparent)
: KDialogBase(KDialogBase::Swallow, i18n("New Basket"), KDialogBase::Ok | KDialogBase::Cancel, : KDialogBase(KDialogBase::Swallow, i18n("New Basket"), KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, tqparent, /*name=*/"NewBasket", /*modal=*/true, /*separator=*/true) KDialogBase::Ok, tqparent, /*name=*/"NewBasket", /*modal=*/true, /*separator=*/true)
, m_defaultProperties(defaultProperties) , m_defaultProperties(defaultProperties)
@ -232,11 +232,11 @@ NewBasketDialog::NewBasketDialog(Basket *tqparentBasket, const NewBasketDefaultP
connect( m_templates, TQT_SIGNAL(doubleClicked(TQIconViewItem*)), this, TQT_SLOT(slotOk()) ); connect( m_templates, TQT_SIGNAL(doubleClicked(TQIconViewItem*)), this, TQT_SLOT(slotOk()) );
connect( m_templates, TQT_SIGNAL(returnPressed(TQIconViewItem*)), this, TQT_SLOT(returnPressed()) ); connect( m_templates, TQT_SIGNAL(returnPressed(TQIconViewItem*)), this, TQT_SLOT(returnPressed()) );
if (tqparentBasket) { if (parentBasket) {
int index = 0; int index = 0;
for (TQMap<int, Basket*>::Iterator it = m_basketsMap.begin(); it != m_basketsMap.end(); ++it) for (TQMap<int, Basket*>::Iterator it = m_basketsMap.begin(); it != m_basketsMap.end(); ++it)
if (it.data() == tqparentBasket) { if (it.data() == parentBasket) {
index = it.key(); index = it.key();
break; break;
} }

@ -80,7 +80,7 @@ class NewBasketDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
NewBasketDialog(Basket *tqparentBasket, const NewBasketDefaultProperties &defaultProperties, TQWidget *tqparent = 0); NewBasketDialog(Basket *parentBasket, const NewBasketDefaultProperties &defaultProperties, TQWidget *tqparent = 0);
~NewBasketDialog(); ~NewBasketDialog();
void polish(); void polish();
protected slots: protected slots:

@ -454,7 +454,7 @@ bool Note::tqcontains(Note *note)
if (note == this) if (note == this)
return true; return true;
else else
note = note->tqparentNote(); note = note->parentNote();
// FOR_EACH_CHILD (child) // FOR_EACH_CHILD (child)
// if (child->tqcontains(note)) // if (child->tqcontains(note))
@ -520,18 +520,18 @@ int Note::yExpander()
bool Note::isFree() bool Note::isFree()
{ {
return tqparentNote() == 0 && basket()->isFreeLayout(); return parentNote() == 0 && basket()->isFreeLayout();
} }
bool Note::isColumn() bool Note::isColumn()
{ {
return tqparentNote() == 0 && basket()->isColumnsLayout(); return parentNote() == 0 && basket()->isColumnsLayout();
} }
bool Note::hasResizer() bool Note::hasResizer()
{ {
// "isFree" || "isColmun but not the last" // "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() int Note::resizerHeight()
@ -733,7 +733,7 @@ void Note::setCursor(Zone zone)
case Note::None: basket()->viewport()->unsetCursor(); break; case Note::None: basket()->viewport()->unsetCursor(); break;
default: default:
State *state = stateForEmblemNumber(zone - Emblem0); State *state = stateForEmblemNumber(zone - Emblem0);
if (state && state->tqparentTag()->states().count() > 1) if (state && state->parentTag()->states().count() > 1)
basket()->viewport()->setCursor(TQt::PointingHandCursor); basket()->viewport()->setCursor(TQt::PointingHandCursor);
else else
basket()->viewport()->unsetCursor(); basket()->viewport()->unsetCursor();
@ -857,7 +857,7 @@ void Note::requestRetqlayout()
{ {
m_width = 0; m_width = 0;
unbufferize(); 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 ? void Note::setWidth(int width) // TODO: inline ?
@ -998,7 +998,7 @@ void Note::toggleFolded(bool animate)
if (basket()->isLoaded() && !m_isFolded) { if (basket()->isLoaded() && !m_isFolded) {
//basket()->setFocusedNote(this); //basket()->setFocusedNote(this);
basket()->retqlayoutNotes(true); basket()->relayoutNotes(true);
basket()->ensureNoteVisible(this); basket()->ensureNoteVisible(this);
} }
@ -1090,7 +1090,7 @@ bool Note::showSubNotes()
return !m_isFolded || !m_collapseFinished || basket()->isFiltering(); 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()) if (!matching())
return; return;
@ -1127,14 +1127,14 @@ void Note::retqlayoutAt(int x, int y, bool animate)
bool first = true; bool first = true;
while (child) { 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 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(); h += child->finalHeight();
} else // In case the user collapse a group, then move it and then expand it: } 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! 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! // 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 tqparent primary note and set the Y to THAT y:
if (!child->matching()) if (!child->matching())
child->setY(tqparentPrimaryNote()->y()); child->setY(parentPrimaryNote()->y());
child = child->next(); child = child->next();
first = false; 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): // 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)) if (basket()->tmpWidth < finalRightLimit() + (hasResizer() ? RESIZER_WIDTH : 0))
basket()->tmpWidth = finalRightLimit() + (hasResizer() ? RESIZER_WIDTH : 0); basket()->tmpWidth = finalRightLimit() + (hasResizer() ? RESIZER_WIDTH : 0);
if (basket()->tmpHeight < finalY() + finalHeight()) if (basket()->tmpHeight < finalY() + finalHeight())
@ -1203,8 +1203,8 @@ int Note::rightLimit()
{ {
if (isColumn() && m_next == 0L) // The last column if (isColumn() && m_next == 0L) // The last column
return TQMAX(x() + minWidth(), basket()->visibleWidth()); return TQMAX(x() + minWidth(), basket()->visibleWidth());
else if (tqparentNote()) else if (parentNote())
return tqparentNote()->rightLimit(); return parentNote()->rightLimit();
else else
return m_x + m_groupWidth; return m_x + m_groupWidth;
} }
@ -1213,8 +1213,8 @@ int Note::finalRightLimit()
{ {
if (isColumn() && m_next == 0L) // The last column if (isColumn() && m_next == 0L) // The last column
return TQMAX(finalX() + minWidth(), basket()->visibleWidth()); return TQMAX(finalX() + minWidth(), basket()->visibleWidth());
else if (tqparentNote()) else if (parentNote())
return tqparentNote()->finalRightLimit(); return parentNote()->finalRightLimit();
else else
return finalX() + m_groupWidth; return finalX() + m_groupWidth;
} }
@ -2088,18 +2088,18 @@ void Note::addState(State *state, bool orReplace)
if (!content()) if (!content())
return; return;
Tag *tag = state->tqparentTag(); Tag *tag = state->parentTag();
State::List::iterator itStates = m_states.begin(); 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... // 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 each existing tags:
for (Tag::List::iterator it = Tag::all.begin(); it != Tag::all.end(); ++it) { 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 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; continue;
// We found the tag to insert: // We found the tag to insert:
if (*it == tag) { if (*it == tag) {
// And the note already have the 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: // We replace the state if wanted:
if (orReplace) { if (orReplace) {
itStates = m_states.insert(itStates, state); itStates = m_states.insert(itStates, state);
@ -2114,7 +2114,7 @@ void Note::addState(State *state, bool orReplace)
return; return;
} }
// The note has this tag: // The note has this tag:
if (itStates != m_states.end() && *it == (*itStates)->tqparentTag()) if (itStates != m_states.end() && *it == (*itStates)->parentTag())
++itStates; ++itStates;
} }
} }
@ -2197,7 +2197,7 @@ void Note::removeState(State *state)
void Note::removeTag(Tag *tag) void Note::removeTag(Tag *tag)
{ {
for (State::List::iterator it = m_states.begin(); it != m_states.end(); ++it) 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); m_states.remove(it);
recomputeStyle(); recomputeStyle();
return; return;
@ -2254,7 +2254,7 @@ void Note::addStateToSelectedNotes(State *state, bool orReplace)
void Note::changeStateOfSelectedNotes(State *state) void Note::changeStateOfSelectedNotes(State *state)
{ {
if (content() && isSelected() && hasTag(state->tqparentTag())) if (content() && isSelected() && hasTag(state->parentTag()))
addState(state); addState(state);
FOR_EACH_CHILD (child) FOR_EACH_CHILD (child)
@ -2283,7 +2283,7 @@ bool Note::hasState(State *state)
bool Note::hasTag(Tag *tag) bool Note::hasTag(Tag *tag)
{ {
for (State::List::iterator it = m_states.begin(); it != m_states.end(); ++it) for (State::List::iterator it = m_states.begin(); it != m_states.end(); ++it)
if ((*it)->tqparentTag() == tag) if ((*it)->parentTag() == tag)
return true; return true;
return false; return false;
} }
@ -2291,7 +2291,7 @@ bool Note::hasTag(Tag *tag)
State* Note::stateOfTag(Tag *tag) State* Note::stateOfTag(Tag *tag)
{ {
for (State::List::iterator it = m_states.begin(); it != m_states.end(); ++it) for (State::List::iterator it = m_states.begin(); it != m_states.end(); ++it)
if ((*it)->tqparentTag() == tag) if ((*it)->parentTag() == tag)
return *it; return *it;
return 0; return 0;
} }
@ -2354,8 +2354,8 @@ void Note::inheritTagsOf(Note *note)
return; return;
for (State::List::iterator it = note->states().begin(); it != note->states().end(); ++it) for (State::List::iterator it = note->states().begin(); it != note->states().end(); ++it)
if ((*it)->tqparentTag() && (*it)->tqparentTag()->inheritedBySiblings()) if ((*it)->parentTag() && (*it)->parentTag()->inheritedBySiblings())
addTag((*it)->tqparentTag()); addTag((*it)->parentTag());
} }
void Note::unbufferizeAll() void Note::unbufferizeAll()
@ -2386,11 +2386,11 @@ TQRect Note::visibleRect()
areas.append(rect()); 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: // 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) { while (tqparent) {
if (tqparent->expandingOrCollapsing()) if (tqparent->expandingOrCollapsing())
substractRectOnAreas(TQRect(x(), tqparent->y() - height(), width(), height()), areas, true); substractRectOnAreas(TQRect(x(), tqparent->y() - height(), width(), height()), areas, true);
tqparent = tqparent->tqparentNote(); tqparent = tqparent->parentNote();
} }
if (areas.count() > 0) if (areas.count() > 0)
@ -2453,7 +2453,7 @@ Note* Note::noteForFullPath(const TQString &path)
void Note::listUsedTags(TQValueList<Tag*> &list) void Note::listUsedTags(TQValueList<Tag*> &list)
{ {
for (State::List::Iterator it = m_states.begin(); it != m_states.end(); ++it) { 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)) if (!list.tqcontains(tag))
list.append(tag); list.append(tag);
} }
@ -2491,7 +2491,7 @@ Note* Note::nextInStack()
return next()->nextInStack(); return next()->nextInStack();
// And finally, in the tqparent: // And finally, in the tqparent:
Note *note = tqparentNote(); Note *note = parentNote();
while (note) while (note)
if (note->next()) if (note->next())
if (note->next()->content()) if (note->next()->content())
@ -2499,7 +2499,7 @@ Note* Note::nextInStack()
else else
return note->next()->nextInStack(); return note->next()->nextInStack();
else else
note = note->tqparentNote(); note = note->parentNote();
// Not found: // Not found:
return 0; return 0;
@ -2518,8 +2518,8 @@ Note* Note::prevInStack()
return note; return note;
} }
if (tqparentNote()) if (parentNote())
return tqparentNote()->prevInStack(); return parentNote()->prevInStack();
else else
return 0; return 0;
} }
@ -2554,13 +2554,13 @@ bool Note::isShown()
return true; return true;
// So, here we go to the complexe case: if the note is inside a collapsed group: // 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; Note *child = this;
while (group) { while (group) {
if (group->isFolded() && group->firstChild() != child) if (group->isFolded() && group->firstChild() != child)
return false; return false;
child = group; child = group;
group = group->tqparentNote(); group = group->parentNote();
} }
return true; return true;
} }
@ -2645,7 +2645,7 @@ void Note::groupIn(Note *group)
bool Note::tryExpandParent() bool Note::tryExpandParent()
{ {
Note *tqparent = tqparentNote(); Note *tqparent = parentNote();
Note *child = this; Note *child = this;
while (tqparent) { while (tqparent) {
if (tqparent->firstChild() != child) if (tqparent->firstChild() != child)
@ -2654,18 +2654,18 @@ bool Note::tryExpandParent()
return false; return false;
if (tqparent->isFolded()) { if (tqparent->isFolded()) {
tqparent->toggleFolded(true); tqparent->toggleFolded(true);
basket()->retqlayoutNotes(true); basket()->relayoutNotes(true);
return true; return true;
} }
child = tqparent; child = tqparent;
tqparent = tqparent->tqparentNote(); tqparent = tqparent->parentNote();
} }
return false; return false;
} }
bool Note::tryFoldParent() // TODO: withCtrl ? withShift ? bool Note::tryFoldParent() // TODO: withCtrl ? withShift ?
{ {
Note *tqparent = tqparentNote(); Note *tqparent = parentNote();
Note *child = this; Note *child = this;
while (tqparent) { while (tqparent) {
if (tqparent->firstChild() != child) if (tqparent->firstChild() != child)
@ -2674,11 +2674,11 @@ bool Note::tryFoldParent() // TODO: withCtrl ? withShift ?
return false; return false;
if (!tqparent->isFolded()) { if (!tqparent->isFolded()) {
tqparent->toggleFolded(true); tqparent->toggleFolded(true);
basket()->retqlayoutNotes(true); basket()->relayoutNotes(true);
return true; return true;
} }
child = tqparent; child = tqparent;
tqparent = tqparent->tqparentNote(); tqparent = tqparent->parentNote();
} }
return false; 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); return int(sqrt(pow(noteCenterX - thisCenterX, 2) + pow(noteCenterY - thisCenterY, 2)) + angle);
} }
Note* Note::tqparentPrimaryNote() Note* Note::parentPrimaryNote()
{ {
Note *primary = this; Note *primary = this;
while (primary->tqparentNote()) while (primary->parentNote())
primary = primary->tqparentNote(); primary = primary->parentNote();
return primary; return primary;
} }

@ -88,7 +88,7 @@ class Note
TQRect rect(); TQRect rect();
TQRect resizerRect(); TQRect resizerRect();
TQRect visibleRect(); TQRect visibleRect();
void retqlayoutAt(int x, int y, bool animate); void relayoutAt(int x, int y, bool animate);
int contentX(); int contentX();
int minWidth(); int minWidth();
int minRight(); int minRight();
@ -118,7 +118,7 @@ class Note
inline bool isGroup() { return m_content == 0L; } inline bool isGroup() { return m_content == 0L; }
inline bool isFolded() { return m_isFolded; } inline bool isFolded() { return m_isFolded; }
inline Note* firstChild() { return m_firstChild; } inline Note* firstChild() { return m_firstChild; }
inline Note* tqparentNote() { return m_parentNote; } inline Note* parentNote() { return m_parentNote; }
/*inline*/ bool showSubNotes();// { return !m_isFolded || !m_collapseFinished; } /*inline*/ bool showSubNotes();// { return !m_isFolded || !m_collapseFinished; }
inline void setParentNote(Note *note) { m_parentNote = note; } inline void setParentNote(Note *note) { m_parentNote = note; }
inline void setFirstChild(Note *note) { m_firstChild = note; } inline void setFirstChild(Note *note) { m_firstChild = note; }
@ -315,7 +315,7 @@ class Note
Note* nextShownInStack(); Note* nextShownInStack();
Note* prevShownInStack(); Note* prevShownInStack();
Note* tqparentPrimaryNote(); // TODO: There are places in the code where this methods is hand-copied / hand-inlined instead of called. Note* parentPrimaryNote(); // TODO: There are places in the code where this methods is hand-copied / hand-inlined instead of called.
Note* firstSelected(); Note* firstSelected();
Note* lastSelected(); Note* lastSelected();

@ -68,7 +68,7 @@ TQDragObject* NoteDrag::dragObject(NoteSelection *noteList, bool cutting, TQWidg
// Then a list of pointers to all notes, and tqparent groups: // Then a list of pointers to all notes, and tqparent groups:
for (NoteSelection *node = noteList->firstStacked(); node; node = node->nextStacked()) for (NoteSelection *node = noteList->firstStacked(); node; node = node->nextStacked())
stream << (TQ_UINT64)(node->note); stream << (TQ_UINT64)(node->note);
TQValueList<Note*> groups = noteList->tqparentGroups(); TQValueList<Note*> groups = noteList->parentGroups();
for (TQValueList<Note*>::iterator it = groups.begin(); it != groups.end(); ++it) for (TQValueList<Note*>::iterator it = groups.begin(); it != groups.end(); ++it)
stream << (TQ_UINT64)(*it); stream << (TQ_UINT64)(*it);
stream << (TQ_UINT64)0; stream << (TQ_UINT64)0;

@ -767,7 +767,7 @@ NoteType::Id NoteFactory::typeForURL(const KURL &url, Basket */*tqparent*/)
{ {
/* KMimeType::Ptr kMimeType = KMimeType::findByURL(url); /* KMimeType::Ptr kMimeType = KMimeType::findByURL(url);
if (Global::debugWindow) if (Global::debugWindow)
*Global::debugWindow << "typeForURL: " + kMimeType->tqparentMimeType();//property("MimeType").toString();*/ *Global::debugWindow << "typeForURL: " + kMimeType->parentMimeType();//property("MimeType").toString();*/
bool viewText = Settings::viewTextFileContent(); bool viewText = Settings::viewTextFileContent();
bool viewHTML = Settings::viewHtmlFileContent(); bool viewHTML = Settings::viewHtmlFileContent();
bool viewImage = Settings::viewImageFileContent(); bool viewImage = Settings::viewImageFileContent();

@ -117,6 +117,6 @@
<slot access="private">changeKey()</slot> <slot access="private">changeKey()</slot>
<slot access="private">clearKey()</slot> <slot access="private">clearKey()</slot>
</Q_SLOTS> </Q_SLOTS>
<tqlayoutdefaults spacing="0" margin="0"/> <layoutdefaults spacing="0" margin="0"/>
<tqlayoutfunctions spacing="KDialog::spacingHint"/> <layoutfunctions spacing="KDialog::spacingHint"/>
</UI> </UI>

@ -341,7 +341,7 @@ void Settings::setBigNotes(bool big)
Note::MIN_HEIGHT = 2*Note::NOTE_MARGIN + Note::EMBLEM_SIZE; Note::MIN_HEIGHT = 2*Note::NOTE_MARGIN + Note::EMBLEM_SIZE;
if (Global::bnpView) if (Global::bnpView)
Global::bnpView->retqlayoutAllBaskets(); Global::bnpView->relayoutAllBaskets();
} }
void Settings::setAutoBullet(bool yes) void Settings::setAutoBullet(bool yes)

@ -186,7 +186,7 @@ TQString SoftwareImporters::fromTomboy(TQString tomboy)
return "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body>" + tomboy + "</body></html>"; return "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body>" + tomboy + "</body></html>";
} }
Note* SoftwareImporters::insertTitledNote(Basket *tqparent, const TQString &title, const TQString &content, TQt::TextFormat format/* = TQt::PlainText*/, Note *tqparentNote/* = 0*/) Note* SoftwareImporters::insertTitledNote(Basket *tqparent, const TQString &title, const TQString &content, TQt::TextFormat format/* = TQt::PlainText*/, Note *parentNote/* = 0*/)
{ {
Note *nGroup = new Note(tqparent); Note *nGroup = new Note(tqparent);
@ -199,9 +199,9 @@ Note* SoftwareImporters::insertTitledNote(Basket *tqparent, const TQString &titl
else else
nContent = NoteFactory::createNoteHtml(content, tqparent); nContent = NoteFactory::createNoteHtml(content, tqparent);
if (tqparentNote == 0) if (parentNote == 0)
tqparentNote = tqparent->firstNote(); // In the first column! parentNote = tqparent->firstNote(); // In the first column!
tqparent->insertNote(nGroup, tqparentNote, Note::BottomColumn, TQPoint(), /*animate=*/false); tqparent->insertNote(nGroup, parentNote, Note::BottomColumn, TQPoint(), /*animate=*/false);
tqparent->insertNote(nTitle, nGroup, Note::BottomColumn, TQPoint(), /*animate=*/false); tqparent->insertNote(nTitle, nGroup, Note::BottomColumn, TQPoint(), /*animate=*/false);
tqparent->insertNote(nContent, nTitle, Note::BottomInsert, TQPoint(), /*animate=*/false); tqparent->insertNote(nContent, nTitle, Note::BottomInsert, TQPoint(), /*animate=*/false);
@ -217,8 +217,8 @@ void SoftwareImporters::finishImport(Basket *basket)
basket->setFocusedNote(basket->firstNoteShownInStack()); basket->setFocusedNote(basket->firstNoteShownInStack());
// Retqlayout every notes at theire new place and simulate a load animation (because already loaded just after the creation). // Retqlayout every notes at theire new place and simulate a load animation (because already loaded just after the creation).
// Without a retqlayouting, notes on the bottom would comes from the top (because they were inserted on top) and clutter the animation load: // Without a relayouting, notes on the bottom would comes from the top (because they were inserted on top) and clutter the animation load:
basket->retqlayoutNotes(/*animate=*/false); basket->relayoutNotes(/*animate=*/false);
basket->animateLoad(); basket->animateLoad();
basket->save(); basket->save();
} }
@ -646,12 +646,12 @@ void SoftwareImporters::importTuxCards()
TQDomElement collection = document->documentElement(); TQDomElement collection = document->documentElement();
int remainingHierarchy = (hierarchy == 0 ? 65000 : 3 - hierarchy); int remainingHierarchy = (hierarchy == 0 ? 65000 : 3 - hierarchy);
importTuxCardsNode(collection, /*tqparentBasket=*/0, /*tqparentNote=*/0, remainingHierarchy); importTuxCardsNode(collection, /*parentBasket=*/0, /*parentNote=*/0, remainingHierarchy);
} }
// TODO: <InformationElement isOpen="true" isEncripted="false" // TODO: <InformationElement isOpen="true" isEncripted="false"
void SoftwareImporters::importTuxCardsNode(const TQDomElement &element, Basket *tqparentBasket, Note *tqparentNote, int remainingHierarchy) void SoftwareImporters::importTuxCardsNode(const TQDomElement &element, Basket *parentBasket, Note *parentNote, int remainingHierarchy)
{ {
for (TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling()) { for (TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling()) {
TQDomElement e = n.toElement(); TQDomElement e = n.toElement();
@ -674,7 +674,7 @@ void SoftwareImporters::importTuxCardsNode(const TQDomElement &element, Basket *
} }
if (remainingHierarchy > 0) { if (remainingHierarchy > 0) {
BasketFactory::newBasket(icon, name, /*backgroundImage=*/"", /*backgroundColor=*/TQColor(), /*textColor=*/TQColor(), /*templateName=*/"1column", tqparentBasket); BasketFactory::newBasket(icon, name, /*backgroundImage=*/"", /*backgroundColor=*/TQColor(), /*textColor=*/TQColor(), /*templateName=*/"1column", parentBasket);
Basket *basket = Global::bnpView->currentBasket(); Basket *basket = Global::bnpView->currentBasket();
basket->load(); basket->load();
@ -687,8 +687,8 @@ void SoftwareImporters::importTuxCardsNode(const TQDomElement &element, Basket *
importTuxCardsNode(e, basket, 0, remainingHierarchy - 1); importTuxCardsNode(e, basket, 0, remainingHierarchy - 1);
finishImport(basket); finishImport(basket);
} else { } else {
Note *nGroup = insertTitledNote(tqparentBasket, name, content, (isRichText ? TQt::RichText : TQt::PlainText), tqparentNote); Note *nGroup = insertTitledNote(parentBasket, name, content, (isRichText ? TQt::RichText : TQt::PlainText), parentNote);
importTuxCardsNode(e, tqparentBasket, nGroup, remainingHierarchy - 1); importTuxCardsNode(e, parentBasket, nGroup, remainingHierarchy - 1);
} }
} }
} }

@ -74,7 +74,7 @@ namespace SoftwareImporters
// Useful methods to design importers: // Useful methods to design importers:
TQString fromICS(const TQString &ics); TQString fromICS(const TQString &ics);
TQString fromTomboy(TQString tomboy); TQString fromTomboy(TQString tomboy);
Note* insertTitledNote(Basket *tqparent, const TQString &title, const TQString &content, TQt::TextFormat format = TQt::PlainText, Note *tqparentNote = 0); Note* insertTitledNote(Basket *tqparent, const TQString &title, const TQString &content, TQt::TextFormat format = TQt::PlainText, Note *parentNote = 0);
void finishImport(Basket *basket); void finishImport(Basket *basket);
// The importers in themselves: // The importers in themselves:
@ -87,7 +87,7 @@ namespace SoftwareImporters
void importTextFile(); void importTextFile();
// //
void importTuxCardsNode(const TQDomElement &element, Basket *tqparentBasket, Note *tqparentNote, int remainingHierarchy); void importTuxCardsNode(const TQDomElement &element, Basket *parentBasket, Note *parentNote, int remainingHierarchy);
} }
#endif // SOFTWAREIMPORTERS_H #endif // SOFTWAREIMPORTERS_H

@ -102,7 +102,7 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu)
// 2. And then if the icon is visible too (eg. this->show() has been called): // 2. And then if the icon is visible too (eg. this->show() has been called):
useSystray = useSystray && isVisible(); useSystray = useSystray && isVisible();
// 3. Kicker (or another systray manager) can be visible but tqmasked out of // 3. Kicker (or another systray manager) can be visible but masked out of
// the screen (ie. on right or on left of it). We check if the icon isn't // the screen (ie. on right or on left of it). We check if the icon isn't
// out of screen. // out of screen.
if (useSystray) { if (useSystray) {

@ -52,10 +52,10 @@ State::~State()
State* State::nextState(bool cycle /*= true*/) State* State::nextState(bool cycle /*= true*/)
{ {
if (!tqparentTag()) if (!parentTag())
return 0; return 0;
List states = tqparentTag()->states(); List states = parentTag()->states();
// The tag contains only one state: // The tag contains only one state:
if (states.count() == 1) if (states.count() == 1)
return 0; return 0;
@ -75,9 +75,9 @@ State* State::nextState(bool cycle /*= true*/)
TQString State::fullName() TQString State::fullName()
{ {
if (!tqparentTag() || tqparentTag()->states().count() == 1) if (!parentTag() || parentTag()->states().count() == 1)
return (name().isEmpty() && tqparentTag() ? tqparentTag()->name() : name()); return (name().isEmpty() && parentTag() ? parentTag()->name() : name());
return TQString(i18n("%1: %2")).tqarg(tqparentTag()->name(), name()); return TQString(i18n("%1: %2")).tqarg(parentTag()->name(), name());
} }
TQFont State::font(TQFont base) TQFont State::font(TQFont base)
@ -781,7 +781,7 @@ TQSize IndentedMenuItem::tqsizeHint()
StateMenuItem::StateMenuItem(State *state, const TQString &shortcut, bool withTagName) StateMenuItem::StateMenuItem(State *state, const TQString &shortcut, bool withTagName)
: m_state(state), m_shortcut(shortcut) : m_state(state), m_shortcut(shortcut)
{ {
m_name = (withTagName && m_state->tqparentTag() ? m_state->tqparentTag()->name() : m_state->name()); m_name = (withTagName && m_state->parentTag() ? m_state->parentTag()->name() : m_state->name());
} }
StateMenuItem::~StateMenuItem() StateMenuItem::~StateMenuItem()

@ -75,7 +75,7 @@ class State
TQColor backgroundColor() const { return m_backgroundColor; } TQColor backgroundColor() const { return m_backgroundColor; }
TQString textEquivalent() const { return m_textEquivalent; } TQString textEquivalent() const { return m_textEquivalent; }
bool onAllTextLines() const { return m_onAllTextLines; } bool onAllTextLines() const { return m_onAllTextLines; }
Tag* tqparentTag() const { return m_parentTag; } Tag* parentTag() const { return m_parentTag; }
/// HELPING FUNCTIONS: /// HELPING FUNCTIONS:
State *nextState(bool cycle = true); State *nextState(bool cycle = true);
TQString fullName(); TQString fullName();

@ -926,9 +926,9 @@ void TagsEditDialog::deleteTag()
// Remove the new tag, to avoid keyboard-shortcut clashes: // Remove the new tag, to avoid keyboard-shortcut clashes:
delete item->tagCopy()->newTag; delete item->tagCopy()->newTag;
} else { } else {
TagListViewItem *tqparentItem = item->tqparent(); TagListViewItem *parentItem = item->tqparent();
// Remove the state: // Remove the state:
tqparentItem->tagCopy()->stateCopies.remove(item->stateCopy()); parentItem->tagCopy()->stateCopies.remove(item->stateCopy());
if (item->stateCopy()->oldState) { if (item->stateCopy()->oldState) {
m_deletedStates.append(item->stateCopy()->oldState); m_deletedStates.append(item->stateCopy()->oldState);
m_addedStates.remove(item->stateCopy()->oldState); m_addedStates.remove(item->stateCopy()->oldState);
@ -937,9 +937,9 @@ void TagsEditDialog::deleteTag()
delete item; delete item;
item = 0; item = 0;
// Transform to single-state tag if needed: // Transform to single-state tag if needed:
if (tqparentItem->childCount() == 1) { if (parentItem->childCount() == 1) {
delete tqparentItem->firstChild(); delete parentItem->firstChild();
m_tags->setCurrentItem(tqparentItem); m_tags->setCurrentItem(parentItem);
} }
} }
@ -1197,7 +1197,7 @@ void TagsEditDialog::slotOk()
Global::bnpView->removedStates(m_deletedStates); Global::bnpView->removedStates(m_deletedStates);
// Update every note (change colors, size because of font change or added/removed emblems...): // Update every note (change colors, size because of font change or added/removed emblems...):
Global::bnpView->retqlayoutAllBaskets(); Global::bnpView->relayoutAllBaskets();
Global::bnpView->recomputeAllStyles(); Global::bnpView->recomputeAllStyles();
KDialogBase::slotOk(); KDialogBase::slotOk();

Loading…
Cancel
Save