Coder Social home page Coder Social logo

mm-project / qt_painter Goto Github PK

View Code? Open in Web Editor NEW
22.0 5.0 10.0 84.54 MB

CAD framework tool on top of Qt

C++ 80.87% C 11.84% Objective-C 6.91% CMake 0.01% Shell 0.14% Dockerfile 0.01% JavaScript 0.15% CSS 0.02% Python 0.05%
eda cad vlsi qt5 framework design-patterns cpp

qt_painter's Introduction

The "Project"

This is educational project that we hope will eventually become some sort of CAD tool. The aim is to learn "system design" of such tools and come-up with own building blocks, make some experiments and have fun.

Platform/OS Support

  • Linux32 ubuntu 18.04
  • Linux64 ubuntu 18.04
  • Windows10-64 - Mingw
  • Windows10 64 - MVCS

Usability Features

  • Command intepreter ( log format )
  • 1-on-1 Logging/Replaying
  • Shape creation/deletion ( rect,line,elipse,polygon )
  • Shape selection/highlighting
  • Shape basic properties ( border color, fill color, stiple )
  • Viewport manipulation ( zoominng/panning )
  • Data Save/Load
  • GUI Ribbon Widget
  • GUI Console Assistant

Inter-project API

  • Messenger
  • Selection
  • Postman
  • Service
  • Renderer
  • Region Query
  • Command management
  • Runtime
  • Logging/Replying

Buildsystem/TestHarness capabilities

  • GUI/QA harness commands
  • Diff web-view
  • Debugging modes, replay stop, resume, contine
  • Automated CI check ( circleCI )
  • Test running infrascture
  • 20 integration tests.

  • Unit testing capabilities and few unit tests
  • Building from docker image

qt_painter's People

Contributors

levibyte avatar nagaina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

qt_painter's Issues

move bsys to cmake

its finally time to learn some cmake :))))))
..and move project to it.

better keypress-binding handling

should be improved places like
void canvas::keyPressEvent(QKeyEvent* ev) {

//binding goes here
//if(ev->modifiers() & Qt::ShiftModifier) {
    //if ( ev->key() == Qt::Key_1 )  cm->find_command("dicmdQaCompareCanvas")->execute();
    //better handling
    if ( ev->key() == Qt::Key_2 )  
        cm->find_command("dicmdQaCompareSelection")->execute_and_log();
    else if ( ev->key() == Qt::Key_Z ) 
        m_renderer->zoomout();
    else if ( ev->key() == Qt::Key_X ) 
        m_renderer->zoomin();
    else if ( ev->key() == Qt::Key_Up )
        m_renderer->pan(PANUP);
    else if ( ev->key() == Qt::Key_Down )
        m_renderer->pan(PANDOWN);
    else if ( ev->key() == Qt::Key_Left )
        m_renderer->pan(PANLEFT);
    else if ( ev->key() == Qt::Key_Right )
        m_renderer->pan(PANRIGHT);
    else {
        if( cm->is_idle() ) 
            return;
    
        cm->disactivate_active_command();
    }

callbacks design (usage with parameters) is very poor

Postman/Callback need to be redesigned.

Currently postman's register(..)/notify() can operate only with LeCallback type and thus callback functions should take it as the argument ( if needed ) and convert to their agreed type via dynamic cast.

This very inconvenient, becasue
a. forces to have own custom type derived from LeCallback even some POD types , like int
b. it forces user to now the callback's actual type in advance during compilation but use DC.
c. dynamic cast is time consuming.
e. should evaluated and handled properly
d. code difficult to follow

So we need better approach.
( better if compile time )

QPainter is stack object

currently renderer is implemented in such a way that QPainter stack variable is created during every paintEvent. : ))))
(aranc kriv anelu)
(կարամ հայատառել գրեմ)

CI on Windows

  1. Provisioning with msvc and mingw
  2. Different jobs per provision
  3. Building & running tests

shapeUnderCursor => active object

  1. Select under cursor should be replaced as get active object ( adds to selection if clicked )
  2. Dummy command should actually be actually this command
  3. Log command ( name??? ) even if no selection

