stable
v1.7.0
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * QtTimeLine.hpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Jul 11, 2013
|
|---|
| 5 | * Author: heber
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #ifndef QTTIMELINE_HPP_
|
|---|
| 9 | #define QTTIMELINE_HPP_
|
|---|
| 10 |
|
|---|
| 11 | // include config.h
|
|---|
| 12 | #ifdef HAVE_CONFIG_H
|
|---|
| 13 | #include <config.h>
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 | #include <QtGui/QHBoxLayout>
|
|---|
| 17 | #include <QtGui/QSlider>
|
|---|
| 18 | #include <QtGui/QSpinBox>
|
|---|
| 19 |
|
|---|
| 20 | #include <boost/thread/recursive_mutex.hpp>
|
|---|
| 21 |
|
|---|
| 22 | #include "CodePatterns/Observer/Observer.hpp"
|
|---|
| 23 |
|
|---|
| 24 | class QtTimeLine : public QWidget, public Observer
|
|---|
| 25 | {
|
|---|
| 26 | Q_OBJECT
|
|---|
| 27 |
|
|---|
| 28 | public:
|
|---|
| 29 | QtTimeLine(QWidget * _parent=0);
|
|---|
| 30 | virtual ~QtTimeLine();
|
|---|
| 31 |
|
|---|
| 32 | protected:
|
|---|
| 33 | virtual void update(Observable *publisher);
|
|---|
| 34 | virtual void recieveNotification(Observable *publisher, Notification_ptr notification);
|
|---|
| 35 | virtual void subjectKilled(Observable *publisher);
|
|---|
| 36 | virtual void paintEvent(QPaintEvent * event);
|
|---|
| 37 |
|
|---|
| 38 | private slots:
|
|---|
| 39 | void StepUpdate(int position);
|
|---|
| 40 |
|
|---|
| 41 | private:
|
|---|
| 42 | //!> whether AtomObserver knows about us or not
|
|---|
| 43 | bool atomobserver_enlisted;
|
|---|
| 44 | //!> whether WorldTime knows about us or not
|
|---|
| 45 | bool worldtime_enlisted;
|
|---|
| 46 |
|
|---|
| 47 | QSlider *slider;
|
|---|
| 48 | QSpinBox *spinbox;
|
|---|
| 49 | QHBoxLayout *layout;
|
|---|
| 50 |
|
|---|
| 51 | //!> states whether we are expecting a notification from the worldtime
|
|---|
| 52 | bool SetWorldTime_called;
|
|---|
| 53 |
|
|---|
| 54 | mutable boost::recursive_mutex refill_mutex;
|
|---|
| 55 | };
|
|---|
| 56 |
|
|---|
| 57 | #endif /* QTTIMELINE_HPP_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.