18 setSizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Fixed);
20 QLayout* vlayout =
new QVBoxLayout();
21 QLayout* hlayout =
new QHBoxLayout();
22 this->setLayout(vlayout);
25 hlayout->setContentsMargins(margin, margin, margin, margin);
26 hlayout->setSpacing(6);
28 _updateButton =
new QPushButton(
"Update",
this);
29 _autoCheckBox =
new QCheckBox(
"Auto Update",
this);
30 _frequencySpinBox =
new QDoubleSpinBox(
this);
31 _collapseAllButton =
new QPushButton(
"Collapse all",
this);
32 _splitBoxButton =
new QPushButton(
"Hide Queries, Predictions and Commits",
this);
33 _loadingGifLabel =
new QLabel(
this);
34 _loadingGif =
new QMovie(
":/armem_gui/resources/loadingSpinner.gif");
36 _loadingGifLabel->setScaledContents(
true);
37 QFontMetrics fm(font());
38 _loadingGifLabel->setFixedSize(fm.height(), fm.height());
40 _frequencySpinBox->setValue(2.0);
41 _frequencySpinBox->setMinimum(0);
42 _frequencySpinBox->setMaximum(60);
43 _frequencySpinBox->setSingleStep(0.5);
44 _frequencySpinBox->setSuffix(
" Hz");
46 hlayout->addWidget(_updateButton);
47 hlayout->addWidget(_autoCheckBox);
48 hlayout->addWidget(_frequencySpinBox);
50 hlayout->addWidget(_collapseAllButton);
51 hlayout->addWidget(_splitBoxButton);
52 hlayout->addWidget(_loadingGifLabel);
53 vlayout->addItem(hlayout);
57 _frequencySpinBox->setEnabled(_autoCheckBox->isChecked());
61 connect(_frequencySpinBox,
62 &QDoubleSpinBox::editingFinished,
67 connect(_updateButton, &QPushButton::pressed,
this, &
This::update);
69 connect(_splitBoxButton, &QPushButton::pressed,
this, &
This::splitBox);