ganeswidgets/inc/hgwidgetitem.h
changeset 1 e48454f237ca
parent 0 89c329efa980
child 2 49c70dcc3f17
equal deleted inserted replaced
0:89c329efa980 1:e48454f237ca
    30 
    30 
    31 class HgWidgetItem
    31 class HgWidgetItem
    32 {
    32 {
    33 public:
    33 public:
    34 
    34 
    35     HgWidgetItem(HgQuadRenderer* renderer);
    35     HgWidgetItem(HgQuadRenderer *renderer);
    36     HgWidgetItem( HgQuadRenderer* renderer, QImage image, QString title, QString description );
    36     HgWidgetItem(HgQuadRenderer *renderer, QImage image, QString title, QString description );
    37     virtual ~HgWidgetItem();  
    37     virtual ~HgWidgetItem();
    38     
    38 
    39     void setImage( QImage image );
    39     void setImage(const QImage &image);
    40     
    40 
    41     void setTitle( QString title );
    41     void setTitle(QString title);
    42     QString title() const;
    42     QString title() const;
    43     
    43 
    44     const HgImage* image() const;
    44     const HgImage* image() const;
    45         
    45 
    46     void setDescription( QString description );
    46     void setDescription( QString description );
    47     QString description() const;
    47     QString description() const;
    48     
    48 
    49     void setModelIndex( const QModelIndex& index);
    49     void setModelIndex( const QModelIndex& index);
    50     QModelIndex modelIndex() const;
    50     QModelIndex modelIndex() const;
    51     
    51 
    52     bool validData() const;
    52     bool validData() const;
    53     bool updateItemData();
    53     bool updateItemData();
    54     void releaseItemData();
    54     void releaseItemData();
    55     
    55 
    56     bool visibility() const;
    56     bool visibility() const;
    57     void setVisibility(bool visible);
    57     void setVisibility(bool visible);
    58 
    58 
    59 private:
    59 private:
    60 
    60 
    63     QModelIndex mModelIndex;
    63     QModelIndex mModelIndex;
    64     bool        mValidData;
    64     bool        mValidData;
    65     HgImage*    mHgImage;
    65     HgImage*    mHgImage;
    66     HgQuadRenderer* mRenderer;
    66     HgQuadRenderer* mRenderer;
    67     bool mVisibility;
    67     bool mVisibility;
    68     
    68 
    69     Q_DISABLE_COPY(HgWidgetItem)
    69     Q_DISABLE_COPY(HgWidgetItem)
    70 };
    70 };
    71 
    71 
    72 #endif  //HGWIDGETITEM_H
    72 #endif  //HGWIDGETITEM_H
    73 
    73