~ubuntu-branches/ubuntu/wily/psi/wily

« back to all changes in this revision

Viewing changes to third-party/qca/qca-gnupg/gpgproc/gpgproc.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-08-28 18:46:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080828184652-iiik12dl91nq7cdi
Tags: 0.12-2
Uploading to unstable (Closes: Bug#494352)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include "qpipe.h"
24
24
 
 
25
class QTimer;
 
26
 
25
27
namespace gpgQCAPlugin {
26
28
 
 
29
// FIXME: Even though deleting an object during a metacall event is supposed
 
30
//   to be legal with Qt, it is unfortunately buggy (at least before Qt 4.4).
 
31
//   This function performs the following steps:
 
32
//     obj->disconnect(owner); // to prevent future signals to owner
 
33
//     obj->setParent(0);      // to prevent delete if parent is deleted
 
34
//     obj->deleteLater();     // now we can forget about the object
 
35
void releaseAndDeleteLater(QObject *owner, QObject *obj);
 
36
 
 
37
class SafeTimer : public QObject
 
38
{
 
39
        Q_OBJECT
 
40
public:
 
41
        SafeTimer(QObject *parent = 0);
 
42
        ~SafeTimer();
 
43
 
 
44
        int interval() const;
 
45
        bool isActive() const;
 
46
        bool isSingleShot() const;
 
47
        void setInterval(int msec);
 
48
        void setSingleShot(bool singleShot);
 
49
        int timerId() const;
 
50
 
 
51
public slots:
 
52
        void start(int msec);
 
53
        void start();
 
54
        void stop();
 
55
 
 
56
signals:
 
57
        void timeout();
 
58
 
 
59
private:
 
60
        QTimer *timer;
 
61
};
 
62
 
27
63
// GPGProc - executes gpg and provides access to all 6 channels.  NormalMode
28
64
//   enables stdout, stderr, and stdin.  ExtendedMode has those 3 plus status
29
65
//   aux, and command.  The aux channel is connected to the '-&?' argument.