timeComponent.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00008 
00009 #ifndef timeComponent_H_
00010 #define timeComponent_H_
00011 #include "lgrGui.h"
00012 
00013 #include <QtCore/QObject>
00014 #include <absoluteTime.h>
00015 
00016 namespace MAKLogger
00017 {
00018 
00021    class DT_DLL_LGRGUI DtTimeComponent : public QObject
00022    {
00023       Q_OBJECT
00024 
00025    public:
00026       DtTimeComponent();
00027 
00028       virtual ~DtTimeComponent();
00029 
00030    private:
00032       DtTimeComponent(const DtTimeComponent&);
00034       DtTimeComponent& operator=(const DtTimeComponent&);
00035    public:
00036 
00037 
00039       static void listenOnly(const DtTimeComponent*,const DtTimeComponent*);
00043       static void disconnect(const DtTimeComponent*,const DtTimeComponent*);
00044 
00046       //
00047       //First time is the first valid time, all other times must be >=
00048       //Last  time is the last valid time all other times must be <=
00049       //Start time is the starting time, stop and current time must be >=
00050       //Stop  time is the stopping time, start and current time must be <=
00051       //Current time is the current time, it is between start and stop time.
00052 
00053    public:
00055 
00056       virtual DtAbsoluteTime firstTime() const;
00057 
00059       virtual DtAbsoluteTime lastTime() const;
00060 
00062       virtual DtAbsoluteTime startTime() const;
00063 
00065       virtual DtAbsoluteTime stopTime() const;
00066 
00068       virtual DtAbsoluteTime currentTime() const;
00069 
00071       virtual DtRelativeTime length() const;
00072 
00074       virtual DtRelativeTime duration() const;
00075       
00077 
00080       virtual DtAbsoluteTime timeOfPercentFirstLast(float percent) const;
00081 
00084       virtual float percentOfTimeFirstLast(const DtAbsoluteTime& time) const;
00085 
00088       virtual DtAbsoluteTime timeOfPercentStartStop(float percent) const;
00089 
00092       virtual float percentOfTimeStartStop(const DtAbsoluteTime& time) const;
00093 
00097       bool followModeEnabled() const;
00098 
00099    public slots:
00100 
00102       virtual void setFollowMode(bool);
00103 
00104       virtual void setStartStopTimes(const DtAbsoluteTime&,const DtAbsoluteTime&, bool emitSignal=true);
00105 
00106       virtual void setFirstTime  (const DtAbsoluteTime&);
00107       virtual void setLastTime   (const DtAbsoluteTime&);
00108       virtual void setCurrentTime(const DtAbsoluteTime&);
00109 
00110       virtual void emitSetCurrentTime(const DtAbsoluteTime&);
00111       virtual void emitStartStopTimesChanged(const DtAbsoluteTime&,const DtAbsoluteTime&);
00112 
00113    signals:
00115       void firstTimeChanged  (const DtAbsoluteTime&);
00116       void lastTimeChanged   (const DtAbsoluteTime&);
00117       void startStopTimesChanged(const DtAbsoluteTime&,const DtAbsoluteTime&);
00118       void currentTimeChanged(const DtAbsoluteTime&);  
00119 
00120       void modifyCurrentTime(const DtAbsoluteTime&);  
00121       void modifyStartStopTime(const DtAbsoluteTime&,const DtAbsoluteTime&);
00122 
00123       void followModeChanged(bool);
00124 
00125    private:
00126 
00128       DtAbsoluteTime myFirstTime;
00129       DtAbsoluteTime myLastTime;
00130 
00132       DtAbsoluteTime myStartTime;
00133       DtAbsoluteTime myStopTime;
00134       DtAbsoluteTime myCurrentTime;
00135 
00136       bool myFollowModeFlag;
00137       DtRelativeTime myFollowTime;
00138 
00139    };
00140 
00141 }
00142 
00143 #endif

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)