QAdvanced Item View  0.4
The QAIV (Qt Advanced Item Views) library provides GUI and utility classes extending the capabilities of the Qt item views.
 All Classes Functions Variables Enumerations Enumerator Properties Groups Pages
qfilterviewconnector.h
1 /******************************************************************************
2 ** This file is part of qadvanceditemviews.
3 **
4 ** Copyright (c) 2011-2012 Martin Hoppe martin@2x2hoppe.de
5 **
6 ** qadvanceditemviews is free software: you can redistribute it
7 ** and/or modify it under the terms of the GNU Lesser General
8 ** Public License as published by the Free Software Foundation,
9 ** either version 3 of the License, or (at your option) any
10 ** later version.
11 **
12 ** qadvanceditemviews is distributed in the hope that it will be
13 ** useful, but WITHOUT ANY WARRANTY; without even the implied
14 ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 ** See the GNU General Public License for more details.
16 **
17 ** You should have received a copy of the GNU Lesser General Public
18 ** License along with qadvanceditemviews.
19 ** If not, see <http://www.gnu.org/licenses/>.
20 ******************************************************************************/
21 #ifndef QFILTERVIEWCONNECTOR_H
22 #define QFILTERVIEWCONNECTOR_H
23 
24 #include <QObject>
25 
26 #include <qaivlib_global.h>
27 
28 class QFilterView;
29 class QTableView;
30 class QTreeView;
31 
33 class QAIVLIBSHARED_EXPORT QFilterViewConnector : public QObject
34 {
35  Q_OBJECT
36 public:
37  explicit QFilterViewConnector(QFilterView* filterView);
38  explicit QFilterViewConnector(QFilterView* filterView, QTableView* tableView, QObject *parent = 0);
39  explicit QFilterViewConnector(QFilterView* filterView, QTreeView* treeView, QObject *parent = 0);
40 
41  void setDataView(QTableView* view);
42  void setDataView(QTreeView* view);
43 signals:
44 
45 public slots:
46  void adjustVerticalHeaderWidth();
47 private slots:
48  void dataViewHorizontalScrollBarRangeChanged(int min, int max);
49  void dataViewHorizontalScrollBarSilderMoved(int value);
50  void dataViewHorizontalSortIndicatorChanged(int logicalIndex, Qt::SortOrder order);
51  void dataViewHorizontalSectionMoved(int logicalIndex, int oldVisualIndex, int newVisualIndex);
52  void dataViewHorizontalSectionResized(int logicalIndex, int oldSize, int newSize);
53  void dataViewVerticalScrollBarRangeChanged(int min, int max);
54 
55  void filterViewHorizontalSectionMoved(int logicalIndex, int oldVisualIndex, int newVisualIndex);
56  void filterViewHorizontalSectionResized(int logicalIndex, int oldSize, int newSize);
57  void filterViewHorizontalSortIndicatorChanged(int logicalIndex, Qt::SortOrder order);
58 private:
59  QFilterView* cFilterView;
60  QTableView* cTableView;
61  QTreeView* cTreeView;
62 };
63 
64 #endif // QFILTERVIEWCONNECTOR_H
The QFilterViewConnector class connects a QFilterView with a QTableView or QTreeView.
Definition: qfilterviewconnector.h:33
The QFilterView class provides a widget that is used to view and edit filter definitions.
Definition: qfilterview.h:38