-
Notifications
You must be signed in to change notification settings - Fork 2
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
add view files #3
base: master
Are you sure you want to change the base?
Conversation
farir1408
commented
Jan 21, 2018
- Добавил основную форму приложения.
- Добавил классы для отображения информации на форме.
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 Draw::clearMap() | ||
{ | ||
pixmap.load("./map.png"); |
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.
это должно быть вынесено в константу/конфигурационный файл
return; | ||
} | ||
|
||
void Draw::drawMap() |
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.
если Вы явно бросаете исключение в методе, то стоит об этом явно указать в сигнатуре
listOfPoint = new QList<QPoint>(); | ||
draw = drawOfMainControll; | ||
color = QColor(rand() % 255, rand() % 255, rand() % 255); | ||
if (listOfPoint == NULL) |
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.
new бросает исключение в отличие от malloc
чтобы не бросал, можно передать параметр (std::nothrow)
void clearMap(); | ||
void getScale(double *width, double *height); | ||
private: | ||
QTableWidget *tblWidget; |
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.
имеет смысл сделать интерфейсы не зависимыми от Qt (или зависимыми, но по минимуму)
а реализацию, привязанную к Qt, вынести в cpp файл, воспользовавшись тут PIMPL идиомой