FunShapes
Editor 2D graphical objects / Редактор графических 2D объектов
Description
The editor is written on C ++ using cross-platform Qt5. It can serve as a template for novice programmers using Qt to create their own programs using 2D graphics. In the program code can be found examples:
- Class QSignalMapper as switch events / signals arising in the program
- Writing to file, read from file QFile, QFileDialog, QTextStream
- Creating your own context menu QMenu
- Implementation mechanism undo / redo actions made by the user (Undo/Redo). He can also be used to automation software - as record/playback macros, animation etc.
- Transformation of a graphic view of the scene / objects (scale, rotation) QTransform
- Working with View of Scene QGraphicsView coordinate transformation (mapFrom…)
- Drawing with QPainterPath
- Overriding the paint () method of the object to control the process of drawing (use gradient fill, "highlighting", the definition of the order of drawing intersecting objects, control the scale drawing) QPainter
- Convert binary data to Base64 and back QString, QByteArray
- Selecting multiple objects with the mouse Rubber Band Region
The editor allows you to create and edit embedded types of objects, such as:
- Triangle
- Rectangle
- Circle
- Text
- Image
Objects might change the following parameters:
- Position
- Geometry(for objects "Image"/"Text", image/text scaled for object area)
- Orientation (angle on the Z axis)
- Color (except object "Image")
- Embedded text of object as well as the font, size and color of this text (except "Text" object)
Scene supports clipboard operations (Cut / Copy / Paste), and has a mechanism of undo / redo changes for objects (Undo / Redo). The state of the scene with objects and all their parameters (including images of objects "Image") can be saved to a file. Scene's file is a simple text file where the scene, objects and their parameters are described in the XML format.