Osdu import: update connection label.

This commit is contained in:
Kristian Bendiksen
2024-06-14 12:16:05 +02:00
parent 2d76775ff6
commit a6323471e7
2 changed files with 9 additions and 7 deletions

View File

@@ -185,8 +185,8 @@ AuthenticationPage::AuthenticationPage( RiaOsduConnector* osduConnector, QWidget
QVBoxLayout* layout = new QVBoxLayout;
QLabel* label = new QLabel( "Checking OSDU connection..." );
layout->addWidget( label );
m_connectionLabel = new QLabel( "Checking OSDU connection. You might need to login." );
layout->addWidget( m_connectionLabel );
QFormLayout* formLayout = new QFormLayout;
layout->addLayout( formLayout );
@@ -226,6 +226,7 @@ bool AuthenticationPage::isComplete() const
//--------------------------------------------------------------------------------------------------
void AuthenticationPage::accessOk()
{
m_connectionLabel->setText( "Connection to OSDU: OK." );
m_accessOk = true;
emit( completeChanged() );
}

View File

@@ -113,9 +113,9 @@ public:
void setOsduFields( const std::vector<OsduField>& osduFields )
{
beginInsertRows( QModelIndex(), 0, static_cast<int>( osduFields.size() ) );
beginResetModel();
m_osduFields = osduFields;
endInsertRows();
endResetModel();
}
private:
@@ -193,6 +193,7 @@ public:
void setOsduWellbores( const QString& wellId, const std::vector<OsduWellbore>& osduWellbores )
{
beginResetModel();
m_map[wellId] = osduWellbores;
m_osduWellbores.clear();
for ( auto [name, values] : m_map )
@@ -201,8 +202,7 @@ public:
m_osduWellbores.push_back( v );
}
beginInsertRows( QModelIndex(), 0, static_cast<int>( m_osduWellbores.size() ) );
endInsertRows();
endResetModel();
}
private:
@@ -227,7 +227,8 @@ private slots:
void accessOk();
private:
bool m_accessOk;
QLabel* m_connectionLabel;
bool m_accessOk;
};
//--------------------------------------------------------------------------------------------------