OpenCurves  0.9
PlotViewToolbar Class Reference

A toolbar for use with PlotView objects. More...

#include <plotviewtoolbar.h>

Inheritance diagram for PlotViewToolbar:

Public Types

enum  GroupId { GroupNone = -1, GroupZoom = 0, GroupTool, GroupCount }
 Various tool groupings for actions on the toolbar. More...
 
enum  ActionId {
  ActionInvalid = -1, ActionZoomXY, ActionZoomX, ActionZoomY,
  ActionToolMulti, ActionToolZoom, ActionToolPan, ActionCount
}
 IDs for the various actions on the toolbar. More...
 

Public Slots

bool setActive (ActionId actionId)
 Set the action associated with actionId to be active. More...
 

Signals

void active (ActionId actionId)
 Signal emitted when an action becomes active. More...
 

Public Member Functions

 PlotViewToolbar (QWidget *parent=0)
 Constructor. More...
 
 ~PlotViewToolbar ()
 Destructor.
 
QAction * action (ActionId actionId) const
 Access an action on the toolbar by ActionId. More...
 
ActionId actionId (const QAction *action) const
 Get the ActionId of the given action. More...
 

Detailed Description

A toolbar for use with PlotView objects.

The toolbar supports operations which directly affect a PlotView. The toolbar may be added to a main view and associated with a SplitView or directly associated with a PlotView. In either case, it is the user's responsibility to bind the toolbar actions appropriately.

The toolbar automatically ensures that one and only one action in each GroupId is checked.

Member Enumeration Documentation

IDs for the various actions on the toolbar.

Enumerator
ActionZoomXY 

Set the zoom mode to X and Y.

ActionZoomX 

Set zoom to X axis only.

ActionZoomY 

Set zoom to Y axis only.

ActionToolMulti 

Select zoom and pan multi-tool.

ActionToolZoom 

Select zoom only tool.

ActionToolPan 

Select pan only tool.

Various tool groupings for actions on the toolbar.

Enumerator
GroupZoom 

Various zoom settings.

GroupTool 

Exclusive interaction tools.

Constructor & Destructor Documentation

PlotViewToolbar::PlotViewToolbar ( QWidget *  parent = 0)
explicit

Constructor.

Parameters
parentThe owner of the toolbar.

Member Function Documentation

QAction* PlotViewToolbar::action ( ActionId  actionId) const

Access an action on the toolbar by ActionId.

Parameters
actionIdThe ID of the requested action.
Returns
The requested action or null actionId is invalid.
ActionId PlotViewToolbar::actionId ( const QAction *  action) const

Get the ActionId of the given action.

Parameters
actionThe action of interest.
Returns
The ActionId associated with action or ActionInvalid if action is null or invalid.
void PlotViewToolbar::active ( ActionId  actionId)
signal

Signal emitted when an action becomes active.

Parameters
actionIdThe ID of the activated action.
bool PlotViewToolbar::setActive ( ActionId  actionId)
slot

Set the action associated with actionId to be active.

Other actions in the same group are made inactive.

Parameters
actionIdThe ID of the action of interest.
Returns
True if actionId was successfully resolve to an action.

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