X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=src%2Fexportoofiledialog.h;fp=src%2Fexportoofiledialog.h;h=5ee3654fe782582bb37d7e552ef024a76f3d9d63;hb=d483bd8e6523c23c6f1d8908a2e0611c2bc9ff4f;hp=0000000000000000000000000000000000000000;hpb=7dfa3fe589d1722d49681f42cdb0bf1e6efb5223;p=sven%2Fvym.git diff --git a/src/exportoofiledialog.h b/src/exportoofiledialog.h new file mode 100644 index 0000000..5ee3654 --- /dev/null +++ b/src/exportoofiledialog.h @@ -0,0 +1,36 @@ +#ifndef EXPORTOOFILEDIALOG +#define EXPORTOOFILEDIALOG + +#include +#include + +#include "settings.h" + +/*! \brief Dialog to select output file and format for Open Office documents + +This is an overloaded QFileDialog, which allows to select templates by setting a +type. +*/ + +class ExportOOFileDialog : public QFileDialog { + Q_OBJECT + public: + ExportOOFileDialog(); + + ExportOOFileDialog(QWidget *parent, const QString &caption = QString()); + bool foundConfig(); + QString selectedConfig(); + void show(); + + private slots: + void newConfigPath(const QString &f); + + private: + void init(); + void addFilter(const QString &); + void scanExportConfigs(QDir); + QStringList configPaths; + QStringList filters; + QString lastFilter; +}; +#endif