UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
hds::TreeSelectorWid Class Reference

#include <tree_selector_wid.hpp>

Inheritance diagram for hds::TreeSelectorWid:
hds::SelectorWid

Signals

void itemDoubleClicked (QTreeWidgetItem *item, int column)
 

Public Member Functions

 TreeSelectorWid (QWidget *parent=0, Qt::WindowFlags f=0)
 
 TreeSelectorWid (int columns, QWidget *parent=0, Qt::WindowFlags f=0)
 
virtual ~TreeSelectorWid ()
 
virtual int currentId () const
 
virtual QStringList current () const
 
virtual QString current (int id) const
 
virtual void setCurrent (int id)
 
virtual int count () const
 
virtual void add (const QStringList &item)
 
virtual void remove (int id)
 
virtual void clear ()
 
void resizeToContents ()
 
void setHeaderLabels (const QStringList &labels)
 
void headers (bool on)
 
bool headers () const
 
int columns ()
 
void setColumns (int n)
 
int defColumnForFind () const
 
void setDefColumnForFind (int id)
 
- Public Member Functions inherited from hds::SelectorWid
 SelectorWid (QWidget *parent=0, Qt::WindowFlags f=0)
 
virtual ~SelectorWid ()
 
bool findString () const
 
void findString (bool on)
 
QLineEdit & getFindLineEdit ()
 

Protected Slots

virtual void currentItemChangedSlot (QTreeWidgetItem *current, QTreeWidgetItem *previous)
 
virtual void textEditedSlot (const QString &str)
 

Protected Member Functions

const QTreeWidget & treeWid () const
 
QTreeWidget & treeWid ()
 
- Protected Member Functions inherited from hds::SelectorWid
Ui::SelectorWidui ()
 
const Ui::SelectorWidui () const
 

Detailed Description

Widget provides item selection from any list.

Constructor & Destructor Documentation

hds::TreeSelectorWid::TreeSelectorWid ( QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)
Default constructor of the widget. One column by default. 

The first column is defalt for find. The first column is default for find.

hds::TreeSelectorWid::TreeSelectorWid ( int  columns,
QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)
Constructor with provided number of columns and default column for find. 

The first column is defalt for find.

virtual hds::TreeSelectorWid::~TreeSelectorWid ( )
virtual

Destructor.

Member Function Documentation

virtual void hds::TreeSelectorWid::add ( const QStringList &  item)
virtual
Add one row item. Size of item is to be equal to

the number of columns.

virtual void hds::TreeSelectorWid::clear ( )
virtual

Clear all items.

Implements hds::SelectorWid.

int hds::TreeSelectorWid::columns ( )

Number of columns.

virtual int hds::TreeSelectorWid::count ( ) const
virtual

Number of items.

Implements hds::SelectorWid.

virtual QStringList hds::TreeSelectorWid::current ( ) const
virtual

Current item row, empty string list if not selected.

virtual QString hds::TreeSelectorWid::current ( int  id) const
virtual
Element with provided id of current item row, null string

if not selected or id put of range.

virtual int hds::TreeSelectorWid::currentId ( ) const
virtual

Id of current item (-1 if not selected).

Implements hds::SelectorWid.

virtual void hds::TreeSelectorWid::currentItemChangedSlot ( QTreeWidgetItem *  current,
QTreeWidgetItem *  previous 
)
protectedvirtualslot

If any item selected.

int hds::TreeSelectorWid::defColumnForFind ( ) const

Default column for find.

void hds::TreeSelectorWid::headers ( bool  on)

Show/hide headers.

bool hds::TreeSelectorWid::headers ( ) const

Does headers on.

void hds::TreeSelectorWid::itemDoubleClicked ( QTreeWidgetItem *  item,
int  column 
)
signal

Double click on item.

virtual void hds::TreeSelectorWid::remove ( int  id)
virtual

Remove item, nothing happens if no such item.

Implements hds::SelectorWid.

void hds::TreeSelectorWid::resizeToContents ( )

Resize all columns to its contents.

void hds::TreeSelectorWid::setColumns ( int  n)

Set provided number of columns.

virtual void hds::TreeSelectorWid::setCurrent ( int  id)
virtual

Set current item.

Implements hds::SelectorWid.

void hds::TreeSelectorWid::setDefColumnForFind ( int  id)

Set default column for find. Id should be in proper range.

void hds::TreeSelectorWid::setHeaderLabels ( const QStringList &  labels)
Set labels of the header. Size of provided list should

be equal to number of columns.

virtual void hds::TreeSelectorWid::textEditedSlot ( const QString &  str)
protectedvirtualslot

If text in line edit is to be changed.

const QTreeWidget& hds::TreeSelectorWid::treeWid ( ) const
inlineprotected

Access to the tree widget.

QTreeWidget& hds::TreeSelectorWid::treeWid ( )
inlineprotected

Access to the tree widget.


The documentation for this class was generated from the following file: