mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +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_ItemDocument_H
|
||||
#define DFBrowser_ItemDocument_H
|
||||
@@ -26,17 +26,21 @@ typedef QExplicitlySharedDataPointer<DFBrowser_ItemDocument> DFBrowser_ItemDocum
|
||||
|
||||
//! \class DFBrowser_ItemDocument
|
||||
//! \brief Declaration of the tree model document item.
|
||||
//! This item is connected to the OCAF document. Parent item is application, children are either labels or attributes
|
||||
//! This item is connected to the OCAF document. Parent item is application, children are either
|
||||
//! labels or attributes
|
||||
class DFBrowser_ItemDocument : 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_ItemDocumentPtr CreateItem (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
|
||||
{ return DFBrowser_ItemDocumentPtr (new DFBrowser_ItemDocument (theParent, theRow, theColumn)); }
|
||||
static DFBrowser_ItemDocumentPtr CreateItem(TreeModel_ItemBasePtr theParent,
|
||||
const int theRow,
|
||||
const int theColumn)
|
||||
{
|
||||
return DFBrowser_ItemDocumentPtr(new DFBrowser_ItemDocument(theParent, theRow, theColumn));
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowser_ItemDocument() {}
|
||||
@@ -47,7 +51,7 @@ public:
|
||||
|
||||
//! Sets the item document
|
||||
//! \param theLabel an object where the child items structure is found
|
||||
void setDocument (const Handle(TDocStd_Document)& theDocument) { myDocument = theDocument; }
|
||||
void setDocument(const Handle(TDocStd_Document)& theDocument) { myDocument = theDocument; }
|
||||
|
||||
//! Returns true if the current document is not null
|
||||
//! \return a boolean value
|
||||
@@ -64,30 +68,28 @@ public:
|
||||
Standard_EXPORT virtual void Reset() Standard_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
//! Initializes the current item. It is empty because Reset() is also empty.
|
||||
virtual void initItem() const Standard_OVERRIDE;
|
||||
|
||||
//! Initializes the current item. It creates a backup of the specific item information
|
||||
virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE;
|
||||
virtual QVariant initValue(const int theItemRole) const Standard_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
//! Creates a child item in the given position.
|
||||
//! \param theRow the child row position
|
||||
//! \param theColumn the child column position
|
||||
//! \return the created item
|
||||
virtual TreeModel_ItemBasePtr createChild (int theRow, int theColumn) Standard_OVERRIDE;
|
||||
virtual TreeModel_ItemBasePtr createChild(int theRow, int theColumn) Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
//! Constructor
|
||||
//! \param theParent a parent item
|
||||
DFBrowser_ItemDocument(TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
|
||||
: DFBrowser_ItemBase (theParent, theRow, theColumn) {}
|
||||
: DFBrowser_ItemBase(theParent, theRow, theColumn)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Handle(TDocStd_Document) myDocument; //!< cached application document by the row index of the item
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user