Signals | Public Member Functions

AxisButton Class Reference

#include <PlotCurve.h>

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

List of all members.

Signals

void axisChanged (QwtPlot::Axis axis)

Public Member Functions

 AxisButton (QWidget *parent=0)
void setCurrentAxis (QwtPlot::Axis axis)

Constructor & Destructor Documentation

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

                                    : QPushButton(parent),
        yLeftAxisAction("Left Y-axis", this), yRightAxisAction("Right Y-axis", this)
    {
        yLeftAxisAction.setData(QVariant::fromValue(QwtPlot::yLeft));
        yRightAxisAction.setData(QVariant::fromValue(QwtPlot::yRight));
        setFlat(true);
        m.addAction(&yLeftAxisAction);
        m.addAction(&yRightAxisAction);
        setMenu(&m);

        connect(&m, SIGNAL(triggered(QAction*)),
                this, SLOT(axisSelected(QAction*)));
        axisSelected(&yLeftAxisAction);
    }


Member Function Documentation

void AxisButton::axisChanged ( QwtPlot::Axis  axis  )  [signal]
void AxisButton::setCurrentAxis ( QwtPlot::Axis  axis  )  [inline]

Referenced by LegendItem::layout().

                                         {
        if (axis == axisOfAction(&yLeftAxisAction)) {
            axisSelected(&yLeftAxisAction);
        } else if (axis == axisOfAction(&yRightAxisAction)) {
            axisOfAction(&yRightAxisAction);
        } else {
            return;
        }
    }


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