casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casa::PlotButton Class Referenceabstract

Generic class for a button that goes on a PlotPanel. More...

#include <PlotPanel.h>

Inheritance diagram for casa::PlotButton:
casa::PlotWidget

Public Member Functions

 PlotButton ()
 Constructor. More...
 
virtual ~PlotButton ()
 Destructor. More...
 
virtual bool textShown () const =0
 Returns true if text is being shown on the button, false otherwise. More...
 
virtual void showText (bool show=true)=0
 Show/hide the set text on the button. More...
 
virtual casacore::String text () const =0
 Currently set button text. More...
 
virtual void setText (const casacore::String &text)=0
 Sets the button text. More...
 
virtual bool imageShown () const =0
 Returns true if an image is being shown on the button, false otherwise. More...
 
virtual void showImage (bool show=true)=0
 Show/hide the set image on the button. More...
 
virtual void setImagePath (const casacore::String &imgPath)=0
 Set the image path to be shown on the button. More...
 
virtual bool isToggleable () const =0
 Returns true if the button is "toggleable", false otherwise. More...
 
virtual void setToggleable (bool toggleable=true)=0
 Sets whether this button is "toggleable" or not. More...
 
virtual bool isToggled () const =0
 Returns whether this button is in a toggled state or not. More...
 
virtual void setToggled (bool toggled=true)=0
 Sets whether this button is in a toggled state or not. More...
 
virtual void registerHandler (PlotButtonEventHandlerPtr handler)=0
 Register the given event handler for this button. More...
 
virtual std::vector
< PlotButtonEventHandlerPtr
allHandlers () const =0
 Returns all event handlers currently registered on this button. More...
 
virtual void unregisterHandler (PlotButtonEventHandlerPtr handler)=0
 Unregisters the given event handler. More...
 
- Public Member Functions inherited from casa::PlotWidget
 PlotWidget ()
 Constructor. More...
 
virtual ~PlotWidget ()
 Destructor. More...
 
virtual bool isEnabled () const =0
 Returns true if the widget is currently enabled, false otherwise. More...
 
virtual void setEnabled (bool enabled=true)=0
 Enables/disables the widget. More...
 
virtual bool isVisible () const =0
 Returns true if the widget is currently visible. More...
 
virtual void setVisible (bool visible=true)=0
 Show/hide the widget. More...
 
virtual casacore::String tooltip () const =0
 Returns the tooltip for this widget. More...
 
virtual void setTooltip (const casacore::String &text)=0
 Sets the tooltip for this widget. More...
 

Detailed Description

Generic class for a button that goes on a PlotPanel.

A button has properties that can be set, as well as registration for event handlers. A button can only be seen/interacted with on a PlotPanel.

Definition at line 68 of file PlotPanel.h.

Constructor & Destructor Documentation

casa::PlotButton::PlotButton ( )
inline

Constructor.

Definition at line 71 of file PlotPanel.h.

virtual casa::PlotButton::~PlotButton ( )
inlinevirtual

Destructor.

Definition at line 74 of file PlotPanel.h.

Member Function Documentation

virtual std::vector<PlotButtonEventHandlerPtr> casa::PlotButton::allHandlers ( ) const
pure virtual

Returns all event handlers currently registered on this button.

virtual bool casa::PlotButton::imageShown ( ) const
pure virtual

Returns true if an image is being shown on the button, false otherwise.

virtual bool casa::PlotButton::isToggleable ( ) const
pure virtual

Returns true if the button is "toggleable", false otherwise.

A button that is toggleable sticks down when pushed, then comes back up when pushed again. The state can be determined with isToggled().

virtual bool casa::PlotButton::isToggled ( ) const
pure virtual

Returns whether this button is in a toggled state or not.

virtual void casa::PlotButton::registerHandler ( PlotButtonEventHandlerPtr  handler)
pure virtual

Register the given event handler for this button.

virtual void casa::PlotButton::setImagePath ( const casacore::String imgPath)
pure virtual

Set the image path to be shown on the button.

virtual void casa::PlotButton::setText ( const casacore::String text)
pure virtual

Sets the button text.

virtual void casa::PlotButton::setToggleable ( bool  toggleable = true)
pure virtual

Sets whether this button is "toggleable" or not.

virtual void casa::PlotButton::setToggled ( bool  toggled = true)
pure virtual

Sets whether this button is in a toggled state or not.

(Does not affect buttons that are not toggleable.)

virtual void casa::PlotButton::showImage ( bool  show = true)
pure virtual

Show/hide the set image on the button.

virtual void casa::PlotButton::showText ( bool  show = true)
pure virtual

Show/hide the set text on the button.

virtual casacore::String casa::PlotButton::text ( ) const
pure virtual

Currently set button text.

(May not be displayed.)

virtual bool casa::PlotButton::textShown ( ) const
pure virtual

Returns true if text is being shown on the button, false otherwise.

virtual void casa::PlotButton::unregisterHandler ( PlotButtonEventHandlerPtr  handler)
pure virtual

Unregisters the given event handler.


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