diff options
| author | 2014-12-06 17:33:25 -0500 | |
|---|---|---|
| committer | 2014-12-06 17:33:25 -0500 | |
| commit | 7167ce41b61d2ba2cdb526777a4233eb84a3b66a (patch) | |
| tree | a35c14143716e1f2c98f808c81f89426045a946f /SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h | |
Imported Upstream version 2.99.6upstream/2.99.6
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h | 69 |
1 files changed, 69 insertions, 0 deletions
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 <QWizard> + +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<CfgEntry*,bool> 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 |
