src/hbwidgets/widgets/hbgroupbox.h
changeset 3 11d3954df52a
parent 2 06ff229162e9
child 6 c3690ec91ef8
equal deleted inserted replaced
2:06ff229162e9 3:11d3954df52a
    37     Q_PROPERTY( bool collapsable READ isCollapsable WRITE setCollapsable )
    37     Q_PROPERTY( bool collapsable READ isCollapsable WRITE setCollapsable )
    38     Q_PROPERTY( bool collapsed READ isCollapsed WRITE setCollapsed )    
    38     Q_PROPERTY( bool collapsed READ isCollapsed WRITE setCollapsed )    
    39     Q_PROPERTY( bool marqueeHeading READ marqueeHeading WRITE setMarqueeHeading )    
    39     Q_PROPERTY( bool marqueeHeading READ marqueeHeading WRITE setMarqueeHeading )    
    40 
    40 
    41 public:
    41 public:
       
    42 
    42     explicit HbGroupBox( QGraphicsItem *parent = 0 );
    43     explicit HbGroupBox( QGraphicsItem *parent = 0 );
    43     ~HbGroupBox( );
    44     ~HbGroupBox( );
    44 
    45 
    45     void setHeading( const QString &text );
    46     void setHeading( const QString &text );
    46     QString heading( ) const;   
    47     QString heading( ) const;   
    47 
    48 
    48     bool isCollapsable( ) const;
    49     bool isCollapsable( ) const;
    49     bool isCollapsed( ) const;
    50     bool isCollapsed( ) const;
    50 
    51 
    51     void setMarqueeHeading( bool marquee = false );
    52     void setMarqueeHeading( bool marquee = true );
    52     bool marqueeHeading( ) const;
    53     bool marqueeHeading( ) const;
    53     
    54     
    54     void setContentWidget( HbWidget *widget );
    55     void setContentWidget( HbWidget *widget );
    55     HbWidget *contentWidget( ) const;
    56     HbWidget *contentWidget( ) const;
    56 
    57 
    57     virtual QGraphicsItem *primitive( HbStyle::Primitive primitive ) const;
    58     virtual QGraphicsItem *primitive( HbStyle::Primitive primitive ) const;
    58 
    59 
    59     enum { Type = Hb::ItemType_GroupBox };
    60     enum { 
    60     int type( ) const { return Type; }
    61         Type = Hb::ItemType_GroupBox 
       
    62     };
       
    63 
       
    64     int type( ) const {
       
    65         return Type;
       
    66     }
    61 
    67 
    62 public slots:
    68 public slots:
       
    69 
    63     void updatePrimitives( );
    70     void updatePrimitives( );
    64     void setCollapsed( bool collapsed = true );
    71     void setCollapsed( bool collapsed = true );
    65     void setCollapsable( bool collapsable = true );
    72     void setCollapsable( bool collapsable = true );
    66 
    73 
    67     signals:
    74 signals:
       
    75 
    68     void clicked(); 
    76     void clicked(); 
    69     void longPress(const QPointF &delta); 
    77     void longPress( const QPointF &delta ); 
    70     void toggled(bool state);
    78     void toggled( bool state );
    71 
    79 
    72 protected:
    80 protected:
       
    81 
    73     HbGroupBox( HbGroupBoxPrivate &dd, QGraphicsItem *parent );
    82     HbGroupBox( HbGroupBoxPrivate &dd, QGraphicsItem *parent );
    74 
    83 
    75 private:
    84 private:
    76     Q_DECLARE_PRIVATE_D( d_ptr, HbGroupBox )
    85     Q_DECLARE_PRIVATE_D( d_ptr, HbGroupBox )
    77     Q_DISABLE_COPY( HbGroupBox )
    86     Q_DISABLE_COPY( HbGroupBox )