]> git.sven.stormbind.net Git - sven/vym.git/blobdiff - src/exportoofiledialog.h
New upstream version 2.9.22
[sven/vym.git] / src / exportoofiledialog.h
diff --git a/src/exportoofiledialog.h b/src/exportoofiledialog.h
new file mode 100644 (file)
index 0000000..5ee3654
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef EXPORTOOFILEDIALOG
+#define EXPORTOOFILEDIALOG
+
+#include <QFileDialog>
+#include <QStringList>
+
+#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