mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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 DFBrowser_Item_H
|
||||
#define DFBrowser_Item_H
|
||||
@@ -36,13 +36,16 @@ typedef QExplicitlySharedDataPointer<DFBrowser_Item> DFBrowser_ItemPtr;
|
||||
class DFBrowser_Item : public DFBrowser_ItemBase
|
||||
{
|
||||
public:
|
||||
|
||||
//! Creates an item wrapped by a shared pointer
|
||||
//! \param theRow the item row position in the parent item
|
||||
//! \param theColumn the item column position in the parent item
|
||||
//! \return the pointer to the created item
|
||||
static DFBrowser_ItemPtr CreateItem (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
|
||||
{ return DFBrowser_ItemPtr (new DFBrowser_Item (theParent, theRow, theColumn)); }
|
||||
static DFBrowser_ItemPtr CreateItem(TreeModel_ItemBasePtr theParent,
|
||||
const int theRow,
|
||||
const int theColumn)
|
||||
{
|
||||
return DFBrowser_ItemPtr(new DFBrowser_Item(theParent, theRow, theColumn));
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowser_Item() {}
|
||||
@@ -53,7 +56,8 @@ public:
|
||||
//! \return the item attribute
|
||||
Standard_EXPORT Handle(TDF_Attribute) GetAttribute() const;
|
||||
|
||||
//! Finds int parent item attribute or label by this item row and store it in a field of this item.
|
||||
//! Finds int parent item attribute or label by this item row and store it in a field of this
|
||||
//! item.
|
||||
Standard_EXPORT virtual void Init() Standard_OVERRIDE;
|
||||
|
||||
//! Resets the cached item values, set null attribute and calls reset of the parent class
|
||||
@@ -65,38 +69,38 @@ public:
|
||||
Standard_EXPORT QVariant GetAttributeInfo(int theRole) const;
|
||||
|
||||
protected:
|
||||
|
||||
//! \return number of children.
|
||||
virtual int initRowCount() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns data value for the role:
|
||||
//! - if content is label, calls DFBrowser_ItemBase;
|
||||
//! - if content is attribute, if the fole is extended display, asks additional info text or ask module about info
|
||||
//! \param theItemRole a value role
|
||||
//! \return the value
|
||||
virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE;
|
||||
//! - if content is attribute, if the fole is extended display, asks additional info text or ask
|
||||
//! module about info \param theItemRole a value role \return the value
|
||||
virtual QVariant initValue(const int theItemRole) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns stream value of the item to fulfill property panel.
|
||||
//! \return stream value or dummy
|
||||
Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void initStream(Standard_OStream& theOStream) const Standard_OVERRIDE;
|
||||
|
||||
//! Constructor
|
||||
//! \param theParent a parent item
|
||||
//! \param theRow the item row position in the parent item
|
||||
//! \param theColumn the item column position in the parent item
|
||||
DFBrowser_Item (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
|
||||
: DFBrowser_ItemBase (theParent, theRow, theColumn) {}
|
||||
DFBrowser_Item(TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
|
||||
: DFBrowser_ItemBase(theParent, theRow, theColumn)
|
||||
{
|
||||
}
|
||||
|
||||
//! Initializes the current item. It creates a backup of the specific item information
|
||||
virtual void initItem() const Standard_OVERRIDE;
|
||||
|
||||
//! Sets the item attribute
|
||||
//! \param theAttribute an item attribute
|
||||
void SetAttribute (Handle(TDF_Attribute) theAttribute);
|
||||
void SetAttribute(Handle(TDF_Attribute) theAttribute);
|
||||
|
||||
private:
|
||||
|
||||
Standard_GUID myAttributeGUID; //!< if attribute, stores GUID of the attribute because label can contain only one attribute of a kind
|
||||
Standard_GUID myAttributeGUID; //!< if attribute, stores GUID of the attribute because label can
|
||||
//!< contain only one attribute of a kind
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user