Tulip Plugins
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
GraphTableWidget Class Reference

Table widget object providing convinience functions for handling graph objects. More...

#include <GraphTableWidget.h>

Collaboration diagram for GraphTableWidget:
Collaboration graph
[legend]

List of all members.

Public Types

enum  SelectionStatus { Selected, Unselected, PartiallySelected }

Public Member Functions

 GraphTableWidget (QWidget *parent=NULL)
virtual ~GraphTableWidget ()
void setGraph (tlp::Graph *graph, tlp::ElementType element)
tlp::ElementType elementType () const
tlp::Graph * graph () const
GraphTableModel * graphModel () const
void update ()
SelectionStatus selectionStatus (const QModelIndexList &elements) const
 Compute the selection status for the elements list.
std::set< unsigned int > indexListToIds (const QModelIndexList &elementsIndexes) const
 Convert the index list to ids.
void highlightAllElements ()
void highlightElements (const std::set< unsigned int > &elementsToHighligh)
void scrollToFirstOf (const QModelIndexList &indexes)
 Scrolls the view if necessary to show a maximum of elements in the list. Compute the element at the top left corner and move the view port to it's position.
void highlightAndDisplayElements (const std::set< unsigned int > &elements)
 Convinience function that highlight all the elements in the list and move the viewport of the table view on the element at the top left corner.
QModelIndexList selectedRows (int columns=0) const
 Return the selected rows from QItemSelectionModel but remove hiden rows from the result.
void setRowFilter (QRegExp regExp, bool showOnlySelectedElements, int columnFilter)
void unsetRowFilter ()

Protected Member Functions

void setModel (QAbstractItemModel *)
void updateHorizontalHeaderVisibility (bool checked)

Protected Attributes

tlp::Graph * _graph
tlp::ElementType _type
GraphTableModel * _tulipTableModel
TulipFilterProxyModel * _filterModel

Detailed Description

Table widget object providing convinience functions for handling graph objects.


Member Enumeration Documentation

Enumerator:
Selected 
Unselected 
PartiallySelected 

Constructor & Destructor Documentation

GraphTableWidget::GraphTableWidget ( QWidget *  parent = NULL)
virtual GraphTableWidget::~GraphTableWidget ( ) [inline, virtual]

Member Function Documentation

tlp::ElementType GraphTableWidget::elementType ( ) const [inline]
tlp::Graph* GraphTableWidget::graph ( ) const [inline]
GraphTableModel* GraphTableWidget::graphModel ( ) const [inline]
void GraphTableWidget::highlightAllElements ( )
void GraphTableWidget::highlightAndDisplayElements ( const std::set< unsigned int > &  elements)

Convinience function that highlight all the elements in the list and move the viewport of the table view on the element at the top left corner.

void GraphTableWidget::highlightElements ( const std::set< unsigned int > &  elementsToHighligh)
set< unsigned int > GraphTableWidget::indexListToIds ( const QModelIndexList &  elementsIndexes) const

Convert the index list to ids.

void GraphTableWidget::scrollToFirstOf ( const QModelIndexList &  indexes)

Scrolls the view if necessary to show a maximum of elements in the list. Compute the element at the top left corner and move the view port to it's position.

QModelIndexList GraphTableWidget::selectedRows ( int  columns = 0) const

Return the selected rows from QItemSelectionModel but remove hiden rows from the result.

GraphTableWidget::SelectionStatus GraphTableWidget::selectionStatus ( const QModelIndexList &  elements) const

Compute the selection status for the elements list.

void GraphTableWidget::setGraph ( tlp::Graph *  graph,
tlp::ElementType  element 
)
void GraphTableWidget::setModel ( QAbstractItemModel *  ) [inline, protected]
void GraphTableWidget::setRowFilter ( QRegExp  regExp,
bool  showOnlySelectedElements,
int  columnFilter 
)
void GraphTableWidget::unsetRowFilter ( )
void GraphTableWidget::update ( )
void GraphTableWidget::updateHorizontalHeaderVisibility ( bool  checked) [protected]

Member Data Documentation

tlp::Graph* GraphTableWidget::_graph [protected]
tlp::ElementType GraphTableWidget::_type [protected]