21 #ifndef QADVANCEDTABLEVIEW_H
22 #define QADVANCEDTABLEVIEW_H
24 #include <QAbstractItemView>
25 #include <QHeaderView>
27 #include <qaivlib_global.h>
28 #include <qabstractfilter.h>
36 class QAdvancedTableViewPrivate;
76 Q_PROPERTY(
bool alternatingRowColors READ alternatingRowColors WRITE setAlternatingRowColors)
87 Q_PROPERTY(
bool autoScroll READ hasAutoScroll WRITE setAutoScroll)
92 Q_PROPERTY(
bool dragEnabled READ dragEnabled WRITE setDragEnabled)
99 Q_PROPERTY(QAbstractItemView::EditTriggers editTriggers READ editTriggers WRITE setEditTriggers)
104 Q_PROPERTY(QIcon filterDisabledIcon READ filterDisabledIcon WRITE setFilterDisabledIcon)
109 Q_PROPERTY(QIcon filterEnabledIcon READ filterEnabledIcon WRITE setFilterEnabledIcon)
114 Q_PROPERTY(Qt::PenStyle gridStyle READ gridStyle WRITE setGridStyle)
121 Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
128 Q_PROPERTY(QAbstractItemView::SelectionBehavior selectionBehavior READ selectionBehavior WRITE setSelectionBehavior)
133 Q_PROPERTY(QAbstractItemView::SelectionMode selectionMode READ selectionMode WRITE setSelectionMode)
141 Q_PROPERTY(
bool showFilter READ showFilter WRITE setShowFilter)
149 Q_PROPERTY(
bool showFixedRows READ showFixedRows WRITE setShowFixedRows)
157 Q_PROPERTY(
bool showGrid READ showGrid WRITE setShowGrid)
159 Q_PROPERTY(
bool showSortIndicator READ isSortIndicatorShown WRITE setSortIndicatorShown)
167 Q_PROPERTY(
bool splitView READ viewSplitted WRITE splitView)
178 Q_PROPERTY(
bool sortingEnabled READ isSortingEnabled WRITE setSortingEnabled)
185 Q_PROPERTY(Qt::TextElideMode textElideMode READ textElideMode WRITE setTextElideMode)
194 Q_PROPERTY(
bool wordWrap READ wordWrap WRITE setWordWrap)
208 bool alternatingRowColors() const;
214 int columnAt(
int x) const;
220 QVariantList columnsFilterTypes(
int column) const;
225 int columnWidth(
int column) const;
229 QMenu* createStandardContextMenu(const QModelIndex &index);
234 QModelIndex currentIndex() const;
240 int defaultFilterType(
int column) const;
244 bool dragEnabled() const;
249 QAbstractItemView::EditTriggers editTriggers() const;
255 QIcon filterDisabledIcon() const;
256 QIcon filterEnabledIcon() const;
268 QModelIndexList fixedRows(
int column = 0) const;
273 bool hasAutoScroll() const;
277 QHeaderView* horizontalHeader() const;
282 Qt::PenStyle gridStyle() const;
284 QSize iconSize() const;
288 virtual QModelIndex indexAt(const QPoint & point) const;
293 bool isColumnHidden(
int column) const;
298 bool showFixedRows() const;
303 bool isRowHidden(
int row) const;
307 bool isSortIndicatorShown() const;
312 bool isSortingEnabled() const;
317 QAbstractItemDelegate* itemDelegate() const;
322 QAbstractItemDelegate* itemDelegateForColumn(
int column) const;
327 QAbstractItemDelegate* itemDelegateForRow(
int row) const;
331 QSize minimumSizeHint() const;
335 QAbstractItemModel* model() const;
340 bool restoreFilter(const QByteArray & data);
344 bool restoreState(const QByteArray & data);
348 QModelIndex rootIndex() const;
353 int rowAt(
int y) const;
357 int rowHeight(
int row) const;
362 QByteArray saveFilter() const;
367 QByteArray saveState();
369 QAbstractItemView::SelectionBehavior selectionBehavior() const;
374 QAbstractItemView::SelectionMode selectionMode() const;
378 QItemSelectionModel* selectionModel() const;
383 void setAlternatingRowColors(
bool enable);
387 void setAutoScroll(
bool enable);
392 void setColumnWidth(
int column,
int width);
396 void setContextMenuPolicy(Qt::ContextMenuPolicy policy);
400 void setDefaultFilterType(
int column,
int type);
404 void setDefaultFilterType(const QString & name,
int type);
408 void setDragEnabled(
bool enable);
412 void setEditTriggers(QAbstractItemView::EditTriggers triggers);
417 void setColumnFilterTypes(
int column, const QVariantList & types);
418 void setFilterDisabledIcon(const QIcon & icon);
419 void setFilterEnabledIcon(const QIcon & icon);
426 bool setFilterType(
int type,
int column,
int row = 0);
431 void setGridStyle(Qt::PenStyle style);
433 void setIconSize(const QSize & size);
438 void setItemDelegate(QAbstractItemDelegate* delegate);
443 void setItemDelegateForColumn(
int column, QAbstractItemDelegate * delegate);
448 void setItemDelegateForRow(
int row, QAbstractItemDelegate * delegate);
452 void setModel( QAbstractItemModel* model );
456 virtual
void setRootIndex(const QModelIndex & index);
461 void setRowHeight(
int row,
int height);
463 void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior);
468 void setSelectionMode(QAbstractItemView::SelectionMode mode);
472 void setSortIndicatorShown(
bool show);
477 void setSortingEnabled(
bool enable);
482 void setTextElideMode(Qt::TextElideMode mode);
486 void setWordWrap(
bool wrap);
491 bool showFilter() const;
496 bool showGrid() const;
501 QSize sizeHint() const;
506 void sortByColumn(
int column, Qt::SortOrder order);
511 Qt::TextElideMode textElideMode() const;
515 QHeaderView* verticalHeader() const;
520 bool viewSplitted() const;
524 QWidget* viewport() const;
528 bool wordWrap() const;
534 void activated( const QModelIndex & index );
539 void clicked( const QModelIndex & index );
543 void doubleClicked( const QModelIndex & index );
548 void entered( const QModelIndex & index );
554 void pressed( const QModelIndex & index );
558 void viewportEntered();
563 void addFilterGroup();
568 void clearSelection();
572 void edit(const QModelIndex & index);
577 void hideColumn(
int column);
581 void hideColumns(const QStringList & names);
585 void hideFilterView();
590 void hideRow(
int row);
595 void resizeColumnToContents(
int column);
599 void resizeColumnsToContents();
603 void resizeRowToContents(
int row);
607 void resizeRowsToContents();
611 virtual
void reset();
616 void scrollToBottom();
625 virtual
void selectAll();
630 void selectColumn(
int colum);
635 void selectRow(
int row);
639 void setCurrentIndex(const QModelIndex & index);
644 void setFilterEnabled(
int row,
int column,
bool enable);
649 void setShowFilter(
bool show);
654 void setShowFixedRows(
bool show);
659 void setShowGrid(
bool show );
664 void showColumn(
int column);
669 void showRow(
int row);
674 void splitView(
bool split);
678 void update(const QModelIndex & index);
683 virtual
void contextMenuEvent(QContextMenuEvent* event);
687 bool eventFilter(QObject *obj, QEvent *event);
691 void showEvent(QShowEvent* event);
693 void dataModelLayoutChanged();
694 void dataViewHorizontalScrollBarRangeChanged(
int minimum,
int maximum);
695 void dataViewHorizontalScrollBarSilderMoved(
int value );
696 void dataViewHorizontalScrollBarValueChanged(
int value );
697 void filterAdded(const QModelIndex & parent,
int start,
int end);
698 void headerViewHorizontalScrollBarRangeChanged(
int min,
int max );
699 void headerViewHorizontalScrollBarSilderMoved(
int value );
700 void headerViewHorizontalScrollBarValueChanged(
int value );
701 void headerViewSectionResized(
int logicalIndex,
int oldSize,
int newSize );
702 void horizontalHeaderViewSectionMoved(
int logicalIndex,
int oldVisualIndex,
int newVisualIndex );
703 void horizontalHeaderSortIndicatorChanged(
int logicalIndex, Qt::SortOrder order );
705 void subviewReceivedFocus();
706 void updateHeaderViewGeometries();
707 void updateHeaderViewVerticalScrollBar(
int min,
int max );
708 void updateHorizontalHeaderSectionSize();
709 void verticalHeaderSectionClicked(
int section);
711 void verticalHeaderSectionResized(
int logicalIndex,
int oldSize,
int newSize);
712 void viewActivated(const QModelIndex & index);
713 void viewClicked(const QModelIndex & index);
714 void viewDoubleClicked(const QModelIndex & index);
715 void viewEntered(const QModelIndex & index);
716 void viewPressed(const QModelIndex & index);
718 QModelIndex mapToSource(const QModelIndex & index) const;
720 QAdvancedTableViewPrivate* d;
725 #endif // QADVANCEDTABLEVIEW_H
The QFilterModelProxy provides for filtering or highlighting data passed between a model and a view...
Definition: qfiltermodelproxy.h:34
The QAbstractFilterProxyModel provides an abstract base class for filter models.
Definition: qabstractfilterproxymodel.h:32
The QAbstractFilterModel class provides the abstract interface for filter model classes.
Definition: qabstractfiltermodel.h:41
The QAbstractFilter class provides a base class for filter definitions used with a QAdvancedTableView...
Definition: qabstractfilter.h:41
The QAdvancedTableView class provides an advanced model/view implementation of a table view...
Definition: qadvancedtableview.h:65
The QFilterView class provides a widget that is used to view and edit filter definitions.
Definition: qfilterview.h:38