src/hbwidgets/itemviews/hbtreeviewitem.cpp
changeset 6 c3690ec91ef8
parent 2 06ff229162e9
child 21 4633027730f5
child 34 ed14f46c0e55
equal deleted inserted replaced
5:627c4a0fd0e7 6:c3690ec91ef8
    20 **
    20 **
    21 ** If you have questions regarding the use of this file, please contact
    21 ** If you have questions regarding the use of this file, please contact
    22 ** Nokia at developer.feedback@nokia.com.
    22 ** Nokia at developer.feedback@nokia.com.
    23 **
    23 **
    24 ****************************************************************************/
    24 ****************************************************************************/
       
    25 
       
    26 #include "hbtreeviewitem.h"
    25 #include "hbtreeviewitem_p.h"
    27 #include "hbtreeviewitem_p.h"
    26 
    28 
    27 #include "hbtreeviewitem.h"
       
    28 #include "hbtreeview.h"
    29 #include "hbtreeview.h"
    29 #include "hbabstractitemview.h"
    30 #include "hbabstractitemview.h"
    30 #include "hbabstractitemcontainer_p.h"
    31 #include "hbabstractitemcontainer_p.h"
    31 
    32 
    32 #include <hbnamespace.h>
    33 #include <hbnamespace.h>
    54 
    55 
    55     \b Subclassing
    56     \b Subclassing
    56 
    57 
    57     See HbListViewItem for commmon view item subclassing reference. 
    58     See HbListViewItem for commmon view item subclassing reference. 
    58 
    59 
       
    60     \primitives
       
    61     \primitive{subitem-indicator} HbIconItem representing the expand/collapse icon in an HbTreeViewItem that has child items.
    59 */
    62 */
    60 
    63 
    61 
    64 
    62 HbTreeViewItemPrivate::HbTreeViewItemPrivate(HbTreeViewItem *prototype) :
    65 HbTreeViewItemPrivate::HbTreeViewItemPrivate(HbTreeViewItem *prototype) :
    63     HbListViewItemPrivate(prototype, new HbTreeViewItemShared),
    66     HbListViewItemPrivate(prototype, new HbTreeViewItemShared),
   297 }
   300 }
   298 
   301 
   299 /*!
   302 /*!
   300     Returns true if the item is expanded; otherwise returns false.
   303     Returns true if the item is expanded; otherwise returns false.
   301 
   304 
   302     \sa setExpanded
   305     \sa setExpanded()
   303 */
   306 */
   304 bool HbTreeViewItem::isExpanded() const
   307 bool HbTreeViewItem::isExpanded() const
   305 {
   308 {
   306     Q_D(const HbTreeViewItem);
   309     Q_D(const HbTreeViewItem);
   307     return d->mExpanded;
   310     return d->mExpanded;
   350 /*!
   353 /*!
   351     Sets items either expandable or non-expandable by the user, depending on the value of \a expandable.
   354     Sets items either expandable or non-expandable by the user, depending on the value of \a expandable.
   352 
   355 
   353     This method will change the user expandable value for all view items.
   356     This method will change the user expandable value for all view items.
   354 
   357 
   355     \sa isUserExpandable
   358     \sa isUserExpandable()
   356 */
   359 */
   357 void HbTreeViewItem::setUserExpandable(bool expandable)
   360 void HbTreeViewItem::setUserExpandable(bool expandable)
   358 {
   361 {
   359     HB_SDD(HbTreeViewItem);
   362     HB_SDD(HbTreeViewItem);
   360     if (sd->mUserExpandable != expandable) {
   363     if (sd->mUserExpandable != expandable) {
   364 }
   367 }
   365 
   368 
   366 /*!
   369 /*!
   367     Returns true if the items are expandable by the user; otherwise returns false.
   370     Returns true if the items are expandable by the user; otherwise returns false.
   368 
   371 
   369     \sa setUserExpandable
   372     \sa setUserExpandable()
   370 */
   373 */
   371 bool HbTreeViewItem::isUserExpandable() const
   374 bool HbTreeViewItem::isUserExpandable() const
   372 {
   375 {
   373     HB_SDD(const HbTreeViewItem);
   376     HB_SDD(const HbTreeViewItem);
   374     return sd->mUserExpandable;
   377     return sd->mUserExpandable;