![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure |
#include <StelGuiItems.hpp>
Public Slots | |
| void | setChecked (bool b) |
Signals | |
| void | toggled (bool) |
| void | triggered () |
| void | hoverChanged (bool b) |
Public Member Functions | |
| StelButton (QGraphicsItem *parent, const QPixmap &pixOn, const QPixmap &pixOff, const QPixmap &pixHover=QPixmap(), QAction *action=NULL, bool noBackground=false) | |
| bool | isChecked () const |
| void | setOpacity (double v) |
| void | setRedMode (bool b) |
Protected Member Functions | |
| virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
| virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
| StelButton::StelButton | ( | QGraphicsItem * | parent, | |
| const QPixmap & | pixOn, | |||
| const QPixmap & | pixOff, | |||
| const QPixmap & | pixHover = QPixmap(), |
|||
| QAction * | action = NULL, |
|||
| bool | noBackground = false | |||
| ) |
Constructor.
| parent | the parent item | |
| pixOn | the pixmap to display when the button is toggled | |
| pixOff | the pixmap to display when the button is not toggled | |
| pixHover | a pixmap slowly blended when mouse is over the button | |
| action | the associated action. Connections are automatically done with the signals if relevant. | |
| noBackground | define whether the button background image have to be used |
| bool StelButton::isChecked | ( | ) | const [inline] |
Get whether the button is checked.
| void StelButton::setOpacity | ( | double | v | ) | [inline] |
Set the button opacity.
| void StelButton::setRedMode | ( | bool | b | ) | [inline] |
Activate red mode for this button, i.e. will reduce the non red color component of the icon.
| void StelButton::toggled | ( | bool | ) | [signal] |
Triggered when the button state changes.
| void StelButton::triggered | ( | ) | [signal] |
Triggered when the button state changes.
| void StelButton::hoverChanged | ( | bool | b | ) | [signal] |
Emitted when the hover state change.
| b | true if the mouse entered the button |
| void StelButton::setChecked | ( | bool | b | ) | [slot] |
set whether the button is checked
1.5.5