Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Widget
- {
- public:
- Widget(int id) : id_(id) {
- timer_.connect(PseudoTimer::started(), [this] () {
- std::cout << "Widget id=" << this->id() << " : "
- << "started slot" << std::endl;
- });
- timer_.connect(PseudoTimer::expierd(), [this] (int n) {
- std::cout << "Widget id=" << this->id() << " : "
- << "expierd slot n=" << n << std::endl;
- });
- }
- void clicked() {
- timer_.start();
- }
- int id() const {
- return id_;
- }
- private:
- int id_;
- PseudoTimer timer_;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement