andre@2: #ifndef METADATAVIEW_H andre@2: #define METADATAVIEW_H andre@2: /* Copyright (C) 2014 by Intevation GmbH andre@2: * andre@2: * This file is Free Software under the GNU GPL (v>=2) andre@2: * and comes with ABSOLUTELY NO WARRANTY! andre@2: * See LICENSE.txt for details. andre@2: */ andre@2: #include andre@2: #include andre@2: andre@2: class QTableView; andre@2: class QSortFilterProxyModel; andre@2: class QxtCsvModel; andre@2: class MetaDataView: public QWidget andre@2: { andre@2: Q_OBJECT andre@2: andre@2: public: andre@2: MetaDataView(QWidget * parent = 0, Qt::WindowFlags f = 0); andre@2: andre@2: protected: andre@2: void setupGUI(); andre@2: andre@2: public: andre@2: /**@brief parse a metadata file and set up the model accordingly. andre@2: * andre@2: * @returns a localized error message in case of parsing errors. Or andre@2: * an empty string on success. */ andre@2: QString parseMetaData(const QString& fileName); andre@2: andre@2: Q_SIGNALS: andre@2: /**@brief emited when the selection changed. andre@2: * andre@2: * @param pictureFile: The file that is now selected. andre@2: * @param info: Additional info to show with the file.*/ andre@2: void selectionChanged(const QString& pictureFile, const QString& info); andre@2: andre@2: protected slots: andre@2: void viewSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected); andre@2: andre@2: public slots: andre@2: /**@brief selects the next row and emits a selection changed signal */ andre@2: void selectNextRow(); andre@2: andre@2: protected: andre@2: QxtCsvModel *mCSVModel; andre@2: QSortFilterProxyModel *mSortModel; andre@2: QTableView *mView; andre@2: }; andre@2: andre@2: andre@2: #endif // METADATAVIEW_H