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 | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties | List of all members
ctkDICOMTableView Class Reference

The ctkDICOMTableView displays the content of a specific table of the ctkDICOMDatabase. More...

#include <Libs/DICOM/Widgets/ctkDICOMTableView.h>

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

Public Types

typedef QWidget Superclass
 

Public Slots

void onCustomContextMenuRequested (const QPoint &point)
 Translates the local point to a global one. More...
 
void onSelectionChanged ()
 slot is called if the selection of the tableview is changed Within this slot the signal signalSelectionChanged is emitted More...
 
void onUpdateQuery (const QStringList &uids)
 Updates the query which is used for displaying the table content. More...
 

Signals

void doubleClicked (const QModelIndex &)
 
void queryChanged (const QStringList &uids)
 Is emitted when the query text has changed. More...
 
void selectionChanged (const QItemSelection &, const QItemSelection &)
 Is emitted when the data selection has changed. More...
 
void selectionChanged (const QStringList &uids)
 Is emitted when the selection in the tableview has changed. More...
 

Public Member Functions

void addSqlWhereCondition (const std::pair< QString, QStringList > &condition)
 Add a where condition to the usual select statement. More...
 
 ctkDICOMTableView (ctkDICOMDatabase *dicomDataBase, QString queryTableName, QWidget *parent=0)
 
 ctkDICOMTableView (QString queryTableName, QWidget *parent=0)
 
 ctkDICOMTableView (QWidget *parent=0)
 
QStringList currentSelection () const
 Returns the uids of the current selected rows. More...
 
bool filterActive ()
 
void setDicomDataBase (ctkDICOMDatabase *dicomDatabase)
 Setting the ctkDICOMDatabase which shall be queried. More...
 
void setQuery (const QStringList &uids=QStringList())
 
void setQueryForeignKey (const QString &foreignKey)
 
void setQueryTableName (const QString &tableName)
 
void setTableSectionSize (int)
 
int tableSectionSize ()
 
QTableView * tableView ()
 Get the actual QTableView, for specific view settings. More...
 
QStringList uidsForAllRows () const
 Getting the UIDs for all rows. More...
 
virtual ~ctkDICOMTableView ()
 

Protected Slots

void onDatabaseChanged ()
 Called when the underlying database changes. More...
 
void onFilterChanged ()
 Called when the text of the ctkSearchBox has changed. More...
 
void onInstanceAdded ()
 Called if a new instance was added to the database. More...
 
void selectAll ()
 

Protected Member Functions

virtual bool eventFilter (QObject *obj, QEvent *event)
 

Protected Attributes

QScopedPointer< ctkDICOMTableViewPrivate > d_ptr
 

Properties

bool filterActive
 
QTableView * tblDicomDatabaseView
 

Detailed Description

The ctkDICOMTableView displays the content of a specific table of the ctkDICOMDatabase.

The ctkDICOMTableView holds a QTableView which displays the content of the selected ctkDICOMDatabase. It also holds a ctkSearchBox which allows filtering of the table content.

Definition at line 43 of file ctkDICOMTableView.h.

Member Typedef Documentation

◆ Superclass

Definition at line 50 of file ctkDICOMTableView.h.

Constructor & Destructor Documentation

◆ ctkDICOMTableView() [1/3]

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

Constructs ctkDICOMTableView without underlying database and table name

Parameters
parentparentwidget

◆ ctkDICOMTableView() [2/3]

ctkDICOMTableView::ctkDICOMTableView ( QString  queryTableName,
QWidget *  parent = 0 
)
explicit

ctor with tablename as parameter

Parameters
parentthe parent widget
queryTableNamethe name of the table of the ctkDICOMDatabase which shall be displayed

◆ ctkDICOMTableView() [3/3]

ctkDICOMTableView::ctkDICOMTableView ( ctkDICOMDatabase dicomDataBase,
QString  queryTableName,
QWidget *  parent = 0 
)
explicit

ctor with tablename and database as parameter

Parameters
ctkDicomDataBasethe ctkDICOMDatabase which shall be used
parentthe parent widget
queryTableNamethe name of the table of the ctkDICOMDatabase which shall be displayed

◆ ~ctkDICOMTableView()

virtual ctkDICOMTableView::~ctkDICOMTableView ( )
virtual

Member Function Documentation

◆ addSqlWhereCondition()

void ctkDICOMTableView::addSqlWhereCondition ( const std::pair< QString, QStringList > &  condition)

Add a where condition to the usual select statement.

Parameters
conditionstd::pair with column name and a value list

◆ currentSelection()

QStringList ctkDICOMTableView::currentSelection ( ) const

Returns the uids of the current selected rows.

Returns
a list containing all the uids of the selected rows

◆ doubleClicked

void ctkDICOMTableView::doubleClicked ( const QModelIndex &  )
signal

◆ eventFilter()

virtual bool ctkDICOMTableView::eventFilter ( QObject *  obj,
QEvent *  event 
)
protectedvirtual

◆ filterActive()

bool ctkDICOMTableView::filterActive ( )

◆ onCustomContextMenuRequested

void ctkDICOMTableView::onCustomContextMenuRequested ( const QPoint &  point)
slot

Translates the local point to a global one.

Parameters
pointthe local point to translate to global Emits customContextMenuRequested with the global point

◆ onDatabaseChanged

void ctkDICOMTableView::onDatabaseChanged ( )
protectedslot

Called when the underlying database changes.

◆ onFilterChanged

void ctkDICOMTableView::onFilterChanged ( )
protectedslot

Called when the text of the ctkSearchBox has changed.

◆ onInstanceAdded

void ctkDICOMTableView::onInstanceAdded ( )
protectedslot

Called if a new instance was added to the database.

◆ onSelectionChanged

void ctkDICOMTableView::onSelectionChanged ( )
slot

slot is called if the selection of the tableview is changed Within this slot the signal signalSelectionChanged is emitted

◆ onUpdateQuery

void ctkDICOMTableView::onUpdateQuery ( const QStringList &  uids)
slot

Updates the query which is used for displaying the table content.

Parameters
uidsthe uids of the table entries which shall be displayed

◆ queryChanged

void ctkDICOMTableView::queryChanged ( const QStringList &  uids)
signal

Is emitted when the query text has changed.

Parameters
uidsthe list of uids of the objects included in the query

◆ selectAll

void ctkDICOMTableView::selectAll ( )
protectedslot

◆ selectionChanged [1/2]

void ctkDICOMTableView::selectionChanged ( const QItemSelection &  ,
const QItemSelection &   
)
signal

Is emitted when the data selection has changed.

◆ selectionChanged [2/2]

void ctkDICOMTableView::selectionChanged ( const QStringList &  uids)
signal

Is emitted when the selection in the tableview has changed.

Parameters
uidsthe list of uids of the selected objects

◆ setDicomDataBase()

void ctkDICOMTableView::setDicomDataBase ( ctkDICOMDatabase dicomDatabase)

Setting the ctkDICOMDatabase which shall be queried.

Parameters
dicomDataBasethe underlying database

◆ setQuery()

void ctkDICOMTableView::setQuery ( const QStringList &  uids = QStringList())

Set the query for the underlying database. If the uid list is not empty just the entries with the according uids are selected

Parameters
uidsa list of uids which should be selected

◆ setQueryForeignKey()

void ctkDICOMTableView::setQueryForeignKey ( const QString &  foreignKey)

Setting the foreign key for the database query. This is usefull if e.g. you want to select the studies for a certain patient

Parameters
foreignKeythe foreign key which will be used for the query

◆ setQueryTableName()

void ctkDICOMTableView::setQueryTableName ( const QString &  tableName)

Setting the table name which shall be used for the database query

Parameters
tableNamethe name of the database table

◆ setTableSectionSize()

void ctkDICOMTableView::setTableSectionSize ( int  )

◆ tableSectionSize()

int ctkDICOMTableView::tableSectionSize ( )

◆ tableView()

QTableView* ctkDICOMTableView::tableView ( )

Get the actual QTableView, for specific view settings.

Returns
a pointer to QTableView* tblDicomDatabaseView

◆ uidsForAllRows()

QStringList ctkDICOMTableView::uidsForAllRows ( ) const

Getting the UIDs for all rows.

Returns
a QStringList with the uids for all rows

Member Data Documentation

◆ d_ptr

QScopedPointer<ctkDICOMTableViewPrivate> ctkDICOMTableView::d_ptr
protected

Definition at line 192 of file ctkDICOMTableView.h.

Property Documentation

◆ filterActive

bool ctkDICOMTableView::filterActive
read

Definition at line 1 of file ctkDICOMTableView.h.

◆ tblDicomDatabaseView

QTableView* ctkDICOMTableView::tblDicomDatabaseView
read

Definition at line 1 of file ctkDICOMTableView.h.


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