# # ifndef SHAPE_H
# define SHAPE_H
#include
The namespace Ui {
The class Shape;
}
The class Shape: public QMainWindow
{
Q_OBJECT
Public:
Explicit Shape (QWidget * parent=0);
To Shape ();
Enum Code {Line, the Rect}; Shape ();
Void setStart (QPoint s)
{
Start=s;
}
Void setEnd (QPoint e)
{
End=e;
}
The QPoint the startPoint ()
{
Return the start;
}
The QPoint endPoint ()
{
Return the end;
}
Void virtual paint (QPainter & amp; Painter)=0;
Private:
Ui: : Shape * Ui;
};
# endif//SHAPE_H
CodePudding user response:
Add QPoint class start;CodePudding user response:
Private:Ui: : Shape * Ui;
The QPoint start;
The QPoint end;
Not defined by the start and end
CodePudding user response:
Thank you very much! Successfully solved