clock/clockui/clockwidget/clockwidgetimpl/inc/clockwidget.h
changeset 50 579cc610882e
parent 26 a949c2543c15
--- a/clock/clockui/clockwidget/clockwidgetimpl/inc/clockwidget.h	Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockwidget/clockwidgetimpl/inc/clockwidget.h	Tue Jul 06 14:14:56 2010 +0300
@@ -20,7 +20,7 @@
 
 // System includes
 #include <hbwidget.h>
-
+#include <QPointer>
 // User includes
 #include "clockwidgetdefines.h"
 
@@ -28,11 +28,13 @@
 
 class QGraphicsLinearLayout;
 class AnalogClockWidget;
+class DigitalClockWidget;
 
 class CLOCKWIDGET_EXPORT  ClockWidget : public HbWidget
 {
     Q_OBJECT
     Q_PROPERTY(ClockType clockType READ clockType WRITE setClockType)
+	Q_PROPERTY(TimeFormat timeFormat READ timeFormat WRITE setTimeFormat)
 
 public:
     enum ClockType
@@ -40,20 +42,31 @@
         ClockTypeAnalog,
         ClockTypeDigital
     };
+	enum TimeFormat
+	{
+		TimeFormat12Hrs,
+		TimeFormat24Hrs
+	};
 
     ClockWidget(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0);
     ~ClockWidget();
     ClockType clockType() const;
     void setClockType(const ClockType &type);
     void loadClockWidget();
+    TimeFormat timeFormat() const;
+	void setTimeFormat(const TimeFormat &timeFormat);
 
 public slots:
     void updateTime();
     
 private:
-    ClockType mClockType;
-    AnalogClockWidget *mAnalogClock;
-    QGraphicsLinearLayout *mLayout;
+    void updateClockWidget();
+private:
+    ClockType                       mClockType;
+    TimeFormat                      mTimeFormat;
+    QPointer<AnalogClockWidget>     mAnalogClock;
+    QPointer<DigitalClockWidget>    mDigitalClock;
+    QGraphicsLinearLayout           *mLayout;
 };
 
 #endif // CLOCKWIDGET_H