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 DFBrowser_SearchLineModel_H
#define DFBrowser_SearchLineModel_H
@@ -44,9 +44,8 @@ class DFBrowser_Module;
class DFBrowser_SearchLineModel : public QAbstractTableModel
{
public:
//! Constructor
Standard_EXPORT DFBrowser_SearchLineModel (QObject* theParent, DFBrowser_Module* theModule);
Standard_EXPORT DFBrowser_SearchLineModel(QObject* theParent, DFBrowser_Module* theModule);
//! Destructor
virtual ~DFBrowser_SearchLineModel() {}
@@ -58,20 +57,22 @@ public:
DFBrowser_Module* GetModule() const { return myModule; }
//! Fills internal containers by the OCAF values. Updates number of rows value
//! \param theDocumentValues container of document index to container of entry/attribute name to item information
//! \param theDocumentInfoValues container of a document index to entry/attribute name
Standard_EXPORT void SetValues (const QMap<int, QMap<QString, DFBrowser_SearchItemInfo > >& theDocumentValues,
const QMap<int, QStringList>& theDocumentInfoValues);
//! \param theDocumentValues container of document index to container of entry/attribute name to
//! item information \param theDocumentInfoValues container of a document index to entry/attribute
//! name
Standard_EXPORT void SetValues(
const QMap<int, QMap<QString, DFBrowser_SearchItemInfo>>& theDocumentValues,
const QMap<int, QStringList>& theDocumentInfoValues);
//! Clears cache of values
Standard_EXPORT void ClearValues();
//! Returns path to attribute or label element of OCAF by the index.
//! \param theIndex a tree model index
Standard_EXPORT QStringList GetPath (const QModelIndex& theIndex) const;
Standard_EXPORT QStringList GetPath(const QModelIndex& theIndex) const;
//! Returns value(attribute name or label entry) of OCAF by the index
Standard_EXPORT QString GetValue (const QModelIndex& theIndex) const;
Standard_EXPORT QString GetValue(const QModelIndex& theIndex) const;
//! Emits the layoutChanged signal from outside of this class
Standard_EXPORT void EmitLayoutChanged();
@@ -81,39 +82,47 @@ public:
//! \param theColummn the index column position
//! \param theParent the parent index
//! \return the model index
Standard_EXPORT virtual QModelIndex index (int theRow, int theColumn,
const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE;
Standard_EXPORT virtual QModelIndex index(int theRow,
int theColumn,
const QModelIndex& theParent = QModelIndex()) const
Standard_OVERRIDE;
//! Returns the data stored under the given role for the item referred to by the index.
//! \param theIndex a model index
//! \param theRole an enumeration value of role for data obtaining
Standard_EXPORT virtual QVariant data (const QModelIndex& theIndex,
int theRole = Qt::DisplayRole) const Standard_OVERRIDE;
Standard_EXPORT virtual QVariant data(const QModelIndex& theIndex,
int theRole = Qt::DisplayRole) const Standard_OVERRIDE;
//! Returns the number of rows under the given parent.
//! \param theParent a parent model index
//! \return the number of rows
virtual int rowCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE
{ (void)theParent; return myRowCount; }
virtual int rowCount(const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE
{
(void)theParent;
return myRowCount;
}
//! Returns the number of columns for the children of the given parent.
//! \param theParent a parent model index
//! \return the number of columns
virtual int columnCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE
{ (void)theParent; return 3; }
virtual int columnCount(const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE
{
(void)theParent;
return 3;
}
protected:
//! Returns document index by a row index in table model
//! \param theRow a row index of a QModelIndex
//! \param theRowInDocument an output index, to obtain information from myDocumentInfoValues
int getDocumentId (const int theRow, int& theRowInDocument) const;
int getDocumentId(const int theRow, int& theRowInDocument) const;
private:
DFBrowser_Module* myModule; //!< the current module
//! a document index to container of entry/attribute name to item information
QMap<int, QMap<QString, DFBrowser_SearchItemInfo> > myAdditionalValues;
DFBrowser_Module*
myModule; //!< the current module
//! a document index to container of entry/attribute name to item information
QMap<int, QMap<QString, DFBrowser_SearchItemInfo>> myAdditionalValues;
QMap<int, QStringList> myDocumentInfoValues; //!< a document index to entry/attribute name
int myRowCount; //!< number of rows in the model: summ of row counts in all documents
};