QtiPlot 0.9.7.3
Signals | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

LegendWidget Class Reference

#include <LegendWidget.h>

Inheritance diagram for LegendWidget:
FrameWidget PieLabel

List of all members.

Signals

void enableEditor ()

Public Member Functions

int angle ()
void clone (LegendWidget *t)
QFont font ()
bool hasTeXOutput ()
bool isAutoUpdateEnabled ()
 LegendWidget (Graph *)
void print (QPainter *p, const QwtScaleMap map[QwtPlot::axisCnt])
QString saveToString ()
void setAngle (int angle)
void setAutoUpdate (bool on=true)
void setFont (const QFont &font)
void setTeXOutput (bool on=true)
void setText (const QString &s)
void setTextColor (const QColor &c)
void showTextEditor ()
QString text ()
QColor textColor ()
QSize textSize (QPainter *p, const QwtText &text)
 ~LegendWidget ()

Static Public Member Functions

static void restore (Graph *g, const QStringList &lst)

Private Member Functions

void drawSymbol (PlotCurve *c, int point, QPainter *p, int x, int y, int l)
void drawText (QPainter *, const QRect &, QwtArray< long >, int)
void drawVector (PlotCurve *c, QPainter *p, int x, int y, int l)
PlotCurvegetCurve (const QString &s, int &point)
QwtArray< long > itemsHeight (QPainter *p, int symbolLineLength, int &width, int &height, int &textWidth, int &textHeight)
virtual void paintEvent (QPaintEvent *e)
QString parse (const QString &str)
int symbolsMaxWidth ()

Private Attributes

int d_angle
 Rotation angle.
bool d_auto_update
 Flag telling if the legend should be updated each time a curve is added/removed from the parent plot.
bool d_tex_output
 Flag telling if the legend contains TeX commands that mustn't be escaped when exporting to .tex.
QwtText * d_text
 Pointer to the QwtText object.
int h_space
 Distance between symbols and legend text.
int left_margin
 Distance between frame and content.
int line_length
 Length of the symbol line.
int top_margin

Constructor & Destructor Documentation

LegendWidget::LegendWidget ( Graph plot)
LegendWidget::~LegendWidget ( )

References d_text.


Member Function Documentation

int LegendWidget::angle ( ) [inline]
void LegendWidget::clone ( LegendWidget t)
void LegendWidget::drawSymbol ( PlotCurve c,
int  point,
QPainter *  p,
int  x,
int  y,
int  l 
) [private]
void LegendWidget::drawText ( QPainter *  p,
const QRect &  rect,
QwtArray< long >  height,
int  symbolLineLength 
) [private]
void LegendWidget::drawVector ( PlotCurve c,
QPainter *  p,
int  x,
int  y,
int  l 
) [private]
void LegendWidget::enableEditor ( ) [signal]

Referenced by LegendWidget(), and showTextEditor().

QFont LegendWidget::font ( ) [inline]
PlotCurve * LegendWidget::getCurve ( const QString &  s,
int &  point 
) [private]
bool LegendWidget::hasTeXOutput ( ) [inline]

References d_tex_output.

Referenced by clone(), and EnrichmentDialog::setWidget().

bool LegendWidget::isAutoUpdateEnabled ( ) [inline]
QwtArray< long > LegendWidget::itemsHeight ( QPainter *  p,
int  symbolLineLength,
int &  width,
int &  height,
int &  textWidth,
int &  textHeight 
) [private]
void LegendWidget::paintEvent ( QPaintEvent *  e) [private, virtual]
QString LegendWidget::parse ( const QString &  str) [private]
void LegendWidget::print ( QPainter *  p,
const QwtScaleMap  map[QwtPlot::axisCnt] 
) [virtual]
void LegendWidget::restore ( Graph g,
const QStringList &  lst 
) [static]
QString LegendWidget::saveToString ( ) [virtual]

Reimplemented from FrameWidget.

Reimplemented in PieLabel.

References FrameWidget::backgroundColor(), d_angle, d_auto_update, d_tex_output, and d_text.

void LegendWidget::setAngle ( int  angle)
void LegendWidget::setAutoUpdate ( bool  on = true) [inline]
void LegendWidget::setFont ( const QFont &  font)
void LegendWidget::setTeXOutput ( bool  on = true) [inline]
void LegendWidget::setText ( const QString &  s)
void LegendWidget::setTextColor ( const QColor &  c)
void LegendWidget::showTextEditor ( )
int LegendWidget::symbolsMaxWidth ( ) [private]
QString LegendWidget::text ( ) [inline]
QColor LegendWidget::textColor ( ) [inline]
QSize LegendWidget::textSize ( QPainter *  p,
const QwtText &  text 
)

References FrameWidget::boundingRect().

Referenced by drawText(), and itemsHeight().


Member Data Documentation

int LegendWidget::d_angle [private]

Rotation angle.

Reimplemented from FrameWidget.

Referenced by angle(), clone(), drawText(), itemsHeight(), saveToString(), and setAngle().

Flag telling if the legend should be updated each time a curve is added/removed from the parent plot.

Referenced by clone(), isAutoUpdateEnabled(), saveToString(), and setAutoUpdate().

Flag telling if the legend contains TeX commands that mustn't be escaped when exporting to .tex.

Referenced by clone(), hasTeXOutput(), parse(), saveToString(), and setTeXOutput().

QwtText* LegendWidget::d_text [private]
int LegendWidget::h_space [private]

Distance between symbols and legend text.

Referenced by drawText(), itemsHeight(), and print().

Distance between frame and content.

Referenced by drawText(), itemsHeight(), and print().

Length of the symbol line.

Referenced by paintEvent(), print(), and symbolsMaxWidth().

int LegendWidget::top_margin [private]

Referenced by itemsHeight(), and print().


The documentation for this class was generated from the following files: