diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-11-13 19:53:11 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-11-13 19:53:22 +0900 |
| commit | 98b37ff3b1d307add5fe3f9e1f9c7923831debd4 (patch) | |
| tree | f99bdc8ee40242e1baba1d09b2522e1344098c5d /examples/PkExample.cpp | |
| parent | 8f1d08da58bce00523534cf39807732f7dee91ce (diff) | |
| download | polkit-tqt-98b37ff3b1d307add5fe3f9e1f9c7923831debd4.tar.gz polkit-tqt-98b37ff3b1d307add5fe3f9e1f9c7923831debd4.zip | |
Conversion of 'gui' library module.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'examples/PkExample.cpp')
| -rw-r--r-- | examples/PkExample.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/PkExample.cpp b/examples/PkExample.cpp index e200009d3..7366b4eaa 100644 --- a/examples/PkExample.cpp +++ b/examples/PkExample.cpp @@ -40,7 +40,7 @@ PkExample::PkExample(TQMainWindow *parent) ActionButton *bt; // Here we create an ActionButton that is a subclass of Action - // always pass a TQAbstractButton pointer and action id + // always pass a TQButton pointer and action id // You can change the action id later if you want bt = new ActionButton(kickPB, "org.qt.policykit.examples.kick", this); // Here we are setting the text and icon to all four states @@ -56,10 +56,10 @@ PkExample::PkExample(TQMainWindow *parent) // this signal is emitted when the user click on the action, // it will only happen if it was inserted in a TQMenu or a TQToolBar connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction())); - // This signal was propagated from the TQAbstractButton just for + // This signal was propagated from the TQButton just for // convenience in this case we don't have any benefit but the code // look cleaner - connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate())); + connect(bt, SIGNAL(clicked(TQButton *, bool)), bt, SLOT(activate())); // this is the Action activated signal, it is always emmited whenever // someone click and get authorized to do the action connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated())); @@ -70,7 +70,7 @@ PkExample::PkExample(TQMainWindow *parent) menuActions->addAction(qobject_cast<Action *>(bt)); toolBar->addAction(qobject_cast<Action *>(bt)); connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction())); - connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate())); + connect(bt, SIGNAL(clicked(TQButton *, bool)), bt, SLOT(activate())); connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated())); bt = new ActionButton(bleedPB, "org.qt.policykit.examples.bleed", this); @@ -79,7 +79,7 @@ PkExample::PkExample(TQMainWindow *parent) menuActions->addAction(qobject_cast<Action *>(bt)); toolBar->addAction(qobject_cast<Action *>(bt)); connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction())); - connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate())); + connect(bt, SIGNAL(clicked(TQButton *, bool)), bt, SLOT(activate())); connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated())); // This action is more customized @@ -103,7 +103,7 @@ PkExample::PkExample(TQMainWindow *parent) menuActions->addAction(qobject_cast<Action *>(bt)); toolBar->addAction(qobject_cast<Action *>(bt)); connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction())); - connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate())); + connect(bt, SIGNAL(clicked(TQButton *, bool)), bt, SLOT(activate())); connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated())); bt = new ActionButton(deletePB, "org.qt.policykit.examples.delete", this); @@ -114,7 +114,7 @@ PkExample::PkExample(TQMainWindow *parent) menuActions->addAction(qobject_cast<Action *>(bt)); toolBar->addAction(qobject_cast<Action *>(bt)); connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction())); - connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate())); + connect(bt, SIGNAL(clicked(TQButton *, bool)), bt, SLOT(activate())); connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated())); bt = new ActionButton(listenPB, "org.qt.policykit.examples.listen", this); @@ -125,7 +125,7 @@ PkExample::PkExample(TQMainWindow *parent) menuActions->addAction(qobject_cast<Action *>(bt)); toolBar->addAction(qobject_cast<Action *>(bt)); connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction())); - connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate())); + connect(bt, SIGNAL(clicked(TQButton *, bool)), bt, SLOT(activate())); connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated())); bt = new ActionButton(setPB, "org.qt.policykit.examples.set", this); @@ -136,7 +136,7 @@ PkExample::PkExample(TQMainWindow *parent) menuActions->addAction(qobject_cast<Action *>(bt)); toolBar->addAction(qobject_cast<Action *>(bt)); connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction())); - connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate())); + connect(bt, SIGNAL(clicked(TQButton *, bool)), bt, SLOT(activate())); connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated())); bt = new ActionButton(shoutPB, "org.qt.policykit.examples.shout", this); @@ -149,7 +149,7 @@ PkExample::PkExample(TQMainWindow *parent) menuActions->addAction(qobject_cast<Action *>(bt)); toolBar->addAction(qobject_cast<Action *>(bt)); connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction())); - connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate())); + connect(bt, SIGNAL(clicked(TQButton *, bool)), bt, SLOT(activate())); connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated())); // test configChanged |
