phoneplugins/infowidgetplugin/infowidget/inc/infowidgetlayoutmanager.h
changeset 46 bc5a64e5bc3c
parent 45 6b911d05207e
child 50 377c906a8701
equal deleted inserted replaced
45:6b911d05207e 46:bc5a64e5bc3c
    37 
    37 
    38 // Class declaration
    38 // Class declaration
    39 class InfoWidgetDocumentLoader : public HbDocumentLoader
    39 class InfoWidgetDocumentLoader : public HbDocumentLoader
    40 {
    40 {
    41 public:
    41 public:
    42     InfoWidgetDocumentLoader();
       
    43     virtual QObject *createObject(const QString& type,
    42     virtual QObject *createObject(const QString& type,
    44                                   const QString &name);
    43                                   const QString &name);
    45 };
    44 };
    46 
    45 
    47 // Class declaration
    46 // Class declaration
   121     void destroyWidgets();
   120     void destroyWidgets();
   122     
   121     
   123     int layoutRows() const; 
   122     int layoutRows() const; 
   124     void setLayoutRows(int rows);
   123     void setLayoutRows(int rows);
   125     
   124     
   126     qreal layoutRowHeight() const;
   125     qreal layoutRowHeight();
   127     bool textFitsToRect(QString text, QFont font, QRectF rect); 
   126     bool textFitsToRect(QString text, QFont font, QRectF rect) const;  
   128     
   127     
   129 private:
   128 private:
   130     QMap<LayoutItemRole, QGraphicsWidget *> m_widgets;
   129     QMap<LayoutItemRole, QGraphicsWidget *> m_widgets;
   131     QMap<LayoutItemRole, QGraphicsWidget *> m_infoDisplayWidgets; 
   130     QMap<LayoutItemRole, QGraphicsWidget *> m_infoDisplayWidgets; 
   132     QMap<LayoutItemRole, QGraphicsWidget *> m_settingsDialogWidgets;
   131     QMap<LayoutItemRole, QGraphicsWidget *> m_settingsDialogWidgets;
   133     QMap<LayoutItemRole, QObject *> m_objects;
   132     QMap<LayoutItemRole, QObject *> m_objects;
   134 
   133 
   135     InfoWidgetDocumentLoader *m_documentLoader;
   134     InfoWidgetDocumentLoader *m_documentLoader;
   136     DisplayRole m_displayRole; 
   135     DisplayRole m_displayRole; 
   137     int m_layoutRows;
   136     int m_layoutRows;
       
   137     qreal m_cachedLayoutRowHeight; 
   138     
   138     
   139 };
   139 };
   140 
   140 
   141 
   141 
   142 #endif // INFOWIDGETLAYOUTMANAGER_H
   142 #endif // INFOWIDGETLAYOUTMANAGER_H