PacMaster 2.0(r200)
Controls digital PAC measurements and collects the results

PacCountingSignalTransition.h

Go to the documentation of this file.
00001 #ifndef PACCOUNTINGSIGNALTRANSITION_H
00002 #define PACCOUNTINGSIGNALTRANSITION_H
00003 
00004 #include <QSignalTransition>
00005 
00006 class PacCountingSignalTransition : public QSignalTransition
00007 {
00008     Q_OBJECT
00009   Q_PROPERTY(int numcalls READ numCalls WRITE setNumCalls)
00010   Q_PROPERTY(int remainingcalls READ remainingCalls WRITE setRemainingCalls)
00011 
00012 public:
00013   PacCountingSignalTransition(QObject * sender, const char * signal, QState * sourceState = 0);
00014   int numCalls() const;
00015   int remainingCalls() const;
00016   void setTargetState(QAbstractState* target);
00017   void setTargetStates(const QList<QAbstractState*> &targets);
00018 
00019 signals:
00020   void triggerDirectTransition();
00021   void remainingCallsChanged(int remaining);
00022 
00023 public slots:
00024   void setNumCalls(int nc);
00025   void increaseNumCalls();
00026   void decreaseNumCalls();
00027   void setRemainingCalls(int rc);
00028   void increaseRemainingCalls();
00029   void decreaseRemainingCalls();
00030   void reset();
00031 
00032 protected:
00033   bool eventTest(QEvent *e);
00034 
00035 private:
00036   int numcalls;
00037   int remainingcalls;
00038   QSignalTransition direct;
00039 };
00040 
00041 #endif // PACCOUNTINGSIGNALTRANSITION_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines