diff -r 06ff229162e9 -r 11d3954df52a src/hbwidgets/widgets/hbgroupbox.cpp --- a/src/hbwidgets/widgets/hbgroupbox.cpp Fri May 14 16:09:54 2010 +0300 +++ b/src/hbwidgets/widgets/hbgroupbox.cpp Thu May 27 13:10:59 2010 +0300 @@ -89,7 +89,7 @@ /*! \internal - Sets the group box type + Sets the groupbox type */ void HbGroupBoxPrivate::setGroupBoxType( GroupBoxType type ) { @@ -171,59 +171,60 @@ /*! - @alpha + @beta @hbwidgets \class HbGroupBox \brief HbGroupBox shows the user that a set of controls belong together. - HbGroupBox is a container that provides the following : + HbGroupBox is a container, which can have following Elementes: - \li Heading: text only - \li Body content: arbitrary content (any HbWidget) - \li Disclosure mechanism: expands and collapses the body content; + \li Heading: A heading contains one row text and disclosure indicator if the disclosure mechanism is on. + \li Body content: Can have arbitrary content (any HbWidget)and application is responsible for its layout. + \li Disclosure Indicator: Indicates the expands and collapses state of body; There are three types of GroupBox: - \li Simple Label - it's only function is to show relationship between items. - simple Label shows a heading with marquee, no disclosure mechanism, and - no body content. Marquee is disabled by default.Also it is not focusable. + \li Simple Label - Simple Label is to indicate the users position in the application hierarchy + or to display a textual label and its noninteractive. + Simple Label has a heading text with marquee, no disclosure mechanism, and + no body content.Simple label only has heading element. + Marquee is disabled by default, can be enabled using setMarqueeHeading () .Also it is not focusable. Example usage: For SimpleLabel type groupbox \code // create groupBox and set only heading; without any body content HbGroupBox *simpleLabel = new HbGroupBox(); simpleLabel->setHeading("Simple label groupBox comes with marquee disabled by default"); + //to make marqee enabled + simpleLabel->setMarqueeHeading(true); \endcode \image html simpleLabelgroupbox.png A SimpleLabel groupbox - \li Rich Label - does not show a heading and all content is in the body area - with no marquee and no disclosure control.Body Content must describe its own behavior and layout. + \li Rich Label - Rich label can contain dynamic content,which themselves can be interactive,or informative + with no heading ,no marquee and no disclosure control.Body Content must describe its own behavior and layout. Example usage: For RichLabel type groupbox \code // create groupBox and set only content; without any heading - HbGroupBox *richHeading = new HbGroupBox(); - // content widget can be any HbWidget - // layouting and interaction behaviour inside Content widget is application's responsiblity - HbPushButton *button = new HbPushButton(HbIcon(":/icons/ovi.png"),"Ovi"); + HbGroupBox *richLabel = new HbGroupBox(); + HbPushButton *button = new HbPushButton(HbIcon(QString("qtg_large_info")),"Ovi"); button->setAdditionalText("Launch Ovi Music store"); - button->setOrientation(Qt::Vertical); - button->setTextAlignment(Qt::AlignLeft); - richHeading->setContentWidget(button); + richLabel->setContentWidget(button); + mainlayout->addItem(richLabel); \endcode \image html richLabelgroupbox.png A RichLabel groupbox. In RichLabel type, groupbox provides background for body content. - \li Collapsing container - also allows the user to show or hide the content of the groupBox. + \li Collapsing container - Collapsing container allows the user to show or hide the content of the groupBox. It always has a heading and body content; optionally has a disclosure mechanism. - The heading does not marquee.The collapse/expand disclosure mechanism is located - in the heading and is the chief utility of this type of group box. + The heading does not marquee.The body content must describe its own behavior and layout. + The collapse/expand disclosure mechanism is located in the heading and is the chief utility of this type of groupbox. - If disclosure mechanism is Off, then heading will appear without expand/collapse indication icon + If disclosure mechanism is Off,then heading will appear without expand/collapse indication icon heading.Also the user will not be able to expand/collapse the body content. Example usage:For collapsingContainer groupbox @@ -241,7 +242,7 @@ \image html collapsableContainergroupbox.png A Collapsing container groupbox. In this type, groupBox body content can be expanded/collapsed, - depending on whether or not the group box is collapsed. + depending on whether or not the groupbox is collapsed. CollapsingContainer type groupBox comes with disclosure mechanism On by default. @@ -262,7 +263,7 @@ This signal is emitted only in case of richLabel and collapsing container groupbox, whenever click happened on body content.If the body content set is an interactive widget - and consumes mouse press event, then clicked signal will not get emitted from groupBox in that case. + and consumes mouse press event, then in that case clicked signal will not get emitted from groupBox. */ /*! @@ -273,8 +274,8 @@ */ /*! - @alpha - Constructs a group box with the given \a parent. + @beta + Constructs a groupbox with the given \a parent. */ HbGroupBox::HbGroupBox( QGraphicsItem *parent) : HbWidget(*new HbGroupBoxPrivate, parent) @@ -294,18 +295,20 @@ } /*! - Destructs the group box. + Destructs the groupbox. */ HbGroupBox::~HbGroupBox() { } /*! - @alpha + @beta - Sets the group box heading + Sets the groupbox heading Note: heading property is valid for simpleLabel & collapsing container type. + For Collapsing container, + if body content is collapsible ,heading will appear along with Disclosure indicator. If heading is set on richLabel type groupBox, it will be ignored \sa heading @@ -326,7 +329,7 @@ } /*! - @alpha + @beta Returns text shown on the groupBox heading. @@ -346,7 +349,7 @@ } /*! - @alpha + @beta Sets whether the groupbox is collapsable or not @@ -382,11 +385,11 @@ } /*! - @alpha + @beta Returns whether the groupbox is collapsable or not - By default, group boxes are collapsable. + By default, groupbox is collapsable. \sa setCollapsable */ @@ -399,18 +402,18 @@ } /*! - @alpha + @beta Sets whether the groupbox collapsed or expanded - If the groupbox is collapsed,the group box's content widget are hidden; + If the groupbox is collapsed,the groupbox's content widget are hidden; otherwise they will be visible setCollapsed on groupbox will emit signal toggled( bool ) upon collapse\expand of content widget - Only collapsable groupboxes can be collapsed. (i.e)this API will not do anything - if group box is not collapsable.By default, group boxes are not collapsed. + Only collapsable groupbox can be collapsed. (i.e)this API will not do anything + if groupbox is not collapsable.By default, groupbox is not collapsed. Note: collapsed property is valid only for collapsing container type. If collapsed is set on simpleLabel or richLabel type groupBox, it will be ignored @@ -449,15 +452,16 @@ d->mHeadingWidget->updatePrimitives(); emit toggled( d->mHeadingWidget->collapsed ); } - } + repolish(); + } } /*! - @alpha + @beta - Returns whether the group box is collapsed or expanded + Returns whether the groupbox is collapsed or expanded - By default, groupboxes are not collapsed. + By default, groupbox is not collapsed. \sa setCollapsed \sa setCollapsable */ @@ -471,7 +475,7 @@ } /*! - @alpha + @beta Enables the marquee for heading if marqueeHeading is true, otherwise the heading will not marquee. @@ -491,7 +495,7 @@ } /*! - @alpha + @beta Returns true if marquee is enabled for groupbox heading; otherwise returns false. @@ -511,7 +515,7 @@ /*! - @alpha + @beta Sets the groupbox content widget @@ -555,7 +559,7 @@ } /*! - @alpha + @beta Returns groupbox content widget