Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/widget/wtime.h

Go to the documentation of this file.
00001 // wtime.h
00002 // WTime is a widget showing the current time
00003 // In skin.xml, it is represented by a <Time> node.
00004 
00005 #ifndef WTIME_H
00006 #define WTIME_H
00007 
00008 #include <QTimer>
00009 
00010 #include "widget/wlabel.h"
00011 
00012 class WTime: public WLabel {
00013     Q_OBJECT
00014   public:
00015     WTime(QWidget *parent=0);
00016     virtual ~WTime();
00017     void setup(QDomNode node);
00018 
00019   private slots:
00020     void refreshTime();
00021 
00022   private:
00023     void setTimeFormat(QDomNode node);
00024 
00025     QTimer* m_pTimer;
00026     QString m_sTimeFormat;
00027     // m_iInterval defines how often the time will be updated
00028     short m_iInterval;
00029     // m_iInterval is set to s_iSecondInterval if seconds are shown
00030     // otherwise, m_iInterval = s_iMinuteInterval
00031     static const short s_iSecondInterval = 100;
00032     static const short s_iMinuteInterval = 1000;
00033 };
00034 
00035 #endif /* WTIME_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines