File: TwoPhaseSignal.h

package info (click to toggle)
js8call 2.5.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,720 kB
  • sloc: cpp: 562,655; sh: 898; python: 132; ansic: 102; makefile: 4
file content (26 lines) | stat: -rw-r--r-- 734 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef TWOPHASESIGNAL_H
#define TWOPHASESIGNAL_H
#include <QObject>

/**
 * This is a humble helper class for Qt signals and slots when this mechanism is
 * also used to initialize the data.  In that case, we first do the "plumbing"
 * phase, where signals and slots are connected as appropriate.  After that has
 * been completed, signals are to be sent in a volley so that an required
 * initial values are being set.
 */
class TwoPhaseSignal : public QObject {
    Q_OBJECT
  public:
    TwoPhaseSignal();
    ~TwoPhaseSignal();

  public slots:
    /**
     * Called when the plumbing has been completed.
     * The object should react by fireing its signals.
     */
    virtual void onPlumbingCompleted() const = 0;
};

#endif