mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Version 0.8.6
This commit is contained in:
@@ -243,14 +243,6 @@ void RIMainWindow::createActions()
|
||||
connect(m_zoomAll, SIGNAL(triggered()), SLOT(slotZoomAll()));
|
||||
|
||||
// Debug actions
|
||||
m_debugUseShaders = new QAction("Use shaders", this);
|
||||
m_debugUseShaders->setCheckable(true);
|
||||
connect(m_debugUseShaders, SIGNAL(triggered(bool)), SLOT(slotUseShaders(bool)));
|
||||
|
||||
m_performanceHud = new QAction("Show Performance Info", this);
|
||||
m_performanceHud->setCheckable(true);
|
||||
connect(m_performanceHud, SIGNAL(triggered(bool)), SLOT(slotShowPerformanceInfo(bool)));
|
||||
|
||||
m_newPropertyView = new QAction("New Property View", this);
|
||||
connect(m_newPropertyView, SIGNAL(triggered()), SLOT(slotNewObjectPropertyView()));
|
||||
|
||||
@@ -309,8 +301,6 @@ void RIMainWindow::createMenus()
|
||||
debugMenu->addAction(m_mockLargeResultsModelAction);
|
||||
debugMenu->addAction(m_mockInputModelAction);
|
||||
debugMenu->addSeparator();
|
||||
debugMenu->addAction(m_debugUseShaders);
|
||||
debugMenu->addAction(m_performanceHud);
|
||||
debugMenu->addAction(m_newPropertyView);
|
||||
|
||||
connect(debugMenu, SIGNAL(aboutToShow()), SLOT(slotRefreshDebugActions()));
|
||||
@@ -1036,8 +1026,6 @@ void RIMainWindow::slotShowPerformanceInfo(bool enable)
|
||||
void RIMainWindow::slotRefreshDebugActions()
|
||||
{
|
||||
RIApplication* app = RIApplication::instance();
|
||||
m_debugUseShaders->setChecked(app->useShaders());
|
||||
m_performanceHud->setChecked(app->showPerformanceInfo());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -128,8 +128,6 @@ private:
|
||||
QAction* m_zoomAll;
|
||||
|
||||
// Debug actions
|
||||
QAction* m_debugUseShaders;
|
||||
QAction* m_performanceHud;
|
||||
QAction* m_newPropertyView;
|
||||
|
||||
// Help actions
|
||||
|
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RIProcessMonitor.h"
|
||||
#include "cafUiProcess.h"
|
||||
#include "RIApplication.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -38,6 +39,15 @@ RIProcessMonitor::RIProcessMonitor(QDockWidget* pParent)
|
||||
pTopLayout->addWidget(pLabel);
|
||||
pTopLayout->addWidget(m_labelStatus);
|
||||
|
||||
pTopLayout->addStretch();
|
||||
QPushButton* clearPushButton = new QPushButton("Clear", this);
|
||||
pTopLayout->addWidget(clearPushButton);
|
||||
connect(clearPushButton, SIGNAL(clicked()), this, SLOT(slotClearTextEdit()) );
|
||||
|
||||
m_terminatePushButton = new QPushButton("Stop", this);
|
||||
pTopLayout->addWidget(m_terminatePushButton);
|
||||
connect(m_terminatePushButton, SIGNAL(clicked()), this, SLOT(slotTerminateProcess()) );
|
||||
m_terminatePushButton->setEnabled(false);
|
||||
|
||||
m_textEdit = new QPlainTextEdit(this);
|
||||
m_textEdit->setReadOnly(true);
|
||||
@@ -72,7 +82,6 @@ RIProcessMonitor::~RIProcessMonitor()
|
||||
void RIProcessMonitor::startMonitorWorkProcess(caf::UiProcess* pProcess)
|
||||
{
|
||||
setStatusMsg("N/A", caf::PROCESS_STATE_NORMAL);
|
||||
m_textEdit->clear();
|
||||
|
||||
if (m_monitoredProcess == pProcess) return;
|
||||
|
||||
@@ -82,6 +91,11 @@ void RIProcessMonitor::startMonitorWorkProcess(caf::UiProcess* pProcess)
|
||||
connect(m_monitoredProcess, SIGNAL(signalStatusMsg(const QString&, int)), SLOT(slotShowProcStatusMsg(const QString&, int)));
|
||||
connect(m_monitoredProcess, SIGNAL(readyReadStandardError()), SLOT(slotProcReadyReadStdErr()));
|
||||
connect(m_monitoredProcess, SIGNAL(readyReadStandardOutput()), SLOT(slotProcReadyReadStdOut()));
|
||||
|
||||
m_terminatePushButton->setEnabled(true);
|
||||
|
||||
QString timeStamp = QTime::currentTime().toString("hh:mm:ss");
|
||||
addStringToLog(timeStamp + " Process starting\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +106,12 @@ void RIProcessMonitor::stopMonitorWorkProcess()
|
||||
{
|
||||
m_monitoredProcess = NULL;
|
||||
|
||||
m_terminatePushButton->setEnabled(false);
|
||||
|
||||
setStatusMsg("N/A", caf::PROCESS_STATE_NORMAL);
|
||||
|
||||
QString timeStamp = QTime::currentTime().toString("hh:mm:ss");
|
||||
addStringToLog(timeStamp + " Process finished\n\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -166,3 +185,22 @@ void RIProcessMonitor::slotProcReadyReadStdErr()
|
||||
addStringToLog(dataArray.data());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RIProcessMonitor::slotTerminateProcess()
|
||||
{
|
||||
addStringToLog("Process terminated by user\n");
|
||||
|
||||
RIApplication* app = RIApplication::instance();
|
||||
app->terminateProcess();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RIProcessMonitor::slotClearTextEdit()
|
||||
{
|
||||
m_textEdit->clear();
|
||||
}
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
class QDockWidget;
|
||||
class QLabel;
|
||||
class QPlainTextEdit;
|
||||
class QPushButton;
|
||||
|
||||
namespace caf
|
||||
{
|
||||
@@ -40,6 +41,7 @@ class RIProcessMonitor : public QWidget
|
||||
private:
|
||||
QLabel* m_labelStatus; // Shows current status string
|
||||
QPlainTextEdit* m_textEdit; // Showing the textual output from the process
|
||||
QPushButton* m_terminatePushButton;
|
||||
|
||||
caf::UiProcess* m_monitoredProcess; // Pointer to the process we're monitoring. Needed to fetch text
|
||||
|
||||
@@ -58,5 +60,7 @@ private slots:
|
||||
void slotShowProcStatusMsg(const QString& message, int messageType);
|
||||
void slotProcReadyReadStdOut();
|
||||
void slotProcReadyReadStdErr();
|
||||
void slotTerminateProcess();
|
||||
void slotClearTextEdit();
|
||||
};
|
||||
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include "cafUtils.h"
|
||||
#include "cafFrameAnimationControl.h"
|
||||
#include "cafNavigationPolicy.h"
|
||||
#include "cafEffectGenerator.h"
|
||||
|
||||
using cvf::ManipulatorTrackball;
|
||||
|
||||
@@ -255,6 +256,8 @@ void RIViewer::slotEndAnimation()
|
||||
if (m_reservoirView) m_reservoirView->endAnimation();
|
||||
|
||||
caf::Viewer::slotEndAnimation();
|
||||
|
||||
caf::EffectGenerator::releaseUnreferencedEffects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user