Signals | Public Member Functions

LegendItem Class Reference

#include <PlotCurve.h>

Inheritance diagram for LegendItem:
Inheritance graph
[legend]
Collaboration diagram for LegendItem:
Collaboration graph
[legend]

List of all members.

Signals

void colorChanged (const QColor &color)
void axisChanged (QwtPlot::Axis)

Public Member Functions

 LegendItem (QWidget *parent=0)
void setText (QString title)
QColor currentColor () const
void setCurrentColor (QColor color)
QColor color (int index) const
void setCurrentAxis (QwtPlot::Axis axis)
QVBoxLayoutlayout ()

Constructor & Destructor Documentation

LegendItem::LegendItem ( QWidget parent = 0  )  [inline]

                 : public QFrame {
    Q_OBJECT
public:
    LegendItem(QWidget *parent = 0) : QFrame (parent){
        setFrameStyle(QFrame::Panel | QFrame::Raised);
        label.setTextFormat(Qt::PlainText);
        label.setContentsMargins(6,0,0,0);
        cPick.setFlat(true);
        cPick.setStandardColors();
        cPick.setColorDialogEnabled(true);
        setup();

        // connections
        connect(&cPick, SIGNAL(colorChanged(QColor)),


Member Function Documentation

void LegendItem::axisChanged ( QwtPlot::Axis   )  [signal]
QColor LegendItem::color ( int  index  )  const [inline]

Referenced by PlotCurve::updateLegend().

                                      {
        cPick.setCurrentColor(color);
    }

void LegendItem::colorChanged ( const QColor color  )  [signal]
QColor LegendItem::currentColor (  )  const [inline]

Referenced by PlotCurve::updateLegend().

                               {
        label.setText(title);
    }

QVBoxLayout* LegendItem::layout (  )  [inline]

                                         {
        m_axisButton.setCurrentAxis(axis);
    }

void LegendItem::setCurrentAxis ( QwtPlot::Axis  axis  )  [inline]

                                  {
        return cPick.color(index);
    }

void LegendItem::setCurrentColor ( QColor  color  )  [inline]

Referenced by PlotCurve::updateLegend().

                                {
        return cPick.currentColor();
    }

void LegendItem::setText ( QString  title  )  [inline]

Referenced by PlotCurve::updateLegend().

                               {


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