summaryrefslogtreecommitdiffstats
path: root/src/note.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:29:20 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:29:20 -0600
commit882bcd26b3d60be72ea2b35921969a9850c52db9 (patch)
tree8d0a6902c5de4632c4e73e35c4d86404fa75f470 /src/note.cpp
parentc82058b2b64334c10d7e547cb81ac64efe09f516 (diff)
downloadbasket-882bcd26b3d60be72ea2b35921969a9850c52db9.tar.gz
basket-882bcd26b3d60be72ea2b35921969a9850c52db9.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/note.cpp')
-rw-r--r--src/note.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/note.cpp b/src/note.cpp
index 94eab87..13644eb 100644
--- a/src/note.cpp
+++ b/src/note.cpp
@@ -73,7 +73,7 @@ Note::Note(Basket *parent)
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(parent), m_content(0), m_addedDate(TQDateTime::tqcurrentDateTime()), m_lastModificationDate(TQDateTime::tqcurrentDateTime()),
+ m_basket(parent), m_content(0), m_addedDate(TQDateTime::currentDateTime()), m_lastModificationDate(TQDateTime::currentDateTime()),
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),
@@ -853,20 +853,20 @@ void Note::unsetWidth()
child->unsetWidth();
}
-void Note::requestRetqlayout()
+void Note::requestRelayout()
{
m_width = 0;
unbufferize();
- basket()->relayoutNotes(true); // TODO: A signal that will retqlayout ONCE and DELAYED if called several times
+ basket()->relayoutNotes(true); // TODO: A signal that will relayout ONCE and DELAYED if called several times
}
void Note::setWidth(int width) // TODO: inline ?
{
if (m_width != width)
- setWidthForceRetqlayout(width);
+ setWidthForceRelayout(width);
}
-void Note::setWidthForceRetqlayout(int width)
+void Note::setWidthForceRelayout(int width)
{
unbufferize();
m_width = (width < minWidth() ? minWidth() : width);
@@ -970,7 +970,7 @@ void Note::toggleFolded(bool animate)
if (animate) {
// We animate collapsing (so sub-notes fluidly go under the first note)
- // We don't animate expanding: we place sub-notes directly under the first note (and the next retqlayout will animate the expanding)
+ // We don't animate expanding: we place sub-notes directly under the first note (and the next relayout will animate the expanding)
// But if user quickly collapsed and then expand (while the collapsing animation isn't finished), we animate anyway
bool animateSetUnder = (m_isFolded || !m_collapseFinished);
// std::cout << "fold:" << m_isFolded << " collapseFinished:" << m_collapseFinished << " animateSetUnder:" << animateSetUnder << std::endl;
@@ -1098,7 +1098,7 @@ void Note::relayoutAt(int x, int y, bool animate)
m_computedAreas = false;
m_areas.clear();
- // Don't retqlayout free notes one under the other, because by definition they are freely positionned!
+ // Don't relayout free notes one under the other, because by definition they are freely positionned!
if (isFree()) {
x = finalX();
y = finalY();
@@ -1109,7 +1109,7 @@ void Note::relayoutAt(int x, int y, bool animate)
cancelAnimation();
setX(x);
setY(y);
- // But retqlayout others vertically if they are inside such primary groups or if it is a "normal" basket:
+ // But relayout others vertically if they are inside such primary groups or if it is a "normal" basket:
} else {
if (animate)
setFinalPosition(x, y);
@@ -1120,13 +1120,13 @@ void Note::relayoutAt(int x, int y, bool animate)
}
}
- // Then, retqlayout sub-notes (only the first, if the group is folded) and so, assign an height to the group:
+ // Then, relayout sub-notes (only the first, if the group is folded) and so, assign an height to the group:
if (isGroup()) {
int h = 0;
Note *child = firstChild();
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
+ if (child->matching() && (!m_isFolded || first || basket()->isFiltering())) { // Don't use showSubNotes() but use !m_isFolded because we don't want a relayout for the animated collapsing notes
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:
@@ -1284,7 +1284,7 @@ void Note::drawExpander(TQPainter *painter, int x, int y, const TQColor &backgro
// If the current style is a KStyle, use it to draw the expander (plus or minus):
if (dynamic_cast<KStyle*>(&(kapp->tqstyle())) != NULL) {
// Set the 4 rounded corners background to background color:
- TQColorGroup cg(basket->tqcolorGroup());
+ TQColorGroup cg(basket->colorGroup());
cg.setColor(TQColorGroup::Base, background);
// Fill the inside of the expander in white, typically:
@@ -1304,7 +1304,7 @@ void Note::drawExpander(TQPainter *painter, int x, int y, const TQColor &backgro
} else {
int width = EXPANDER_WIDTH;
int height = EXPANDER_HEIGHT;
- const TQColorGroup &cg = basket->tqcolorGroup();
+ const TQColorGroup &cg = basket->colorGroup();
// Fill white area:
painter->fillRect(x + 1, y + 1, width - 2, height - 2, cg.base());
@@ -1979,7 +1979,7 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect)
}
// Determine the colors (for the richText drawing) and the text color (for the tags arrow too):
- TQColorGroup cg(basket()->tqcolorGroup());
+ TQColorGroup cg(basket()->colorGroup());
cg.setColor(TQColorGroup::Text, (m_computedState.textColor().isValid() ? m_computedState.textColor() : basket()->textColor()) );
cg.setColor(TQColorGroup::Background, bgColor);
if (isSelected())
@@ -1990,14 +1990,14 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect)
TQColor textColor = cg.color(TQColorGroup::Text);
TQColor light = Tools::mixColor(textColor, bgColor);
TQColor mid = Tools::mixColor(textColor, light);
- painter2.setPen(light);//TQPen(basket()->tqcolorGroup().dark().light(150)));
+ painter2.setPen(light);//TQPen(basket()->colorGroup().dark().light(150)));
painter2.drawLine(xIcon, yIcon + 6, xIcon + 4, yIcon + 6);
- painter2.setPen(mid);//TQPen(basket()->tqcolorGroup().dark()));
+ painter2.setPen(mid);//TQPen(basket()->colorGroup().dark()));
painter2.drawLine(xIcon + 1, yIcon + 7, xIcon + 3, yIcon + 7);
- painter2.setPen(textColor);//TQPen(basket()->tqcolorGroup().foreground()));
+ painter2.setPen(textColor);//TQPen(basket()->colorGroup().foreground()));
painter2.drawPoint(xIcon + 2, yIcon + 8);
} else if (m_haveInvisibleTags) {
- painter2.setPen(cg.color(TQColorGroup::Text)/*TQPen(basket()->tqcolorGroup().foreground())*/);
+ painter2.setPen(cg.color(TQColorGroup::Text)/*TQPen(basket()->colorGroup().foreground())*/);
painter2.drawPoint(xIcon, yIcon + 7);
painter2.drawPoint(xIcon + 2, yIcon + 7);
painter2.drawPoint(xIcon + 4, yIcon + 7);
@@ -2146,7 +2146,7 @@ void Note::recomputeStyle()
// unsetWidth();
if (content())
content()->fontChanged();
-// requestRetqlayout(); // TODO!
+// requestRelayout(); // TODO!
}
void Note::recomputeAllStyles()