mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
73 lines
2.5 KiB
C++
73 lines
2.5 KiB
C++
// Created on: 2019-02-25
|
|
// Created by: Natalia ERMOLAEVA
|
|
// Copyright (c) 2019 OPEN CASCADE SAS
|
|
//
|
|
// This file is part of Open CASCADE Technology software library.
|
|
//
|
|
// This library is free software; you can redistribute it and/or modify it under
|
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
|
// by the Free Software Foundation, with special exception defined in the file
|
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
// distribution for complete text of the license and disclaimer of any warranty.
|
|
//
|
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
// commercial license or contractual agreement.
|
|
|
|
#ifndef ShapeView_ItemPropertiesFace_H
|
|
#define ShapeView_ItemPropertiesFace_H
|
|
|
|
#include <Standard.hxx>
|
|
#include <TopoDS_Shape.hxx>
|
|
|
|
#include <inspector/TreeModel_ItemProperties.hxx>
|
|
#include <inspector/TreeModel_ItemBase.hxx>
|
|
|
|
#include <Standard_WarningsDisable.hxx>
|
|
#include <QAbstractTableModel>
|
|
#include <QColor>
|
|
#include <QList>
|
|
#include <QModelIndexList>
|
|
#include <QVariant>
|
|
#include <Standard_WarningsRestore.hxx>
|
|
|
|
class QItemDelegate;
|
|
|
|
DEFINE_STANDARD_HANDLE (ShapeView_ItemPropertiesFace, TreeModel_ItemProperties)
|
|
|
|
//! \class ShapeView_ItemPropertiesFace
|
|
//! \brief This is an interace for ViewControl_TableModel to give real values of the model
|
|
//! It should be filled or redefined.
|
|
class ShapeView_ItemPropertiesFace : public TreeModel_ItemProperties
|
|
{
|
|
public:
|
|
|
|
//! Constructor
|
|
Standard_EXPORT ShapeView_ItemPropertiesFace (const TreeModel_ItemBasePtr& theItem)
|
|
: TreeModel_ItemProperties (theItem) {}
|
|
|
|
//! Destructor
|
|
virtual ~ShapeView_ItemPropertiesFace() {}
|
|
|
|
//! Returns number of rows, depending on orientation: myColumnCount or size of values container
|
|
//! \param theParent an index of the parent item
|
|
//! \return an integer value
|
|
Standard_EXPORT virtual int GetTableRowCount() const Standard_OVERRIDE;
|
|
|
|
//! Returns content of the model index for the given role, it is obtained from internal container of values
|
|
//! It returns value only for DisplayRole.
|
|
//! \param theRow a model index row
|
|
//! \param theColumn a model index column
|
|
//! \param theRole a view role
|
|
//! \return value intepreted depending on the given role
|
|
Standard_EXPORT virtual QVariant GetTableData (const int theRow, const int theColumn, const int theRole = Qt::DisplayRole) const Standard_OVERRIDE;
|
|
|
|
DEFINE_STANDARD_RTTIEXT (ShapeView_ItemPropertiesFace, TreeModel_ItemProperties)
|
|
|
|
protected:
|
|
//! Returns item shape
|
|
TopoDS_Shape getItemShape() const;
|
|
|
|
};
|
|
|
|
#endif
|