File indexing completed on 2025-01-05 03:35:38

0001 /*
0002     File                 : AddValueLabelDialog.h
0003     Project              : LabPlot
0004     Description          : Dialog to add a new the value label
0005     --------------------------------------------------------------------
0006     SPDX-FileCopyrightText: 2021-2022 Alexander Semke <alexander.semke@web.de>
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #ifndef ADDVALUELABELDIALOG_H
0011 #define ADDVALUELABELDIALOG_H
0012 
0013 #include "backend/core/AbstractColumn.h"
0014 #include <QDialog>
0015 
0016 class Column;
0017 class QComboBox;
0018 class QDateTimeEdit;
0019 class QLineEdit;
0020 
0021 class AddValueLabelDialog : public QDialog {
0022     Q_OBJECT
0023 
0024 public:
0025     explicit AddValueLabelDialog(QWidget* parent, const Column*);
0026     ~AddValueLabelDialog() override;
0027 
0028     void setDateTimeFormat(const QString&);
0029 
0030     double value() const;
0031     int valueInt() const;
0032     qint64 valueBigInt() const;
0033     QString valueText() const;
0034     QDateTime valueDateTime() const;
0035 
0036     QString label() const;
0037 
0038 private:
0039     QLineEdit* leValue{nullptr};
0040     QComboBox* cbValue{nullptr};
0041     QLineEdit* leLabel{nullptr};
0042     QDateTimeEdit* dateTimeEdit{nullptr};
0043 };
0044 
0045 #endif