2015-11-18 02:35:38 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2015-11-18 02:35:38 -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
|
|
|
//
|
2015-11-18 02:35:38 -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>
|
2015-11-18 02:35:38 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-04-12 02:08:38 -05:00
|
|
|
#include <QIcon>
|
2024-04-16 07:22:15 -05:00
|
|
|
#include <QStringList>
|
|
|
|
|
2017-11-18 18:12:39 -06:00
|
|
|
#include <vector>
|
2015-11-18 02:35:38 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
namespace caf
|
|
|
|
{
|
|
|
|
class CmdFeatureMenuBuilder;
|
2017-11-18 18:12:39 -06:00
|
|
|
}
|
2019-04-12 02:08:38 -05:00
|
|
|
|
|
|
|
class QString;
|
2015-11-19 11:57:32 -06:00
|
|
|
class QMenu;
|
2017-11-18 18:12:39 -06:00
|
|
|
class RimWellPath;
|
|
|
|
class RimScriptCollection;
|
2019-09-29 05:31:21 -05:00
|
|
|
class RimPlotTemplateFolderItem;
|
2015-11-19 11:57:32 -06:00
|
|
|
|
2015-11-18 02:35:38 -06:00
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
|
|
|
///
|
2015-11-18 02:35:38 -06:00
|
|
|
//==================================================================================================
|
|
|
|
class RimContextCommandBuilder
|
|
|
|
{
|
|
|
|
public:
|
2019-09-06 03:40:57 -05:00
|
|
|
static caf::CmdFeatureMenuBuilder commandsFromSelection();
|
2017-11-18 18:12:39 -06:00
|
|
|
|
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
static std::vector<RimWellPath*> allWellPaths();
|
|
|
|
static void createExecuteScriptForCasesFeatureMenu( caf::CmdFeatureMenuBuilder& menuBuilder );
|
2019-09-29 05:31:21 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static void appendScriptItems( caf::CmdFeatureMenuBuilder& menuBuilder, RimScriptCollection* scriptCollection );
|
2023-02-26 03:48:40 -06:00
|
|
|
static void appendPlotTemplateItems( caf::CmdFeatureMenuBuilder& menuBuilder, RimPlotTemplateFolderItem* plotTemplateRoot );
|
2019-04-08 04:04:21 -05:00
|
|
|
|
2024-05-27 04:24:00 -05:00
|
|
|
static int appendImportMenu( caf::CmdFeatureMenuBuilder& menuBuilder, bool addSeparatorBeforeMenu = false, bool addOsduMenuItem = false );
|
2019-09-06 03:40:57 -05:00
|
|
|
static int appendCreateCompletions( caf::CmdFeatureMenuBuilder& menuBuilder, bool addSeparatorBeforeMenu = false );
|
|
|
|
static int appendExportCompletions( caf::CmdFeatureMenuBuilder& menuBuilder, bool addSeparatorBeforeMenu = false );
|
|
|
|
static int appendExportWellPaths( caf::CmdFeatureMenuBuilder& menuBuilder, bool addSeparatorBeforeMenu = false );
|
|
|
|
static int appendSubMenuWithCommands( caf::CmdFeatureMenuBuilder& menuBuilder,
|
|
|
|
const QStringList& commandCandidates,
|
|
|
|
const QString& menuLabel,
|
|
|
|
const QIcon& menuIcon = QIcon(),
|
|
|
|
bool addSeparatorBeforeMenu = false );
|
2015-11-18 02:35:38 -06:00
|
|
|
};
|