diff --git a/QtCurvesCpp.pro.user b/QtCurvesCpp.pro.user index 3ff9845..35a182d 100644 --- a/QtCurvesCpp.pro.user +++ b/QtCurvesCpp.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -282,14 +282,17 @@ 13 14 - -1 + 2 - - - %{buildDir} - Custom Executable + QtCurvesCpp - ProjectExplorer.CustomExecutableRunConfiguration + Qt4ProjectManager.Qt4RunConfiguration:C:/DEVEL/QtCurvesCpp/QtCurvesCpp.pro + true + + QtCurvesCpp.pro + false + + C:/DEVEL/build-QtCurvesCpp-Desktop_Qt_5_9_1_MinGW_32bit-Debug 3768 false true diff --git a/mainwindow.cpp b/mainwindow.cpp index 1f838f1..dd517a0 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -49,3 +49,21 @@ void MainWindow::on_btnLine_clicked() this->ui->renderArea->setShape(RenderArea::Line); this->ui->renderArea->repaint(); } + +void MainWindow::on_intervalInput_valueChanged(double arg1) +{ + this->ui->renderArea->setInternalLenght(arg1); + this->ui->renderArea->repaint(); +} + +void MainWindow::on_scaleInput_valueChanged(double arg1) +{ + this->ui->renderArea->setScale(arg1); + this->ui->renderArea->repaint(); +} + +void MainWindow::on_stepInput_valueChanged(double arg1) +{ + this->ui->renderArea->setStepCount(arg1); + this->ui->renderArea->repaint(); +} diff --git a/mainwindow.h b/mainwindow.h index f5b0d40..c245bb4 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -29,6 +29,12 @@ class MainWindow : public QMainWindow void on_btnLine_clicked(); + void on_intervalInput_valueChanged(double arg1); + + void on_scaleInput_valueChanged(double arg1); + + void on_stepInput_valueChanged(double arg1); + private: constexpr static QWidget* root = 0; Ui::MainWindow *ui; diff --git a/mainwindow.ui b/mainwindow.ui index 5f451d2..879f81d 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -6,8 +6,8 @@ 0 0 - 690 - 602 + 670 + 612 @@ -141,129 +141,286 @@ background-color: rgb(16, 15, 15); - + + + true + + + + 11 + 11 + 561 + 538 + + + splitter + + + + + 580 + 12 + 80 + 21 + + + + + 0 + 0 + + + + color: rgb(255, 255, 255); +background-color: rgb(36, 35, 35); +border-color: rgb(255, 255, 255); + + + Astroid + + + false + + + + + + 580 + 39 + 80 + 21 + + + + + 0 + 0 + + + + color: rgb(255, 255, 255); +background-color: rgb(36, 35, 35); +border-color: rgb(255, 255, 255); + + + Cicloid + + + + + + 580 + 66 + 80 + 21 + + + + + 0 + 0 + + + + color: rgb(255, 255, 255); +background-color: rgb(36, 35, 35); +border-color: rgb(255, 255, 255); + + + Huygens + + + + + + 580 + 93 + 80 + 21 + + + + + 0 + 0 + + + + color: rgb(255, 255, 255); +background-color: rgb(36, 35, 35); +border-color: rgb(255, 255, 255); + + + Hypo Cycloid + + + + + + 580 + 170 + 81 + 22 + + + + color: rgb(255, 255, 255); + + + + + + 580 + 220 + 81 + 22 + + + + color: rgb(255, 255, 255); + + + + + + 580 + 150 + 81 + 16 + + + + color: rgb(255, 255, 255); + + + Scale + + + Qt::PlainText + + + false + + + Qt::AlignCenter + + + + + + 580 + 200 + 81 + 16 + + + + color: rgb(255, 255, 255); + + + Interval lenght + + + Qt::PlainText + + + false + + + Qt::AlignCenter + + + + + + 580 + 240 + 81 + 16 + + + + color: rgb(255, 255, 255); + + + Step count + + + Qt::PlainText + + + false + + + Qt::AlignCenter + + + + + + 580 + 260 + 81 + 22 + + + + color: rgb(255, 255, 255); + + + 10 - 10 - 671 - 540 + 560 + 101 + 21 - - - - - true - - splitter - - - - - - - - - 0 - 0 - - - - color: rgb(255, 255, 255); + + color: rgb(255, 255, 255); background-color: rgb(36, 35, 35); border-color: rgb(255, 255, 255); - - - Astroid - - - false - - - - - - - - 0 - 0 - - - - color: rgb(255, 255, 255); + + + Background colour + + + + + + 120 + 560 + 61 + 21 + + + + color: rgb(255, 255, 255); background-color: rgb(36, 35, 35); border-color: rgb(255, 255, 255); - - - Cicloid - - - - - - - - 0 - 0 - - - - color: rgb(255, 255, 255); + + + Line colour + + + + + + 580 + 120 + 80 + 21 + + + + color: rgb(255, 255, 255); background-color: rgb(36, 35, 35); border-color: rgb(255, 255, 255); - - - Huygens - - - - - - - - 0 - 0 - - - - color: rgb(255, 255, 255); -background-color: rgb(36, 35, 35); -border-color: rgb(255, 255, 255); - - - Hypo Cycloid - - - - - - - color: rgb(255, 255, 255); -background-color: rgb(36, 35, 35); -border-color: rgb(255, 255, 255); - - - Line - - - - - - - Qt::Vertical - - - - 77 - 428 - - - - - - - + + + Line + diff --git a/renderarea.cpp b/renderarea.cpp index 6627121..37c7db9 100644 --- a/renderarea.cpp +++ b/renderarea.cpp @@ -56,6 +56,21 @@ QSize RenderArea::sizeHint() const return QSize(400,200); } +void RenderArea::setInternalLenght(double l) +{ + mIntervalLenght = l; +} + +void RenderArea::setScale(double s) +{ + mScale = s; +} + +void RenderArea::setStepCount(double s) +{ + mStepCount = s; +} + void RenderArea::paintEvent(QPaintEvent* event) { QPainter painter{this}; diff --git a/renderarea.h b/renderarea.h index 5663fea..6718a2d 100644 --- a/renderarea.h +++ b/renderarea.h @@ -24,6 +24,9 @@ class RenderArea : public QWidget QColor backgroundColor() const { return mBackgroundColour; } void setShape(ShapesType shape) { mShape = shape; OnShapeChanged(); } ShapesType shape() const { return mShape; } + void setInternalLenght(double l); + void setScale(double s); + void setStepCount(double s); signals: