• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kmobiletools

TreeItem Class Reference

#include <treeitem.h>

Inheritance diagram for TreeItem:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class represents a generic tree item (inspired from a Qt example).

Author:
Matthias Lechner <matthias@lmme.de>

Definition at line 34 of file treeitem.h.


Public Types

enum  ChildProperty { VisibleChildren = 0, AllChildren = 1 }

Signals

void dataChanged (TreeItem *item)

Public Member Functions

void appendChild (TreeItem *child)
TreeItem * child (int row)
int childCount (ChildProperty childProperty=VisibleChildren) const
QVariant data () const
QFont font () const
QIcon icon () const
TreeItem * parent () const
void removeChild (TreeItem *child)
int row () const
void setFont (QFont font)
void setIcon (QIcon icon)
void setVisible (bool visible)
 TreeItem (QString data, TreeItem *parent=0)
bool visible () const
 ~TreeItem ()

Member Enumeration Documentation

enum TreeItem::ChildProperty

Enumerator:
VisibleChildren 
AllChildren 

Definition at line 37 of file treeitem.h.


Constructor & Destructor Documentation

TreeItem::TreeItem ( QString  data,
TreeItem *  parent = 0 
)

Definition at line 24 of file treeitem.cpp.

TreeItem::~TreeItem (  ) 

Definition at line 31 of file treeitem.cpp.


Member Function Documentation

void TreeItem::appendChild ( TreeItem *  child  ) 

Appends a child item to the current item.

Parameters:
child the child to append

Definition at line 37 of file treeitem.cpp.

TreeItem * TreeItem::child ( int  row  ) 

Returns the child at the given row.

Parameters:
row the row where the item is located
Returns:
the child item

Definition at line 65 of file treeitem.cpp.

int TreeItem::childCount ( ChildProperty  childProperty = VisibleChildren  )  const

Returns how many children the item has.

Parameters:
childProperty include items with the property only
Returns:
the child count

Definition at line 70 of file treeitem.cpp.

QVariant TreeItem::data (  )  const

Returns the data of the current item.

Returns:
the item data

Definition at line 88 of file treeitem.cpp.

void TreeItem::dataChanged ( TreeItem *  item  )  [signal]

This signal is emitted when the data (text, icon.

..) of this item has changed

Parameters:
item the current item

QFont TreeItem::font (  )  const

Returns the font for the current item.

Returns:
the item's font

Definition at line 98 of file treeitem.cpp.

QIcon TreeItem::icon (  )  const

Returns the icon of the current item.

Returns:
the item's icon

Definition at line 93 of file treeitem.cpp.

TreeItem * TreeItem::parent (  )  const

Returns the item's parent.

Returns:
the parent

Definition at line 103 of file treeitem.cpp.

void TreeItem::removeChild ( TreeItem *  child  ) 

Removes a child from the current item Please note that the item is NOT deleted.

Parameters:
child the child to remove

Definition at line 42 of file treeitem.cpp.

int TreeItem::row (  )  const

Returns the position of this item within its parent.

Returns:
the position

Definition at line 108 of file treeitem.cpp.

void TreeItem::setFont ( QFont  font  ) 

Sets the item's font.

Parameters:
font the font

Definition at line 52 of file treeitem.cpp.

void TreeItem::setIcon ( QIcon  icon  ) 

Sets the item's icon.

Parameters:
icon the icon

Definition at line 47 of file treeitem.cpp.

void TreeItem::setVisible ( bool  visible  ) 

Sets whether the item should be displayed in a view.

Parameters:
visible true if the item

Definition at line 57 of file treeitem.cpp.

bool TreeItem::visible (  )  const

Returns whether the item is visible to a view.

Returns:
true if the item is visible

Definition at line 61 of file treeitem.cpp.


The documentation for this class was generated from the following files:
  • treeitem.h
  • treeitem.cpp

kmobiletools

Skip menu "kmobiletools"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal