24 #include <QVBoxLayout>
27 : QWidget(parent), m_instrumentCombo(new QComboBox), m_currentDataItem(nullptr)
29 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
30 setWindowTitle(
"RealDataPropertiesWidget");
32 QVBoxLayout* mainLayout =
new QVBoxLayout;
33 mainLayout->setMargin(5);
34 mainLayout->setSpacing(2);
38 mainLayout->addWidget(
new QLabel(
"Linked instrument"));
41 mainLayout->addStretch();
42 setLayout(mainLayout);
45 static_cast<void (QComboBox::*)(
int)
>(&QComboBox::currentIndexChanged),
this,
93 const QString newSelectedInstrumentId =
m_instrumentCombo->currentData().toString();
142 const bool linkChanged =
#define ASSERT(condition)
Defines class MainWindow.
Defines InstrumentItems classes.
Defines class InstrumentModel.
Defines class LinkInstrumentManager.
Defines class RealDataItem.
Defines class SessionModel.
void instrumentNameChanged(const InstrumentItem *instrument)
void instrumentAddedOrRemoved()
static MainWindow * instance()
Returns the one and only instance of this class.
void unsubscribe(const void *caller)
Cancells all subscribtion of given caller.
void setOnItemDestroy(std::function< void(SessionItem *)> f, const void *caller=0)
void setOnPropertyChange(std::function< void(QString)> f, const void *caller=0)
The RealDataItem class represents intensity data imported from file and intended for fitting.
void setInstrumentId(const QString &id)
void updateToInstrument(const InstrumentItem *instrument)
QString instrumentId() const
ModelMapper * mapper()
Returns the current model mapper of this item. Creates new one if necessary.