1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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:
dpasukhi
2025-01-25 20:15:22 +00:00
parent dbba6f1289
commit a5a7b3185b
14005 changed files with 1273539 additions and 1195567 deletions

View File

@@ -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 TreeModel_HeaderSection_H
#define TreeModel_HeaderSection_H
@@ -31,12 +31,25 @@ class TreeModel_HeaderSection
{
public:
//! Constructor
TreeModel_HeaderSection() : myName(), myWidth (-1), myIsHidden (false), myIsItalic (false) {}
TreeModel_HeaderSection()
: myName(),
myWidth(-1),
myIsHidden(false),
myIsItalic(false)
{
}
//! Constructor
TreeModel_HeaderSection (const QString& theName, const int theWidth = -1, const bool theIsHidden = false,
const bool theIsItalic = false)
: myName (theName), myWidth (theWidth), myIsHidden (theIsHidden), myIsItalic (theIsItalic) {}
TreeModel_HeaderSection(const QString& theName,
const int theWidth = -1,
const bool theIsHidden = false,
const bool theIsItalic = false)
: myName(theName),
myWidth(theWidth),
myIsHidden(theIsHidden),
myIsItalic(theIsItalic)
{
}
//! Destructor
~TreeModel_HeaderSection() {}
@@ -48,36 +61,39 @@ public:
//! Sets text value
//! \theName text value
void SetName (const QString& theName) { myName = theName; }
void SetName(const QString& theName) { myName = theName; }
//! Returns text value
QString GetName() const { return myName; }
//! Sets section width
//! \param theValue width value
void SetWidth (const int theWidth) { myWidth = theWidth; }
void SetWidth(const int theWidth) { myWidth = theWidth; }
//! Returns section width
int GetWidth (const bool isComputeDefault = true) const
{ return (myWidth ==-1 && isComputeDefault) ? TreeModel_Tools::GetTextWidth (GetName(), 0) : myWidth; }
int GetWidth(const bool isComputeDefault = true) const
{
return (myWidth == -1 && isComputeDefault) ? TreeModel_Tools::GetTextWidth(GetName(), 0)
: myWidth;
}
//! Sets section width
void SetIsHidden (bool isHidden) { myIsHidden = isHidden; }
void SetIsHidden(bool isHidden) { myIsHidden = isHidden; }
//! Returns if the section is visiblt
bool IsHidden() const { return myIsHidden; }
//! Sets section width
void SetIsItalic (bool isItalic) { myIsItalic = isItalic; }
void SetIsItalic(bool isItalic) { myIsItalic = isItalic; }
//! Returns if the section is visiblt
bool IsItalic() const { return myIsItalic; }
private:
QString myName; //!< text value
int myWidth; //!< section width
bool myIsHidden; //!< visibility
bool myIsItalic; //!< italic
QString myName; //!< text value
int myWidth; //!< section width
bool myIsHidden; //!< visibility
bool myIsItalic; //!< italic
};
#endif