-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task 1. #84
base: master
Are you sure you want to change the base?
Task 1. #84
Conversation
src/Voitov/Task1/CMakeLists.txt
Outdated
|
||
find_package(Qt5 COMPONENTS Widgets REQUIRED) | ||
|
||
add_executable(EXE ${SRC}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давайте дадим осмысленное название исполняемому файлу EXE
-> VoitovTask1
src/Voitov/Task1/figure.hpp
Outdated
|
||
void setColor(QVector3D rgb); | ||
|
||
QVector4D getColor(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QVector4D getColor(); | |
[[nodiscard]] QVector4D getColor() const noexcept; |
и ниже
src/Voitov/Task1/figure.hpp
Outdated
|
||
void setColor(QVector3D rgb); | ||
|
||
QVector4D getColor(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QVector4D getColor(); | |
[[nodiscard]] QVector4D getColor() const noexcept; |
и ниже
class figure | ||
{ | ||
public: | ||
virtual ~figure() = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Зачем виртуальный деструктор?
src/Voitov/Task1/figure.cpp
Outdated
return this->gIndexes; | ||
} | ||
|
||
void geometry::figure::setColor(QVector3D rgb){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void geometry::figure::setColor(QVector3D rgb){ | |
void geometry::figure::setColor(const QVector3D rgb){ |
src/Voitov/Task1/figure.cpp
Outdated
#include "figure.hpp" | ||
|
||
namespace geometry{ | ||
//figure::figure(){} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лишний код
src/Voitov/Task1/cube.hpp
Outdated
|
||
namespace geometry{ | ||
|
||
class Cube final: public figure { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Само наличие структуры cube бесмысленно. Либо делайте figure интерфейсом, либо мержите оба этих класса
изменено: src/Voitov/Task1/CMakeLists.txt изменено: src/Voitov/Task1/cube.hpp удалено: src/Voitov/Task1/figure.cpp изменено: src/Voitov/Task1/figure.hpp новый файл: src/Voitov/Task1/figureinformation.cpp новый файл: src/Voitov/Task1/figureinformation.h изменено: src/Voitov/Task1/main.cpp изменено: src/Voitov/Task1/uiwindow.cpp изменено: src/Voitov/Task1/uiwindow.h изменен исполняемый файл EXE -> VoitovTask1 Добавлены [[nodiscard]] и const noexcept в нужных методах Удален лишний код класс figure переделан в интерфейс, а также добавлен базовый класс FigureInformation
3bb138c
to
acdbcea
Compare
Features: Key c - change cube color, Key B - change background color