New rendering engine

  1. split canvas to canvas_gui and canvas
  2. create new drawing stack of following
    drawPoint->drawLine->(drawRect,drawPolygon )
    drawPoint->drawEllipse->drawCircle
  3. moving object rendering from object to renderer API's ( or update with no QPainter )
  4. add parallel drawing ( via quandrants and rq ) and collecting in different pixmaps
  5. combined all results to final pixmap
  6. in canvas gui, put pixmap "image" in painter ( in paint event ) to render final image

src/ is tooooo big

Hi Levon,

Please break src/ into modules such as commands, shapes ... ինձանից լավ գիտես ոնց ։Դ
Cheers,
Elen

log-replay : issue with replaying command commit

Following code is not replaying correctly

incmdCreateObjPolygon
dicmdCanvasMouseClick -point (261,160) 
dicmdCanvasMouseClick -point (261,160) 
dicmdCanvasMouseClick -point (500,88) 
dicmdCanvasMouseClick -point (500,88) 
dicmdCanvasMouseClick -point (513,211) 
dicmdCanvasMouseClick -point (513,211) 
dicmdCanvasMouseClick -point (433,288) 
dicmdCanvasMouseClick -point (433,288) 
dicmdCanvasMouseClick -point (433,288) 
dicmdCanvasMouseClick -point (433,288) 
dicmdCanvasMouseClick -point (305,280) 
dicmdCanvasMouseClick -point (305,280) 
dicmdCanvasMouseClick -point (243,254) 
dicmdCanvasMouseClick -point (243,254) 
dicmdCanvasMouseClick -point (237,204) 
dicmdCanvasMouseClick -point (237,204) 
dicmdCanvasMouseDblClick -point (198,188)
incmdCreateObjEllipse
dicmdCanvasMouseClick -point (383,156) 
dicmdCanvasMouseClick -point (436,215) 
dicmdCanvasMouseClick -point (607,313) 
dicmdCanvasMouseClick -point (663,360) 
incmdSelectShapesByRegion
dicmdCanvasMouseClick -point (70,30) 
dicmdCanvasMouseClick -point (798,602)

