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 TInspectorEXE_OpenFileDialog_H
#define TInspectorEXE_OpenFileDialog_H
@@ -39,18 +39,18 @@ class QWidget;
//! \class TInspector_OpenFileDialog
//! Control that contains table view of samples and line to select a file name from other directory.
//! Click on element of samples table view calls this sample opening else after entering(or opening) file name
//! the import becomes active. Click on the button will open selected file if it is possible
//! Click on element of samples table view calls this sample opening else after entering(or opening)
//! file name the import becomes active. Click on the button will open selected file if it is
//! possible
class TInspector_OpenFileDialog : public QDialog
{
Q_OBJECT
private:
//! Constructor
Standard_EXPORT TInspector_OpenFileDialog (QWidget* theParent, const QStringList& theRecentlyOpenedFiles);
Standard_EXPORT TInspector_OpenFileDialog(QWidget* theParent,
const QStringList& theRecentlyOpenedFiles);
public:
//! Destructor
virtual ~TInspector_OpenFileDialog() Standard_OVERRIDE {}
@@ -58,7 +58,8 @@ public:
//! \param theParent a parent for the new dialog
//! \param theDataDirName path to default samples directory
//! \returns a file name from the open file dialog
Standard_EXPORT static QString OpenFile (QWidget* theParent, const QStringList& theRecentlyOpenedFiles);
Standard_EXPORT static QString OpenFile(QWidget* theParent,
const QStringList& theRecentlyOpenedFiles);
//! Returns selection name from the dialog
QString GetFileName() const { return myFileName; }
@@ -70,22 +71,26 @@ public:
//! \param thePluginName name of the plugin
//! \param theCommunicator source of preferences
//! \param[out] theFileNames container of recently opened file names
Standard_EXPORT static void GetPluginRecentlyOpenedFiles (const TCollection_AsciiString& thePluginName,
TInspector_Communicator* theCommunicator,
QStringList& theFileNames);
Standard_EXPORT static void GetPluginRecentlyOpenedFiles(
const TCollection_AsciiString& thePluginName,
TInspector_Communicator* theCommunicator,
QStringList& theFileNames);
//! Sets preferences: previous opened documents.
//! \param thePluginName name of the plugin
//! \param theCommunicator source of preferences
//! \param theFileNames container of recently opened file names to be set into communicator preferences
Standard_EXPORT static void SetPluginRecentlyOpenedFiles (const TCollection_AsciiString& thePluginName,
TInspector_Communicator* theCommunicator,
QStringList& theFileNames);
//! \param theFileNames container of recently opened file names to be set into communicator
//! preferences
Standard_EXPORT static void SetPluginRecentlyOpenedFiles(
const TCollection_AsciiString& thePluginName,
TInspector_Communicator* theCommunicator,
QStringList& theFileNames);
private slots:
//! Stores name of selected sample file
void onSampleSelectionChanged (const QItemSelection& theSelected, const QItemSelection& theDeselected);
void onSampleSelectionChanged(const QItemSelection& theSelected,
const QItemSelection& theDeselected);
//! Opens file dialog to select a file name. Fills file name line, enable import button
void onSelectClicked();
@@ -94,23 +99,21 @@ private slots:
void onApplySelectClicked();
private:
//! Creates view of file names in samples directory
//! \param theFileNames a container of names
//! \return table view
QTableView* createTableView (const QStringList& theFileNames);
QTableView* createTableView(const QStringList& theFileNames);
//! Creates view model and fills it by the file names
//! \param theFileNames a container of names
//! \return model
QAbstractItemModel* createModel (const QStringList& theFileNames);
QAbstractItemModel* createModel(const QStringList& theFileNames);
private:
QStringList myRecentlyOpenedFiles; //!< recently opened files
QString myFileName; //!< result file name
QTableView* mySamplesView; //!< view of sample file names
QLineEdit* mySelectedName; //!< alternative control to open file
QString myFileName; //!< result file name
QTableView* mySamplesView; //!< view of sample file names
QLineEdit* mySelectedName; //!< alternative control to open file
};
#endif