diff --git a/GUI/Views/InstrumentWidgets/InstrumentListModel.cpp b/GUI/Views/InstrumentWidgets/InstrumentListModel.cpp index c2aa2198ea967e3888f0b3f771cc469c95ac86fa..df58d282c718e0ab5bcb62d633618761376b1a3a 100644 --- a/GUI/Views/InstrumentWidgets/InstrumentListModel.cpp +++ b/GUI/Views/InstrumentWidgets/InstrumentListModel.cpp @@ -22,27 +22,27 @@ //-------------------------------------------------------------------------------------------------- /// Get the default name for an instrument (i.e. the name a newly created instrument should get) -template<typename T> const QString defaultInstrumentName() +template <typename T> const QString defaultInstrumentName() { return "Untitled"; } -template<> const QString defaultInstrumentName<SpecularInstrumentItem>() +template <> const QString defaultInstrumentName<SpecularInstrumentItem>() { return "Specular"; } -template<> const QString defaultInstrumentName<DepthProbeInstrumentItem>() +template <> const QString defaultInstrumentName<DepthProbeInstrumentItem>() { return "DepthProbe"; } -template<> const QString defaultInstrumentName<GISASInstrumentItem>() +template <> const QString defaultInstrumentName<GISASInstrumentItem>() { return "GISAS"; } -template<> const QString defaultInstrumentName<OffSpecularInstrumentItem>() +template <> const QString defaultInstrumentName<OffSpecularInstrumentItem>() { return "OffSpecular"; } diff --git a/GUI/Views/InstrumentWidgets/InstrumentListModel.h b/GUI/Views/InstrumentWidgets/InstrumentListModel.h index 2582462afed40ace448d34ef34b6cc82b32e8c16..de0b10658b80a13e1ce929360fcfff1e8f7c7acc 100644 --- a/GUI/Views/InstrumentWidgets/InstrumentListModel.h +++ b/GUI/Views/InstrumentWidgets/InstrumentListModel.h @@ -48,8 +48,7 @@ public: QModelIndex copyInstrument(const InstrumentItem* source); private: - - template<class Instrument> QModelIndex addNewInstrument(); + template <class Instrument> QModelIndex addNewInstrument(); private: InstrumentModel* m_instruments; diff --git a/GUI/Views/InstrumentWidgets/InstrumentListView.cpp b/GUI/Views/InstrumentWidgets/InstrumentListView.cpp index b858e80a854cdd80ce5480716e0bcc283f8099d4..f4e3f2d8ceef9993e7b16c1178be3f786a0cbdae 100644 --- a/GUI/Views/InstrumentWidgets/InstrumentListView.cpp +++ b/GUI/Views/InstrumentWidgets/InstrumentListView.cpp @@ -71,15 +71,13 @@ InstrumentListView::InstrumentListView(ProjectDocument* document, QWidget* paren m_newSpecularAction = new QAction("New specular", this); m_newSpecularAction->setIcon(QIcon(":/images/shape-square-plus.svg")); m_newSpecularAction->setToolTip("Add new specular instrument with default settings"); - connect(m_newSpecularAction, &QAction::triggered, this, - &InstrumentListView::onNewSpecular); + connect(m_newSpecularAction, &QAction::triggered, this, &InstrumentListView::onNewSpecular); addAction(m_newSpecularAction); m_newDepthProbeAction = new QAction("New depth probe", this); m_newDepthProbeAction->setIcon(QIcon(":/images/shape-square-plus.svg")); m_newDepthProbeAction->setToolTip("Add new depth probe instrument with default settings"); - connect(m_newDepthProbeAction, &QAction::triggered, this, - &InstrumentListView::onNewDepthProbe); + connect(m_newDepthProbeAction, &QAction::triggered, this, &InstrumentListView::onNewDepthProbe); addAction(m_newDepthProbeAction); m_separatorAction1 = new QAction(this); @@ -141,11 +139,10 @@ QSize InstrumentListView::minimumSizeHint() const QList<QAction*> InstrumentListView::toolbarActions() const { - return {m_newGisasAction, m_newOffSpecularAction, - m_newSpecularAction, m_newDepthProbeAction, - m_separatorAction1, m_removeAction, - m_copyAction, m_separatorAction2, - m_storeInLibraryAction, m_loadFromLibraryAction}; + return {m_newGisasAction, m_newOffSpecularAction, m_newSpecularAction, + m_newDepthProbeAction, m_separatorAction1, m_removeAction, + m_copyAction, m_separatorAction2, m_storeInLibraryAction, + m_loadFromLibraryAction}; } void InstrumentListView::updateSelectedInstrument() diff --git a/GUI/Views/InstrumentWidgets/InstrumentView.cpp b/GUI/Views/InstrumentWidgets/InstrumentView.cpp index ecff4a50b6774794ba2dbbf4ece4002d54fedc89..f2827c8dbcde053531fec48fd261a26e0e1a3456 100644 --- a/GUI/Views/InstrumentWidgets/InstrumentView.cpp +++ b/GUI/Views/InstrumentWidgets/InstrumentView.cpp @@ -44,8 +44,8 @@ InstrumentView::InstrumentView(QWidget* parent, ProjectDocument* document) connect(m_instrumentListView, &InstrumentListView::instrumentSelected, this, &InstrumentView::onInstrumentSelected); - connect(m_instrumentEditor, &InstrumentEditor::instrumentNameChanged, - m_instrumentListView, &InstrumentListView::updateSelectedInstrument); + connect(m_instrumentEditor, &InstrumentEditor::instrumentNameChanged, m_instrumentListView, + &InstrumentListView::updateSelectedInstrument); onInstrumentSelected(nullptr); } diff --git a/GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.cpp b/GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.cpp index 1e27b165b68feb3ca80f530c0f60c8f30d7618a5..2a8a19da60e0329fcea3ab5035c0703d96520724 100644 --- a/GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.cpp +++ b/GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.cpp @@ -172,12 +172,12 @@ void ResolutionFunctionEditor::onResolutionFunctionSelected(int index) { if (m_item && index != -1) { const QString res_type = m_combo->currentData().toString(); - if (res_type == ResolutionFunctionNoneItem::M_TYPE) { + if (res_type == ResolutionFunctionNoneItem::M_TYPE) { m_item->setResolutionFunctionType<ResolutionFunctionNoneItem>(); m_stack->setCurrentWidget(m_blankForm); } else { - m_gaussForm->setItem - (m_item->setResolutionFunctionType<ResolutionFunction2DGaussianItem>()); + m_gaussForm->setItem( + m_item->setResolutionFunctionType<ResolutionFunction2DGaussianItem>()); m_stack->setCurrentWidget(m_gaussForm); } }