55 lines
1.2 KiB
C++
55 lines
1.2 KiB
C++
#ifndef SETTINGSDIALOG__H
|
|
#define SETTINGSDIALOG__H
|
|
|
|
#include <QDialog>
|
|
#include <QColorDialog>
|
|
#include <QCheckBox>
|
|
#include <QLineEdit>
|
|
#include <QPushButton>
|
|
#include <QLabel>
|
|
#include <QVBoxLayout>
|
|
#include <QHBoxLayout>
|
|
#include <QGridLayout>
|
|
#include <QVector>
|
|
#include <QRandomGenerator>
|
|
|
|
class SettingsDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SettingsDialog(int curveCount, QWidget *parent = nullptr);
|
|
~SettingsDialog();
|
|
|
|
double getXMin() const;
|
|
double getXMax() const;
|
|
double getYMin() const;
|
|
double getYMax() const;
|
|
|
|
QColor getCurveColor(int index) const;
|
|
QColor getBackgroundColor() const;
|
|
QVector<QColor> getCurveColors() const;
|
|
|
|
bool isGridVisible() const;
|
|
|
|
private:
|
|
QLineEdit *xMinLineEdit;
|
|
QLineEdit *xMaxLineEdit;
|
|
QLineEdit *yMinLineEdit;
|
|
QLineEdit *yMaxLineEdit;
|
|
|
|
QVector<QPushButton*> curveColorButtons;
|
|
QPushButton *backgroundColorButton;
|
|
|
|
QVector<QColor> curveColors;
|
|
QColor backgroundColor;
|
|
|
|
QCheckBox *gridCheckBox;
|
|
|
|
void setupCurveColorButtons(int curveCount);
|
|
void initializeCurveColors(int size, quint32 seed);
|
|
void updateColorButton(QPushButton *button, const QColor &color);
|
|
};
|
|
|
|
#endif // SETTINGSDIALOG__H
|