Gui::CheckListDialog Class Reference

The CheckListDialog class provides a dialog with a QListView with checkable items inside. More...

#include <Widgets.h>

Public Member Functions

void accept ()
 Collects all checked items to be able to return them by call getCheckedItems(). More...
 
 CheckListDialog (QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags())
 Constructs a CheckListDialog which is a child of 'parent', with the name 'name' and widget flags set to 'f'. More...
 
QStringList getCheckedItems () const
 Returns a list of the check items. More...
 
void setCheckableItems (const QList< CheckListItem > &items)
 Sets the items to the dialog's list view. More...
 
void setCheckableItems (const QStringList &items)
 Sets the items to the dialog's list view. More...
 
 ~CheckListDialog ()
 Destroys the object and frees any allocated resources. More...
 

Detailed Description

The CheckListDialog class provides a dialog with a QListView with checkable items inside.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ CheckListDialog()

CheckListDialog::CheckListDialog ( QWidget parent = nullptr,
Qt::WindowFlags  fl = Qt::WindowFlags() 
)

Constructs a CheckListDialog which is a child of 'parent', with the name 'name' and widget flags set to 'f'.

The dialog will by default be modeless, unless you set 'modal' to true to construct a modal dialog.

◆ ~CheckListDialog()

CheckListDialog::~CheckListDialog ( )

Destroys the object and frees any allocated resources.

Member Function Documentation

◆ accept()

◆ getCheckedItems()

QStringList CheckListDialog::getCheckedItems ( ) const

Returns a list of the check items.

◆ setCheckableItems() [1/2]

void CheckListDialog::setCheckableItems ( const QList< CheckListItem > &  items)

Sets the items to the dialog's list view.

If the boolean type of a CheckListItem is set to false the item is not checkable any more.

◆ setCheckableItems() [2/2]

void CheckListDialog::setCheckableItems ( const QStringList &  items)

Sets the items to the dialog's list view.

By default all items are checkable..


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