ALBA
albaGUISettingsTimeBar.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUISettingsTimeBar
5 Authors: Paolo Quadrani
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaGUISettingsTimeBar_H__
18#define __albaGUISettingsTimeBar_H__
19
20#include "albaGUISettings.h"
21
22//----------------------------------------------------------------------------
23// forward reference
24//----------------------------------------------------------------------------
25
31{
32public:
34 albaGUISettingsTimeBar(albaObserver *Listener, const albaString &label = _("Time Bar"));
37
39 {
49 };
50
52 void OnEvent(albaEventBase *alba_event);
53
56
58 void SetRealTimeMode(int realTime = 0);
59
61 int GetLoop() {return m_Loop;};
62
64 void LoopAnimation(int loop = 0);
65
67 void AminateInSubrange(int animate_subrange = 0);
68
71
73 void SetSubrange(double sub_range[2]);
74
76 void SetSubrange(double min, double max);
77
79 void GetSubrange(double sub_range[2]) {sub_range[0] = m_SubRange[0]; sub_range[1] = m_SubRange[1];};
80
82 double *GetSubrange() {return m_SubRange;};
83
86 void SetTimeMultiplier(double tmult = 1.0);
87
89 double GetTimeMultiplier() {return m_TimeSpeed;};
90
93 void SetTimeScale(double tscale = 1000.0);
94
96 double GetTimeScale() {return m_TimeScale;};
97
99 void PlayInActiveViewport(int active_viewport = 0);
100
103
105 void SetTimeBounds(double min, double max);
106
109
111 void SetNumberOfFrames(int frames);
112
114 void SetTimeStep(double step);
115
116protected:
118 void CreateGui();
119
122
125
128 void Update();
129
130 double m_TimeMin;
131 double m_TimeMax;
132
134 double m_TimeStep;
139 double m_SubRange[2];
140 double m_TimeSpeed;
141 double m_TimeScale;
142};
143#endif
MINID
Definition: albaDecl.h:420
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
class name: albaGUISettingsTimeBar Gui class for handling time bar properties inside application sett...
void EnableWidgets()
Enable/Disable widgets.
int GetLoop()
Return true if loop animation is active.
void SetSubrange(double min, double max)
Set the subrange playback interval.
double m_SubRange[2]
Time subrange animation.
void SetTimeStep(double step)
Set the time step for the animation.
int m_NumberOfFrames
Number of frames.
void InitializeSettings()
Initialize the application settings.
void GetSubrange(double sub_range[2])
Return the playback subrange.
int GetNumberOfFrames()
Return the number of subdivision for the time bar.
void AminateInSubrange(int animate_subrange=0)
Turn On/Off the possibility to do the playback in a sub-range of the whole time range.
void OnEvent(albaEventBase *alba_event)
Answer to the messages coming from interface.
void Update()
Update the GUI information according to the new values associated to the variables and flush these ne...
double * GetSubrange()
Return the playback subrange.
void CreateGui()
Create the GUI for the setting panel.
void SetTimeBounds(double min, double max)
Called by the time bar to set the time-bounds of the loaded data tree.
int m_RealTimeMode
Flag to play the animation in real time mode (checked) or to show all key-frames of the animation (un...
int GetRealTimeMode()
Return true if real time mode is active.
void SetTimeMultiplier(double tmult=1.0)
Set the time multiplier to speed up or down the animation when the playback is not in real time.
~albaGUISettingsTimeBar()
destructor
int GetAnimateSubrange()
Return true if animation in subrange is active.
double GetTimeMultiplier()
Return the time multiplier.
double GetTimeScale()
Return the time scale factor.
double m_TimeScale
Time scale referring to the time base = seconds.
void SetSubrange(double sub_range[2])
Set the subrange playback interval.
int GetPlayingInActiveViewport()
Return true if is active the flag for the update only into the active viewport.
albaGUISettingsTimeBar(albaObserver *Listener, const albaString &label=_("Time Bar"))
constructor
void PlayInActiveViewport(int active_viewport=0)
Enable/Disable the update of the animation only in the active viewport.
void SetNumberOfFrames(int frames)
Set the number of frames.
void SetRealTimeMode(int realTime=0)
Set the play modality: real time or all frames.
double m_TimeStep
Time step linked to the number of frames and to the time range.
void SetTimeScale(double tscale=1000.0)
Set the time scale to transform milliseconds to the VME unit time.
void LoopAnimation(int loop=0)
Turn On/Off the loop playback.
double m_TimeSpeed
Multiplier to speed up the animation when is not in real time mode.
class name: albaGUISettings base class for more complex specified classes regarding the setting of ap...
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
albaString - performs common string operations on c-strings.
Definition: albaString.h:43