diff options
Diffstat (limited to 'gui/polkitqt1-gui-actionbutton.cpp')
-rw-r--r-- | gui/polkitqt1-gui-actionbutton.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/gui/polkitqt1-gui-actionbutton.cpp b/gui/polkitqt1-gui-actionbutton.cpp index a9963dcb9..fefb831cf 100644 --- a/gui/polkitqt1-gui-actionbutton.cpp +++ b/gui/polkitqt1-gui-actionbutton.cpp @@ -23,15 +23,15 @@ #include "polkitqt1-gui-actionbutton_p.h" -namespace PolkitQt1 +namespace PolkitTQt1 { namespace Gui { -ActionButton::ActionButton(QAbstractButton *button, const QString &actionId, QObject *parent) +ActionButton::ActionButton(TQAbstractButton *button, const TQString &actionId, TQObject *parent) : Action(actionId, parent) - , d_ptr(new ActionButtonPrivate(QList<QAbstractButton *>() << button)) + , d_ptr(new ActionButtonPrivate(TQList<TQAbstractButton *>() << button)) { d_ptr->q_ptr = this; @@ -39,7 +39,7 @@ ActionButton::ActionButton(QAbstractButton *button, const QString &actionId, QOb connect(this, SIGNAL(dataChanged()), SLOT(updateButton())); } -ActionButton::ActionButton(ActionButtonPrivate &dd, const QString &actionId, QObject *parent) +ActionButton::ActionButton(ActionButtonPrivate &dd, const TQString &actionId, TQObject *parent) : Action(actionId, parent) , d_ptr(&dd) { @@ -57,7 +57,7 @@ void ActionButtonPrivate::updateButton() { Q_Q(ActionButton); - Q_FOREACH(QAbstractButton *ent, buttons) { + Q_FOREACH(TQAbstractButton *ent, buttons) { ent->setVisible(q->isVisible()); ent->setEnabled(q->isEnabled()); ent->setText(q->text()); @@ -81,7 +81,7 @@ bool ActionButton::activate() Q_D(ActionButton); bool tg = false; - Q_FOREACH(QAbstractButton *ent, d->buttons) { + Q_FOREACH(TQAbstractButton *ent, d->buttons) { if (ent->isCheckable()) { // we set the the current Action state ent->setChecked(isChecked()); @@ -97,12 +97,12 @@ bool ActionButton::activate() return Action::activate(); } -void ActionButton::setButton(QAbstractButton *button) +void ActionButton::setButton(TQAbstractButton *button) { Q_D(ActionButton); // First, let's clear the list - Q_FOREACH(QAbstractButton *ent, d->buttons) { + Q_FOREACH(TQAbstractButton *ent, d->buttons) { d->removeButton(ent); } @@ -110,21 +110,21 @@ void ActionButton::setButton(QAbstractButton *button) d->addButton(button); } -void ActionButtonPrivate::addButton(QAbstractButton *button) +void ActionButtonPrivate::addButton(TQAbstractButton *button) { Q_Q(ActionButton); buttons.append(button); - QObject::connect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool))); - QObject::connect(q, SIGNAL(toggled(bool)), button, SLOT(toggle())); + TQObject::connect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool))); + TQObject::connect(q, SIGNAL(toggled(bool)), button, SLOT(toggle())); if (q->isCheckable()) { // the button should follow our first buttons button->setCheckable(true); } else if (button->isCheckable()) { // if we are not checkable BUT the button - // is (eg a QCheckBox) we should set all buttons to + // is (eg a TQCheckBox) we should set all buttons to // checkable. - Q_FOREACH(QAbstractButton *ent, buttons) { + Q_FOREACH(TQAbstractButton *ent, buttons) { ent->setCheckable(true); } // set the checkable state of Action to store the initial state @@ -134,18 +134,18 @@ void ActionButtonPrivate::addButton(QAbstractButton *button) updateButton(); } -void ActionButtonPrivate::removeButton(QAbstractButton *button) +void ActionButtonPrivate::removeButton(TQAbstractButton *button) { Q_Q(ActionButton); if (buttons.contains(button)) { - QObject::disconnect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool))); - QObject::disconnect(q, SIGNAL(toggled(bool)), button, SLOT(toggle())); + TQObject::disconnect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool))); + TQObject::disconnect(q, SIGNAL(toggled(bool)), button, SLOT(toggle())); buttons.removeOne(button); } } -QAbstractButton *ActionButton::button() const +TQAbstractButton *ActionButton::button() const { Q_D(const ActionButton); @@ -156,7 +156,7 @@ void ActionButtonPrivate::streamClicked(bool c) { Q_Q(ActionButton); - Q_EMIT q->clicked(qobject_cast<QAbstractButton *>(q->sender()), c); + Q_EMIT q->clicked(qobject_cast<TQAbstractButton *>(q->sender()), c); } } |