2014-09-10 17:27:45 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file vpropertytreeview.h
|
|
|
|
** @author hedgeware <internal(at)hedgeware.net>
|
|
|
|
** @date
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
|
|
|
** All rights reserved. This program and the accompanying materials
|
|
|
|
** are made available under the terms of the GNU Lesser General Public License
|
|
|
|
** (LGPL) version 2.1 which accompanies this distribution, and is available at
|
|
|
|
** http://www.gnu.org/licenses/lgpl-2.1.html
|
|
|
|
**
|
|
|
|
** This library 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
|
|
|
|
** Lesser General Public License for more details.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
#ifndef VPROPERTYTREEVIEW_H
|
|
|
|
#define VPROPERTYTREEVIEW_H
|
|
|
|
|
2016-08-08 13:44:49 +02:00
|
|
|
#include <qcompilerdetection.h>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
2014-09-10 17:27:45 +02:00
|
|
|
#include <QTreeView>
|
2016-08-08 13:44:49 +02:00
|
|
|
#include <QtGlobal>
|
|
|
|
|
2014-09-10 17:27:45 +02:00
|
|
|
#include "vpropertyexplorer_global.h"
|
|
|
|
|
2014-09-10 19:57:08 +02:00
|
|
|
namespace VPE
|
|
|
|
{
|
2014-09-10 17:27:45 +02:00
|
|
|
|
|
|
|
class VPROPERTYEXPLORERSHARED_EXPORT VPropertyDelegate;
|
|
|
|
class VPROPERTYEXPLORERSHARED_EXPORT VPropertyModel;
|
2016-08-08 13:44:49 +02:00
|
|
|
class VPropertyTreeViewPrivate;
|
2014-09-10 17:27:45 +02:00
|
|
|
|
|
|
|
class VPROPERTYEXPLORERSHARED_EXPORT VPropertyTreeView : public QTreeView
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
//! Default constructor
|
2017-07-05 18:35:34 +02:00
|
|
|
explicit VPropertyTreeView(QWidget *parent = nullptr);
|
2014-09-10 17:27:45 +02:00
|
|
|
|
|
|
|
//! The destructor, taking a model and setting it to the tree view
|
2014-10-03 13:40:39 +02:00
|
|
|
//! \param model The model to set as model for this tree view
|
2017-07-05 18:35:34 +02:00
|
|
|
explicit VPropertyTreeView(VPropertyModel* model, QWidget *parent = nullptr);
|
2014-09-10 17:27:45 +02:00
|
|
|
|
|
|
|
//! Destructor
|
2018-06-26 14:53:48 +02:00
|
|
|
virtual ~VPropertyTreeView() override;
|
2014-09-10 17:27:45 +02:00
|
|
|
|
|
|
|
//! Sets the height for each row. Set this to 0 in order to let the standard delegate decide
|
|
|
|
void setRowHeight(int height = 0, bool add_to_standard = false);
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
//! This method is called by the constructors to initialize the view
|
|
|
|
virtual void init();
|
|
|
|
|
|
|
|
//! protected constructor
|
2017-07-05 18:35:34 +02:00
|
|
|
VPropertyTreeView(VPropertyTreeViewPrivate* d, bool init_, QWidget *parent = nullptr);
|
2014-09-10 17:27:45 +02:00
|
|
|
|
|
|
|
//! The protected data
|
|
|
|
VPropertyTreeViewPrivate* d_ptr;
|
2014-09-20 18:05:21 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY(VPropertyTreeView)
|
2014-09-10 17:27:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // VPROPERTYTREEVIEWEEVIEW_H
|