source: src/UIElements/Views/Qt4/QtTimeLine.hpp@ 9a1e099

Action_Thermostats Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.1 ChemicalSpaceEvaluator Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Exclude_Hydrogens_annealWithBondGraph Fix_Verbose_Codepatterns ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion Gui_displays_atomic_force_velocity JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool PythonUI_with_named_parameters Recreated_GuiChecks StoppableMakroAction TremoloParser_IncreasedPrecision
Last change on this file since 9a1e099 was 7516f6, checked in by Frederik Heber <frederik.heber@…>, 8 years ago

FIX: several Qt...Lists required mutex to control refill triggered by observable update.

  • Property mode set to 100644
File size: 1.1 KB
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/QSlider>
17
18#include <boost/thread/recursive_mutex.hpp>
19
20#include "CodePatterns/Observer/Observer.hpp"
21
22class QtTimeLine : public QSlider, public Observer
23{
24 Q_OBJECT
25
26public:
27 QtTimeLine(QWidget * _parent=0);
28 virtual ~QtTimeLine();
29
30protected:
31 virtual void update(Observable *publisher);
32 virtual void recieveNotification(Observable *publisher, Notification_ptr notification);
33 virtual void subjectKilled(Observable *publisher);
34 virtual void paintEvent(QPaintEvent * event);
35
36private slots:
37 void StepUpdate(int position);
38
39private:
40 //!> whether AtomObserver knows about us or not
41 bool atomobserver_enlisted;
42 //!> whether WorldTime knows about us or not
43 bool worldtime_enlisted;
44 //!> states whether value was set by observing WorldTime (and not by slider)
45 bool WorldTime_change;
46
47 mutable boost::recursive_mutex refill_mutex;
48};
49
50#endif /* QTTIMELINE_HPP_ */
Note: See TracBrowser for help on using the repository browser.