Merge pull request #97 from OPM/dev

Update to 0.9.30
This commit is contained in:
Magne Sjaastad 2013-10-09 00:36:45 -07:00
commit f12b04d773
1027 changed files with 30476 additions and 18815 deletions

1
.gitignore vendored
View File

@ -32,3 +32,4 @@ CTest*.cmake
# Target program
/ApplicationCode/ResInsight
/.project

View File

@ -1,17 +1,35 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################

View File

@ -123,7 +123,7 @@ RiaApplication::RiaApplication(int& argc, char** argv)
//cvf::Trace::enable(false);
m_preferences = new RiaPreferences;
readPreferences();
readFieldsFromApplicationStore(m_preferences);
applyPreferences();
if (useShaders())
@ -143,12 +143,12 @@ RiaApplication::RiaApplication(int& argc, char** argv)
m_socketServer = new RiaSocketServer( this);
m_workerProcess = NULL;
m_startupDefaultDirectory = QDir::homePath();
#ifdef WIN32
//m_startupDefaultDirectory += "/My Documents/";
m_startupDefaultDirectory = QDir::homePath();
#else
m_startupDefaultDirectory = QDir::currentPath();
#endif
setDefaultFileDialogDirectory("MULTICASEIMPORT", "/");
// The creation of a font is time consuming, so make sure you really need your own font
@ -287,7 +287,7 @@ bool RiaApplication::loadProject(const QString& projectFileName)
// VL check regarding specific order mentioned in comment above...
m_preferences->lastUsedProjectFileName = projectFileName;
writePreferences();
writeFieldsToApplicationStore(m_preferences);
for (size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++)
{
@ -444,9 +444,9 @@ bool RiaApplication::saveProjectPromptForFileName()
startPath = app->defaultFileDialogDirectory("BINARY_GRID");
}
startPath += "/ResInsightProject.rip";
startPath += "/ResInsightProject.rsp";
QString fileName = QFileDialog::getSaveFileName(NULL, tr("Save File"), startPath, tr("Project Files (*.rip *.xml)"));
QString fileName = QFileDialog::getSaveFileName(NULL, tr("Save File"), startPath, tr("Project Files (*.rsp);;All files(*.*)"));
if (fileName.isEmpty())
{
return false;
@ -472,7 +472,7 @@ bool RiaApplication::saveProjectAs(const QString& fileName)
m_project->writeFile();
m_preferences->lastUsedProjectFileName = fileName;
writePreferences();
writeFieldsToApplicationStore(m_preferences);
return true;
}
@ -597,13 +597,12 @@ bool RiaApplication::openEclipseCase(const QString& caseName, const QString& cas
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiaApplication::openInputEclipseCase(const QString& caseName, const QStringList& caseFileNames)
bool RiaApplication::openInputEclipseCaseFromFileNames(const QStringList& fileNames)
{
RimInputCase* rimInputReservoir = new RimInputCase();
m_project->assignCaseIdToCase(rimInputReservoir);
rimInputReservoir->caseUserDescription = caseName;
rimInputReservoir->openDataFileSet(caseFileNames);
rimInputReservoir->openDataFileSet(fileNames);
RimAnalysisModels* analysisModels = m_project->activeOilField() ? m_project->activeOilField()->analysisModels() : NULL;
if (analysisModels == NULL) return false;
@ -662,7 +661,7 @@ void RiaApplication::createLargeResultsMockModel()
//--------------------------------------------------------------------------------------------------
void RiaApplication::createInputMockModel()
{
openInputEclipseCase("Input Mock Debug Model Simple", QStringList("Input Mock Debug Model Simple"));
openInputEclipseCaseFromFileNames(QStringList("Input Mock Debug Model Simple"));
}
//--------------------------------------------------------------------------------------------------
@ -695,7 +694,7 @@ void RiaApplication::setActiveReservoirView(RimReservoirView* rv)
void RiaApplication::setUseShaders(bool enable)
{
m_preferences->useShaders = enable;
writePreferences();
writeFieldsToApplicationStore(m_preferences);
}
//--------------------------------------------------------------------------------------------------
@ -727,7 +726,7 @@ RiaApplication::RINavigationPolicy RiaApplication::navigationPolicy() const
void RiaApplication::setShowPerformanceInfo(bool enable)
{
m_preferences->showHud = enable;
writePreferences();
writeFieldsToApplicationStore(m_preferences);
}
@ -870,15 +869,7 @@ bool RiaApplication::parseArguments()
if (isRunRegressionTest)
{
RiuMainWindow* mainWnd = RiuMainWindow::instance();
if (mainWnd)
{
mainWnd->hideAllDockWindows();
runRegressionTest(regressionTestPath);
mainWnd->loadWinGeoAndDockToolBarLayout();
}
executeRegressionTests(regressionTestPath);
return false;
}
@ -1028,7 +1019,7 @@ bool RiaApplication::launchProcess(const QString& program, const QStringList& ar
// Set the LD_LIBRARY_PATH to make the octave plugins find the embedded Qt
QProcessEnvironment penv = m_workerProcess->processEnvironment();
QProcessEnvironment penv = QProcessEnvironment::systemEnvironment();
QString ldPath = penv.value("LD_LIBRARY_PATH", "");
if (ldPath == "") ldPath = QApplication::applicationDirPath();
@ -1080,12 +1071,12 @@ bool RiaApplication::launchProcessForMultipleCases(const QString& program, const
//--------------------------------------------------------------------------------------------------
/// Read fields of a Pdm object using QSettings
//--------------------------------------------------------------------------------------------------
void RiaApplication::readPreferences()
void RiaApplication::readFieldsFromApplicationStore(caf::PdmObject* object)
{
QSettings settings;
std::vector<caf::PdmFieldHandle*> fields;
m_preferences->fields(fields);
object->fields(fields);
size_t i;
for (i = 0; i < fields.size(); i++)
{
@ -1102,12 +1093,14 @@ void RiaApplication::readPreferences()
//--------------------------------------------------------------------------------------------------
/// Write fields of a Pdm object using QSettings
//--------------------------------------------------------------------------------------------------
void RiaApplication::writePreferences()
void RiaApplication::writeFieldsToApplicationStore(const caf::PdmObject* object)
{
CVF_ASSERT(object);
QSettings settings;
std::vector<caf::PdmFieldHandle*> fields;
m_preferences->fields(fields);
object->fields(fields);
size_t i;
for (i = 0; i < fields.size(); i++)
@ -1384,7 +1377,11 @@ void RiaApplication::runRegressionTest(const QString& testRootPath)
imageCompareReporter.addImageDirectoryComparisonSet(testFolderName.toStdString(), reportBaseFolderName.toStdString(), reportGeneratedFolderName.toStdString(), reportDiffFolderName.toStdString());
}
imageCompareReporter.generateHTMLReport(testDir.filePath(RegTestNames::reportFileName).toStdString());
QString htmlReportFileName = testDir.filePath(RegTestNames::reportFileName);
imageCompareReporter.generateHTMLReport(htmlReportFileName.toStdString());
// Open HTML report
QDesktopServices::openUrl(htmlReportFileName);
// Generate diff images
this->preferences()->resetToDefaults();
@ -1403,6 +1400,8 @@ void RiaApplication::runRegressionTest(const QString& testRootPath)
}
m_commandQueueLock.unlock();
regressionTestSetFixedSizeForAllViews();
saveSnapshotForAllViews(generatedFolderName);
QDir baseDir(testCaseFolder.filePath(baseFolderName));
@ -1769,3 +1768,52 @@ void RiaApplication::executeCommandObjects()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaApplication::executeRegressionTests(const QString& regressionTestPath)
{
RiuMainWindow* mainWnd = RiuMainWindow::instance();
if (mainWnd)
{
mainWnd->hideAllDockWindows();
mainWnd->setDefaultWindowSize();
runRegressionTest(regressionTestPath);
mainWnd->loadWinGeoAndDockToolBarLayout();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaApplication::regressionTestSetFixedSizeForAllViews()
{
RiuMainWindow* mainWnd = RiuMainWindow::instance();
if (!mainWnd) return;
if (m_project.isNull()) return;
std::vector<RimCase*> projectCases;
m_project->allCases(projectCases);
for (size_t i = 0; i < projectCases.size(); i++)
{
RimCase* ri = projectCases[i];
if (!ri) continue;
for (size_t j = 0; j < ri->reservoirViews().size(); j++)
{
RimReservoirView* riv = ri->reservoirViews()[j];
if (riv && riv->viewer())
{
// This size is set to match the regression test reference images
riv->viewer()->setFixedSize(1000, 745);
}
}
}
}

View File

@ -67,6 +67,8 @@ public:
bool parseArguments();
void executeRegressionTests(const QString& regressionTestPath);
void setActiveReservoirView(RimReservoirView*);
RimReservoirView* activeReservoirView();
const RimReservoirView* activeReservoirView() const;
@ -86,7 +88,7 @@ public:
bool openEclipseCaseFromFile(const QString& fileName);
bool openEclipseCase(const QString& caseName, const QString& caseFileName);
bool addEclipseCases(const QStringList& fileNames);
bool openInputEclipseCase(const QString& caseName, const QStringList& caseFileNames);
bool openInputEclipseCaseFromFileNames(const QStringList& fileNames);
bool loadLastUsedProject();
QString currentProjectFileName() const;
@ -103,6 +105,7 @@ public:
void saveSnapshotForAllViews(const QString& snapshotFolderName);
void runRegressionTest(const QString& testRootPath);
void updateRegressionTest(const QString& testRootPath );
void regressionTestSetFixedSizeForAllViews();
void processNonGuiEvents();
@ -124,8 +127,8 @@ public:
void terminateProcess();
RiaPreferences* preferences();
void readPreferences();
void writePreferences();
void readFieldsFromApplicationStore(caf::PdmObject* object);
void writeFieldsToApplicationStore(const caf::PdmObject* object);
void applyPreferences();
cvf::Font* standardFont();

View File

@ -1,150 +1,156 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RiaImageFileCompare.h"
#include <QtCore/QProcess>
//==================================================================================================
//
//
//
//==================================================================================================
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaImageFileCompare::RiaImageFileCompare(QString compareExecutable)
: m_compareExecutable(compareExecutable)
{
reset();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaImageFileCompare::~RiaImageFileCompare()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaImageFileCompare::reset()
{
m_imagesEqual = false;
m_lastError = IC_NO_ERROR;
m_errorMsg = "";
m_errorDetails = "";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiaImageFileCompare::runComparison(QString imgFileName, QString refFileName, QString diffFileName)
{
reset();
if (m_compareExecutable.isEmpty())
{
m_lastError = SEVERE_ERROR;
m_errorMsg = "Cannot compare images, no compare executable set";
return false;
}
//QString args = QString("-fuzz 2% -lowlight-color white -metric ae \"%1\" \"%2\" \"%3\"").arg(imgFileName).arg(refFileName).arg((diffFileName));
QString args = QString("-lowlight-color white -metric ae \"%1\" \"%2\" \"%3\"").arg(imgFileName).arg(refFileName).arg((diffFileName));
QString completeCommand = QString("\"%1\" %2").arg(m_compareExecutable).arg(args);
// Launch process and wait
QProcess proc;
proc.start(completeCommand);
proc.waitForFinished(30000);
QProcess::ProcessError procError = proc.error();
if (procError != QProcess::UnknownError)
{
m_lastError = SEVERE_ERROR;
m_errorMsg = "Error running compare tool process";
m_errorDetails = completeCommand;
return false;
}
QByteArray stdErr = proc.readAllStandardError();
int procExitCode = proc.exitCode();
if (procExitCode == 0)
{
// Strip out whitespace and look for 0 (as in zero pixel differences)
stdErr = stdErr.simplified();
if (!stdErr.isEmpty() && stdErr[0] == '0')
{
m_imagesEqual = true;
}
return true;
}
else
{
// Report non-severe error
m_lastError = IC_ERROR;
m_errorMsg = "Error running compare tool process";
m_errorDetails = stdErr;
return false;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiaImageFileCompare::imagesEqual() const
{
return m_imagesEqual;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaImageFileCompare::ErrorType RiaImageFileCompare::error() const
{
return m_lastError;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaImageFileCompare::errorMessage() const
{
return m_errorMsg;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaImageFileCompare::errorDetails() const
{
return m_errorDetails;
}
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RiaImageFileCompare.h"
#include <QtCore/QProcess>
//==================================================================================================
//
//
//
//==================================================================================================
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaImageFileCompare::RiaImageFileCompare(QString compareExecutable)
: m_compareExecutable(compareExecutable)
{
reset();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaImageFileCompare::~RiaImageFileCompare()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaImageFileCompare::reset()
{
m_imagesEqual = false;
m_lastError = IC_NO_ERROR;
m_errorMsg = "";
m_errorDetails = "";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiaImageFileCompare::runComparison(QString imgFileName, QString refFileName, QString diffFileName)
{
reset();
if (m_compareExecutable.isEmpty())
{
m_lastError = SEVERE_ERROR;
m_errorMsg = "Cannot compare images, no compare executable set";
return false;
}
//QString args = QString("-fuzz 2% -lowlight-color white -metric ae \"%1\" \"%2\" \"%3\"").arg(imgFileName).arg(refFileName).arg((diffFileName));
// The ImageMagick compare tool on RedHat 5 does not support the lowlight-color options
// Use GCC version as a crude mechanism for disabling use of this option on RedHat5
#if (__GNUC__ == 4 && __GNUC_MINOR__ <= 1)
QString args = QString("-metric ae \"%1\" \"%2\" \"%3\"").arg(imgFileName).arg(refFileName).arg((diffFileName));
#else
QString args = QString("-lowlight-color white -metric ae \"%1\" \"%2\" \"%3\"").arg(imgFileName).arg(refFileName).arg((diffFileName));
#endif
QString completeCommand = QString("\"%1\" %2").arg(m_compareExecutable).arg(args);
// Launch process and wait
QProcess proc;
proc.start(completeCommand);
proc.waitForFinished(30000);
QProcess::ProcessError procError = proc.error();
if (procError != QProcess::UnknownError)
{
m_lastError = SEVERE_ERROR;
m_errorMsg = "Error running compare tool process";
m_errorDetails = completeCommand;
return false;
}
QByteArray stdErr = proc.readAllStandardError();
int procExitCode = proc.exitCode();
if (procExitCode == 0)
{
// Strip out whitespace and look for 0 (as in zero pixel differences)
stdErr = stdErr.simplified();
if (!stdErr.isEmpty() && stdErr[0] == '0')
{
m_imagesEqual = true;
}
return true;
}
else
{
// Report non-severe error
m_lastError = IC_ERROR;
m_errorMsg = "Error running compare tool process";
m_errorDetails = stdErr;
return false;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiaImageFileCompare::imagesEqual() const
{
return m_imagesEqual;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaImageFileCompare::ErrorType RiaImageFileCompare::error() const
{
return m_lastError;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaImageFileCompare::errorMessage() const
{
return m_errorMsg;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaImageFileCompare::errorDetails() const
{
return m_errorDetails;
}

View File

@ -44,6 +44,7 @@ RiaPreferences::RiaPreferences(void)
CAF_PDM_InitField(&defaultGridLines, "defaultGridLines", true, "Gridlines", "", "", "");
CAF_PDM_InitField(&defaultGridLineColors, "defaultGridLineColors", cvf::Color3f(0.92f, 0.92f, 0.92f), "Mesh color", "", "", "");
CAF_PDM_InitField(&defaultFaultGridLineColors, "defaultFaultGridLineColors", cvf::Color3f(0.08f, 0.08f, 0.08f), "Mesh color along faults", "", "", "");
CAF_PDM_InitField(&defaultWellLabelColor, "defaultWellLableColor", cvf::Color3f(0.92f, 0.92f, 0.92f), "Well label color", "", "The default well label color in new views", "");
CAF_PDM_InitField(&defaultViewerBackgroundColor, "defaultViewerBackgroundColor", cvf::Color3f(0.69f, 0.77f, 0.87f), "Viewer background", "", "The viewer background color for new views", "");
@ -102,7 +103,7 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
defaultSettingsGroup->add(&defaultGridLines);
defaultSettingsGroup->add(&defaultGridLineColors);
defaultSettingsGroup->add(&defaultFaultGridLineColors);
defaultSettingsGroup->add(&defaultWellLabelColor);
caf::PdmUiGroup* autoComputeGroup = uiOrdering.addNewGroup("Compute when loading new case");
autoComputeGroup->add(&autocomputeSOIL);

View File

@ -48,6 +48,7 @@ public: // Pdm Fields
caf::PdmField<cvf::Color3f> defaultGridLineColors;
caf::PdmField<cvf::Color3f> defaultFaultGridLineColors;
caf::PdmField<cvf::Color3f> defaultViewerBackgroundColor;
caf::PdmField<cvf::Color3f> defaultWellLabelColor;
caf::PdmField<bool> useShaders;
caf::PdmField<bool> showHud;

View File

@ -0,0 +1,60 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RiaRegressionTest.h"
#include "cafPdmUiFilePathEditor.h"
CAF_PDM_SOURCE_INIT(RiaRegressionTest, "RiaRegressionTest");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaRegressionTest::RiaRegressionTest(void)
{
CAF_PDM_InitFieldNoDefault(&applicationWorkingFolder, "workingFolder", "Application Working Folder", "", "", "");
applicationWorkingFolder.setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName());
CAF_PDM_InitFieldNoDefault(&regressionTestFolder, "regressionTestFolder", "Regression Test Folder", "", "", "");
regressionTestFolder.setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName());
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaRegressionTest::~RiaRegressionTest(void)
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaRegressionTest::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
{
if (field == &applicationWorkingFolder || field == &regressionTestFolder)
{
caf::PdmUiFilePathEditorAttribute* myAttr = static_cast<caf::PdmUiFilePathEditorAttribute*>(attribute);
if (myAttr)
{
myAttr->m_selectDirectory = true;
}
}
}

View File

@ -0,0 +1,43 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafPdmObject.h"
#include "cafPdmField.h"
#include "cafAppEnum.h"
class RiaRegressionTest : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RiaRegressionTest(void);
virtual ~RiaRegressionTest(void);
public:
caf::PdmField<QString> applicationWorkingFolder;
caf::PdmField<QString> regressionTestFolder;
protected:
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute);
};

View File

@ -36,6 +36,7 @@ set( APPLICATION_FILES
Application/RiaPreferences.cpp
Application/RiaImageFileCompare.cpp
Application/RiaImageCompareReporter.cpp
Application/RiaRegressionTest.cpp
)
set( USER_INTERFACE_FILES
@ -151,6 +152,7 @@ list( REMOVE_ITEM RAW_SOURCES
Application/RiaImageFileCompare.cpp
Application/RiaImageCompareReporter.cpp
Application/RiaRegressionTest.cpp
FileInterface/RifEclipseInputFileTools.cpp
FileInterface/RifEclipseOutputFileTools.cpp
@ -213,6 +215,7 @@ set( EXE_FILES
${WIN_RESOURCE}
${HEADER_FILES}
${REFERENCED_CMAKE_FILES}
../ResInsightVersion.cmake
)
add_executable( ResInsight ${EXE_FILES} )

View File

@ -15,9 +15,9 @@ include_directories(
${ResInsight_SOURCE_DIR}/ApplicationCode/ProjectDataModel
${ResInsight_SOURCE_DIR}/ThirdParty
${ResInsight_SOURCE_DIR}/cafProjectDataModel
${ResInsight_SOURCE_DIR}/Fwk/AppFwk/cafProjectDataModel
${ResInsight_SOURCE_DIR}/CommonCode
${ResInsight_SOURCE_DIR}/Fwk/AppFwk/CommonCode
#Remove when RigStatistics is out
${ResInsight_SOURCE_DIR}/ApplicationCode/ModelVisualization
@ -47,7 +47,7 @@ source_group( "ReservoirDataModel" FILES ${CODE_SOURCE_FILES} )
set( CPP_SOURCES
${CPP_SOURCES}
${ResInsight_SOURCE_DIR}/cafUserInterface/cafProgressInfo.cpp
${ResInsight_SOURCE_DIR}/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp
)
source_group( "Headers" FILES ${CODE_HEADER_FILES} )

View File

@ -22,6 +22,7 @@
#include "ecl_file.h"
#include "ecl_kw_magic.h"
#include "ecl_grid.h"
#include "ecl_rsthead.h"
#include <QFileInfo>
#include <QDebug>
@ -91,25 +92,25 @@ void RifEclipseOutputFileTools::timeSteps(ecl_file_type* ecl_file, std::vector<Q
ecl_kw_type* kwINTEHEAD = ecl_file_iget_named_kw(ecl_file, INTEHEAD_KW, 0);
if (kwINTEHEAD)
{
int day = ecl_kw_iget_int(kwINTEHEAD, INTEHEAD_DAY_INDEX);
int month = ecl_kw_iget_int(kwINTEHEAD, INTEHEAD_MONTH_INDEX);
int year = ecl_kw_iget_int(kwINTEHEAD, INTEHEAD_YEAR_INDEX);
QDate simulationStart(year, month, day);
time_t ertTimeStamp = ecl_rsthead_date(kwINTEHEAD);
QDateTime simulationStart = QDateTime::fromTime_t(ertTimeStamp);
for (int i = 0; i < days.size(); i++)
{
QDateTime reportDateTime(simulationStart);
CVF_ASSERT(reportDateTime.isValid());
double dayValue = days[i];
double floorDayValue = cvf::Math::floor(dayValue);
double dayFraction = dayValue - floorDayValue;
reportDateTime = reportDateTime.addDays(static_cast<int>(floorDayValue));
double dayFraction = dayValue - floorDayValue;
int seconds = static_cast<int>(dayFraction * 24.0 * 60.0 * 60.0);
QTime time(0, 0);
time = time.addSecs(seconds);
QDate reportDate = simulationStart;
reportDate = reportDate.addDays(static_cast<int>(floorDayValue));
reportDateTime.setTime(time);
QDateTime reportDateTime(reportDate, time);
if (std::find(timeStepsFound.begin(), timeStepsFound.end(), reportDateTime) == timeStepsFound.end())
{
timeStepsFound.push_back(reportDateTime);
@ -124,14 +125,10 @@ void RifEclipseOutputFileTools::timeSteps(ecl_file_type* ecl_file, std::vector<Q
ecl_kw_type* kwINTEHEAD = ecl_file_iget_named_kw(ecl_file, INTEHEAD_KW, i);
if (kwINTEHEAD)
{
int day = ecl_kw_iget_int(kwINTEHEAD, INTEHEAD_DAY_INDEX);
int month = ecl_kw_iget_int(kwINTEHEAD, INTEHEAD_MONTH_INDEX);
int year = ecl_kw_iget_int(kwINTEHEAD, INTEHEAD_YEAR_INDEX);
time_t ertTimeStamp = ecl_rsthead_date(kwINTEHEAD);
QDateTime reportDateTime = QDateTime::fromTime_t(ertTimeStamp);
CVF_ASSERT(reportDateTime.isValid());
QDate reportDate(year, month, day);
CVF_ASSERT(reportDate.isValid());
QDateTime reportDateTime(reportDate);
if (std::find(timeStepsFound.begin(), timeStepsFound.end(), reportDateTime) == timeStepsFound.end())
{
timeStepsFound.push_back(reportDateTime);

View File

@ -290,7 +290,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
drawableText->setDrawBorder(false);
drawableText->setDrawBackground(false);
drawableText->setVerticalAlignment(cvf::TextDrawer::CENTER);
drawableText->setTextColor(cvf::Color3f(0.92f, 0.92f, 0.92f));
drawableText->setTextColor(m_rimReservoirView->wellCollection()->wellLabelColor());
cvf::String cvfString = cvfqt::Utils::fromQString(well->name());

View File

@ -197,8 +197,7 @@ void RivWellPathPartMgr::buildWellPathParts(cvf::Vec3d displayModelOffset, doubl
drawableText->setDrawBorder(false);
drawableText->setDrawBackground(false);
drawableText->setVerticalAlignment(cvf::TextDrawer::CENTER);
//drawableText->setTextColor(cvf::Color3f(0.08f, 0.08f, 0.08f));
drawableText->setTextColor(cvf::Color3f(0.92f, 0.92f, 0.92f));
drawableText->setTextColor(m_wellPathCollection->wellPathLabelColor());
cvf::String cvfString = cvfqt::Utils::fromQString(m_rimWellPath->name());

View File

@ -27,7 +27,6 @@
#include "RimIdenticalGridCaseGroup.h"
#include "RiaApplication.h"
#include "RiaVersionInfo.h"
#include "RigGridManager.h"
#include "RigCaseData.h"

View File

@ -22,6 +22,7 @@
#include <QFile>
#include <QFileInfo>
#include <QDir>
#include <QDebug>
#include "RifReaderEclipseOutput.h"
#include "RifReaderMockModel.h"
@ -399,7 +400,7 @@ RimReservoirCellResultsStorage* RimCase::results(RifReaderInterface::PorosityMod
//--------------------------------------------------------------------------------------------------
/// Relocate the supplied file name, based on the search path as follows:
/// fileName, newProjectPath/fileNameWoPath, relocatedPath/fileNameWoPath
/// If the file is not found in any of the positions, the fileName is returned unchanged
/// If the file is not found in any of the positions, the fileName is returned but converted to Qt Style path separators: "/"
///
/// The relocatedPath is found in this way:
/// use the start of newProjectPath
@ -407,11 +408,33 @@ RimReservoirCellResultsStorage* RimCase::results(RifReaderInterface::PorosityMod
/// such that the common start of oldProjectPath and m_gridFileName is removed from m_gridFileName
/// and replaced with the start of newProjectPath up to where newProjectPath starts to be equal to oldProjectPath
//--------------------------------------------------------------------------------------------------
QString RimCase::relocateFile(const QString& fileName, const QString& newProjectPath, const QString& oldProjectPath,
QString RimCase::relocateFile(const QString& orgFileName, const QString& orgNewProjectPath, const QString& orgOldProjectPath,
bool* foundFile, std::vector<QString>* searchedPaths)
{
if (foundFile) *foundFile = true;
// Make sure we have a Qt formatted path ( using "/" not "\")
QString fileName = QDir::fromNativeSeparators(orgFileName);
QString newProjectPath = QDir::fromNativeSeparators(orgNewProjectPath);
QString oldProjectPath = QDir::fromNativeSeparators(orgOldProjectPath);
// If we from a file or whatever gets a real windows path on linux, we need to manually convert it
// because Qt will not. QDir::fromNativeSeparators does nothing on linux.
bool isWindowsPath = false;
if (orgFileName.count("/")) isWindowsPath = false; // "/" are not allowed in a windows path
else if (orgFileName.count("\\")
&& !QFile::exists(orgFileName)) // To make sure we do not convert single linux files containing "\"
{
isWindowsPath = true;
}
if (isWindowsPath)
{
// Windows absolute path detected. transform.
fileName.replace(QString("\\"), QString("/"));
}
if (searchedPaths) searchedPaths->push_back(fileName);
if (QFile::exists(fileName))
{

View File

@ -75,16 +75,22 @@ RimInputCase::~RimInputCase()
/// Open the supplied file set. If no grid data has been read, it will first find the possible
/// grid data among the files then read all supported properties from the files matching the grid
//--------------------------------------------------------------------------------------------------
void RimInputCase::openDataFileSet(const QStringList& filenames)
void RimInputCase::openDataFileSet(const QStringList& fileNames)
{
if (filenames.contains("Input Mock Debug Model"))
if (fileNames.contains("Input Mock Debug Model Simple"))
{
cvf::ref<RifReaderInterface> readerInterface = this->createMockModel(filenames[0]);
cvf::ref<RifReaderInterface> readerInterface = this->createMockModel(fileNames[0]);
results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p());
results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(readerInterface.p());
reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->computeDerivedData();
reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->computeDerivedData();
QFileInfo gridFileName(fileNames[0]);
QString caseName = gridFileName.completeBaseName();
this->caseUserDescription = caseName;
computeCachedData();
return;
}
@ -97,11 +103,16 @@ void RimInputCase::openDataFileSet(const QStringList& filenames)
// First find and read the grid data
if (this->reservoirData()->mainGrid()->gridPointDimensions() == cvf::Vec3st(0,0,0))
{
for (int i = 0; i < filenames.size(); i++)
for (int i = 0; i < fileNames.size(); i++)
{
if (RifEclipseInputFileTools::openGridFile(filenames[i], this->reservoirData()))
if (RifEclipseInputFileTools::openGridFile(fileNames[i], this->reservoirData()))
{
m_gridFileName = filenames[i];
m_gridFileName = fileNames[i];
QFileInfo gridFileName(fileNames[i]);
QString caseName = gridFileName.completeBaseName();
this->caseUserDescription = caseName;
this->reservoirData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
@ -119,13 +130,13 @@ void RimInputCase::openDataFileSet(const QStringList& filenames)
// Then read the properties possibly in the grid file
QStringList filesToRead;
for (int i = 0; i < filenames.size(); i++)
for (int i = 0; i < fileNames.size(); i++)
{
size_t j;
bool exist = false;
for (j = 0; j < m_additionalFileNames().size(); j++)
{
if (m_additionalFileNames()[j] == filenames[i])
if (m_additionalFileNames()[j] == fileNames[i])
{
exist = true;
}
@ -133,7 +144,7 @@ void RimInputCase::openDataFileSet(const QStringList& filenames)
if (!exist)
{
filesToRead.push_back(filenames[i]);
filesToRead.push_back(fileNames[i]);
}
}
@ -171,7 +182,7 @@ bool RimInputCase::openEclipseGridFile()
{
cvf::ref<RifReaderInterface> readerInterface;
if (m_gridFileName().contains("Input Mock Debug Model"))
if (m_gridFileName().contains("Input Mock Debug Model Simple"))
{
readerInterface = this->createMockModel(this->m_gridFileName());
}

View File

@ -46,7 +46,7 @@ public:
caf::PdmField<RimInputPropertyCollection*> m_inputPropertyCollection;
// File open methods
void openDataFileSet(const QStringList& filenames);
void openDataFileSet(const QStringList& fileNames);
void loadAndSyncronizeInputProperties();
void removeProperty(RimInputProperty* inputProperty);

View File

@ -61,6 +61,8 @@ namespace caf {
addItem(RimLegendConfig::OPPOSITE_NORMAL,"OPPOSITE_NORMAL", "Full color, Blue on top");
addItem(RimLegendConfig::WHITE_PINK, "WHITE_PIMK", "White to pink");
addItem(RimLegendConfig::PINK_WHITE, "PINK_WHITE", "Pink to white");
addItem(RimLegendConfig::BLUE_WHITE_RED, "BLUE_WHITE_RED", "Blue, white, red");
addItem(RimLegendConfig::RED_WHITE_BLUE, "RED_WHITE_BLUE", "Red, white, blue");
addItem(RimLegendConfig::WHITE_BLACK, "WHITE_BLACK", "White to black");
addItem(RimLegendConfig::BLACK_WHITE, "BLACK_WHITE", "Black to white");
setDefault(RimLegendConfig::NORMAL);
@ -104,13 +106,13 @@ RimLegendConfig::RimLegendConfig()
m_localAutoNegClosestToZero(0)
{
CAF_PDM_InitObject("Legend Definition", ":/Legend.png", "", "");
CAF_PDM_InitField(&m_numLevels, "NumberOfLevels", 8, "Number of levels", "", "","");
CAF_PDM_InitField(&m_precision, "Precision", 2, "Precision", "", "","");
CAF_PDM_InitField(&m_tickNumberFormat, "TickNumberFormat", caf::AppEnum<RimLegendConfig::NumberFormatType>(FIXED), "Precision", "", "","");
CAF_PDM_InitField(&m_numLevels, "NumberOfLevels", 8, "Number of levels", "", "A hint on how many tick marks you whish.","");
CAF_PDM_InitField(&m_precision, "Precision", 4, "Significant digits", "", "The number of significant digits displayed in the legend numbers","");
CAF_PDM_InitField(&m_tickNumberFormat, "TickNumberFormat", caf::AppEnum<RimLegendConfig::NumberFormatType>(FIXED), "Number format", "", "","");
CAF_PDM_InitField(&m_colorRangeMode, "ColorRangeMode", ColorRangeEnum(NORMAL) , "Color range", "", "", "");
CAF_PDM_InitField(&m_colorRangeMode, "ColorRangeMode", ColorRangeEnum(NORMAL) , "Colors", "", "", "");
CAF_PDM_InitField(&m_mappingMode, "MappingMode", MappingEnum(LINEAR_CONTINUOUS) , "Mapping", "", "", "");
CAF_PDM_InitField(&m_rangeMode, "RangeType", caf::AppEnum<RimLegendConfig::RangeModeType>(AUTOMATIC_ALLTIMESTEPS), "Legend range type", "", "Switches between automatic and user defined range on the legend", "");
CAF_PDM_InitField(&m_rangeMode, "RangeType", caf::AppEnum<RimLegendConfig::RangeModeType>(AUTOMATIC_ALLTIMESTEPS), "Range type", "", "Switches between automatic and user defined range on the legend", "");
CAF_PDM_InitField(&m_userDefinedMaxValue, "UserDefinedMax", 1.0, "Max", "", "Min value of the legend", "");
CAF_PDM_InitField(&m_userDefinedMinValue, "UserDefinedMin", 0.0, "Min", "", "Max value of the legend", "");
CAF_PDM_InitField(&resultVariableName, "ResultVariableUsage", QString(""), "", "", "", "");
@ -155,11 +157,11 @@ void RimLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
{
if (m_userDefinedMaxValue == m_userDefinedMaxValue.defaultValue() && m_globalAutoMax != cvf::UNDEFINED_DOUBLE)
{
m_userDefinedMaxValue = adjust(m_globalAutoMax, m_precision);
m_userDefinedMaxValue = roundToNumSignificantDigits(m_globalAutoMax, m_precision);
}
if (m_userDefinedMinValue == m_userDefinedMinValue.defaultValue() && m_globalAutoMin != cvf::UNDEFINED_DOUBLE)
{
m_userDefinedMinValue = adjust(m_globalAutoMin, m_precision);
m_userDefinedMinValue = roundToNumSignificantDigits(m_globalAutoMin, m_precision);
}
}
@ -184,24 +186,24 @@ void RimLegendConfig::updateLegend()
if (m_rangeMode == AUTOMATIC_ALLTIMESTEPS)
{
adjustedMin = adjust(m_globalAutoMin, m_precision);
adjustedMax = adjust(m_globalAutoMax, m_precision);
adjustedMin = roundToNumSignificantDigits(m_globalAutoMin, m_precision);
adjustedMax = roundToNumSignificantDigits(m_globalAutoMax, m_precision);
posClosestToZero = m_globalAutoPosClosestToZero;
negClosestToZero = m_globalAutoNegClosestToZero;
}
else if (m_rangeMode == AUTOMATIC_CURRENT_TIMESTEP)
{
adjustedMin = adjust(m_localAutoMin, m_precision);
adjustedMax = adjust(m_localAutoMax, m_precision);
adjustedMin = roundToNumSignificantDigits(m_localAutoMin, m_precision);
adjustedMax = roundToNumSignificantDigits(m_localAutoMax, m_precision);
posClosestToZero = m_localAutoPosClosestToZero;
negClosestToZero = m_localAutoNegClosestToZero;
}
else
{
adjustedMin = adjust(m_userDefinedMinValue, m_precision);
adjustedMax = adjust(m_userDefinedMaxValue, m_precision);
adjustedMin = roundToNumSignificantDigits(m_userDefinedMinValue, m_precision);
adjustedMax = roundToNumSignificantDigits(m_userDefinedMaxValue, m_precision);
posClosestToZero = m_globalAutoPosClosestToZero;
negClosestToZero = m_globalAutoNegClosestToZero;
@ -277,7 +279,8 @@ void RimLegendConfig::updateLegend()
legendColors.add(cvf::Color3ub( 0, 127, 255));
legendColors.add(cvf::Color3ub( 0, 0, 255));
}
break; case BLACK_WHITE:
break;
case BLACK_WHITE:
case WHITE_BLACK:
{
legendColors.reserve(2);
@ -309,6 +312,25 @@ void RimLegendConfig::updateLegend()
}
}
break;
case BLUE_WHITE_RED:
case RED_WHITE_BLUE:
{
legendColors.reserve(3);
if (m_colorRangeMode() == BLUE_WHITE_RED)
{
legendColors.add(cvf::Color3ub::BLUE);
legendColors.add(cvf::Color3ub::WHITE);
legendColors.add(cvf::Color3ub::RED);
}
else
{
legendColors.add(cvf::Color3ub::RED);
legendColors.add(cvf::Color3ub::WHITE);
legendColors.add(cvf::Color3ub::BLUE);
}
}
break;
}
m_linDiscreteScalarMapper->setColors(legendColors);
@ -340,11 +362,35 @@ void RimLegendConfig::updateLegend()
}
m_legend->setScalarMapper(m_currentScalarMapper.p());
m_legend->setTickPrecision(m_precision());
double decadesInRange = 0;
if (m_mappingMode == LOG10_CONTINUOUS || m_mappingMode == LOG10_DISCRETE)
{
// For log mapping, use the min value as reference for num valid digits
decadesInRange = cvf::Math::abs(adjustedMin) < cvf::Math::abs(adjustedMax) ? cvf::Math::abs(adjustedMin) : cvf::Math::abs(adjustedMax);
decadesInRange = log10(decadesInRange);
}
else
{
// For linear mapping, use the max value as reference for num valid digits
double absRange = CVF_MAX(cvf::Math::abs(adjustedMax), cvf::Math::abs(adjustedMin));
decadesInRange = log10(absRange);
}
decadesInRange = cvf::Math::ceil(decadesInRange);
// Using Fixed format
NumberFormatType nft = m_tickNumberFormat();
m_legend->setTickFormat((cvf::OverlayScalarMapperLegend::NumberFormat)nft);
// Set the fixed number of digits after the decimal point to the number needed to show all the significant digits.
int numDecimalDigits = m_precision();
if (nft != SCIENTIFIC)
{
numDecimalDigits -= static_cast<int>(decadesInRange);
}
m_legend->setTickPrecision(cvf::Math::clamp(numDecimalDigits, 0, 20));
if (m_globalAutoMax != cvf::UNDEFINED_DOUBLE )
{
@ -370,13 +416,45 @@ void RimLegendConfig::updateLegend()
//--------------------------------------------------------------------------------------------------
void RimLegendConfig::setAutomaticRanges(double globalMin, double globalMax, double localMin, double localMax)
{
m_globalAutoMin = adjust(globalMin, m_precision);
m_globalAutoMax = adjust(globalMax, m_precision);
double candidateGlobalAutoMin = roundToNumSignificantDigits(globalMin, m_precision);
double candidateGlobalAutoMax = roundToNumSignificantDigits(globalMax, m_precision);
m_localAutoMin = adjust(localMin, m_precision);
m_localAutoMax = adjust(localMax, m_precision);
double candidateLocalAutoMin = roundToNumSignificantDigits(localMin, m_precision);
double candidateLocalAutoMax = roundToNumSignificantDigits(localMax, m_precision);
updateLegend();
bool needsUpdate = false;
const double epsilon = std::numeric_limits<double>::epsilon();
if (cvf::Math::abs(candidateGlobalAutoMax - m_globalAutoMax) > epsilon)
{
needsUpdate = true;
}
if (cvf::Math::abs(candidateGlobalAutoMin - m_globalAutoMin) > epsilon)
{
needsUpdate = true;
}
if (cvf::Math::abs(candidateLocalAutoMax - m_localAutoMax) > epsilon)
{
needsUpdate = true;
}
if (cvf::Math::abs(candidateLocalAutoMin - m_localAutoMin) > epsilon)
{
needsUpdate = true;
}
if (needsUpdate)
{
m_globalAutoMin = candidateGlobalAutoMin;
m_globalAutoMax = candidateGlobalAutoMax;
m_localAutoMin = candidateLocalAutoMin;
m_localAutoMax = candidateLocalAutoMax;
updateLegend();
}
}
//--------------------------------------------------------------------------------------------------
@ -485,9 +563,9 @@ void RimLegendConfig::recreateLegend()
}
//--------------------------------------------------------------------------------------------------
/// Adjust double value to given precision
/// Rounding the double value to given number of significant digits
//--------------------------------------------------------------------------------------------------
double RimLegendConfig::adjust(double domainValue, double precision)
double RimLegendConfig::roundToNumSignificantDigits(double domainValue, double numSignificantDigits)
{
double absDomainValue = cvf::Math::abs(domainValue);
if (absDomainValue == 0.0)
@ -498,11 +576,13 @@ double RimLegendConfig::adjust(double domainValue, double precision)
double logDecValue = log10(absDomainValue);
logDecValue = cvf::Math::ceil(logDecValue);
double factor = pow(10.0, precision - logDecValue);
double factor = pow(10.0, numSignificantDigits - logDecValue);
double tmp = domainValue * factor;
double integerPart;
modf(tmp, &integerPart);
double fraction = modf(tmp, &integerPart);
if (cvf::Math::abs(fraction)>= 0.5) (integerPart >= 0) ? integerPart++: integerPart-- ;
double newDomainValue = integerPart / factor;
@ -514,16 +594,57 @@ double RimLegendConfig::adjust(double domainValue, double precision)
//--------------------------------------------------------------------------------------------------
void RimLegendConfig::setClosestToZeroValues(double globalPosClosestToZero, double globalNegClosestToZero, double localPosClosestToZero, double localNegClosestToZero)
{
m_globalAutoPosClosestToZero = globalPosClosestToZero;
m_globalAutoNegClosestToZero = globalNegClosestToZero;
m_localAutoPosClosestToZero = localPosClosestToZero;
m_localAutoNegClosestToZero = localNegClosestToZero;
bool needsUpdate = false;
const double epsilon = std::numeric_limits<double>::epsilon();
if (m_globalAutoPosClosestToZero == HUGE_VAL) m_globalAutoPosClosestToZero = 0;
if (m_globalAutoNegClosestToZero == -HUGE_VAL) m_globalAutoNegClosestToZero = 0;
if (m_localAutoPosClosestToZero == HUGE_VAL) m_localAutoPosClosestToZero = 0;
if (m_localAutoNegClosestToZero == -HUGE_VAL) m_localAutoNegClosestToZero = 0;
if (cvf::Math::abs(globalPosClosestToZero - m_globalAutoPosClosestToZero) > epsilon)
{
needsUpdate = true;
}
if (cvf::Math::abs(globalNegClosestToZero - m_globalAutoNegClosestToZero) > epsilon)
{
needsUpdate = true;
}
if (cvf::Math::abs(localPosClosestToZero - m_localAutoPosClosestToZero) > epsilon)
{
needsUpdate = true;
}
if (cvf::Math::abs(localNegClosestToZero - m_localAutoNegClosestToZero) > epsilon)
{
needsUpdate = true;
}
updateLegend();
if (needsUpdate)
{
m_globalAutoPosClosestToZero = globalPosClosestToZero;
m_globalAutoNegClosestToZero = globalNegClosestToZero;
m_localAutoPosClosestToZero = localPosClosestToZero;
m_localAutoNegClosestToZero = localNegClosestToZero;
if (m_globalAutoPosClosestToZero == HUGE_VAL) m_globalAutoPosClosestToZero = 0;
if (m_globalAutoNegClosestToZero == -HUGE_VAL) m_globalAutoNegClosestToZero = 0;
if (m_localAutoPosClosestToZero == HUGE_VAL) m_localAutoPosClosestToZero = 0;
if (m_localAutoNegClosestToZero == -HUGE_VAL) m_localAutoNegClosestToZero = 0;
updateLegend();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
{
caf::PdmUiOrdering * formatGr = uiOrdering.addNewGroup("Format");
formatGr->add(&m_numLevels);
formatGr->add(&m_precision);
formatGr->add(&m_tickNumberFormat);
formatGr->add(&m_colorRangeMode);
caf::PdmUiOrdering * mappingGr = uiOrdering.addNewGroup("Mapping");
mappingGr->add(&m_mappingMode);
mappingGr->add(&m_rangeMode);
mappingGr->add(&m_userDefinedMaxValue);
mappingGr->add(&m_userDefinedMinValue);
}

View File

@ -68,7 +68,9 @@ public:
WHITE_PINK,
PINK_WHITE,
WHITE_BLACK,
BLACK_WHITE
BLACK_WHITE,
BLUE_WHITE_RED,
RED_WHITE_BLUE
};
typedef caf::AppEnum<ColorRangesType> ColorRangeEnum;
@ -90,17 +92,20 @@ public:
void setPosition(cvf::Vec2ui position);
cvf::ScalarMapper* scalarMapper() { return m_currentScalarMapper.p(); }
cvf::OverlayScalarMapperLegend* legend() { return m_legend.p(); }
void updateLegend();
cvf::OverlayScalarMapperLegend* legend() { return m_legend.p(); }
protected:
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
virtual void initAfterRead();
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
private:
void updateLegend();
void updateFieldVisibility();
cvf::ref<cvf::Color3ubArray> interpolateColorArray(const cvf::Color3ubArray& colorArray, cvf::uint targetColorCount);
double adjust(double value, double precision);
double roundToNumSignificantDigits(double value, double precision);
private:
caf::PdmPointer<RimReservoirView> m_reservoirView;
@ -110,7 +115,7 @@ private:
cvf::ref<cvf::ScalarMapperContinuousLinear> m_linSmoothScalarMapper;
cvf::ref<cvf::ScalarMapper> m_currentScalarMapper;
cvf::ref<cvf::OverlayScalarMapperLegend> m_legend;
cvf::ref<cvf::OverlayScalarMapperLegend> m_legend;
double m_globalAutoMax;
double m_globalAutoMin;

View File

@ -25,7 +25,6 @@
#include "RimIdenticalGridCaseGroup.h"
#include "RiaApplication.h"
#include "RiaVersionInfo.h"
#include "RigGridManager.h"
#include "RigCaseData.h"

View File

@ -74,6 +74,7 @@ RimProject::RimProject(void)
CAF_PDM_InitFieldNoDefault(&wellPathImport, "WellPathImport", "WellPathImport", "", "", "");
wellPathImport = new RimWellPathImport();
wellPathImport.setUiHidden(true);
wellPathImport.setUiChildrenHidden(true);
CAF_PDM_InitFieldNoDefault(&commandObjects, "CommandObjects", "CommandObjects", "", "", "");
//wellPathImport.setUiHidden(true);

View File

@ -1090,7 +1090,7 @@ void RimReservoirView::appendCellResultInfo(size_t gridIndex, size_t cellIndex,
const RigWellResultPoint* wellResultCell = wellResultFrame.findResultCell(gridIndex, cellIndex);
if (wellResultCell)
{
resultInfoText->append(QString("Well-cell connection info: Well Name: %1 Branch Id: %2 Segment Id: %3\n").arg(singleWellResultData->m_wellName).arg(wellResultCell->m_ertBranchId +1).arg(wellResultCell->m_ertSegmentId+1));
resultInfoText->append(QString("Well-cell connection info: Well Name: %1 Branch Id: %2 Segment Id: %3\n").arg(singleWellResultData->m_wellName).arg(wellResultCell->m_ertBranchId).arg(wellResultCell->m_ertSegmentId));
}
}
}
@ -1431,12 +1431,16 @@ void RimReservoirView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibl
const std::vector< RigWellResultFrame >& wellResFrames = wres->m_wellCellsTimeSteps;
for (size_t wfIdx = 0; wfIdx < wellResFrames.size(); ++wfIdx)
{
// Add the wellhead cell
// Add the wellhead cell if it is active
if (wellResFrames[wfIdx].m_wellHead.m_gridIndex == grid->gridIndex())
{
size_t gridCellIndex = wellResFrames[wfIdx].m_wellHead.m_gridCellIndex;
(*visibleCells)[gridCellIndex] = true;
size_t globalGridCellIndex = grid->globalGridCellIndex(gridCellIndex);
if (activeCellInfo->isActive(globalGridCellIndex))
{
(*visibleCells)[gridCellIndex] = true;
}
}
// Add all the cells from the branches

View File

@ -296,7 +296,12 @@ void RimResultCase::updateFilePathsFromProjectPath(const QString& newProjectPath
// Update filename and folder paths when opening project from a different file location
caseFileName = relocateFile(caseFileName(), newProjectPath, oldProjectPath, &foundFile, &searchedPaths);
#if 0 // Output the search path for debugging
for (size_t i = 0; i < searchedPaths.size(); ++i)
qDebug() << searchedPaths[i];
#endif
}
//--------------------------------------------------------------------------------------------------

View File

@ -147,11 +147,13 @@ bool RimUiTreeModelPdm::deletePropertyFilter(const QModelIndex& itemIndex)
bool wasSomeFilterActive = propertyFilterCollection->hasActiveFilters();
// Remove Ui items pointing at the pdm object to delete
removeRows_special(itemIndex.row(), 1, itemIndex.parent());
removeRows_special(itemIndex.row(), 1, itemIndex.parent()); // To be deleted
propertyFilterCollection->remove(propertyFilter);
delete propertyFilter;
// updateUiSubTree(propertyFilterCollection); // To be enabled
if (wasFilterActive)
{
propertyFilterCollection->reservoirView()->scheduleGeometryRegen(RivReservoirViewPartMgr::PROPERTY_FILTERED);
@ -187,11 +189,13 @@ bool RimUiTreeModelPdm::deleteRangeFilter(const QModelIndex& itemIndex)
bool wasSomeFilterActive = rangeFilterCollection->hasActiveFilters();
// Remove Ui items pointing at the pdm object to delete
removeRows_special(itemIndex.row(), 1, itemIndex.parent());
removeRows_special(itemIndex.row(), 1, itemIndex.parent()); // To be deleted
rangeFilterCollection->remove(rangeFilter);
delete rangeFilter;
// updateUiSubTree(rangeFilterCollection); // To be enabled
if (wasFilterActive)
{
rangeFilterCollection->reservoirView()->scheduleGeometryRegen(RivReservoirViewPartMgr::PROPERTY_FILTERED);
@ -221,11 +225,12 @@ bool RimUiTreeModelPdm::deleteReservoirView(const QModelIndex& itemIndex)
CVF_ASSERT(reservoirView);
// Remove Ui items pointing at the pdm object to delete
removeRows_special(itemIndex.row(), 1, itemIndex.parent());
removeRows_special(itemIndex.row(), 1, itemIndex.parent()); // To be deleted
reservoirView->eclipseCase()->removeReservoirView(reservoirView);
delete reservoirView;
// updateUiSubTree(reservoirView->eclipseCase()); // To be enabled
clearClipboard();
return true;
@ -591,38 +596,28 @@ RimIdenticalGridCaseGroup* RimUiTreeModelPdm::addCaseGroup(QModelIndex& inserted
RimProject* proj = RiaApplication::instance()->project();
CVF_ASSERT(proj);
QModelIndex scriptModelIndex = getModelIndexFromPdmObject(proj->scriptCollection());
if (!scriptModelIndex.isValid()) return NULL;
caf::PdmUiTreeItem* currentItem = getTreeItemFromIndex(scriptModelIndex);
if (!currentItem) return NULL;
QModelIndex rootIndex = scriptModelIndex.parent();
caf::PdmUiTreeItem* rootTreeItem = currentItem->parent();
// New case group is inserted before the last item, the script item
int position = rootTreeItem->childCount() - 1;
beginInsertRows(rootIndex, position, position);
RimIdenticalGridCaseGroup* createdObject = new RimIdenticalGridCaseGroup;
proj->assignIdToCaseGroup(createdObject);
RimCase* createdReservoir = createdObject->createAndAppendStatisticsCase();
proj->assignCaseIdToCase(createdReservoir);
createdObject->name = QString("Grid Case Group %1").arg(position + 1);
RimAnalysisModels* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels() : NULL;
if (analysisModels)
{
RimIdenticalGridCaseGroup* createdObject = new RimIdenticalGridCaseGroup;
proj->assignIdToCaseGroup(createdObject);
RimCase* createdReservoir = createdObject->createAndAppendStatisticsCase();
proj->assignCaseIdToCase(createdReservoir);
createdObject->name = QString("Grid Case Group %1").arg(analysisModels->caseGroups().size() + 1);
analysisModels->caseGroups().push_back(createdObject);
this->updateUiSubTree(analysisModels);
insertedModelIndex = getModelIndexFromPdmObject(createdObject);
return createdObject;
}
else
{
return NULL;
}
caf::PdmUiTreeItem* childItem = caf::UiTreeItemBuilderPdm::buildViewItems(rootTreeItem, position, createdObject);
endInsertRows();
insertedModelIndex = index(position, 0, rootIndex);
return createdObject;
}
//--------------------------------------------------------------------------------------------------

View File

@ -29,6 +29,8 @@
#include "Rim3dOverlayInfoConfig.h"
#include "RimCellEdgeResultSlot.h"
#include "RiaApplication.h"
#include "RiaPreferences.h"
namespace caf
{
@ -93,6 +95,8 @@ RimWellCollection::RimWellCollection()
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well labels", "", "", "");
CAF_PDM_InitField(&wellHeadScaleFactor, "WellHeadScale", 1.0, "Well head scale", "", "", "");
CAF_PDM_InitField(&wellHeadPosition, "WellHeadPosition", WellHeadPositionEnum(WELLHEAD_POS_TOP_COLUMN), "Well head position", "", "", "");
cvf::Color3f defWellLabelColor = RiaApplication::instance()->preferences()->defaultWellLabelColor();
CAF_PDM_InitField(&wellLabelColor, "WellLabelColor", defWellLabelColor, "Well label color", "", "", "");
CAF_PDM_InitField(&wellPipeVisibility, "GlobalWellPipeVisibility", WellVisibilityEnum(PIPES_OPEN_IN_VISIBLE_CELLS), "Global well pipe visibility", "", "", "");
@ -243,7 +247,8 @@ void RimWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField
|| &wellHeadScaleFactor == changedField
|| &showWellHead == changedField
|| &isAutoDetectingBranches == changedField
|| &wellHeadPosition == changedField)
|| &wellHeadPosition == changedField
|| &wellLabelColor == changedField)
{
if (m_reservoirView)
{
@ -276,6 +281,7 @@ void RimWellCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderin
wellHeadGroup->add(&wellHeadScaleFactor);
wellHeadGroup->add(&showWellLabel);
wellHeadGroup->add(&wellHeadPosition);
wellHeadGroup->add(&wellLabelColor);
caf::PdmUiGroup* wellPipe = uiOrdering.addNewGroup("Well pipe");
wellPipe->add(&wellPipeVisibility);

View File

@ -76,6 +76,8 @@ public:
caf::PdmField<bool> showWellLabel;
caf::PdmField<cvf::Color3f> wellLabelColor;
caf::PdmField<bool> isActive;
caf::PdmField<WellCellsRangeFilterEnum> wellCellsToRangeFilterMode;
@ -91,6 +93,7 @@ public:
caf::PdmField<bool> showWellHead;
caf::PdmField<WellHeadPositionEnum> wellHeadPosition;
caf::PdmField<bool> isAutoDetectingBranches;
caf::PdmPointersField<RimWell*> wells;

View File

@ -20,6 +20,7 @@
#include "cafAppEnum.h"
#include "cafPdmFieldCvfColor.h"
#include "cafProgressInfo.h"
#include "RimWellPathCollection.h"
#include "RimWellPath.h"
@ -41,6 +42,9 @@
#include "RimAnalysisModels.h"
#include <fstream>
#include "RiaApplication.h"
#include "RiaPreferences.h"
namespace caf
{
template<>
@ -64,6 +68,9 @@ RimWellPathCollection::RimWellPathCollection()
CAF_PDM_InitField(&showWellPathLabel, "ShowWellPathLabel", true, "Show well path labels", "", "", "");
cvf::Color3f defWellLabelColor = RiaApplication::instance()->preferences()->defaultWellLabelColor();
CAF_PDM_InitField(&wellPathLabelColor, "WellPathLabelColor", defWellLabelColor, "Well label color", "", "", "");
CAF_PDM_InitField(&wellPathVisibility, "GlobalWellPathVisibility", WellVisibilityEnum(ALL_ON), "Global well path visibility", "", "", "");
CAF_PDM_InitField(&wellPathRadiusScaleFactor, "WellPathRadiusScale", 0.1, "Well Path radius scale", "", "", "");
@ -122,9 +129,14 @@ void RimWellPathCollection::setProject( RimProject* project )
//--------------------------------------------------------------------------------------------------
void RimWellPathCollection::readWellPathFiles()
{
caf::ProgressInfo progress(wellPaths.size(), "Reading well paths from file");
for (size_t wpIdx = 0; wpIdx < wellPaths.size(); wpIdx++)
{
wellPaths[wpIdx]->readWellPathFile();
progress.setProgressDescription(QString("Reading file %1").arg(wellPaths[wpIdx]->name));
progress.incrementProgress();
}
}

View File

@ -52,6 +52,7 @@ public:
typedef caf::AppEnum<RimWellPathCollection::WellVisibilityType> WellVisibilityEnum;
caf::PdmField<bool> showWellPathLabel;
caf::PdmField<cvf::Color3f> wellPathLabelColor;
caf::PdmField<WellVisibilityEnum> wellPathVisibility;
caf::PdmField<double> wellPathRadiusScaleFactor;

View File

@ -19,9 +19,9 @@ include_directories(
${ResInsight_SOURCE_DIR}/ApplicationCode/ProjectDataModel
${ResInsight_SOURCE_DIR}/ThirdParty
${ResInsight_SOURCE_DIR}/cafProjectDataModel
${ResInsight_SOURCE_DIR}/Fwk/AppFwk/cafProjectDataModel
${ResInsight_SOURCE_DIR}/CommonCode
${ResInsight_SOURCE_DIR}/Fwk/AppFwk/CommonCode
#Remove when RigStatistics is out
#${ResInsight_SOURCE_DIR}/ApplicationCode/ModelVisualization
@ -33,7 +33,7 @@ include ("${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists_files.cmake")
set( UNIT_TEST_CPP_SOURCES
${ResInsight_SOURCE_DIR}/cafUserInterface/cafProgressInfo.cpp
${ResInsight_SOURCE_DIR}/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp
main.cpp
RigActiveCellInfo-Test.cpp

View File

@ -164,10 +164,15 @@ void RigCaseData::computeWellCellsPrGrid()
size_t gridIndex = wellCells.m_wellHead.m_gridIndex;
size_t gridCellIndex = wellCells.m_wellHead.m_gridCellIndex;
if (gridIndex != cvf::UNDEFINED_SIZE_T && gridCellIndex != cvf::UNDEFINED_SIZE_T)
if (gridIndex < m_wellCellsInGrid.size() && gridCellIndex < m_wellCellsInGrid[gridIndex]->size())
{
m_wellCellsInGrid[gridIndex]->set(gridCellIndex, true);
m_gridCellToWellIndex[gridIndex]->set(gridCellIndex, static_cast<cvf::uint>(wIdx));
size_t globalGridCellIndex = grids[gridIndex]->globalGridCellIndex(gridCellIndex);
if (m_activeCellInfo->isActive(globalGridCellIndex)
|| m_fractureActiveCellInfo->isActive(globalGridCellIndex))
{
m_wellCellsInGrid[gridIndex]->set(gridCellIndex, true);
m_gridCellToWellIndex[gridIndex]->set(gridCellIndex, static_cast<cvf::uint>(wIdx));
}
}
size_t sIdx;

View File

@ -20,6 +20,8 @@
#include <algorithm>
#include <assert.h>
#include <math.h>
#include "cvfBase.h"
#include "cvfMath.h"
//--------------------------------------------------------------------------------------------------
/// A function to do basic statistical calculations
@ -103,7 +105,7 @@ std::vector<double> RigStatisticsMath::calculateNearestRankPercentiles(const std
{
double pVal = HUGE_VAL;
size_t pValIndex = static_cast<size_t>(sortedValues.size() * fabs(pValPositions[i]) / 100);
size_t pValIndex = static_cast<size_t>(sortedValues.size() * cvf::Math::abs(pValPositions[i]) / 100);
if (pValIndex >= sortedValues.size() ) pValIndex = sortedValues.size() - 1;
@ -142,7 +144,7 @@ std::vector<double> RigStatisticsMath::calculateInterpolatedPercentiles(const st
{
double pVal = HUGE_VAL;
double doubleIndex = (sortedValues.size() - 1) * fabs(pValPositions[i]) / 100.0;
double doubleIndex = (sortedValues.size() - 1) * cvf::Math::abs(pValPositions[i]) / 100.0;
size_t lowerValueIndex = static_cast<size_t>(floor(doubleIndex));
size_t upperValueIndex = lowerValueIndex + 1;

View File

@ -26,15 +26,12 @@ int main(int argc, char *argv[])
RiaApplication app(argc, argv);
QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
setlocale(LC_NUMERIC,"C");
RiuMainWindow window;
QString platform = cvf::System::is64Bit() ? "(64bit)" : "(32bit)";
window.setWindowTitle("ResInsight " + platform);
#ifdef CVF_LINUX
window.resize(1000, 806);
#else
window.resize(1000, 800);
#endif
window.setDefaultWindowSize();
window.show();
if (app.parseArguments())

View File

@ -18,6 +18,7 @@
#include "RiaStdInclude.h"
#include "RiaSocketCommand.h"
#include "RiaSocketServer.h"
#include "RiaSocketTools.h"
#include "RimReservoirView.h"
#include "RimResultSlot.h"
@ -45,20 +46,9 @@ public:
virtual bool interpretCommand(RiaSocketServer* server, const QList<QByteArray>& args, QDataStream& socketStream)
{
int argCaseGroupId = -1;
size_t argGridIndex = 0;
RimCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args);
size_t argGridIndex = args[2].toUInt();
if (args.size() == 2)
{
argGridIndex = args[1].toInt();
}
else if (args.size() == 3)
{
argCaseGroupId = args[1].toInt();
argGridIndex = args[2].toUInt();
}
RimCase* rimCase = server->findReservoir(argCaseGroupId);
if (!rimCase || !rimCase->reservoirData() || (argGridIndex >= rimCase->reservoirData()->gridCount()) )
{
// No data available
@ -135,37 +125,10 @@ public:
virtual bool interpretCommand(RiaSocketServer* server, const QList<QByteArray>& args, QDataStream& socketStream)
{
int argCaseGroupId = -1;
QString porosityModelName;
RimCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args);
if (args.size() == 2)
{
bool numberConversionOk = false;
int tmpValue = args[1].toInt(&numberConversionOk);
if (numberConversionOk)
{
argCaseGroupId = tmpValue;
}
else
{
porosityModelName = args[1];
}
}
else if (args.size() == 3)
{
bool numberConversionOk = false;
int tmpValue = args[1].toInt(&numberConversionOk);
if (numberConversionOk)
{
argCaseGroupId = args[1].toUInt();
porosityModelName = args[2];
}
else
{
argCaseGroupId = args[2].toUInt();
porosityModelName = args[1];
}
}
QString porosityModelName;
porosityModelName = args[2];
RifReaderInterface::PorosityModelResultType porosityModelEnum = RifReaderInterface::MATRIX_RESULTS;
if (porosityModelName.toUpper() == "FRACTURE")
@ -173,7 +136,6 @@ public:
porosityModelEnum = RifReaderInterface::FRACTURE_RESULTS;
}
RimCase* rimCase = server->findReservoir(argCaseGroupId);
if (!rimCase || !rimCase->reservoirData())
{
// No data available
@ -240,20 +202,9 @@ public:
virtual bool interpretCommand(RiaSocketServer* server, const QList<QByteArray>& args, QDataStream& socketStream)
{
int argCaseGroupId = -1;
size_t argGridIndex = 0;
RimCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args);
size_t argGridIndex = args[2].toUInt();
if (args.size() == 2)
{
argGridIndex = args[1].toInt();
}
else if (args.size() == 3)
{
argCaseGroupId = args[1].toInt();
argGridIndex = args[2].toUInt();
}
RimCase* rimCase = server->findReservoir(argCaseGroupId);
if (!rimCase || !rimCase->reservoirData() || (argGridIndex >= rimCase->reservoirData()->gridCount()) )
{
// No data available
@ -335,37 +286,10 @@ public:
virtual bool interpretCommand(RiaSocketServer* server, const QList<QByteArray>& args, QDataStream& socketStream)
{
int argCaseGroupId = -1;
QString porosityModelName;
RimCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args);
if (args.size() == 2)
{
bool numberConversionOk = false;
int tmpValue = args[1].toInt(&numberConversionOk);
if (numberConversionOk)
{
argCaseGroupId = tmpValue;
}
else
{
porosityModelName = args[1];
}
}
else if (args.size() == 3)
{
bool numberConversionOk = false;
int tmpValue = args[1].toInt(&numberConversionOk);
if (numberConversionOk)
{
argCaseGroupId = args[1].toUInt();
porosityModelName = args[2];
}
else
{
argCaseGroupId = args[2].toUInt();
porosityModelName = args[1];
}
}
QString porosityModelName;
porosityModelName = args[2];
RifReaderInterface::PorosityModelResultType porosityModelEnum = RifReaderInterface::MATRIX_RESULTS;
if (porosityModelName.toUpper() == "FRACTURE")
@ -373,7 +297,6 @@ public:
porosityModelEnum = RifReaderInterface::FRACTURE_RESULTS;
}
RimCase* rimCase = server->findReservoir(argCaseGroupId);
if (!rimCase || !rimCase->reservoirData() )
{
// No data available

View File

@ -21,6 +21,7 @@
#include "RiaSocketTools.h"
#include "RiuMainWindow.h"
#include "RiuProcessMonitor.h"
#include "RigCaseData.h"
#include "RigCaseCellResultsData.h"
@ -483,20 +484,17 @@ public:
if (m_invalidActiveCellCountDetected) return true;
if (!currentClient->bytesAvailable()) return false;
// If nothing should be read, or we already have read everything, do nothing
QDataStream socketStream(currentClient);
socketStream.setVersion(riOctavePlugin::qtDataStreamVersion);
if ((m_timeStepCountToRead == 0) || (m_currentTimeStepNumberToRead >= m_timeStepCountToRead) ) return true;
if (!currentClient->bytesAvailable()) return false;
if (m_timeStepCountToRead != m_requestedTimesteps.size())
{
CVF_ASSERT(false);
}
// If nothing should be read, or we already have read everything, do nothing
if ((m_timeStepCountToRead == 0) || (m_currentTimeStepNumberToRead >= m_timeStepCountToRead) ) return true;
// Check if a complete timestep is available, return and whait for readyRead() if not
if (currentClient->bytesAvailable() < (int)m_bytesPerTimeStepToRead) return false;
@ -542,6 +540,9 @@ public:
internalMatrixData = readBuffer.data();
}
QDataStream socketStream(currentClient);
socketStream.setVersion(riOctavePlugin::qtDataStreamVersion);
// Read available complete timestepdata
while ((currentClient->bytesAvailable() >= (int)m_bytesPerTimeStepToRead) && (m_currentTimeStepNumberToRead < m_timeStepCountToRead))
@ -656,6 +657,7 @@ private:
static bool RiaSetActiveCellProperty_init = RiaSocketCommandFactory::instance()->registerCreator<RiaSetActiveCellProperty>(RiaSetActiveCellProperty::commandName());
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -705,7 +707,10 @@ public:
// Read header
if (server->currentClient()->bytesAvailable() < (int)sizeof(quint64)*5) return true;
if (server->currentClient()->bytesAvailable() < (int)sizeof(quint64)*5)
{
return true;
}
quint64 cellCountI = 0;
quint64 cellCountJ = 0;
@ -729,6 +734,8 @@ public:
{
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") +
RiaSocketServer::tr("Zero data to read for ") + ":\"" + m_currentReservoir->caseUserDescription() + "\"\n");
return true;
}
@ -791,6 +798,7 @@ public:
if (timeStepReadError)
{
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: riGetActiveCellProperty : \n") + RiaSocketServer::tr("An error occured while interpreting the requested timesteps."));
return true;
}
}
@ -826,13 +834,18 @@ public:
virtual bool interpretMore(RiaSocketServer* server, QTcpSocket* currentClient)
{
if (m_invalidDataDetected) return true;
if (m_invalidDataDetected){
RiuMainWindow::instance()->processMonitor()->addStringToLog("[ResInsight SocketServer] > True \n");
return true;
}
// If nothing should be read, or we already have read everything, do nothing
if ((m_timeStepCountToRead == 0) || (m_currentTimeStepNumberToRead >= m_timeStepCountToRead) ) return true;
if (!currentClient->bytesAvailable()) return false;
QDataStream socketStream(currentClient);
socketStream.setVersion(riOctavePlugin::qtDataStreamVersion);
RigGridBase* grid = m_currentReservoir->reservoirData()->grid(m_currentGridIndex);
if (!grid)
{
@ -840,19 +853,7 @@ public:
RiaSocketServer::tr("No grid found") + ":\"" + m_currentReservoir->caseUserDescription() + "\"\n");
m_invalidDataDetected = true;
currentClient->abort();
return true;
}
// Do nothing if we have not enough data
if (m_timeStepCountToRead == 0 || m_bytesPerTimeStepToRead == 0)
{
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") +
RiaSocketServer::tr("Zero data to read for ") + ":\"" + m_currentReservoir->caseUserDescription() + "\"\n");
m_invalidDataDetected = true;
currentClient->abort();
currentClient->abort(); // Hmmm... should we not let the server handle this ?
return true;
}
@ -862,11 +863,7 @@ public:
CVF_ASSERT(false);
}
// If nothing should be read, or we already have read everything, do nothing
if ((m_timeStepCountToRead == 0) || (m_currentTimeStepNumberToRead >= m_timeStepCountToRead) ) return true;
// Check if a complete timestep is available, return and whait for readyRead() if not
// Check if a complete timestep is available, return and wait for readyRead() if not
if (currentClient->bytesAvailable() < (int)m_bytesPerTimeStepToRead) return false;
size_t cellCountFromOctave = m_bytesPerTimeStepToRead / sizeof(double);
@ -878,7 +875,6 @@ public:
m_invalidDataDetected = true;
currentClient->abort();
return true;
}
@ -895,7 +891,7 @@ public:
m_scalarResultsToAdd->at(tsId).resize(totalNumberOfCellsIncludingLgrCells, HUGE_VAL);
}
if ((currentClient->bytesAvailable() >= (int)m_bytesPerTimeStepToRead) && (m_currentTimeStepNumberToRead < m_timeStepCountToRead))
while ((currentClient->bytesAvailable() >= (int)m_bytesPerTimeStepToRead) && (m_currentTimeStepNumberToRead < m_timeStepCountToRead))
{
// Read a single time step with data
@ -904,7 +900,9 @@ public:
qint64 bytesRead = currentClient->read((char*)(doubleValues.data()), m_bytesPerTimeStepToRead);
size_t doubleValueIndex = 0;
cvf::ref<cvf::StructGridScalarDataAccess> cellCenterDataAccessObject = m_currentReservoir->reservoirData()->dataAccessObject(grid, m_porosityModelEnum, m_requestedTimesteps[m_currentTimeStepNumberToRead], m_currentScalarIndex);
cvf::ref<cvf::StructGridScalarDataAccess> cellCenterDataAccessObject =
m_currentReservoir->reservoirData()->dataAccessObject(grid, m_porosityModelEnum, m_requestedTimesteps[m_currentTimeStepNumberToRead], m_currentScalarIndex);
if (!cellCenterDataAccessObject.isNull())
{
for (size_t cellIdx = 0; static_cast<size_t>(cellIdx) < cellCountFromOctave; cellIdx++)
@ -965,6 +963,7 @@ public:
return true;
}
return false;
}

View File

@ -20,7 +20,8 @@
//////////////////////////////////////////////////////////////////////////
/// Socket commands, to be moved into a separate file
/// The base class for classes interpreting commands sent via socket.
/// Works in close connection with RiaSocketServer
//////////////////////////////////////////////////////////////////////////
class RiaSocketServer;
@ -30,7 +31,18 @@ class RiaSocketCommand
{
public:
virtual ~RiaSocketCommand() {}
/// This method is supposed to interpret the commands received from the calling socket connection and
/// read the data currently available.
/// If it read all the data and completed the command, it is supposed to return true. If it did not read all the data,
/// it is supposed to return false. The socket server will then assume that the command is not completely interpreted,
/// and will continue to call interpretMore() until that method returns true.
virtual bool interpretCommand(RiaSocketServer* server, const QList<QByteArray>& args, QDataStream& socketStream) = 0;
/// This method is supposed to read whatever more data that is available on the socket connection, and return true if it
/// was able to read all the data. If not all the data was available, it must return false, so that the RiaSocketServer
/// will call this method again when more data becomes available.
virtual bool interpretMore(RiaSocketServer* server, QTcpSocket* currentClient) { return true; }
};

View File

@ -18,6 +18,7 @@
#include "RiaStdInclude.h"
#include "RiaSocketServer.h"
#include "RiaSocketCommand.h"
#include "RiaSocketTools.h"
#include <QtGui>
#include <QtNetwork>
@ -68,6 +69,10 @@ RiaSocketServer::RiaSocketServer(QObject* parent)
m_tcpServer = new QTcpServer(this);
m_nextPendingConnectionTimer = new QTimer(this);
m_nextPendingConnectionTimer->setInterval(100);
m_nextPendingConnectionTimer->setSingleShot(true);
if (!m_tcpServer->listen(QHostAddress::LocalHost, 40001))
{
m_errorMessageDialog->showMessage("Octave communication disabled :\n"
@ -81,6 +86,7 @@ RiaSocketServer::RiaSocketServer(QObject* parent)
return;
}
connect(m_nextPendingConnectionTimer, SIGNAL(timeout()), this, SLOT(handleNextPendingConnection()));
connect(m_tcpServer, SIGNAL(newConnection()), this, SLOT(slotNewClientConnection()));
}
@ -106,54 +112,28 @@ unsigned short RiaSocketServer::serverPort()
//--------------------------------------------------------------------------------------------------
void RiaSocketServer::slotNewClientConnection()
{
// If we are currently handling a connection, just ignore the new one until the queue is empty.
// If we are currently handling a connection, just ignore the new one until the current one is disconnected.
if (m_currentClient != NULL)
if (m_currentClient && (m_currentClient->state() == QAbstractSocket::ConnectedState) )
{
if (m_currentClient->state() == QAbstractSocket::ConnectedState)
{
return;
}
else
{
if (m_currentCommand)
{
if (m_currentCommand->interpretMore(this, m_currentClient))
{
delete m_currentCommand;
m_currentCommand = NULL;
}
//PMonLog("Starting Timer");
m_nextPendingConnectionTimer->start(); // Reset and start again
return;
}
CVF_ASSERT(m_currentCommand == NULL);
}
// Read pending data from socket
terminateCurrentConnection();
if (m_currentClient && m_currentCommand)
{
bool isFinshed = m_currentCommand->interpretMore(this, m_currentClient);
if (!isFinshed)
{
m_errorMessageDialog->showMessage(tr("ResInsight SocketServer: \n") + tr("Warning : The command did not finish up correctly at the presence of a new one."));
}
}
handlePendingIncomingConnectionRequests();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaSocketServer::handleClientConnection(QTcpSocket* clientToHandle)
{
CVF_ASSERT(clientToHandle != NULL);
CVF_ASSERT(m_currentClient == NULL);
CVF_ASSERT(m_currentCommand == NULL);
m_currentClient = clientToHandle;
m_currentCommandSize = 0;
connect(m_currentClient, SIGNAL(disconnected()), this, SLOT(slotCurrentClientDisconnected()));
if (m_currentClient->bytesAvailable())
{
this->readCommandFromOctave();
}
connect(m_currentClient, SIGNAL(readyRead()), this, SLOT(slotReadyRead()));
handleNextPendingConnection();
}
//--------------------------------------------------------------------------------------------------
@ -161,7 +141,13 @@ void RiaSocketServer::handleClientConnection(QTcpSocket* clientToHandle)
//--------------------------------------------------------------------------------------------------
RimCase* RiaSocketServer::findReservoir(int caseId)
{
int currCaseId = caseId;
if (caseId < 0)
{
currCaseId = this->currentCaseId();
}
if (currCaseId < 0)
{
if (RiaApplication::instance()->activeReservoirView())
{
@ -178,7 +164,7 @@ RimCase* RiaSocketServer::findReservoir(int caseId)
for (size_t i = 0; i < cases.size(); i++)
{
if (cases[i]->caseId == caseId)
if (cases[i]->caseId == currCaseId)
{
return cases[i];
}
@ -189,26 +175,29 @@ RimCase* RiaSocketServer::findReservoir(int caseId)
}
//--------------------------------------------------------------------------------------------------
///
/// Reads the command name size, the command string and creates a new command object based on the string read.
/// Tries to interpret the command as well.
/// Returns whether the command actually was completely finished in one go.
//--------------------------------------------------------------------------------------------------
void RiaSocketServer::readCommandFromOctave()
bool RiaSocketServer::readCommandFromOctave()
{
QDataStream socketStream(m_currentClient);
socketStream.setVersion(riOctavePlugin::qtDataStreamVersion);
// If we have not read the currentCommandSize
// read the size of the command if all the data is available
if (m_currentCommandSize == 0)
{
if (m_currentClient->bytesAvailable() < (int)sizeof(qint64)) return;
if (m_currentClient->bytesAvailable() < (int)sizeof(qint64)) return false;
socketStream >> m_currentCommandSize;
}
// Check if the complete command is available, return and whait for readyRead() if not
if (m_currentClient->bytesAvailable() < m_currentCommandSize) return;
if (m_currentClient->bytesAvailable() < m_currentCommandSize) return false;
// Now we can read the command
// Now we can read the command name
QByteArray command = m_currentClient->read( m_currentCommandSize);
QTextStream commandStream(command);
@ -223,29 +212,19 @@ void RiaSocketServer::readCommandFromOctave()
CVF_ASSERT(args.size() > 0);
std::cout << args[0].data() << std::endl;
// Create the actual RiaSocketCommand object that will interpret the socket data
m_currentCommand = RiaSocketCommandFactory::instance()->create(args[0]);
if (m_currentCommand)
{
bool finished = m_currentCommand->interpretCommand(this, args, socketStream);
if (finished)
{
delete m_currentCommand;
m_currentCommand = NULL;
handlePendingIncomingConnectionRequests();
return;
}
return finished;
}
else
{
handlePendingIncomingConnectionRequests();
m_errorMessageDialog->showMessage(tr("ResInsight SocketServer: \n") + tr("Unknown command: %1").arg(args[0].data()));
terminateCurrentConnection();
return;
return true;
}
}
@ -257,19 +236,56 @@ void RiaSocketServer::slotCurrentClientDisconnected()
{
if (m_currentCommand)
{
if (m_currentCommand->interpretMore(this, m_currentClient))
{
delete m_currentCommand;
m_currentCommand = NULL;
}
// Make sure we read what can be read.
bool isFinished = m_currentCommand->interpretMore(this, m_currentClient);
/// What do we do here ?
CVF_ASSERT(m_currentCommand == NULL);
if (!isFinished)
{
m_errorMessageDialog->showMessage(tr("ResInsight SocketServer: \n") + tr("Warning : The command was interrupted and did not finish because the connection to octave disconnected."));
}
}
terminateCurrentConnection();
handleNextPendingConnection();
}
handlePendingIncomingConnectionRequests();
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaSocketServer::slotReadyRead()
{
if (m_currentCommand)
{
bool isFinished = m_currentCommand->interpretMore(this, m_currentClient);
if (isFinished)
{
handleNextPendingConnection();
}
}
else
{
bool isFinished = readCommandFromOctave();
if (isFinished)
{
handleNextPendingConnection();
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaSocketServer::setCurrentCaseId(int caseId)
{
m_currentCaseId = caseId;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RiaSocketServer::currentCaseId() const
{
return m_currentCaseId;
}
//--------------------------------------------------------------------------------------------------
@ -298,53 +314,47 @@ void RiaSocketServer::terminateCurrentConnection()
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
void RiaSocketServer::slotReadyRead()
void RiaSocketServer::handleNextPendingConnection()
{
if (m_currentCommand)
if (m_currentClient && (m_currentClient->state() == QAbstractSocket::ConnectedState) )
{
if (m_currentCommand->interpretMore(this, m_currentClient))
{
delete m_currentCommand;
m_currentCommand = NULL;
//PMonLog("Starting Timer");
m_nextPendingConnectionTimer->start(); // Reset and start again
return;
}
handlePendingIncomingConnectionRequests();
// Stop timer
if (m_nextPendingConnectionTimer->isActive())
{
//PMonLog("Stopping Timer");
m_nextPendingConnectionTimer->stop();
}
terminateCurrentConnection();
QTcpSocket* clientToHandle = m_tcpServer->nextPendingConnection();
if (clientToHandle)
{
CVF_ASSERT(m_currentClient == NULL);
CVF_ASSERT(m_currentCommand == NULL);
m_currentClient = clientToHandle;
m_currentCommandSize = 0;
connect(m_currentClient, SIGNAL(disconnected()), this, SLOT(slotCurrentClientDisconnected()));
connect(m_currentClient, SIGNAL(readyRead()), this, SLOT(slotReadyRead()));
if (m_currentClient->bytesAvailable())
{
bool isFinished = this->readCommandFromOctave();
if (isFinished)
{
// Call ourselves recursively until there are none left, or until it can not be processed in one go.
this->handleNextPendingConnection();
}
}
}
else
{
readCommandFromOctave();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaSocketServer::setCurrentCaseId(int caseId)
{
m_currentCaseId = caseId;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RiaSocketServer::currentCaseId() const
{
return m_currentCaseId;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaSocketServer::handlePendingIncomingConnectionRequests()
{
QTcpSocket* newClient = m_tcpServer->nextPendingConnection();
if (newClient)
{
terminateCurrentConnection();
this->handleClientConnection(newClient);
}
}

View File

@ -28,6 +28,7 @@ class QTcpServer;
class QTcpSocket;
class QNetworkSession;
class QErrorMessage;
class QTimer;
class RimCase;
class RiaSocketCommand;
@ -59,11 +60,11 @@ private slots:
void slotNewClientConnection();
void slotCurrentClientDisconnected();
void slotReadyRead();
void handleNextPendingConnection();
private:
void handleClientConnection( QTcpSocket* clientToHandle);
void terminateCurrentConnection();
void readCommandFromOctave();
void handlePendingIncomingConnectionRequests();
bool readCommandFromOctave();
private:
QTcpServer* m_tcpServer;
@ -74,5 +75,7 @@ private:
RiaSocketCommand* m_currentCommand;
QTimer* m_nextPendingConnectionTimer;
int m_currentCaseId; // Set to -1 to use default server behavior
};

View File

@ -18,6 +18,7 @@
class RimCase;
class RiaSocketServer;
#define PMonLog( MessageString ) RiuMainWindow::instance()->processMonitor()->addStringToLog( MessageString );
class RiaSocketTools
{

View File

@ -311,9 +311,9 @@ public:
int branchId = resPoint.m_ertBranchId;
int segmentId = resPoint.m_ertSegmentId;
cellIs .push_back( static_cast<qint32>(i) );
cellJs .push_back( static_cast<qint32>(j) );
cellKs .push_back( static_cast<qint32>(k) );
cellIs .push_back( static_cast<qint32>(i + 1) ); // NB: 1-based index in Octave
cellJs .push_back( static_cast<qint32>(j + 1) ); // NB: 1-based index in Octave
cellKs .push_back( static_cast<qint32>(k + 1) ); // NB: 1-based index in Octave
gridIndices .push_back( static_cast<qint32>(gridIdx) );
cellStatuses.push_back( static_cast<qint32>(isOpen) );
branchIds .push_back( branchId );

View File

@ -50,6 +50,7 @@
#include "cafAnimationToolBar.h"
#include "cafPdmUiPropertyView.h"
#include "cvfqtBasicAboutDialog.h"
#include "cvfTimer.h"
#include "cafPdmFieldCvfMat4d.h"
@ -60,6 +61,7 @@
#include "Rim3dOverlayInfoConfig.h"
#include "RiuWellImportWizard.h"
#include "RimCalcScript.h"
#include "RiaRegressionTest.h"
@ -202,6 +204,8 @@ void RiuMainWindow::createActions()
m_snapshotAllViewsToFile = new QAction(QIcon(":/SnapShotSaveViews.png"), "Snapshot All Views To File", this);
m_createCommandObject = new QAction("Create Command Object", this);
m_showRegressionTestDialog = new QAction("Regression Test Dialog", this);
m_executePaintEventPerformanceTest = new QAction("&Paint Event Performance Test", this);
m_saveProjectAction = new QAction(QIcon(":/Save.png"), "&Save Project", this);
m_saveProjectAsAction = new QAction(QIcon(":/Save.png"), "Save Project &As", this);
@ -227,6 +231,8 @@ void RiuMainWindow::createActions()
connect(m_snapshotAllViewsToFile, SIGNAL(triggered()), SLOT(slotSnapshotAllViewsToFile()));
connect(m_createCommandObject, SIGNAL(triggered()), SLOT(slotCreateCommandObject()));
connect(m_showRegressionTestDialog, SIGNAL(triggered()), SLOT(slotShowRegressionTestDialog()));
connect(m_executePaintEventPerformanceTest, SIGNAL(triggered()), SLOT(slotExecutePaintEventPerformanceTest()));
connect(m_saveProjectAction, SIGNAL(triggered()), SLOT(slotSaveProject()));
connect(m_saveProjectAsAction, SIGNAL(triggered()), SLOT(slotSaveProjectAs()));
@ -364,7 +370,9 @@ void RiuMainWindow::createMenus()
debugMenu->addAction(m_mockInputModelAction);
debugMenu->addSeparator();
debugMenu->addAction(m_createCommandObject);
debugMenu->addSeparator();
debugMenu->addAction(m_showRegressionTestDialog);
debugMenu->addAction(m_executePaintEventPerformanceTest);
connect(debugMenu, SIGNAL(aboutToShow()), SLOT(slotRefreshDebugActions()));
@ -753,7 +761,7 @@ void RiuMainWindow::slotOpenInputFiles()
// Remember the path to next time
app->setDefaultFileDialogDirectory("INPUT_FILES", QFileInfo(fileNames.last()).absolutePath());
app->openInputEclipseCase("Eclipse Input Files", fileNames);
app->openInputEclipseCaseFromFileNames(fileNames);
}
}
@ -767,7 +775,7 @@ void RiuMainWindow::slotOpenProject()
{
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->defaultFileDialogDirectory("BINARY_GRID");
QString fileName = QFileDialog::getOpenFileName(this, "Open ResInsight Project", defaultDir, "ResInsight project (*.rip)");
QString fileName = QFileDialog::getOpenFileName(this, "Open ResInsight Project", defaultDir, "ResInsight project (*.rsp *.rip);;All files(*.*)");
if (fileName.isEmpty()) return;
@ -1197,13 +1205,13 @@ void RiuMainWindow::slotEditPreferences()
if (preferencesDialog.exec() == QDialog::Accepted)
{
// Write preferences using QSettings and apply them to the application
app->writePreferences();
app->writeFieldsToApplicationStore(app->preferences());
app->applyPreferences();
}
else
{
// Read back currently stored values using QSettings
app->readPreferences();
app->readFieldsFromApplicationStore(app->preferences());
}
}
@ -1700,3 +1708,63 @@ void RiuMainWindow::slotCreateCommandObject()
app->project()->updateConnectedEditors();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::slotShowRegressionTestDialog()
{
RiaRegressionTest regTestConfig;
RiaApplication* app = RiaApplication::instance();
app->readFieldsFromApplicationStore(&regTestConfig);
RiuPreferencesDialog regressionTestDialog(this, &regTestConfig, "Regression Test");
if (regressionTestDialog.exec() == QDialog::Accepted)
{
// Write preferences using QSettings and apply them to the application
app->writeFieldsToApplicationStore(&regTestConfig);
QString currentApplicationPath = QDir::currentPath();
QDir::setCurrent(regTestConfig.applicationWorkingFolder);
app->executeRegressionTests(regTestConfig.regressionTestFolder);
QDir::setCurrent(currentApplicationPath);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::slotExecutePaintEventPerformanceTest()
{
if (RiaApplication::instance()->activeReservoirView() && RiaApplication::instance()->activeReservoirView()->viewer())
{
size_t redrawCount = 50;
caf::Viewer* viewer = RiaApplication::instance()->activeReservoirView()->viewer();
cvf::Timer timer;
for (size_t i = 0; i < redrawCount; i++)
{
viewer->repaint();
}
double totalTimeMS = timer.time() * 1000.0;
double msPerFrame = totalTimeMS / redrawCount;
QString resultInfo = QString("Total time '%1 ms' for %2 number of redraws, frame time '%3 ms'").arg(totalTimeMS).arg(redrawCount).arg(msPerFrame);
setResultInfo(resultInfo);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::setDefaultWindowSize()
{
resize(1000, 810);
}

View File

@ -93,6 +93,8 @@ public:
void selectedCases(std::vector<RimCase*>& cases);
void setDefaultWindowSize();
protected:
virtual void closeEvent(QCloseEvent* event);
@ -155,6 +157,8 @@ private:
QAction* m_snapshotAllViewsToFile;
QAction* m_createCommandObject;
QAction* m_showRegressionTestDialog;
QAction* m_executePaintEventPerformanceTest;
// Help actions
QAction* m_aboutAction;
@ -225,6 +229,9 @@ private slots:
void slotCreateCommandObject();
void slotShowRegressionTestDialog();
void slotExecutePaintEventPerformanceTest();
// Mock models
void slotMockModel();
void slotMockResultsModel();

View File

@ -52,14 +52,16 @@ RiuProcessMonitor::RiuProcessMonitor(QDockWidget* pParent)
m_textEdit->setReadOnly(true);
m_textEdit->setLineWrapMode(QPlainTextEdit::NoWrap);
//QFont font("Courier", 8);
QFont font("Terminal", 10);
QFont font("Courier", 8);
//QFont font("Terminal", 11);
m_textEdit->setFont(font);
QVBoxLayout* pLayout = new QVBoxLayout();
pLayout->addLayout(pTopLayout);
pLayout->addWidget(m_textEdit);
pLayout->setContentsMargins(0, 0, 0, 0);
setLayout(pLayout);
setStatusMsg("N/A", caf::PROCESS_STATE_NORMAL);

View File

@ -52,12 +52,13 @@ public:
void startMonitorWorkProcess(caf::UiProcess* process);
void stopMonitorWorkProcess();
void addStringToLog(const QString& text);
public slots:
void slotClearTextEdit();
private:
void setStatusMsg(const QString& status, int messageType);
void addStringToLog(const QString& text);
private slots:
void slotShowProcStatusMsg(const QString& message, int messageType);

View File

@ -42,6 +42,9 @@ RiuResultInfoPanel::RiuResultInfoPanel(QDockWidget* parent)
QVBoxLayout* layout = new QVBoxLayout();
layout->addWidget(m_textEdit);
layout->setContentsMargins(0, 0, 0, 0);
setLayout(layout);
}

View File

@ -20,8 +20,8 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../FileInterface
${CMAKE_CURRENT_SOURCE_DIR}/../../cafProjectDataModel
${CMAKE_CURRENT_SOURCE_DIR}/../../cafUserInterface
${CMAKE_CURRENT_SOURCE_DIR}/../../Fwk/AppFwk/cafProjectDataModel
${CMAKE_CURRENT_SOURCE_DIR}/../../Fwk/AppFwk/cafUserInterface
)

View File

@ -41,7 +41,7 @@ RimOilFieldEntry::RimOilFieldEntry()
CAF_PDM_InitFieldNoDefault(&name, "OilFieldName", "OilFieldName", "", "", "");
CAF_PDM_InitFieldNoDefault(&edmId, "EdmId", "EdmId", "", "", "");
CAF_PDM_InitField(&selected, "Selected", true, "Selected", "", "", "");
CAF_PDM_InitField(&selected, "Selected", true, "Selected", "", "", "");
CAF_PDM_InitFieldNoDefault(&wellsFilePath, "wellsFilePath", "wellsFilePath", "", "", "");

View File

@ -34,7 +34,7 @@ RimOilRegionEntry::RimOilRegionEntry()
CAF_PDM_InitFieldNoDefault(&fields, "Fields", "", "", "", "");
CAF_PDM_InitField(&selected, "Selected", true, "Selected", "", "", "");
CAF_PDM_InitField(&selected, "Selected", false, "Selected", "", "", "");
}

View File

@ -38,12 +38,12 @@ public:
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
void updateState();
caf::PdmField<QString> name;
caf::PdmField<bool> selected;
caf::PdmPointersField<RimOilFieldEntry*> fields;
private:
void updateState();
};

View File

@ -17,6 +17,7 @@
/////////////////////////////////////////////////////////////////////////////////
#include "RimWellPathImport.h"
#include "cafPdmUiTreeViewEditor.h"
namespace caf {
@ -186,3 +187,19 @@ void RimWellPathImport::fieldChangedByUi(const caf::PdmFieldHandle* changedField
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathImport::defineObjectEditorAttribute(QString uiConfigName, caf::PdmUiEditorAttribute * attribute)
{
caf::PdmUiTreeViewEditorAttribute* myAttr = dynamic_cast<caf::PdmUiTreeViewEditorAttribute*>(attribute);
if (myAttr)
{
QStringList colHeaders;
colHeaders << "Region";
myAttr->columnHeaders = colHeaders;
}
}

View File

@ -57,9 +57,11 @@ public:
virtual void initAfterRead();
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
virtual void defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute * attribute );
//private:
void updateFieldVisibility();
};

View File

@ -32,6 +32,7 @@
#include "RimWellPathImport.h"
#include "RifJsonEncodeDecode.h"
#include "cafPdmUiTreeViewEditor.h"
//--------------------------------------------------------------------------------------------------
@ -45,8 +46,7 @@ RiuWellImportWizard::RiuWellImportWizard(const QString& webServiceAddress, const
m_destinationFolder = downloadFolder;
m_webServiceAddress = webServiceAddress;
m_progressDialog = new QProgressDialog(this);
m_myProgressDialog = new QProgressDialog(this);
m_firstTimeRequestingAuthentication = true;
@ -64,8 +64,6 @@ RiuWellImportWizard::RiuWellImportWizard(const QString& webServiceAddress, const
this, SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
#endif
connect(m_progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload()));
}
//--------------------------------------------------------------------------------------------------
@ -121,9 +119,6 @@ void RiuWellImportWizard::issueHttpRequestToFile(QString completeUrlText, QStrin
return;
}
m_progressDialog->setWindowTitle(tr("HTTP"));
m_progressDialog->setLabelText(tr("Downloading %1.").arg(destinationFileName));
// schedule the request
m_httpRequestAborted = false;
startRequest(m_url);
@ -152,7 +147,7 @@ void RiuWellImportWizard::httpFinished()
m_file = 0;
}
m_reply->deleteLater();
m_progressDialog->hide();
m_myProgressDialog->hide();
return;
}
@ -215,7 +210,12 @@ void RiuWellImportWizard::httpFinished()
out << singleWellPathContent;
}
}
m_myProgressDialog->setLabelText(QString("Downloaded well path : %1").arg(wellPathName));
}
int newValue = m_myProgressDialog->maximum() - m_wellRequestQueue.size();
m_myProgressDialog->setValue(newValue);
}
m_reply->deleteLater();
@ -247,20 +247,6 @@ void RiuWellImportWizard::httpReadyRead()
m_file->write(m_reply->readAll());
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellImportWizard::updateDataReadProgress(qint64 bytesRead, qint64 totalBytes)
{
if (m_httpRequestAborted)
return;
m_progressDialog->setMaximum(totalBytes);
m_progressDialog->setValue(bytesRead);
}
//--------------------------------------------------------------------------------------------------
/// This slot will be called for the first network reply that will need authentication.
/// If the authentication is successful, the username/password is cached in the QNetworkAccessManager
@ -323,8 +309,6 @@ void RiuWellImportWizard::startRequest(QUrl url)
this, SLOT(httpFinished()));
connect(m_reply, SIGNAL(readyRead()),
this, SLOT(httpReadyRead()));
connect(m_reply, SIGNAL(downloadProgress(qint64,qint64)),
this, SLOT(updateDataReadProgress(qint64,qint64)));
}
@ -385,6 +369,13 @@ void RiuWellImportWizard::updateFieldsModel()
}
m_wellPathImportObject->updateRegions(regions, fields, edmIds);
for (size_t i = 0; i < m_wellPathImportObject->regions.size(); i++)
{
m_wellPathImportObject->regions[i]->updateState();
}
m_wellPathImportObject->updateConnectedEditors();
}
}
@ -413,7 +404,7 @@ void RiuWellImportWizard::downloadWells()
}
else
{
wellRequest = QString("/resinsight/projects/%1/wellsInArea?north=%2&south=%3&east=%4&west=%5&utmZone=32N")
wellRequest = QString("/resinsight/projects/%1/wellsInArea?north=%2&south=%3&east=%4&west=%5&utmzone=32N")
.arg(oilField->edmId)
.arg(QString::number(m_wellPathImportObject->north, 'g', 10))
.arg(QString::number(m_wellPathImportObject->south, 'g', 10))
@ -455,16 +446,15 @@ void RiuWellImportWizard::downloadWellPaths()
for (size_t wIdx = 0; wIdx < oilField->wells.size(); wIdx++)
{
RimWellPathEntry* wellPathEntry = oilField->wells[wIdx];
if (!wellPathEntry->isWellPathValid())
continue;
DownloadEntity urlToFile;
if (wellPathEntry->selected && wellPathEntry->isWellPathValid())
{
DownloadEntity urlToFile;
urlToFile.requestUrl = wellPathEntry->requestUrl;
urlToFile.responseFilename = wellPathEntry->wellPathFilePath;
urlToFile.requestUrl = wellPathEntry->requestUrl;
urlToFile.responseFilename = wellPathEntry->wellPathFilePath;
m_wellRequestQueue.push_back(urlToFile);
m_wellRequestQueue.push_back(urlToFile);
}
}
}
}
@ -473,6 +463,11 @@ void RiuWellImportWizard::downloadWellPaths()
m_currentDownloadState = DOWNLOAD_WELL_PATH;
m_myProgressDialog->setMaximum(m_wellRequestQueue.size());
m_myProgressDialog->setValue(0);
m_myProgressDialog->show();
checkDownloadQueueAndIssueRequests();
}
@ -497,6 +492,8 @@ void RiuWellImportWizard::checkDownloadQueueAndIssueRequests()
if (m_currentDownloadState == DOWNLOAD_WELLS)
{
m_myProgressDialog->hide();
// Update UI with downloaded wells
for (size_t rIdx = 0; rIdx < m_wellPathImportObject->regions.size(); rIdx++)
@ -528,7 +525,7 @@ void RiuWellImportWizard::checkDownloadQueueAndIssueRequests()
m_currentDownloadState = DOWNLOAD_UNDEFINED;
m_progressDialog->hide();
m_myProgressDialog->hide();
}
//--------------------------------------------------------------------------------------------------
@ -695,7 +692,7 @@ void RiuWellImportWizard::parseWellsResponse(RimOilFieldEntry* oilFieldEntry)
WellSelectionPage* wellSelectionPage = dynamic_cast<WellSelectionPage*>(page(m_wellSelectionPageId));
if (wellSelectionPage)
wellSelectionPage->expandAllTreeNodes();
wellSelectionPage->buildWellTreeView();
}
//--------------------------------------------------------------------------------------------------
@ -802,6 +799,31 @@ void FieldSelectionPage::initializePage()
//--------------------------------------------------------------------------------------------------
/// Helper class used to define column headers
//--------------------------------------------------------------------------------------------------
class ObjectGroupWithHeaders : public caf::PdmObjectGroup
{
public:
ObjectGroupWithHeaders() : caf::PdmObjectGroup()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
virtual void defineObjectEditorAttribute(QString uiConfigName, caf::PdmUiEditorAttribute * attribute)
{
caf::PdmUiTreeViewEditorAttribute* myAttr = dynamic_cast<caf::PdmUiTreeViewEditorAttribute*>(attribute);
if (myAttr)
{
QStringList colHeaders;
colHeaders << "Wells";
myAttr->columnHeaders = colHeaders;
}
}
};
@ -823,9 +845,7 @@ WellSelectionPage::WellSelectionPage(RimWellPathImport* wellPathImport, QWidget*
m_wellPathImportObject = wellPathImport;
m_regionsWithVisibleWells = new caf::PdmObjectGroup;
//m_wellSelectionTreeView->setPdmObject(wellPathImport);
m_regionsWithVisibleWells = new ObjectGroupWithHeaders;
}
//--------------------------------------------------------------------------------------------------
@ -837,27 +857,73 @@ void WellSelectionPage::initializePage()
if (!wiz) return;
wiz->downloadWells();
setButtonText(QWizard::NextButton, "Download");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void WellSelectionPage::expandAllTreeNodes()
void WellSelectionPage::buildWellTreeView()
{
m_regionsWithVisibleWells->objects.clear();
for (size_t rIdx = 0; rIdx < m_regionsWithVisibleWells->objects.size(); rIdx++)
{
caf::PdmObjectGroup* regGroup = dynamic_cast<caf::PdmObjectGroup*>(m_regionsWithVisibleWells->objects[rIdx]);
if (!regGroup)
continue;
for (size_t fIdx = 0; fIdx < regGroup->objects.size(); fIdx++)
{
caf::PdmObjectGroup* fieldGroup = dynamic_cast<caf::PdmObjectGroup*>(regGroup->objects[fIdx]);
if (!fieldGroup)
continue;
// RimWellPathEntry objects are present here, they must be taken out out the container, but not deleted
// If fieldGroup->objects->deleteObjects is performed, the objects are deleted
fieldGroup->objects.clear();
}
}
// Delete all temporary pdm object groups
m_regionsWithVisibleWells->deleteObjects();
for (size_t rIdx = 0; rIdx < m_wellPathImportObject->regions.size(); rIdx++)
{
RimOilRegionEntry* oilRegion = m_wellPathImportObject->regions[rIdx];
if (oilRegion->selected)
{
m_regionsWithVisibleWells->objects.push_back(oilRegion);
caf::PdmObjectGroup* regGroup = new caf::PdmObjectGroup;
regGroup->setUiName(oilRegion->userDescriptionField()->uiValue().toString());
m_regionsWithVisibleWells->objects.push_back(regGroup);
for (size_t fIdx = 0; fIdx < oilRegion->fields.size(); fIdx++)
{
RimOilFieldEntry* oilField = oilRegion->fields[fIdx];
if (oilField->selected)
{
caf::PdmObjectGroup* fieldGroup = new caf::PdmObjectGroup;
fieldGroup->setUiName(oilField->userDescriptionField()->uiValue().toString());
regGroup->objects.push_back(fieldGroup);
for (size_t wIdx = 0; wIdx < oilField->wells.size(); wIdx++)
{
RimWellPathEntry* wellPathEntry = oilField->wells[wIdx];
if (wellPathEntry->selected)
{
fieldGroup->objects.push_back(wellPathEntry);
}
}
}
}
}
}
m_wellSelectionTreeView->setPdmObject(m_regionsWithVisibleWells);
m_regionsWithVisibleWells->updateConnectedEditors();
//m_wellSelectionTreeView->treeView()->expandAll();
m_wellSelectionTreeView->treeView()->expandAll();
}
//--------------------------------------------------------------------------------------------------
@ -877,6 +943,7 @@ WellSelectionPage::~WellSelectionPage()
WellSummaryPage::WellSummaryPage(RimWellPathImport* wellPathImport, QWidget* parent /*= 0*/)
{
m_wellPathImportObject = wellPathImport;
m_wellPathImportObject->setUiHidden(true);
QVBoxLayout* layout = new QVBoxLayout;
setLayout(layout);
@ -885,15 +952,18 @@ WellSummaryPage::WellSummaryPage(RimWellPathImport* wellPathImport, QWidget* par
m_textEdit->setReadOnly(true);
layout->addWidget(m_textEdit);
QPushButton* button = new QPushButton("Details", this);
QPushButton* button = new QPushButton("Show/hide details", this);
connect(button, SIGNAL(clicked()), this, SLOT(slotShowDetails()));
layout->addWidget(button);
m_listView = new caf::PdmUiListView(this);
layout->setStretchFactor(m_listView, 10);
layout->addWidget(m_listView);
m_listView->hide();
m_objectGroup = new caf::PdmObjectGroup;
setButtonText(QWizard::FinishButton, "Import");
}
//--------------------------------------------------------------------------------------------------
@ -933,17 +1003,19 @@ void WellSummaryPage::updateSummaryPage()
for (size_t wIdx = 0; wIdx < oilField->wells.size(); wIdx++)
{
RimWellPathEntry* wellPathEntry = oilField->wells[wIdx];
if (QFile::exists(oilField->wells[wIdx]->wellPathFilePath))
if (wellPathEntry->selected)
{
wellPathCount++;
}
else
{
errorString += QString("Failed to get file '%1' from well '%2'\n").arg(oilField->wells[wIdx]->wellPathFilePath).arg(oilField->wells[wIdx]->name);
}
if (QFile::exists(oilField->wells[wIdx]->wellPathFilePath))
{
wellPathCount++;
}
else
{
errorString += QString("Failed to get file '%1' from well '%2'\n").arg(oilField->wells[wIdx]->wellPathFilePath).arg(oilField->wells[wIdx]->name);
}
m_objectGroup->objects.push_back(wellPathEntry);
m_objectGroup->objects.push_back(wellPathEntry);
}
}
}
}
@ -951,7 +1023,7 @@ void WellSummaryPage::updateSummaryPage()
}
m_textEdit->setText(QString("Downloaded successfully %1 well paths.\nPlease push 'Finish' button to import well paths into ResInsight.\n\n").arg(wellPathCount));
m_textEdit->setText(QString("Downloaded successfully %1 well paths.\nPlease push 'Import' button to import well paths into ResInsight.\n\n").arg(wellPathCount));
if (!errorString.isEmpty())
{
m_textEdit->append("Detected following errors during well path download. See details below.");
@ -968,6 +1040,13 @@ void WellSummaryPage::updateSummaryPage()
//--------------------------------------------------------------------------------------------------
void WellSummaryPage::slotShowDetails()
{
m_listView->show();
if (m_listView->isHidden())
{
m_listView->show();
}
else
{
m_listView->hide();
}
}

View File

@ -72,6 +72,10 @@ public:
};
class ObjectGroupWithHeaders;
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -84,10 +88,10 @@ public:
~WellSelectionPage();
virtual void initializePage();
void expandAllTreeNodes();
void buildWellTreeView();
private:
caf::PdmObjectGroup* m_regionsWithVisibleWells;
ObjectGroupWithHeaders* m_regionsWithVisibleWells;
RimWellPathImport* m_wellPathImportObject;
caf::PdmUiTreeView* m_wellSelectionTreeView;
@ -163,7 +167,6 @@ public slots:
void httpFinished();
void httpReadyRead();
void updateDataReadProgress(qint64 bytesRead, qint64 totalBytes);
void slotAuthenticationRequired(QNetworkReply* networkReply, QAuthenticator* authenticator);
@ -195,7 +198,7 @@ private:
RimWellPathImport* m_wellPathImportObject;
caf::PdmUiTreeView* m_pdmTreeView;
QProgressDialog* m_progressDialog;
QProgressDialog* m_myProgressDialog;
QUrl m_url;
QNetworkAccessManager m_networkAccessManager;

View File

@ -13,15 +13,15 @@ find_package( OpenGL )
add_subdirectory(../WellPathImportSsihub "${CMAKE_CURRENT_BINARY_DIR}/WellPathImportSsihub")
add_subdirectory(../../cafProjectDataModel "${CMAKE_CURRENT_BINARY_DIR}/cafProjectDataModel")
add_subdirectory(../../cafUserInterface "${CMAKE_CURRENT_BINARY_DIR}/cafUserInterface")
add_subdirectory(../../Fwk/AppFwk/cafProjectDataModel "${CMAKE_CURRENT_BINARY_DIR}/cafProjectDataModel")
add_subdirectory(../../Fwk/AppFwk/cafUserInterface "${CMAKE_CURRENT_BINARY_DIR}/cafUserInterface")
add_subdirectory(../../cafTests/cafTestApplication "${CMAKE_CURRENT_BINARY_DIR}/cafTestApplication")
#add_subdirectory(../../cafTests/cafTestApplication "${CMAKE_CURRENT_BINARY_DIR}/cafTestApplication")
include_directories(
${WellPathImportSsihub_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../../cafProjectDataModel
${CMAKE_CURRENT_SOURCE_DIR}/../../cafUserInterface
${WellPathImportSsihub_SOURCE_DIR}/../../Fwk/AppFwk/cafProjectDataModel
${WellPathImportSsihub_SOURCE_DIR}/../../Fwk/AppFwk/cafUserInterface
)

View File

@ -2,12 +2,13 @@ cmake_minimum_required (VERSION 2.8)
project (ResInsight)
set (VIZ_MODULES_FOLDER_NAME VisualizationModules)
set (VIZ_MODULES_FOLDER_NAME Fwk/VizFwk)
################################################################################
# Setup the main platform defines
#-----------------------------------------------------
################################################################################
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions(-DCVF_LINUX)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
@ -16,23 +17,28 @@ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
option (RESINSIGHT_USE_OPENMP "Enable OpenMP parallellization in the code" ON)
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CMAKE_CXX_FLAGS "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat")
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -g3 -O0 -DDEBUG -D_DEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNO_DEBUG")
endif()
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# Linux specific code
set(CMAKE_CXX_FLAGS "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat")
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -g3 -O0 -DDEBUG -D_DEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNO_DEBUG")
#set(CMAKE_EXE_LINKER_FLAGS "-Xlinker -rpath .")
if(RESINSIGHT_USE_OPENMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
endif()
# set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g1")
ELSE()
if(RESINSIGHT_USE_OPENMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp")
endif()
ENDIF()
################################################################################
# OpenMP
################################################################################
option (RESINSIGHT_USE_OPENMP "Enable OpenMP parallellization in the code" ON)
if (RESINSIGHT_USE_OPENMP)
find_package(OpenMP)
if(OPENMP_FOUND)
message(STATUS "Enabling OpenMP support")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
else()
message(STATUS "Disabling OpenMP support")
endif()
endif()
################################################################################
@ -46,8 +52,10 @@ include (ResInsightVersion.cmake)
################################################################################
# Disable install of ERT libs and headers, as Ert code is compiled and linked directly
# into ResInsight
SET(INSTALL_ERT OFF CACHE BOOL "Build ERT without installing")
SET(INSTALL_ERT OFF CACHE BOOL "ERT: Install library")
SET(BUILD_SHARED_LIBS OFF CACHE BOOL "ERT: Build shared libraries")
SET(ERT_USE_OPENMP ${OPENMP_FOUND} CACHE BOOL "ERT: Compile using OpenMP")
add_subdirectory(ThirdParty/Ert/devel)
@ -98,12 +106,12 @@ include_directories(
# Ceetron Application Framework
################################################################################
add_subdirectory(cafProjectDataModel)
add_subdirectory(CommonCode)
add_subdirectory(cafAnimControl)
add_subdirectory(cafViewer)
add_subdirectory(cafUserInterface)
add_subdirectory(cafPdmCvf)
add_subdirectory(Fwk/AppFwk/cafProjectDataModel)
add_subdirectory(Fwk/AppFwk/CommonCode)
add_subdirectory(Fwk/AppFwk/cafAnimControl)
add_subdirectory(Fwk/AppFwk/cafViewer)
add_subdirectory(Fwk/AppFwk/cafUserInterface)
add_subdirectory(Fwk/AppFwk/cafPdmCvf)
include_directories(
${cafUserInterface_SOURCE_DIR}

View File

@ -1,38 +0,0 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include "cvfBase.h"
#include "cvfObject.h"
#include "cvfVector3.h"
namespace cvf {
class StructGridScalarDataAccess : public Object
{
public:
virtual double cellScalar(size_t cellIndex) const = 0;
virtual void setCellScalar(size_t cellIndex, double value) = 0;
};
} // namespace cvf

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include "cafEffectGenerator.h"
#include "cafEffectCache.h"

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include "cvfBase.h"

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include "cafEffectGenerator.h"
#include "cafUtils.h"
@ -43,8 +61,8 @@
namespace caf {
//#############################################################################################################################
//#############################################################################################################################
//=============================================================================================================================
//=============================================================================================================================
static const char light_AmbientDiffuse_inl[] =
" \n"
"varying vec3 v_ecPosition; \n"

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include "cvfBase.h"

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include "cvfBase.h"
#include "cvfTrace.h"

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
class QString;

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include "cafMessagePanel.h"
#include <QtGui/QWidget>

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include <QtGui/QWidget>

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include "cvfBase.h"
#include "cvfMath.h"
#include "cafMouseState.h"

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
class QMouseEvent;

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include "cafUtils.h"
#include <QtCore/QFileInfo>

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
class QLineEdit;

View File

@ -1,23 +1,41 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include "cvfBase.h"
#include "cvfStructGrid.h"

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include "cvfObject.h"

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include "cvfBase.h"
#include "cvfStructGrid.h"

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include "cvfObject.h"

View File

@ -0,0 +1,56 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include "cvfBase.h"
#include "cvfObject.h"
#include "cvfVector3.h"
namespace cvf {
class StructGridScalarDataAccess : public Object
{
public:
virtual double cellScalar(size_t cellIndex) const = 0;
virtual void setCellScalar(size_t cellIndex, double value) = 0;
};
} // namespace cvf

View File

Before

Width:  |  Height:  |  Size: 792 B

After

Width:  |  Height:  |  Size: 792 B

View File

Before

Width:  |  Height:  |  Size: 1017 B

After

Width:  |  Height:  |  Size: 1017 B

View File

Before

Width:  |  Height:  |  Size: 1020 B

After

Width:  |  Height:  |  Size: 1020 B

View File

Before

Width:  |  Height:  |  Size: 1003 B

After

Width:  |  Height:  |  Size: 1003 B

View File

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 540 B

After

Width:  |  Height:  |  Size: 540 B

View File

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 953 B

View File

Before

Width:  |  Height:  |  Size: 956 B

After

Width:  |  Height:  |  Size: 956 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include "cafAnimationToolBar.h"
#include <QAction>

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include <QToolBar>

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include "cafFrameAnimationControl.h"
#include "qtimer.h"

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include <QObject>

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include <QTextStream>
#include "cvfBase.h"

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include <QVariant>
#include <QList>

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include <QTextStream>
// Includes needed for field editor registration

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include <QVariant>
#include <QList>

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include <vector>

View File

@ -1,22 +1,40 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include <assert.h>

Some files were not shown because too many files have changed in this diff Show More