mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#355) Removed source code files for old project tree view
This commit is contained in:
@@ -21,7 +21,6 @@
|
|||||||
#include "RimScriptCollection.h"
|
#include "RimScriptCollection.h"
|
||||||
|
|
||||||
#include "RimCalcScript.h"
|
#include "RimCalcScript.h"
|
||||||
#include "RimUiTreeModelPdm.h"
|
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
|
|
||||||
#include "cafPdmUiFilePathEditor.h"
|
#include "cafPdmUiFilePathEditor.h"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,103 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Copyright (C) 2011- Statoil ASA
|
|
||||||
// Copyright (C) 2013- Ceetron Solutions AS
|
|
||||||
// Copyright (C) 2011-2012 Ceetron AS
|
|
||||||
//
|
|
||||||
// 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 "cafPdmObject.h"
|
|
||||||
#include "cafPdmPointer.h"
|
|
||||||
#include "cafPdmObjectGroup.h"
|
|
||||||
#include "cafUiTreeModelPdm.h"
|
|
||||||
|
|
||||||
class QFileSystemWatcher;
|
|
||||||
|
|
||||||
class RimEclipsePropertyFilter;
|
|
||||||
class RimCellRangeFilter;
|
|
||||||
class RimGeoMechPropertyFilter;
|
|
||||||
class RimEclipseCase;
|
|
||||||
class RimEclipseView;
|
|
||||||
class RimEclipseInputProperty;
|
|
||||||
class RimEclipseStatisticsCase;
|
|
||||||
class RimIdenticalGridCaseGroup;
|
|
||||||
|
|
||||||
class RimView;
|
|
||||||
|
|
||||||
|
|
||||||
//==================================================================================================
|
|
||||||
///
|
|
||||||
///
|
|
||||||
//==================================================================================================
|
|
||||||
class RimUiTreeModelPdm : public caf::UiTreeModelPdm
|
|
||||||
{
|
|
||||||
Q_OBJECT;
|
|
||||||
|
|
||||||
public:
|
|
||||||
RimUiTreeModelPdm(QObject* parent);
|
|
||||||
|
|
||||||
// Special edit methods
|
|
||||||
bool deleteRangeFilter(const QModelIndex& itemIndex);
|
|
||||||
bool deletePropertyFilter(const QModelIndex& itemIndex);
|
|
||||||
bool deleteGeoMechPropertyFilter(const QModelIndex& itemIndex);
|
|
||||||
|
|
||||||
void deleteInputProperty(const QModelIndex& itemIndex);
|
|
||||||
void deleteReservoir(RimEclipseCase* reservoir);
|
|
||||||
void deleteAllWellPaths(const QModelIndex& itemIndex);
|
|
||||||
|
|
||||||
RimEclipsePropertyFilter* addPropertyFilter(const QModelIndex& itemIndex, QModelIndex& insertedModelIndex);
|
|
||||||
RimGeoMechPropertyFilter* addGeoMechPropertyFilter(const QModelIndex& itemIndex, QModelIndex& insertedModelIndex);
|
|
||||||
RimCellRangeFilter* addRangeFilter(const QModelIndex& itemIndex, QModelIndex& insertedModelIndex);
|
|
||||||
|
|
||||||
RimView* addReservoirView(const std::vector<caf::PdmUiItem*>& treeSelection);
|
|
||||||
void deleteReservoirViews(const std::vector<caf::PdmUiItem*>& treeSelection);
|
|
||||||
void deleteGeoMechCases(const std::vector<caf::PdmUiItem*>& treeSelection);
|
|
||||||
|
|
||||||
void addInputProperty(const QModelIndex& itemIndex, const QStringList& fileNames);
|
|
||||||
|
|
||||||
void addToParentAndBuildUiItems(caf::PdmUiTreeItem* parentTreeItem, int position, caf::PdmObject* pdmObject);
|
|
||||||
|
|
||||||
void populateObjectGroupFromModelIndexList(const QModelIndexList& modelIndexList, caf::PdmObjectGroup* objectGroup);
|
|
||||||
void addObjects(const QModelIndex& itemIndex, const caf::PdmObjectGroup& pdmObjects);
|
|
||||||
void moveObjects(const QModelIndex& itemIndex, caf::PdmObjectGroup& pdmObjects);
|
|
||||||
|
|
||||||
RimEclipseStatisticsCase* addStatisticalCalculation(const QModelIndex& itemIndex, QModelIndex& insertedModelIndex);
|
|
||||||
RimIdenticalGridCaseGroup* addCaseGroup(QModelIndex& insertedModelIndex);
|
|
||||||
|
|
||||||
bool deleteObjectFromPdmChildArrayField(const QModelIndex& itemIndex);
|
|
||||||
|
|
||||||
void updateScriptPaths();
|
|
||||||
|
|
||||||
virtual Qt::DropActions supportedDropActions() const;
|
|
||||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
|
||||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
|
||||||
virtual QMimeData* mimeData(const QModelIndexList &indexes) const;
|
|
||||||
virtual QStringList mimeTypes() const;
|
|
||||||
|
|
||||||
RimIdenticalGridCaseGroup* gridCaseGroupFromItemIndex(const QModelIndex& itemIndex);
|
|
||||||
void setObjectToggleStateForSelection(QModelIndexList selectedIndexes, int state);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotRefreshScriptTree(QString path);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void clearClipboard();
|
|
||||||
RimEclipseCase* caseFromItemIndex(const QModelIndex& itemIndex);
|
|
||||||
private:
|
|
||||||
QFileSystemWatcher* m_scriptChangeDetector;
|
|
||||||
};
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,139 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
|
||||||
//
|
|
||||||
// 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 "cafPdmObject.h"
|
|
||||||
|
|
||||||
#include <QTreeView>
|
|
||||||
|
|
||||||
class QItemSelection;
|
|
||||||
class RimIdenticalGridCaseGroup;
|
|
||||||
class RimScriptCollection;
|
|
||||||
|
|
||||||
namespace caf {
|
|
||||||
class PdmObjectGroup;
|
|
||||||
}
|
|
||||||
|
|
||||||
//==================================================================================================
|
|
||||||
///
|
|
||||||
///
|
|
||||||
//==================================================================================================
|
|
||||||
class RimUiTreeView : public QTreeView
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
RimUiTreeView(QWidget *parent = 0);
|
|
||||||
~RimUiTreeView();
|
|
||||||
|
|
||||||
virtual void setModel(QAbstractItemModel* model);
|
|
||||||
|
|
||||||
void selectedUiItems(std::vector<caf::PdmUiItem*>& objects);
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void contextMenuEvent(QContextMenuEvent* event);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotAddChildItem();
|
|
||||||
void slotDeleteItem();
|
|
||||||
|
|
||||||
void slotAddRangeFilter();
|
|
||||||
void slotAddSliceFilterI();
|
|
||||||
void slotAddSliceFilterJ();
|
|
||||||
void slotAddSliceFilterK();
|
|
||||||
void slotDeleteRangeFilter();
|
|
||||||
|
|
||||||
void slotAddPropertyFilter();
|
|
||||||
void slotDeletePropertyFilter();
|
|
||||||
void slotAddGeoMechPropertyFilter();
|
|
||||||
void slotDeleteGeoMechPropertyFilter();
|
|
||||||
|
|
||||||
void slotEditScript();
|
|
||||||
void slotNewScript();
|
|
||||||
void slotExecuteScript();
|
|
||||||
void slotExecuteScriptForSelectedCases();
|
|
||||||
|
|
||||||
void slotAddView();
|
|
||||||
void slotDeleteView();
|
|
||||||
|
|
||||||
void slotAddInputProperty();
|
|
||||||
void slotDeleteObjectFromContainer();
|
|
||||||
void slotWriteInputProperty();
|
|
||||||
void slotWriteBinaryResultAsInputProperty();
|
|
||||||
|
|
||||||
void slotCloseCase();
|
|
||||||
void slotCloseGeomechCase();
|
|
||||||
|
|
||||||
void slotNewStatisticsCase();
|
|
||||||
void slotComputeStatistics();
|
|
||||||
|
|
||||||
void slotAddCaseGroup();
|
|
||||||
void slotDeleteObjectFromPdmChildArrayField();
|
|
||||||
|
|
||||||
void slotAddScriptPath();
|
|
||||||
void slotDeleteScriptPath();
|
|
||||||
|
|
||||||
void slotCopyPdmObjectToClipboard();
|
|
||||||
void slotPastePdmObjects();
|
|
||||||
|
|
||||||
void slotSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
|
|
||||||
|
|
||||||
void slotToggleItems();
|
|
||||||
void slotToggleItemsOn();
|
|
||||||
void slotToggleItemsOff();
|
|
||||||
|
|
||||||
void slotDeleteAllWellPaths();
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void selectedObjectChanged( caf::PdmObjectHandle* pdmObject );
|
|
||||||
|
|
||||||
public:
|
|
||||||
enum SelectionToggleType
|
|
||||||
{
|
|
||||||
TOGGLE_ON,
|
|
||||||
TOGGLE_OFF,
|
|
||||||
TOGGLE,
|
|
||||||
TOGGLE_UNDEFINED
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool userConfirmedGridCaseGroupChange(const QModelIndexList& itemIndexList);
|
|
||||||
bool hasAnyStatisticsResults(RimIdenticalGridCaseGroup* gridCaseGroup);
|
|
||||||
|
|
||||||
void createPdmObjectsFromClipboard(caf::PdmObjectGroup* objectGroup);
|
|
||||||
bool hasClipboardValidData();
|
|
||||||
|
|
||||||
virtual void keyPressEvent(QKeyEvent* keyEvent);
|
|
||||||
virtual void mousePressEvent(QMouseEvent* mouseEvent);
|
|
||||||
|
|
||||||
virtual void dropEvent(QDropEvent* dropEvent);
|
|
||||||
|
|
||||||
void executeSelectionToggleOperation(SelectionToggleType toggleState);
|
|
||||||
void appendToggleItemActions(QMenu& contextMenu);
|
|
||||||
|
|
||||||
void setExpandedUpToRoot(const QModelIndex& itemIndex);
|
|
||||||
|
|
||||||
void appendScriptItems(QMenu* menu, RimScriptCollection* scriptCollection);
|
|
||||||
private:
|
|
||||||
QAction* m_pasteAction;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user