00001
00002
00003
00004
00005
00006
00007 #include "QEvent.h"
00008
00009
00010 #include <iostream>
00011 using namespace std;
00012
00013
00014
00015
00016
00017 QEventType QEvent::getType()
00018 {
00019 return Type;
00020 }
00021
00022
00023 void QEvent::setType( QEventType newValue )
00024 {
00025 Type = newValue;
00026 }
00027
00028
00029 QMouseButton QEvent::getButton()
00030 {
00031 return Button;
00032 }
00033
00034
00035 void QEvent::setButton( QMouseButton newValue )
00036 {
00037 Button = newValue;
00038 }
00039
00040
00041 int QEvent::getX()
00042 {
00043 return X;
00044 }
00045
00046
00047 void QEvent::setX( int newValue )
00048 {
00049 X = newValue;
00050 }
00051
00052
00053 int QEvent::getY()
00054 {
00055 return Y;
00056 }
00057
00058
00059 void QEvent::setY( int newValue )
00060 {
00061 Y = newValue;
00062 }
00063
00064
00065 int QEvent::getKey()
00066 {
00067 return Key;
00068 }
00069
00070
00071 void QEvent::setKey( int newValue )
00072 {
00073 Key = newValue;
00074 }
00075
00076
00077
00078
00079 void QEvent::copyFrom( QEvent* from )
00080 {
00081 setType(from->getType());
00082 setButton(from->getButton());
00083 setX(from->getX());
00084 setY(from->getY());
00085 setKey(from->getKey());
00086 }
00087
00088
00089
00090
00091 void QEvent::print()
00092 {
00093 cout << "Class : QEvent" << endl;
00094 cout << "Type = " << Type << endl;
00095 cout << "Button = " << Button << endl;
00096 cout << "X = " << X << endl;
00097 cout << "Y = " << Y << endl;
00098 cout << "Key = " << Key << endl;
00099 }
00100
00101
00102
00103
00104 QEvent::QEvent( )
00105 {
00106 Type = etDraw;
00107 Button = mbLeft;
00108 X = 0;
00109 Y = 0;
00110 Key = 0;
00111 }
00112
00113
00114
00115
00116 QEvent::~QEvent()
00117 {
00118 }
00119
00120
00121
00122