CommonGUI Class Reference

Static Public Member Functions

static QString askString (const QString &title, const QString &label, bool *ok=NULL, const QString &defaultString="")
 Calls QInputDialog::getText(). More...
 
static QList< bool > listViewStandardItemsToBoolList (QListView *listview)
 
static QStringList listViewStandardItemsToStringList (QListView *listview)
 Reads items from a QListView that uses QStandardItemModel and puts texts of these items into a list of strings. More...
 
static void removeSelectedRowsFromQTableWidget (QTableWidget *table)
 
static void removeSelectedRowsFromStandardItemView (QAbstractItemView *view, bool bSelectNextItem=false)
 Removes all selected rows from a QAbstractItemView. More...
 
static void stringListToStandardItemsListView (QListView *targetListview, const QStringList &stringList)
 Puts a list of strings into a QListView that uses QStandardItemModel. More...
 

Detailed Description

Definition at line 33 of file commongui.h.

Member Function Documentation

QString CommonGUI::askString ( const QString &  title,
const QString &  label,
bool *  ok = NULL,
const QString &  defaultString = "" 
)
static

Calls QInputDialog::getText().

Definition at line 30 of file commongui.cpp.

QList< bool > CommonGUI::listViewStandardItemsToBoolList ( QListView *  listview)
static

Reads items from a QListView with QStandardItemModel and pulls the checked state and converts to a QList<bool>.

Definition at line 37 of file commongui.cpp.

QStringList CommonGUI::listViewStandardItemsToStringList ( QListView *  listview)
static

Reads items from a QListView that uses QStandardItemModel and puts texts of these items into a list of strings.

Parameters
listview- QListView that uses QStandardItemModel.

Definition at line 50 of file commongui.cpp.

void CommonGUI::removeSelectedRowsFromStandardItemView ( QAbstractItemView *  view,
bool  bSelectNextItem = false 
)
static

Removes all selected rows from a QAbstractItemView.

Parameters
viewQAbstractItemView from which items will be removed.
bSelectNextItemIf true then next lowest item on the list is selected. Default: false.

Definition at line 83 of file commongui.cpp.

void CommonGUI::stringListToStandardItemsListView ( QListView *  targetListview,
const QStringList &  stringList 
)
static

Puts a list of strings into a QListView that uses QStandardItemModel.

Parameters
targetListviewQListView that uses QStandardItemModel. This list view will be filled with data.
stringListSource data.

Definition at line 127 of file commongui.cpp.


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