annotate src/filterwidget.h @ 22:0a08c1c2531a 0.0.2

Fix missing include and update translations accordingly
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 14 Apr 2015 18:58:16 +0200
parents 315e6988952a
children 64a51a42c01f
rev   line source
4
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
1 #ifndef FILTERWIDGET_H
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
2 #define FILTERWIDGET_H
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
3 /* Copyright (C) 2014 by Intevation GmbH
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
4 *
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
5 * This file is Free Software under the GNU GPL (v>=2)
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
6 * and comes with ABSOLUTELY NO WARRANTY!
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
7 * See LICENSE.txt for details.
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
8 */
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
9 #include <QWidget>
14
315e6988952a Only add entries that do not start with # to filter
Andre Heinecke <andre.heinecke@intevation.de>
parents: 4
diff changeset
10 #include <QMap>
4
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
11
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
12 class QSortFilterProxyModel;
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
13 class QComboBox;
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
14 class QLineEdit;
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
15 class FilterWidget: public QWidget
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
16 {
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
17 Q_OBJECT
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
18
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
19 public:
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
20 /**@brief construct a filterwidget for the model model.*/
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
21 FilterWidget (QSortFilterProxyModel *model,
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
22 QWidget * parent = 0, Qt::WindowFlags f = 0);
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
23
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
24 protected:
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
25 void setupGUI();
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
26
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
27 protected slots:
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
28 void headersChanged();
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
29
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
30 void filterChanged();
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
31
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
32 private:
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
33 QSortFilterProxyModel *mModel;
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
34 QComboBox *mCombo;
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
35 QLineEdit *mEditLine;
14
315e6988952a Only add entries that do not start with # to filter
Andre Heinecke <andre.heinecke@intevation.de>
parents: 4
diff changeset
36 /* Maps the combo index to the model col index */
315e6988952a Only add entries that do not start with # to filter
Andre Heinecke <andre.heinecke@intevation.de>
parents: 4
diff changeset
37 QMap<int, int> mColFilterMap;
4
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
38 };
e4748da7140b Add filter functionalty to metadataview
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
39 #endif // FILTERWIDGET_H
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)