2021-11-26 10:49:09 +08:00
|
|
|
//
|
|
|
|
|
// Created by Krad on 2021/11/24.
|
|
|
|
|
//
|
|
|
|
|
|
2021-12-07 14:08:05 +08:00
|
|
|
#include "SelectDialog.h"
|
2021-11-26 10:49:09 +08:00
|
|
|
#include "components/SlidePickerBox.h"
|
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
#include <QLabel>
|
2021-12-28 18:23:02 +08:00
|
|
|
SelectDialog::SelectDialog(QWidget* parent, Qt::WindowFlags f) : GUIFormBaseDialog(parent, f) {
|
|
|
|
|
|
|
|
|
|
this->setFixedSize(360, 380);
|
|
|
|
|
QVBoxLayout* layout = new QVBoxLayout(formWidget);
|
|
|
|
|
box = new SlidePickerBox(formWidget);
|
|
|
|
|
box->setObjectName("slider_one");
|
|
|
|
|
layout->addWidget(box);
|
|
|
|
|
|
2021-11-26 10:49:09 +08:00
|
|
|
}
|
|
|
|
|
|
2021-12-07 14:08:05 +08:00
|
|
|
SelectDialog::~SelectDialog() {
|
2021-11-26 10:49:09 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-07 14:08:05 +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) {
|
2021-12-28 18:23:02 +08:00
|
|
|
box->setItems(dates);
|
2021-11-26 10:49:09 +08:00
|
|
|
}
|
|
|
|
|
|
2021-12-07 14:08:05 +08:00
|
|
|
QString SelectDialog::getSelectedValue() {
|
2021-12-28 18:23:02 +08:00
|
|
|
return box->getSelectedValue();
|
2021-11-26 10:49:09 +08:00
|
|
|
}
|
|
|
|
|
|
2021-12-28 18:23:02 +08:00
|
|
|
void SelectDialog::setSelectedValue(const QString& val) {
|
|
|
|
|
box->setSelectedValue(val);
|
2021-11-26 10:49:09 +08:00
|
|
|
}
|