38 memoryEntity(new QLineEdit()),
39 timestampInputSelector(new QComboBox()),
40 timestampLayout(new QHBoxLayout()),
41 instanceSpinner(new QSpinBox()),
42 predictionEngineSelector(new QComboBox()),
43 predictButton(new QPushButton(
"Predict")),
44 entityInfoRetriever(entityInfoRetriever)
46 auto* vlayout =
new QVBoxLayout();
47 auto* hlayout =
new QHBoxLayout();
48 hlayout->addWidget(
new QLabel(
"Entity ID"));
49 hlayout->addWidget(memoryEntity);
50 vlayout->addLayout(hlayout);
52 timestampInputSelector->addItems({
"Absolute",
"Relative to now"});
53 timestampLayout->addWidget(
new QLabel(
"Time"));
54 timestampLayout->addWidget(timestampInputSelector);
55 vlayout->addLayout(timestampLayout);
57 hlayout =
new QHBoxLayout();
58 predictionEngineSelector->setSizeAdjustPolicy(QComboBox::AdjustToContents);
59 hlayout->addWidget(
new QLabel(
"Engine"));
60 hlayout->addWidget(predictionEngineSelector);
61 hlayout->addStretch();
62 vlayout->addLayout(hlayout);
64 vlayout->addWidget(predictButton);
68 timestampLayout->addStretch();
72 showTimestampInputMethod(
"Absolute");
74 connect(timestampInputSelector,
75 &QComboBox::currentTextChanged,
77 &PredictionWidget::showTimestampInputMethod);
80 &QLineEdit::editingFinished,
82 &PredictionWidget::updateCurrentEntity);
84 connect(predictButton, &QPushButton::clicked,
this, &PredictionWidget::startPrediction);