CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties | List of all members
ctkTreeComboBox Class Reference

#include <Libs/Widgets/ctkTreeComboBox.h>

Inheritance diagram for ctkTreeComboBox:
Inheritance graph
[legend]
Collaboration diagram for ctkTreeComboBox:
Collaboration graph
[legend]

Public Types

typedef QComboBox Superclass
 

Signals

void popupHide ()
 
void popupShow ()
 

Public Member Functions

 ctkTreeComboBox (QWidget *parent=0)
 
virtual bool eventFilter (QObject *object, QEvent *event)
 
virtual void hidePopup ()
 
void setVisibleModelColumn (int index)
 
virtual void showPopup ()
 
QTreeView * treeView () const
 
int visibleModelColumn () const
 
virtual ~ctkTreeComboBox ()
 

Protected Slots

void resizePopup ()
 

Protected Member Functions

virtual void paintEvent (QPaintEvent *)
 

Protected Attributes

QScopedPointer< ctkTreeComboBoxPrivate > d_ptr
 

Properties

int visibleModelColumn
 

Detailed Description

Description: ComboBox that displays the items as a tree view. See below for a use case: ctkTreeComboBox combo; QStandardItemModel model; model.appendRow(new QStandardItem("Test1")); model.item(0)->appendRow(new QStandardItem("Test1.1")); model.item(0)->appendRow(new QStandardItem("Test1.2")); model.item(0)->appendRow(new QStandardItem("Test1.3")); model.appendRow(new QStandardItem("Test2")); model.appendRow(new QStandardItem("Test3")); combo.setModel(&model); combo.show(); TODO fix size of the view

Definition at line 50 of file ctkTreeComboBox.h.

Member Typedef Documentation

◆ Superclass

typedef QComboBox ctkTreeComboBox::Superclass

Definition at line 57 of file ctkTreeComboBox.h.

Constructor & Destructor Documentation

◆ ctkTreeComboBox()

ctkTreeComboBox::ctkTreeComboBox ( QWidget *  parent = 0)
explicit

◆ ~ctkTreeComboBox()

virtual ctkTreeComboBox::~ctkTreeComboBox ( )
virtual

Member Function Documentation

◆ eventFilter()

virtual bool ctkTreeComboBox::eventFilter ( QObject *  object,
QEvent *  event 
)
virtual

◆ hidePopup()

virtual void ctkTreeComboBox::hidePopup ( )
virtual

◆ paintEvent()

virtual void ctkTreeComboBox::paintEvent ( QPaintEvent *  )
protectedvirtual

◆ popupHide

void ctkTreeComboBox::popupHide ( )
signal

◆ popupShow

void ctkTreeComboBox::popupShow ( )
signal

◆ resizePopup

void ctkTreeComboBox::resizePopup ( )
protectedslot

◆ setVisibleModelColumn()

void ctkTreeComboBox::setVisibleModelColumn ( int  index)

◆ showPopup()

virtual void ctkTreeComboBox::showPopup ( )
virtual

◆ treeView()

QTreeView* ctkTreeComboBox::treeView ( ) const

ctkTreeComboBox uses a QTreeView for its model view. treeView() is a utility function that cast QComboBox::view() into a QTreeView.

See also
view()

◆ visibleModelColumn()

int ctkTreeComboBox::visibleModelColumn ( ) const

Member Data Documentation

◆ d_ptr

QScopedPointer<ctkTreeComboBoxPrivate> ctkTreeComboBox::d_ptr
protected

Definition at line 84 of file ctkTreeComboBox.h.

Property Documentation

◆ visibleModelColumn

int ctkTreeComboBox::visibleModelColumn
readwrite

Column index visible in the view. If

See also
visibleModelColumn is -1 (default) then all columns are visible.

Definition at line 1 of file ctkTreeComboBox.h.


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