phoneplugins/infowidgetplugin/infowidget/inc/infowidget.h
changeset 52 a49bfe5190e4
parent 50 377c906a8701
equal deleted inserted replaced
50:377c906a8701 52:a49bfe5190e4
    27 
    27 
    28 // Forward declarations 
    28 // Forward declarations 
    29 class QGraphicsSceneMouseEvent;
    29 class QGraphicsSceneMouseEvent;
    30 class QGraphicsLinearLayout;
    30 class QGraphicsLinearLayout;
    31 class QTranslator; 
    31 class QTranslator; 
       
    32 class QGestureEvent; 
    32 class HbDialog;
    33 class HbDialog;
    33 class HbIconItem; 
    34 class HbIconItem; 
    34 class HbMarqueeItem;
    35 class HbMarqueeItem;
    35 class HbLabel; 
    36 class HbLabel; 
    36 class HbCheckBox; 
    37 class HbCheckBox; 
    37 class HbPushButton;
    38 class HbPushButton;
    38 class HbFrameItem;
    39 class HbFrameItem;
    39 class HbAction; 
    40 class HbAction; 
    40 class InfoWidgetEngine; 
    41 class InfoWidgetEngine; 
    41 class InfoWidgetPreferences;
    42 class InfoWidgetPreferences;
    42  
    43 
       
    44 
    43 // Class declaration
    45 // Class declaration
    44 class InfoWidget : public HbWidget
    46 class InfoWidget : public HbWidget
    45 {
    47 {
    46     Q_OBJECT
    48     Q_OBJECT
    47 
    49 
    79     void setSatDisplay(QString value);
    81     void setSatDisplay(QString value);
    80     QString spnDisplay();
    82     QString spnDisplay();
    81     void setSpnDisplay(QString value);
    83     void setSpnDisplay(QString value);
    82     
    84     
    83 protected:
    85 protected:
    84     void mousePressEvent(QGraphicsSceneMouseEvent *event);
    86     void gestureEvent(QGestureEvent *event); 
    85     void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); 
       
    86     void mouseMoveEvent(QGraphicsSceneMouseEvent *event); 
       
    87     void changeEvent(QEvent *event);
    87     void changeEvent(QEvent *event);
    88     void timerEvent(QTimerEvent *event);
    88     void timerEvent(QTimerEvent *event);
    89     
    89     
    90     void updateInfoDisplay();
    90     void updateInfoDisplay();
    91     bool readPersistentPreferences();
    91     bool readPersistentPreferences();
    92     void initializeCheckBoxStates(); 
    92     void initializeCheckBoxStates(); 
    93     bool installTranslator(QString translationFile); 
       
    94     void removeTranslators(); 
       
    95      
    93      
    96 private: 
    94 private: 
    97     void updateItemsVisibility();
    95     void updateItemsVisibility();
    98     void layoutInfoDisplay(); 
    96     void layoutInfoDisplay(); 
    99     void updateInfoDisplayItem(
    97     void updateInfoDisplayItem(
   135     
   133     
   136     // Guarded objects, owned
   134     // Guarded objects, owned
   137     QScopedPointer<InfoWidgetEngine> m_engine;
   135     QScopedPointer<InfoWidgetEngine> m_engine;
   138     QScopedPointer<InfoWidgetPreferences> m_preferences;
   136     QScopedPointer<InfoWidgetPreferences> m_preferences;
   139     QScopedPointer<InfoWidgetLayoutManager> m_layoutManager;
   137     QScopedPointer<InfoWidgetLayoutManager> m_layoutManager;
   140     
       
   141     // Translators, owned
       
   142     QList<QTranslator *> m_translators;
       
   143 
   138 
   144     // Widget main layout, not owned 
   139     // Widget main layout, not owned 
   145     QGraphicsLinearLayout *m_layout;
   140     QGraphicsLinearLayout *m_layout;
   146     
   141     
   147     // Currently animating item(s), not owned 
   142     // Currently animating item(s), not owned 
   154     // Id of active timer 
   149     // Id of active timer 
   155     int m_timerId; 
   150     int m_timerId; 
   156     
   151     
   157     // Flags 
   152     // Flags 
   158     bool m_layoutChanging;
   153     bool m_layoutChanging;
   159     bool m_dragEvent; 
       
   160     bool m_initialized;
   154     bool m_initialized;
   161 
   155 
   162 };
   156 };
   163 
   157 
   164 
   158