mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Several refactoring of well import wizard
Keep original copy of RimWellPathImport object as Xml instead of copy using PdmObjectGroup Added destructor for cleanup of wizard pages Simplified info communication between pages
This commit is contained in:
@@ -18,21 +18,26 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QWizard>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QUrl>
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmObjectGroup.h"
|
||||
|
||||
#include <QItemSelection>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
#include <QWizard>
|
||||
|
||||
class QFile;
|
||||
class QProgressDialog;
|
||||
class QLabel;
|
||||
class QTextEdit;
|
||||
|
||||
|
||||
class RimWellPathImport;
|
||||
class RimOilFieldEntry;
|
||||
class RimWellPathEntry;
|
||||
|
||||
|
||||
namespace caf
|
||||
@@ -40,7 +45,8 @@ namespace caf
|
||||
class UiTreeModelPdm;
|
||||
class PdmUiTreeView;
|
||||
class PdmUiListView;
|
||||
class PdmObjectGroup;
|
||||
class PdmUiPropertyView;
|
||||
class PdmGuardedObjects;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,14 +73,50 @@ class FieldSelectionPage : public QWizardPage
|
||||
|
||||
public:
|
||||
FieldSelectionPage(RimWellPathImport* wellPathImport, QWidget* parent = 0);
|
||||
~FieldSelectionPage();
|
||||
|
||||
virtual void initializePage();
|
||||
|
||||
private:
|
||||
caf::PdmUiPropertyView* m_propertyView;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class ObjectGroupWithHeaders;
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Container class used to define column headers
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class ObjectGroupWithHeaders : public caf::PdmGuardedObjects
|
||||
{
|
||||
public:
|
||||
ObjectGroupWithHeaders() {};
|
||||
|
||||
virtual void defineObjectEditorAttribute(QString uiConfigName, caf::PdmUiEditorAttribute * attribute);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class DownloadEntity
|
||||
{
|
||||
public:
|
||||
QString requestUrl;
|
||||
QString responseFilename;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class SummaryPageDownloadEntity : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
SummaryPageDownloadEntity();
|
||||
|
||||
caf::PdmField<QString> requestUrl;
|
||||
caf::PdmField<QString> responseFilename;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -90,6 +132,9 @@ public:
|
||||
virtual void initializePage();
|
||||
void buildWellTreeView();
|
||||
|
||||
|
||||
void selectedWellPathEntries(std::vector<DownloadEntity>& downloadEntities, caf::PdmObjectHandle* objHandle);
|
||||
|
||||
private:
|
||||
ObjectGroupWithHeaders* m_regionsWithVisibleWells;
|
||||
RimWellPathImport* m_wellPathImportObject;
|
||||
@@ -119,20 +164,10 @@ private:
|
||||
RimWellPathImport* m_wellPathImportObject;
|
||||
QTextEdit* m_textEdit;
|
||||
caf::PdmUiListView* m_listView;
|
||||
caf::PdmObjectGroup*m_objectGroup;
|
||||
caf::PdmGuardedObjects* m_objectGroup;
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class DownloadEntity
|
||||
{
|
||||
public:
|
||||
QString requestUrl;
|
||||
QString responseFilename;
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -146,12 +181,12 @@ public:
|
||||
|
||||
public:
|
||||
RiuWellImportWizard(const QString& webServiceAddress, const QString& downloadFolder, RimWellPathImport* wellPathImportObject, QWidget *parent = 0);
|
||||
~RiuWellImportWizard();
|
||||
|
||||
void setCredentials(const QString& username, const QString& password);
|
||||
QStringList absoluteFilePathsToWellPaths() const;
|
||||
|
||||
// Methods used from the wizard pages
|
||||
caf::PdmObjectGroup* wellCollection();
|
||||
void resetAuthenticationCount();
|
||||
|
||||
public slots:
|
||||
@@ -169,6 +204,7 @@ public slots:
|
||||
|
||||
void slotAuthenticationRequired(QNetworkReply* networkReply, QAuthenticator* authenticator);
|
||||
|
||||
int wellSelectionPageId();
|
||||
|
||||
#ifndef QT_NO_OPENSSL
|
||||
void sslErrors(QNetworkReply*,const QList<QSslError> &errors);
|
||||
|
||||
Reference in New Issue
Block a user