Files
GUI/src/dialogs/SelectDialog.cpp

37 lines
765 B
C++
Raw Normal View History

2021-11-26 10:49:09 +08:00
//
// Created by Krad on 2021/11/24.
//
#include "SelectDialog.h"
2022-06-13 11:21:44 +08:00
2021-11-26 10:49:09 +08:00
#include "components/SlidePickerBox.h"
#include <QVBoxLayout>
#include <QLabel>
2022-06-13 11:21:44 +08:00
SelectDialog::SelectDialog(QWidget* parent, Qt::WindowFlags f)
: GUIFormBaseDialog(parent, f)
, mPickBox(new SlidePickerBox(mFormWidget))
{
2021-12-28 18:23:02 +08:00
this->setFixedSize(360, 380);
2022-06-13 11:21:44 +08:00
auto layout = new QVBoxLayout(mFormWidget);
mPickBox->setObjectName("slider_one");
layout->addWidget(mPickBox);
2021-11-26 10:49:09 +08:00
}
bool SelectDialog::updateReferenceData() {
2021-12-28 18:23:02 +08:00
return true;
2021-11-26 10:49:09 +08:00
}
2022-04-22 17:16:45 +08:00
void SelectDialog::setValues(const QStringList& dates) {
2022-06-13 11:21:44 +08:00
mPickBox->setItems(dates);
2021-11-26 10:49:09 +08:00
}
QString SelectDialog::getSelectedValue() {
2022-06-13 11:21:44 +08:00
return mPickBox->getSelectedValue();
2021-11-26 10:49:09 +08:00
}
2021-12-28 18:23:02 +08:00
void SelectDialog::setSelectedValue(const QString& val) {
2022-06-13 11:21:44 +08:00
mPickBox->setSelectedValue(val);
2021-11-26 10:49:09 +08:00
}