comparison src/metadataview.h @ 2:97d2c8869c39

First prototype implementation of table view and player
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 23 Mar 2015 16:34:42 +0100
parents
children 248d5d1cdb38
comparison
equal deleted inserted replaced
1:7a2637c3eb83 2:97d2c8869c39
1 #ifndef METADATAVIEW_H
2 #define METADATAVIEW_H
3 /* Copyright (C) 2014 by Intevation GmbH
4 *
5 * This file is Free Software under the GNU GPL (v>=2)
6 * and comes with ABSOLUTELY NO WARRANTY!
7 * See LICENSE.txt for details.
8 */
9 #include <QWidget>
10 #include <QItemSelection>
11
12 class QTableView;
13 class QSortFilterProxyModel;
14 class QxtCsvModel;
15 class MetaDataView: public QWidget
16 {
17 Q_OBJECT
18
19 public:
20 MetaDataView(QWidget * parent = 0, Qt::WindowFlags f = 0);
21
22 protected:
23 void setupGUI();
24
25 public:
26 /**@brief parse a metadata file and set up the model accordingly.
27 *
28 * @returns a localized error message in case of parsing errors. Or
29 * an empty string on success. */
30 QString parseMetaData(const QString& fileName);
31
32 Q_SIGNALS:
33 /**@brief emited when the selection changed.
34 *
35 * @param pictureFile: The file that is now selected.
36 * @param info: Additional info to show with the file.*/
37 void selectionChanged(const QString& pictureFile, const QString& info);
38
39 protected slots:
40 void viewSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
41
42 public slots:
43 /**@brief selects the next row and emits a selection changed signal */
44 void selectNextRow();
45
46 protected:
47 QxtCsvModel *mCSVModel;
48 QSortFilterProxyModel *mSortModel;
49 QTableView *mView;
50 };
51
52
53 #endif // METADATAVIEW_H
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)