![erase tool in pixelshop erase tool in pixelshop](https://www.mrswizard.com/images2/psp_eraser_tools_options.jpg)
setting up 'exclusive correspondence' properly constructors (ctor) correctly, custom class's ctor won't have the parent ptr set. TODO: BUG: for unknown reason, the QT auto generated code doesn't set up the set up auto-generated code from QT Creator PixelBrush* getBrush() const īool checkValidPixelSize(QString str) const QMainWindow, which hooks up all the controller (user input MVC:C) events to internal models (MVC:M), setting up signals and slots properly. In the current implementation, all the xxx_tools are sharing the same brush, however, a better approach is to let each tool define (or use) its own brush. each xxx_tool.h is associated with an instance of a brush. It is used by drawingcanvas.h to store historic image copies.Ī QDialog that prompts up when the user tries to create a new file.Ī data structure that defines some usual properties like brush size, brush opacity, brush AA, etc.
Erase tool in pixelshop update#
Besides, update the internal graphics buffer underlying the picture and the display graphics buffer for showing the picture to users.Īn enum class defines all the possible drawing tools available.Ī general template class used for doing redo/ undo functions. Implement the main ‘drawing canvas’, detect mouse events, and dispatch the actual drawing to the corresponding tool. Which implement the interface pure functions, defining what should happen when using a particular tool. They all inherit from the interface idrawingtool.h Like circletool.h, erasertool.h, xxx_tool.h Project entry point, used to launch the loop pxielshop.h (QMainWindow)