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