mingw32 build broken :[

building on mingw32 no longer available after moving to cmake hierarchical bsys
: (((((((

Fix coverites

c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_idle_command' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_current_command' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_main_widget' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'

c:\users\elen\desktop\my_projects\qt_painter\src\gui\controller.hpp(32) : warning C26495: Variable 'controller::type' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\core\rq\rq_object.hpp(95): error C2947: expecting '>' to terminate template-argument-list, found '<'
c:\users\elen\desktop\my_projects\qt_painter\src\core\rq\rq_object.hpp(95): error C2061: syntax error: identifier 'T'
c:\users\elen\desktop\my_projects\qt_painter\src\core\rq\rq_object.hpp(97): error C2631: 'RQline': a class or enum cannot be defined in an alias template
c:\users\elen\desktop\my_projects\qt_painter\src\core\rq\node.hpp(8): error C2143: syntax error: missing ';' before '{'
c:\users\elen\desktop\my_projects\qt_painter\src\core\rq\node.hpp(8): error C2447: '{': missing function header (old-style formal list?)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\deque(32): error C2631: '_Deque_unchecked_const_iterator': a class or enum cannot be defined in an alias template
C:/Users/elen/Desktop/my_projects/qt_painter/src/commands/command_manager.cpp: error C2988: unrecognizable template declaration/definition
C:/Users/elen/Desktop/my_projects/qt_painter/src/commands/command_manager.cpp: error C2059: syntax error: 'namespace'
C:/Users/elen/Desktop/my_projects/qt_painter/src/commands/command_manager.cpp: fatal error C1903: unable to recover from previous error(s); stopping compilation
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27031.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

cl /I"C:/Users/elen/CMakeBuilds/aa3f6f1b-85fd-c639-b9ed-245bea48eb48/build/x64-Debug (default)/src/core/core_autogen/include" /I"C:/Programs/Qt/5.11.1/include" /I"C:/Programs/Qt/5.11.1/include/QtCore" /I"C:/Programs/Qt/5.11.1/include/QtGui" /I"C:/Programs/Qt/5.11.1/include/QtWidgets" /D CODE_ANALYSIS /analyze /analyze:only /analyze:plugin"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\EspXEngine.dll" /analyze:plugin"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\localespc.dll" /c /analyze:ruleset"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Team Tools\Static Analysis Tools\Rule Sets\NativeRecommendedRules.ruleset" "C:/Users/elen/Desktop/my_projects/qt_painter/src/core/runtime_environment.cpp" "C:/Users/elen/Desktop/my_projects/qt_painter/src/core/service.cpp" "C:/Users/elen/Desktop/my_projects/qt_painter/src/core/shape_creator.cpp" "C:/Users/elen/Desktop/my_projects/qt_painter/src/core/shapes.cpp" "C:/Users/elen/Desktop/my_projects/qt_painter/src/core/working_set.cpp"

runtime_environment.cpp
c:\users\elen\desktop\my_projects\qt_painter\src\gui\controller.hpp(32) : warning C26495: Variable 'controller::type' is uninitialized. Always initialize a member variable (type.6).

c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_idle_command' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_current_command' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_main_widget' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\gui\controller.hpp(32) : warning C26495: Variable 'controller::type' is uninitialized. Always initialize a member variable (type.6).

c:\users\elen\desktop\my_projects\qt_painter\src\core\rq\rq_object.hpp(95): error C2947: expecting '>' to terminate template-argument-list, found '<'
c:\users\elen\desktop\my_projects\qt_painter\src\core\rq\rq_object.hpp(95): error C2061: syntax error: identifier 'T'
c:\users\elen\desktop\my_projects\qt_painter\src\core\rq\rq_object.hpp(97): error C2631: 'RQline': a class or enum cannot be defined in an alias template
c:\users\elen\desktop\my_projects\qt_painter\src\core\rq\node.hpp(8): error C2143: syntax error: missing ';' before '{'
c:\users\elen\desktop\my_projects\qt_painter\src\core\rq\node.hpp(8): error C2447: '{': missing function header (old-style formal list?)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\deque(32): error C2631: '_Deque_unchecked_const_iterator': a class or enum cannot be defined in an alias template
C:/Users/elen/Desktop/my_projects/qt_painter/src/gui/canvas.cpp: error C2988: unrecognizable template declaration/definition
C:/Users/elen/Desktop/my_projects/qt_painter/src/gui/canvas.cpp: error C2059: syntax error: 'namespace'
C:/Users/elen/Desktop/my_projects/qt_painter/src/gui/canvas.cpp: fatal error C1903: unable to recover from previous error(s); stopping compilation
controller.cpp
c:\users\elen\cmakebuilds\aa3f6f1b-85fd-c639-b9ed-245bea48eb48\build\x64-debug (default).tmp\lib\codeanalysis\predefined c++ types (compiler internal)(33) : warning C28241: The annotation 'SAL_name' for 'new' on 'return' is not recognized.
c:\users\elen\cmakebuilds\aa3f6f1b-85fd-c639-b9ed-245bea48eb48\build\x64-debug (default).tmp\lib\codeanalysis\predefined c++ types (compiler internal)(33) : warning C28285: For function 'new' 'return' syntax error in '("Ret_notnull","","2")' near '("Ret_notnull",""'.
c:\users\elen\cmakebuilds\aa3f6f1b-85fd-c639-b9ed-245bea48eb48\build\x64-debug (default).tmp\lib\codeanalysis\predefined c++ types (compiler internal)(33) : warning C28241: The annotation 'SAL_name' for 'new' on 'return' is not recognized.
c:\users\elen\cmakebuilds\aa3f6f1b-85fd-c639-b9ed-245bea48eb48\build\x64-debug (default).tmp\lib\codeanalysis\predefined c++ types (compiler internal)(33) : warning C28285: For function 'new' 'return' syntax error in '("Post_writable_byte_size","","2")' near '("Post_writable_byte_size",""'.
c:\users\elen\cmakebuilds\aa3f6f1b-85fd-c639-b9ed-245bea48eb48\build\x64-debug (default).tmp\lib\codeanalysis\predefined c++ types (compiler internal)(33) : warning C28241: The annotation 'SAL_writableTo' for 'new' on 'return' is not recognized.
c:\users\elen\cmakebuilds\aa3f6f1b-85fd-c639-b9ed-245bea48eb48\build\x64-debug (default).tmp\lib\codeanalysis\predefined c++ types (compiler internal)(33) : warning C28285: For function 'new' 'return' syntax error in '(byteCount(__formal(0,_Size)))' near '(byteCount(__formal(0'.

c:\users\elen\desktop\my_projects\qt_painter\src\gui\controller.hpp(32) : warning C26495: Variable 'controller::type' is uninitialized. Always initialize a member variable (type.6).

c:\users\elen\desktop\my_projects\qt_painter\src\gui\controller.hpp(32) : warning C26495: Variable 'controller::type' is uninitialized. Always initialize a member variable (type.6).

c:\programs\qt\5.11.1\include\qtwidgets\qstyleoption.h(670) : warning C26495: Variable 'QStyleOptionGraphicsItem::levelOfDetail' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(29) : warning C26495: Variable 'create_shape_gui::m_line_button' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(29) : warning C26495: Variable 'create_shape_gui::m_pen_button' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(29) : warning C26495: Variable 'create_shape_gui::m_polygon_button' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(29) : warning C26495: Variable 'create_shape_gui::m_rect_button' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(29) : warning C26495: Variable 'create_shape_gui::m_ellipse_button' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(58) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(60) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(75) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(92) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(87) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(114) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(125) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(152) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(160) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(209) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\create_shape_gui.cpp(201) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).

c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_idle_command' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_current_command' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_main_widget' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'

c:\users\elen\desktop\my_projects\qt_painter\src\gui\main_window.cpp(75) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\main_window.cpp(74) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\main_window.cpp(76) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\main_window.cpp(73) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\main_window.cpp(77) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\main_window.cpp(78) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\main_window.cpp(79) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\main_window.cpp(80) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).

c:\users\elen\desktop\my_projects\qt_painter\src\gui\controller.hpp(32) : warning C26495: Variable 'controller::type' is uninitialized. Always initialize a member variable (type.6).

c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_pen_cap_style' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_dot_line' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_solid_line' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_brush_layout' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_pen_layout' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_dash_dot_dot_line' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_pen_width' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_dash_dot_line' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_brush_style' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_pen_join_style' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_dash_line' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_pen_color' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(19) : warning C26495: Variable 'pen_brush_gui::m_brush_color' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(171) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(168) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(165) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(163) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(167) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(161) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(162) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(166) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(169) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(170) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
c:\users\elen\desktop\my_projects\qt_painter\src\gui\pen_brush_gui.cpp(164) : warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).

c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_idle_command' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\io../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_current_command' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\io../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_main_widget' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\io../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\io\log_reader.cpp(4) : warning C26495: Variable 'LogReader::timer' is uninitialized. Always initialize a member variable (type.6).

c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_idle_command' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\io../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_current_command' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\io../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
c:\users\elen\desktop\my_projects\qt_painter\src\commands\command_manager.hpp(77) : warning C26495: Variable 'command_manager::m_main_widget' is uninitialized. Always initialize a member variable (type.6).
c:\users\elen\desktop\my_projects\qt_painter\src\io../commands/command_manager.hpp(77): note: This diagnostic occurred in the compiler generated function 'command_manager::command_manager(void)'
Code analysis complete.

region query service

For expanding tool functionality we need region query service.

RegionQuery* rq = RegionQuery::get_instance()

Consider following usage:

update(WorkingSet* ); // for update
std::vector<IShape*> get_shapes_in_region(x0,y0,x1,y1) // region based query
IShape* get_shape_under_pos(x,y) // point based query

add status bar to mainwindow

As tool user I would like to have indication of what's happening now.
Like what is the tool's current status, what are the inputs that current command is waiting for, etc..

APIs are inconstitent

following to be considered as design issues

  1. runtime vs working set
  2. setpos1 setpos2 vs start , end, addpoint

fixs ura?

add undo/redo (GUI)

  1. add buttons to ribbon
  2. make connections till canvas.cpp
  3. add dummy invocations in canvas.cpp

add messanger project

need to have both for IO and debugging proposes
we will have two files

  1. painter.log ( all commands log and info and crash stack )
  2. painter.cmd ( all commands so this file can be replayed with painter -replay replay.cmd )

( command ) Error handling

Need way to have some sort of error handling for simple cases,
such as command name and command function name is different,
which is currently leading to crash.

define assert_xxx??
assert_if
assert_return
assert_through

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.