Skip to content
Snippets Groups Projects
Commit d468a0c8 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Merge branch 'corr' into 'develop'

clang-format

See merge request !368
parents 372c3aea 88819f1f
No related branches found
No related tags found
1 merge request!368clang-format
Pipeline #45861 canceled
......@@ -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";
}
......
......@@ -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;
......
......@@ -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()
......
......@@ -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);
}
......
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment