From 7167ce41b61d2ba2cdb526777a4233eb84a3b66a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sat, 6 Dec 2014 17:33:25 -0500 Subject: Imported Upstream version 2.99.6 --- .../guiSQLiteStudio/dialogs/importdialog.h | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h (limited to 'SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h') diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h new file mode 100644 index 0000000..c50703f --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h @@ -0,0 +1,69 @@ +#ifndef IMPORTDIALOG_H +#define IMPORTDIALOG_H + +#include "guiSQLiteStudio_global.h" +#include + +namespace Ui { + class ImportDialog; +} + +class DbListModel; +class DbObjListModel; +class ImportPlugin; +class ConfigMapper; +class CfgEntry; +class WidgetCover; +class Db; + +class GUI_API_EXPORT ImportDialog : public QWizard +{ + Q_OBJECT + + public: + explicit ImportDialog(QWidget *parent = 0); + ~ImportDialog(); + + void setDbAndTable(Db* db, const QString& table); + void setDb(Db* db); + + protected: + void showEvent(QShowEvent* e); + + private: + void init(); + void initTablePage(); + void initDataSourcePage(); + void removeOldOptions(); + void updateStandardOptions(); + void updatePluginOptions(int& rows); + bool isPluginConfigValid() const; + + Ui::ImportDialog *ui = nullptr; + DbListModel* dbListModel = nullptr; + DbObjListModel* tablesModel = nullptr; + ConfigMapper* configMapper = nullptr; + QWidget* pluginOptionsWidget = nullptr; + ImportPlugin* currentPlugin = nullptr; + QHash pluginConfigOk; + WidgetCover* widgetCover = nullptr; + + private slots: + void handleValidationResultFromPlugin(bool valid, CfgEntry* key, const QString& errorMsg); + void stateUpdateRequestFromPlugin(CfgEntry* key, bool visible, bool enabled); + void refreshTables(); + void pluginSelected(); + void updateValidation(); + void pageChanged(); + void browseForInputFile(); + void success(); + void hideCoverWidget(); + + public slots: + void accept(); + + signals: + void dsPageCompleteChanged(); +}; + +#endif // IMPORTDIALOG_H -- cgit v1.2.3