mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
Coding - Apply .clang-format formatting #286
Update empty method guards to new style with regex (see PR). Used clang-format 18.1.8. New actions to validate code formatting is added. Update .clang-format with disabling of include sorting. It is temporary changes, then include will be sorted. Apply formatting for /src and /tools folder. The files with .hxx,.cxx,.lxx,.h,.pxx,.hpp,*.cpp extensions.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
// 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.
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_AttributePane_H
|
||||
#define DFBrowserPane_AttributePane_H
|
||||
@@ -35,13 +35,13 @@ class QItemSelectionModel;
|
||||
|
||||
//! \class DFBrowserPane_AttributePane
|
||||
//! \brief This is an extension of base attribute pane:
|
||||
//! - GetWidget() creates table view, view model and selection model. Table is vertical with one column.
|
||||
//! - GetWidget() creates table view, view model and selection model. Table is vertical with one
|
||||
//! column.
|
||||
//! - Init() obtains GetValues and give it to the table view model
|
||||
//! If standard pane with such a table is used, only GetValues() should be redefined in children
|
||||
class DFBrowserPane_AttributePane : public DFBrowserPane_AttributePaneAPI
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPane_AttributePane();
|
||||
|
||||
@@ -57,7 +57,8 @@ public:
|
||||
//! \param theParent a parent widget
|
||||
//! \param isToCreate flag if the widget should be created if it is NULL
|
||||
//! \return pane widget
|
||||
Standard_EXPORT virtual QWidget* GetWidget(QWidget* theParent, const bool isToCreate) Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual QWidget* GetWidget(QWidget* theParent,
|
||||
const bool isToCreate) Standard_OVERRIDE;
|
||||
|
||||
//! Gets values of attribute using GetValues() and Init the view model
|
||||
//! \param theAttribute a current attribute
|
||||
@@ -66,34 +67,43 @@ public:
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
virtual void GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{ (void)theAttribute; (void)theValues; };
|
||||
virtual void GetValues(const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
(void)theAttribute;
|
||||
(void)theValues;
|
||||
};
|
||||
|
||||
//! Returns common information for the given attribute kind
|
||||
//! \param theAttributeName a kind of attribute
|
||||
//! \param theRole a role of information, used by tree model (e.g. DisplayRole, icon, background and so on)
|
||||
//! \param theColumnId a tree model column
|
||||
//! \return value, interpreted by tree model depending on the role
|
||||
Standard_EXPORT static QVariant GetAttributeInfoByType(Standard_CString theAttributeName, int theRole, int theColumnId);
|
||||
//! \param theRole a role of information, used by tree model (e.g. DisplayRole, icon, background
|
||||
//! and so on) \param theColumnId a tree model column \return value, interpreted by tree model
|
||||
//! depending on the role
|
||||
Standard_EXPORT static QVariant GetAttributeInfoByType(Standard_CString theAttributeName,
|
||||
int theRole,
|
||||
int theColumnId);
|
||||
|
||||
//! Returns information for the given attribute
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theRole a role of information, used by tree model (e.g. DisplayRole, icon, background and so on)
|
||||
//! \param theColumnId a tree model column
|
||||
//! \return value, interpreted by tree model depending on the role
|
||||
Standard_EXPORT virtual QVariant GetAttributeInfo(const Handle(TDF_Attribute)& theAttribute, int theRole, int theColumnId);
|
||||
//! \param theRole a role of information, used by tree model (e.g. DisplayRole, icon, background
|
||||
//! and so on) \param theColumnId a tree model column \return value, interpreted by tree model
|
||||
//! depending on the role
|
||||
Standard_EXPORT virtual QVariant GetAttributeInfo(const Handle(TDF_Attribute)& theAttribute,
|
||||
int theRole,
|
||||
int theColumnId);
|
||||
|
||||
//! Returns brief attribute information. In general case, it returns even values of GetValues() result.
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a result list of values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues);
|
||||
//! Returns brief attribute information. In general case, it returns even values of GetValues()
|
||||
//! result. \param theAttribute a current attribute \param theValues a result list of values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo(const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues);
|
||||
|
||||
//! Returns list of selection models. In default implementation it contains a selection model for the table view
|
||||
//! \returns container of models
|
||||
virtual std::list<QItemSelectionModel*> GetSelectionModels() Standard_OVERRIDE { return mySelectionModels; }
|
||||
//! Returns list of selection models. In default implementation it contains a selection model for
|
||||
//! the table view \returns container of models
|
||||
virtual std::list<QItemSelectionModel*> GetSelectionModels() Standard_OVERRIDE
|
||||
{
|
||||
return mySelectionModels;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//! Returns converted table view model
|
||||
Standard_EXPORT DFBrowserPane_AttributePaneModel* getPaneModel() const;
|
||||
|
||||
@@ -103,11 +113,14 @@ protected:
|
||||
//! Returns header text values for 0...n table cells in parameter orientation
|
||||
//! \param theOrientation defines horizontal or vertical values
|
||||
//! \param theValues output container of values
|
||||
virtual QList<QVariant> getHeaderValues (const Qt::Orientation theOrientation)
|
||||
{ (void)theOrientation; return QList<QVariant>(); }
|
||||
virtual QList<QVariant> getHeaderValues(const Qt::Orientation theOrientation)
|
||||
{
|
||||
(void)theOrientation;
|
||||
return QList<QVariant>();
|
||||
}
|
||||
|
||||
//! Returns number of columns in internal table. By default it returns 2 : method name for method value.
|
||||
//! \return integer value
|
||||
//! Returns number of columns in internal table. By default it returns 2 : method name for method
|
||||
//! value. \return integer value
|
||||
virtual int getColumnCount() const { return 2; }
|
||||
|
||||
//! Defines widths of table columns
|
||||
@@ -115,10 +128,10 @@ protected:
|
||||
Standard_EXPORT virtual QMap<int, int> getTableColumnWidths() const;
|
||||
|
||||
protected:
|
||||
|
||||
QWidget* myMainWidget; //!< widget created in this pane
|
||||
DFBrowserPane_TableView* myTableView; //!< table for visualization of attribute parameters
|
||||
QAbstractTableModel* myPaneModel; //!< table view model. It is created before the table view, so we need to cache it
|
||||
QWidget* myMainWidget; //!< widget created in this pane
|
||||
DFBrowserPane_TableView* myTableView; //!< table for visualization of attribute parameters
|
||||
QAbstractTableModel*
|
||||
myPaneModel; //!< table view model. It is created before the table view, so we need to cache it
|
||||
std::list<QItemSelectionModel*> mySelectionModels; //! selection models
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user