Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSMouseEvent_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSMouseEvent_p.h
00003  -------------------
00004  begin                : 22/02/2011
00005  copyright            : (C) 2003-2011 by InfoSiAL S.L.
00006  email                : mail@infosial.com
00007  ***************************************************************************/
00008 /***************************************************************************
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; version 2 of the License.               *
00012  ***************************************************************************/
00013 /***************************************************************************
00014  Este  programa es software libre. Puede redistribuirlo y/o modificarlo
00015  bajo  los  términos  de  la  Licencia  Pública General de GNU   en  su
00016  versión 2, publicada  por  la  Free  Software Foundation.
00017  ***************************************************************************/
00018 
00019 #ifndef AQSMOUSEEVENT_P_H_
00020 #define AQSMOUSEEVENT_P_H_
00021 
00022 #include "AQSEvent_p.h"
00023 #include <qevent.h>
00024 
00025 class AQSMouseEvent : public AQSEvent
00026 {
00027   Q_OBJECT
00028 
00029   AQ_DECLARE_AQS_VOID(MouseEvent, Event);
00030 
00031   //@AQ_BEGIN_DEF_PUB_SLOTS@
00032 public slots:
00033   QPoint pos() const;
00034   QPoint globalPos() const;
00035   int x() const;
00036   int y() const;
00037   int globalX() const;
00038   int globalY() const;
00039   uint button() const;
00040   uint state() const;
00041   uint stateAfter() const;
00042   bool isAccepted() const;
00043   void accept();
00044   void ignore();
00045 
00046 protected:
00047   static void *construct(const QSArgumentList &args) {
00048     QMap<int, QStringList> candidates;
00049     candidates[4].append(QString::fromLatin1("QEvent::Type,QPoint,int,int"));
00050     candidates[5].append(QString::fromLatin1("QEvent::Type,QPoint,QPoint,int,int"));
00051     QString sgt(castArgsSignature(args, candidates));
00052     if (sgt == QString::fromLatin1("QEvent::Type,QPoint,int,int"))
00053       return new QMouseEvent(static_cast<QEvent::Type>(args[0].variant().toUInt()),
00054                              *(argValue<QPoint *>(args[1])),
00055                              args[2].variant().toInt(),
00056                              args[3].variant().toInt());
00057     if (sgt == QString::fromLatin1("QEvent::Type,QPoint,QPoint,int,int"))
00058       return new QMouseEvent(static_cast<QEvent::Type>(args[0].variant().toUInt()),
00059                              *(argValue<QPoint *>(args[1])),
00060                              *(argValue<QPoint *>(args[2])),
00061                              args[3].variant().toInt(),
00062                              args[4].variant().toInt());
00063     return 0;
00064   }
00065 
00066 public:
00067   static QMap<int, QStringList> candidateConstructors() {
00068     QMap<int, QStringList> candidates;
00069     candidates[4].append(QString::fromLatin1("QEvent::Type,QPoint,int,int"));
00070     candidates[5].append(QString::fromLatin1("QEvent::Type,QPoint,QPoint,int,int"));
00071     return candidates;
00072   }
00073   //@AQ_END_DEF_PUB_SLOTS@
00074 };
00075 
00076 //@AQ_BEGIN_IMP_PUB_SLOTS@
00077 inline QPoint AQSMouseEvent::pos() const
00078 {
00079   AQ_CALL_RET_V(pos(), QPoint);
00080 }
00081 inline QPoint AQSMouseEvent::globalPos() const
00082 {
00083   AQ_CALL_RET_V(globalPos(), QPoint);
00084 }
00085 inline int AQSMouseEvent::x() const
00086 {
00087   AQ_CALL_RET_V(x(), int);
00088 }
00089 inline int AQSMouseEvent::y() const
00090 {
00091   AQ_CALL_RET_V(y(), int);
00092 }
00093 inline int AQSMouseEvent::globalX() const
00094 {
00095   AQ_CALL_RET_V(globalX(), int);
00096 }
00097 inline int AQSMouseEvent::globalY() const
00098 {
00099   AQ_CALL_RET_V(globalY(), int);
00100 }
00101 inline uint AQSMouseEvent::button() const
00102 {
00103   AQ_CALL_RET_V(button(), uint);
00104 }
00105 inline uint AQSMouseEvent::state() const
00106 {
00107   AQ_CALL_RET_V(state(), uint);
00108 }
00109 inline uint AQSMouseEvent::stateAfter() const
00110 {
00111   AQ_CALL_RET_V(stateAfter(), uint);
00112 }
00113 inline bool AQSMouseEvent::isAccepted() const
00114 {
00115   AQ_CALL_RET_V(isAccepted(), bool);
00116 }
00117 inline void AQSMouseEvent::accept()
00118 {
00119   AQ_CALL_VOID(accept());
00120 }
00121 inline void AQSMouseEvent::ignore()
00122 {
00123   AQ_CALL_VOID(ignore());
00124 }
00125 //@AQ_END_IMP_PUB_SLOTS@
00126 
00127 #endif /* AQSMOUSEEVENT_P_H_ */
00128 // @AQSVOIDPTR@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'