(#379)(#377) Moved store/restore of tree view state to new tree

Also refactored slotCreateCommandObject
This commit is contained in:
Jacob Støren
2015-08-17 09:38:27 +02:00
parent 2f49415d3f
commit bb2eda3e73
6 changed files with 179 additions and 149 deletions

View File

@@ -0,0 +1,18 @@
#pragma once
#include <QModelIndex>
class QTreeView;
class QString;
class QAbstractItemModel;
class RimTreeViewStateSerializer
{
public:
static void applyTreeViewStateFromString(QTreeView* treeView, const QString& treeViewState);
static void storeTreeViewStateToString (const QTreeView* treeView, QString& treeViewState);
static QModelIndex getModelIndexFromString(QAbstractItemModel* model, const QString& currentIndexString);
static void encodeStringFromModelIndex(const QModelIndex mi, QString& currentIndexString);
};