2018-12-19 07:41:17 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2019-01-09 08:21:38 -06:00
|
|
|
// Copyright (C) 2018- Equinor ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2018-12-19 07:41:17 -06:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2018-12-19 07:41:17 -06:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2018-12-19 07:41:17 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cafCmdFeature.h"
|
|
|
|
|
|
|
|
class RimMeasurement;
|
|
|
|
class Rim3dView;
|
2018-12-21 02:23:53 -06:00
|
|
|
class QObject;
|
|
|
|
class RiuMeasurementViewEventFilter;
|
|
|
|
|
2018-12-19 07:41:17 -06:00
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-12-19 07:41:17 -06:00
|
|
|
//==================================================================================================
|
|
|
|
class RicToggleMeasurementModeFeature : public caf::CmdFeature
|
|
|
|
{
|
|
|
|
CAF_CMD_HEADER_INIT;
|
|
|
|
|
2019-03-27 07:08:13 -05:00
|
|
|
void refreshActionLook();
|
|
|
|
|
2018-12-19 07:41:17 -06:00
|
|
|
protected:
|
2023-06-26 07:28:46 -05:00
|
|
|
bool isCommandEnabled() const override;
|
2018-12-19 07:41:17 -06:00
|
|
|
void onActionTriggered( bool isChecked ) override;
|
2019-09-06 03:40:57 -05:00
|
|
|
void setupActionLook( QAction* actionToSetup ) override;
|
2023-06-26 07:28:46 -05:00
|
|
|
bool isCommandChecked() const override;
|
2019-01-08 07:51:45 -06:00
|
|
|
|
2019-03-26 08:05:05 -05:00
|
|
|
protected:
|
2018-12-19 07:41:17 -06:00
|
|
|
RimMeasurement* measurement() const;
|
2019-09-06 03:40:57 -05:00
|
|
|
Rim3dView* activeView() const;
|
2019-03-27 07:08:13 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
void refreshPolyMeasuremeantActionLook();
|
2018-12-19 07:41:17 -06:00
|
|
|
};
|
2019-03-26 08:05:05 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
|
|
|
class RicTogglePolyMeasurementModeFeature : public RicToggleMeasurementModeFeature
|
|
|
|
{
|
|
|
|
CAF_CMD_HEADER_INIT;
|
|
|
|
|
|
|
|
protected:
|
2019-09-06 03:40:57 -05:00
|
|
|
void onActionTriggered( bool isChecked ) override;
|
|
|
|
void setupActionLook( QAction* actionToSetup ) override;
|
2023-06-26 07:28:46 -05:00
|
|
|
bool isCommandChecked() const override;
|
2019-03-26 08:05:05 -05:00
|
|
|
|
2019-03-27 07:08:13 -05:00
|
|
|
private:
|
|
|
|
void refreshMeasurementActionLook();
|
2019-03-26 08:05:05 -05:00
|
|
|
};
|