OpenCurves
0.9
|
A toolbar for use with PlotView
objects.
More...
#include <plotviewtoolbar.h>
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... | |
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.
|
explicit |
Constructor.
parent | The owner of the toolbar. |
QAction* PlotViewToolbar::action | ( | ActionId | actionId | ) | const |
Access an action on the toolbar by ActionId
.
actionId | The ID of the requested action. |
actionId
is invalid. ActionId PlotViewToolbar::actionId | ( | const QAction * | action | ) | const |
Get the ActionId
of the given action
.
action | The action of interest. |
ActionId
associated with action
or ActionInvalid
if action
is null or invalid.
|
signal |
Signal emitted when an action becomes active.
actionId | The ID of the activated action. |
|
slot |
Set the action associated with actionId
to be active.
Other actions in the same group are made inactive.
actionId | The ID of the action of interest. |
actionId
was successfully resolve to an action.