[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Sun Oct 16 22:00:36 CEST 2005
SVN commit 471208 by staikos:
some cleanup and make the vim modeline work again
M +4 -29 kstplotlabel.cpp
M +0 -1 kstplotlabel.h
--- trunk/extragear/graphics/kst/kst/kstplotlabel.cpp #471207:471208
@@ -58,7 +58,6 @@
_parsed = 0L;
reparse();
computeTextSize();
- //updateLineSpacing();
}
@@ -76,7 +75,6 @@
_txt = text;
reparse();
computeTextSize();
- //updateLineSpacing();
}
}
@@ -105,7 +103,6 @@
if (_fontName != fontName) {
_fontName = fontName;
computeTextSize();
- //updateLineSpacing();
}
}
@@ -156,31 +153,14 @@
_lineSpacing = QFontMetrics(QFont(_fontName, _absFontSize)).lineSpacing();
}
-// void KstPlotLabel::computeTextSize(Label::Parsed *lp) {
-// RenderContext rc(_fontName, _symbolFontName, _absFontSize, 0L);
-// renderLabel(rc, lp->chunk);
-// _textWidth = rc.x;
-// _ascent = rc.ascent;
-// _textHeight = 1 + rc.ascent + rc.descent;
-// _lineSpacing = QFontMetrics(QFont(_fontName, _absFontSize)).lineSpacing();
-// }
-
void KstPlotLabel::paint(QPainter& p) {
drawToPainter(_parsed, p);
}
void KstPlotLabel::setFontSize(int size) {
-// if (_fontSize != size) {
-// _absFontSize = size;// + KstSettings::globalSettings()->plotFontSize;
-// if (_absFontSize < MIN_FONT_SIZE) {
-// _absFontSize = MIN_FONT_SIZE;
-// }
-
- _fontSize = size;
-/* updateLineSpacing();
- }*/
+ _fontSize = size;
}
@@ -247,7 +227,6 @@
if (upLS) {
computeTextSize();
- //updateLineSpacing();
}
}
@@ -277,15 +256,11 @@
_rotation = l._rotation;
_interpret = l._interpret;
_replace = l._replace;
- //updateLineSpacing();
- setText(l._txt);
- //computeTextSize(); // already called by setText...
+ setText(l._txt); // calls computeTextSize()
return *this;
}
-// vim: ts=2 sw=2 et
-
void KstPlotLabel::setAbsFontSize(int fs) {
if (_absFontSize != fs) {
_absFontSize = fs;
@@ -293,7 +268,7 @@
_absFontSize = MIN_FONT_SIZE;
}
computeTextSize();
- //reparse();
- //updateLineSpacing();
}
}
+
+// vim: ts=2 sw=2 et
--- trunk/extragear/graphics/kst/kst/kstplotlabel.h #471207:471208
@@ -68,7 +68,6 @@
void drawToPainter(Label::Parsed *lp, QPainter& p);
void computeTextSize();
void reparse();
- //void updateLineSpacing();
float _rotation;
QString _txt;
More information about the Kst
mailing list