ResInsight/Fwk/AppFwk/cafUserInterface/cafQTreeViewStateSerializer.h

40 lines
1.3 KiB
C
Raw Normal View History

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2017 Statoil ASA
2020-06-19 00:53:59 -05: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.
2020-06-19 00:53:59 -05: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.
2020-06-19 00:53:59 -05:00
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
2020-06-19 00:53:59 -05:00
#include <QModelIndex>
class QTreeView;
class QString;
class QAbstractItemModel;
namespace caf
{
class QTreeViewStateSerializer
{
public:
2020-06-19 00:53:59 -05:00
static void applyTreeViewStateFromString( QTreeView* treeView, const QString& treeViewState );
static void storeTreeViewStateToString( const QTreeView* treeView, QString& treeViewState );
2020-06-19 00:53:59 -05:00
static QModelIndex getModelIndexFromString( QAbstractItemModel* model, const QString& currentIndexString );
static void encodeStringFromModelIndex( const QModelIndex mi, QString& currentIndexString );
};
} // End namespace caf