Mercurial > clickerconvert
view src/mainwindow.h @ 67:9cb71d6eabc9
Added tag 1.2 for changeset fe55e1e5bbf2
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 26 Aug 2016 15:27:05 +0200 |
parents | 36ee5dd46fd3 |
children |
line wrap: on
line source
/* Copyright (C) 2016 by ETH Zürich * Software engineering 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. */ /** @file The Main UI class. * * Parent class of all dialogs and graphical user interaction. */ #include <QMainWindow> #include <QSettings> class QPushButton; class QLineEdit; class QCheckBox; class FileNameRequester; /** * @class MainWindow * @brief The mainwindow of the application. * @details Holds the input fields and export options. */ class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(); protected: /** @brief UI setup */ void setupGUI(); /** @brief Cleanup and save the current state */ virtual void closeEvent(QCloseEvent *event); /** @brief Restores the last window state */ void readSettings(); public slots: /** @brief directly set an input file. */ void setInputFile(const QString& file); /** @brief Prefill title with @title. */ void setTitle(const QString& title); protected slots: /** @brief Show an error dialog to the user. */ void showErrorMessage(const QString& errMsg); /** @brief check if all mandataory fields are set. */ void checkCompleted(); /** @brief Do the actual conversion. */ void doConvert(); private: QSettings mSettings; FileNameRequester* mInputRequester; FileNameRequester* mOutRequester; QLineEdit *mTitleEdit; QPushButton *mConvertBtn; QCheckBox *mPdfChk, *mXlsxChk, *mHtmlChk; };