mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#851 Added "Open 3D Window" tool button in plot window. Raise mainWindow when activated from toolbar
This commit is contained in:
@@ -48,6 +48,7 @@ ${CEE_CURRENT_LIST_DIR}RicTogglePerspectiveViewFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicTileWindowsFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicTilePlotWindowsFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicShowPlotWindowFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicShowMainWindowFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicLaunchUnitTestsFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicExportToLasFileFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicExportToLasFileResampleUi.h
|
||||
@@ -104,6 +105,7 @@ ${CEE_CURRENT_LIST_DIR}RicTogglePerspectiveViewFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicTileWindowsFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicTilePlotWindowsFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicShowPlotWindowFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicShowMainWindowFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicLaunchUnitTestsFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicExportToLasFileFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicExportToLasFileResampleUi.cpp
|
||||
|
||||
54
ApplicationCode/Commands/RicShowMainWindowFeature.cpp
Normal file
54
ApplicationCode/Commands/RicShowMainWindowFeature.cpp
Normal file
@@ -0,0 +1,54 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016 Statoil ASA
|
||||
//
|
||||
// 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 "RicShowMainWindowFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicShowMainWindowFeature, "RicShowMainWindowFeature");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowMainWindowFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowMainWindowFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RiuMainWindow* mainWnd = RiuMainWindow::instance();
|
||||
mainWnd->show();
|
||||
mainWnd->raise();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowMainWindowFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setText("Open 3D Window");
|
||||
actionToSetup->setIcon(QIcon(":/ReservoirView.png"));
|
||||
}
|
||||
38
ApplicationCode/Commands/RicShowMainWindowFeature.h
Normal file
38
ApplicationCode/Commands/RicShowMainWindowFeature.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016 Statoil ASA
|
||||
//
|
||||
// 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 "cafCmdFeature.h"
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicShowMainWindowFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
// Overrides
|
||||
virtual bool isCommandEnabled();
|
||||
virtual void onActionTriggered( bool isChecked );
|
||||
virtual void setupActionLook( QAction* actionToSetup );
|
||||
};
|
||||
|
||||
|
||||
@@ -45,6 +45,6 @@ void RicShowPlotWindowFeature::onActionTriggered(bool isChecked)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowPlotWindowFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setText("Show Plot Window");
|
||||
actionToSetup->setText("Open Plot Window");
|
||||
actionToSetup->setIcon(QIcon(":/SummaryPlots16x16.png"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user