Added context menu used to execute a script for multiple cases

For all selected cases, set current case and launch an external Octave process using this current case
p4#: 21742
This commit is contained in:
Magne Sjaastad
2013-05-27 15:38:03 +02:00
parent fe8c155b44
commit fa161607a1
6 changed files with 230 additions and 28 deletions

View File

@@ -24,6 +24,7 @@
class QItemSelection;
class RimIdenticalGridCaseGroup;
class RimScriptCollection;
namespace caf {
class PdmObjectGroup;
@@ -48,8 +49,8 @@ public:
void populateObjectGroupFromModelIndexList(const QModelIndexList& modelIndexList, caf::PdmObjectGroup* objectGroup);
static void applyCurrentIndexFromString(QAbstractItemView& itemView, const QString& currentIndexString);
static void storeCurrentIndexToString(const QAbstractItemView& itemView, QString& currentIndexString);
static QModelIndex getModelIndexFromString(QAbstractItemModel* model, const QString& currentIndexString);
static void encodeStringFromModelIndex(const QModelIndex mi, QString& currentIndexString);
protected:
void contextMenuEvent(QContextMenuEvent* event);
@@ -70,6 +71,7 @@ private slots:
void slotEditScript();
void slotNewScript();
void slotExecuteScript();
void slotExecuteScriptForSelectedCases();
void slotAddView();
void slotDeleteView();
@@ -128,6 +130,8 @@ private:
void appendToggleItemActions(QMenu& contextMenu);
void setExpandedUpToRoot(const QModelIndex& itemIndex);
void appendScriptItems(QMenu* menu, RimScriptCollection* scriptCollection);
private:
QAction* m_pasteAction;
};