24 #include <QVBoxLayout>
28 , m_instrumentCombo(new QComboBox)
29 , m_currentDataItem(nullptr)
30 , m_document(document)
32 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
33 setWindowTitle(
"RealDataPropertiesWidget");
35 auto* mainLayout =
new QVBoxLayout;
36 mainLayout->setMargin(5);
37 mainLayout->setSpacing(2);
41 mainLayout->addWidget(
new QLabel(
"Linked instrument"));
44 mainLayout->addStretch();
45 setLayout(mainLayout);
51 static_cast<void (QComboBox::*)(
int)
>(&QComboBox::currentIndexChanged),
this,
78 const QString newSelectedInstrumentId =
m_instrumentCombo->currentData().toString();
85 const auto* newSelectedInstrument =
105 m_instrumentCombo->addItem(instrumentItem->instrumentName(), instrumentItem->id());
114 const QString instrumentId =
Defines class InstrumentItem and all its children.
Defines class InstrumentsEditController.
Defines class LinkInstrumentManager.
Defines class ProjectDocument.
Defines class RealDataItem.
InstrumentItem * findInstrumentById(const QString &instrumentId) const
QVector< InstrumentItem * > collectedItems() const
void instrumentNameChanged(const InstrumentItem *instrument)
Signals name change of the given instrument.
void instrumentAddedOrRemoved()
Signals a change in the list of instruments.
void linkToInstrumentChanged(const RealDataItem *realDataItem)
bool canLinkDataToInstrument(const RealDataItem *realDataItem, const QString &identifier, QWidget *parent)
Returns true if RealDataItem can be linked to the instrument (same number of bins)....
Project document class handles all data related to the opened project (sample, job,...
InstrumentCollection * collectedItems() const
LinkInstrumentManager * linkInstrumentManager()
InstrumentsEditController * instrumentsEditController()
The edit controller for the instruments in this project document.
Provides access to experimental data, for display and fitting. Owns an AbstractDataLoader.
void linkToInstrument(const InstrumentItem *instrument)
QString instrumentId() const
static QMainWindow * mainWindow