3 /* ============================================================================
6 class THAction::Private {
14 /* ============================================================================
15 * PUBLIC Constructor/Destructors
17 THAction::THAction (QObject *parent)
18 : QObject(parent), d(new THAction::Private)
24 THAction::THAction (const QString& text, QObject *parent)
25 : QObject(parent), d(new THAction::Private)
32 THAction::THAction (const QIcon& icon, const QString& text, QObject *parent)
33 : QObject(parent), d(new THAction::Private)
41 THAction::~THAction() {
45 /* ============================================================================
48 bool THAction::isChecked (void) const {
52 bool THAction::isHovered (void) const {
56 QIcon THAction::icon (void) const {
60 void THAction::setIcon (const QIcon& icon) {
65 QString THAction::text (void) const {
69 void THAction::setText (const QString& text) {
73 /* ============================================================================
76 void THAction::hover (bool isHovered) {
77 d->isHovered = isHovered;
78 if (d->isHovered) emit hovered();
81 void THAction::toggle (void) {
82 emit toggled(d->isChecked);
85 void THAction::trigger (void) {
86 emit triggered(d->isChecked);
89 void THAction::setChecked (bool checked) {
90 d->isChecked = checked;