[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Fri Jun 24 19:13:10 CEST 2005
SVN commit 428607 by staikos:
updates for use in the new label patch
M +6 -2 kstplotlabel.cpp
M +3 -1 kstplotlabel.h
--- trunk/extragear/graphics/kst/kst/kstplotlabel.cpp #428606:428607
@@ -38,7 +38,6 @@
_fontSize = 20;
_parsed = 0L;
reparse();
- computeTextSize(_parsed);
}
@@ -47,7 +46,7 @@
void KstPlotLabel::reparse() {
- _parsed = Label::parse(_txt, _interpret);
+ computeTextSize(_parsed = Label::parse(_txt, _interpret));
}
@@ -153,4 +152,9 @@
}
+QSize KstPlotLabel::size() const {
+ return QSize(_textWidth, _textHeight);
+}
+
+
// vim: ts=2 sw=2 et
--- trunk/extragear/graphics/kst/kst/kstplotlabel.h #428606:428607
@@ -22,7 +22,7 @@
class KstPlotLabel {
public:
- KstPlotLabel(const QString& txt, KstLJustifyType justify = 0L, float rotation = 0.0);
+ KstPlotLabel(const QString& txt = QString::null, KstLJustifyType justify = 0L, float rotation = 0.0);
~KstPlotLabel();
void setText(const QString& text);
@@ -50,6 +50,8 @@
void paint(QPainter& p);
+ QSize size() const;
+
private:
void drawToPainter(Label::Parsed *lp, QPainter& p);
void computeTextSize(Label::Parsed*);
More information about the Kst
mailing list