02 GUI & Scribble jjcao Based on the idea of Professor Ligang Liu
Demo
Requirements Scribble based on QT Draw line, ellipse, rectangle & polygon, & draw freehand Encapsulate each primitive into a Class, such as Line, Ellipse, Rect, Polygon, Freehand. All primitive should inherent from a parent class: Shape. Set the color, thickness, type of the pen Draw a Bezier curve [advance] Note: the input of polygon can be finished by single click of the mouse’s right button.
The objective 体会QT的GUI编程,学习添加菜单、工具条,鼠标交互,绘图,对话框,等 体会QT的signal & slot机制 巩固类的封装 学习类的继承和多态
The process 08-QT-GUI.pptx D:\Qt\4.7.2\bin\assistant.exe C++ GUI Programming with Qt4 Imitate the base project in hw04_GuiScribble.rar to add functions of Ellipse, Rect, Polygon