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_TreeLevelLine_H
#define DFBrowser_TreeLevelLine_H
@@ -41,17 +41,17 @@ class QWidget;
//! <back button> <forward button> <selected item line> <update button> <search line>
//! - <back button> allows moving to previously selected item (if it exists)
//! - <forward button> allows moving to next selected item (if it exists)
//! - <selected item line> path to currently selected item in OCAF tree view. Click on any level will
//! select the clicked item in tree view.
//! - <selected item line> path to currently selected item in OCAF tree view. Click on any level
//! will select the clicked item in tree view.
//! - <update button> will update content of OCAF tree model
//! - <search line> allows type label entry or attribute name and see in search view the available elements
//! - <search line> allows type label entry or attribute name and see in search view the available
//! elements
class DFBrowser_TreeLevelLine : public QObject
{
Q_OBJECT
public:
//! Constructor
Standard_EXPORT DFBrowser_TreeLevelLine (QWidget* theParent);
Standard_EXPORT DFBrowser_TreeLevelLine(QWidget* theParent);
//! Destructor
virtual ~DFBrowser_TreeLevelLine() {}
@@ -69,7 +69,7 @@ signals:
//! Signal about selection of an item in tree level line
//! \param theIndex a tree view model index of selected item
void indexSelected (const QModelIndex& theIndex);
void indexSelected(const QModelIndex& theIndex);
//! Signal about necessity to update OCAF tree model
void updateClicked();
@@ -79,15 +79,16 @@ public slots:
//! Listens tree view selection model. Update tree level line by selected item. Stores
//! \param theSelected a list of selected items
//! \param theDeselected a list of deselected items
Standard_EXPORT void OnTreeViewSelectionChanged (const QItemSelection& theSelected,
const QItemSelection& theDeselected);
Standard_EXPORT void OnTreeViewSelectionChanged(const QItemSelection& theSelected,
const QItemSelection& theDeselected);
private slots:
//! Listens table view selection model. Gets selected tree view model index and emit indexSelected signal.
//! \param theSelected a list of selected items
//! \param theDeselected a list of deselected items
void onTableSelectionChanged (const QItemSelection& theSelected, const QItemSelection& theDeselected);
//! Listens table view selection model. Gets selected tree view model index and emit indexSelected
//! signal. \param theSelected a list of selected items \param theDeselected a list of deselected
//! items
void onTableSelectionChanged(const QItemSelection& theSelected,
const QItemSelection& theDeselected);
//! Listens actions and do the following:
//! - <backward>: moves history to the previous selection item, emits indexSelected signal
@@ -96,35 +97,36 @@ private slots:
void onActionClicked();
private:
//! Returns the previous index of history selection
QModelIndex getBackwardIndex();
//! Returns the next index of history selection
QModelIndex getForwardIndex();
//! Appends new history index, set it active, remove the first history index if the cache is out of range
//! \param theIndex a selected OCAF tree model index
void setForwardIndex (const QModelIndex& theIndex);
//! Appends new history index, set it active, remove the first history index if the cache is out
//! of range \param theIndex a selected OCAF tree model index
void setForwardIndex(const QModelIndex& theIndex);
//! Updates enable state of backward/forward actions depending on the current item index
void updateActionsState();
//! Sets the current index and update actions state
//! \param theIndexId an item index, should be in range of history of indices
void setCurrentHistoryIndex (const int theIndexId);
void setCurrentHistoryIndex(const int theIndexId);
private:
bool mySelectionProcessingBlocked; //!< if true, table view selection is started but has not been finished yet
bool mySelectionProcessingBlocked; //!< if true, table view selection is started but has not been
//!< finished yet
QList<QModelIndex> myHistoryIndices; //!< cached selected OCAF tree model indices
int myCurrentHistoryIndex; //!< an index of the current history selected index from myHistoryIndices
int
myCurrentHistoryIndex; //!< an index of the current history selected index from myHistoryIndices
QWidget* myMainWindow; //!< parent widget for controls
QWidget* myMainWindow; //!< parent widget for controls
QToolButton* myBackwardButton; //!< backward button, to select previous selected item
QToolButton* myForwardButton; //!< forward button, to select next selected item
QToolButton* myUpdateButton; //!< update button, like F5, to update OCAF tree model content
QTableView* myTableView; //!< container of path values to selected item, a path value is a label entry
QToolButton* myForwardButton; //!< forward button, to select next selected item
QToolButton* myUpdateButton; //!< update button, like F5, to update OCAF tree model content
QTableView*
myTableView; //!< container of path values to selected item, a path value is a label entry
DFBrowser_SearchLine* mySearchLine; //!< line of search
};