Mercurial > retraceit
view src/metadataview.h @ 18:e12284a222ba
Fix resetting filters
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 14 Apr 2015 18:56:13 +0200 |
parents | e4748da7140b |
children | 6b9b5efcd7f4 |
line wrap: on
line source
#ifndef METADATAVIEW_H #define METADATAVIEW_H /* Copyright (C) 2014 by Intevation GmbH * * This file is Free Software under the GNU GPL (v>=2) * and comes with ABSOLUTELY NO WARRANTY! * See LICENSE.txt for details. */ #include <QWidget> #include <QItemSelection> #include <QDateTime> class QTableView; class QSortFilterProxyModel; class QxtCsvModel; class MetaDataView: public QWidget { Q_OBJECT public: MetaDataView(QWidget * parent = 0, Qt::WindowFlags f = 0); protected: void setupGUI(); public: /**@brief parse a metadata file and set up the model accordingly. * * @returns a localized error message in case of parsing errors. Or * an empty string on success. */ QString parseMetaData(const QString& fileName); Q_SIGNALS: /**@brief emited when the selection changed. * * @param pictureFile: The file that is now selected. * @param info: Additional info to show with the file.*/ void selectionChanged(const QString& pictureFile, int current, int max, const QDateTime& timestamp); protected slots: /** @brief internal slot to handle table view selection changes */ void viewSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected); /** @brief the data has been changed. Could be filter. */ void dataChanged(); public slots: /**@brief selects the next row and emits a selection changed signal */ void selectNextRow(); /**@brief selects the previous row and emits a selection changed signal */ void selectPrevRow(); /**@brief select a specific row. */ void selectRow(int row); protected: QxtCsvModel *mCSVModel; QSortFilterProxyModel *mSortModel; QTableView *mView; }; #endif // METADATAVIEW_H