Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSKeyEvent_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSKeyEvent_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 AQSKEYEVENT_P_H_
00020 #define AQSKEYEVENT_P_H_
00021 
00022 #include "AQSEvent_p.h"
00023 #include <qevent.h>
00024 
00025 class AQSKeyEvent : public AQSEvent
00026 {
00027   Q_OBJECT
00028 
00029   AQ_DECLARE_AQS_VOID(KeyEvent, Event);
00030 
00031   //@AQ_BEGIN_DEF_PUB_SLOTS@
00032 public slots:
00033   int key() const;
00034   int ascii() const;
00035   uint state() const;
00036   uint stateAfter() const;
00037   bool isAccepted() const;
00038   QString text() const;
00039   bool isAutoRepeat() const;
00040   int count() const;
00041   void accept();
00042   void ignore();
00043 
00044 protected:
00045   static void *construct(const QSArgumentList &args) {
00046     QMap<int, QStringList> candidates;
00047     candidates[4].append(QString::fromLatin1("QEvent::Type,int,int,int"));
00048     candidates[5].append(QString::fromLatin1("QEvent::Type,int,int,int,QString"));
00049     candidates[6].append(QString::fromLatin1("QEvent::Type,int,int,int,QString,bool"));
00050     candidates[7].append(QString::fromLatin1("QEvent::Type,int,int,int,QString,bool,ushort"));
00051     QString sgt(castArgsSignature(args, candidates));
00052     if (sgt == QString::fromLatin1("QEvent::Type,int,int,int"))
00053       return new QKeyEvent(static_cast<QEvent::Type>(args[0].variant().toUInt()),
00054                            args[1].variant().toInt(),
00055                            args[2].variant().toInt(),
00056                            args[3].variant().toInt());
00057     if (sgt == QString::fromLatin1("QEvent::Type,int,int,int,QString"))
00058       return new QKeyEvent(static_cast<QEvent::Type>(args[0].variant().toUInt()),
00059                            args[1].variant().toInt(),
00060                            args[2].variant().toInt(),
00061                            args[3].variant().toInt(),
00062                            *(argValue<QString *>(args[4])));
00063     if (sgt == QString::fromLatin1("QEvent::Type,int,int,int,QString,bool"))
00064       return new QKeyEvent(static_cast<QEvent::Type>(args[0].variant().toUInt()),
00065                            args[1].variant().toInt(),
00066                            args[2].variant().toInt(),
00067                            args[3].variant().toInt(),
00068                            *(argValue<QString *>(args[4])),
00069                            args[5].variant().toBool());
00070     if (sgt == QString::fromLatin1("QEvent::Type,int,int,int,QString,bool,ushort"))
00071       return new QKeyEvent(static_cast<QEvent::Type>(args[0].variant().toUInt()),
00072                            args[1].variant().toInt(),
00073                            args[2].variant().toInt(),
00074                            args[3].variant().toInt(),
00075                            *(argValue<QString *>(args[4])),
00076                            args[5].variant().toBool(),
00077                            *(argValue<ushort *>(args[6])));
00078     return 0;
00079   }
00080 
00081 public:
00082   static QMap<int, QStringList> candidateConstructors() {
00083     QMap<int, QStringList> candidates;
00084     candidates[4].append(QString::fromLatin1("QEvent::Type,int,int,int"));
00085     candidates[5].append(QString::fromLatin1("QEvent::Type,int,int,int,QString"));
00086     candidates[6].append(QString::fromLatin1("QEvent::Type,int,int,int,QString,bool"));
00087     candidates[7].append(QString::fromLatin1("QEvent::Type,int,int,int,QString,bool,ushort"));
00088     return candidates;
00089   }
00090   //@AQ_END_DEF_PUB_SLOTS@
00091 };
00092 
00093 //@AQ_BEGIN_IMP_PUB_SLOTS@
00094 inline int AQSKeyEvent::key() const
00095 {
00096   AQ_CALL_RET_V(key(), int);
00097 }
00098 inline int AQSKeyEvent::ascii() const
00099 {
00100   AQ_CALL_RET_V(ascii(), int);
00101 }
00102 inline uint AQSKeyEvent::state() const
00103 {
00104   AQ_CALL_RET_V(state(), uint);
00105 }
00106 inline uint AQSKeyEvent::stateAfter() const
00107 {
00108   AQ_CALL_RET_V(stateAfter(), uint);
00109 }
00110 inline bool AQSKeyEvent::isAccepted() const
00111 {
00112   AQ_CALL_RET_V(isAccepted(), bool);
00113 }
00114 inline QString AQSKeyEvent::text() const
00115 {
00116   AQ_CALL_RET_V(text(), QString);
00117 }
00118 inline bool AQSKeyEvent::isAutoRepeat() const
00119 {
00120   AQ_CALL_RET_V(isAutoRepeat(), bool);
00121 }
00122 inline int AQSKeyEvent::count() const
00123 {
00124   AQ_CALL_RET_V(count(), int);
00125 }
00126 inline void AQSKeyEvent::accept()
00127 {
00128   AQ_CALL_VOID(accept());
00129 }
00130 inline void AQSKeyEvent::ignore()
00131 {
00132   AQ_CALL_VOID(ignore());
00133 }
00134 //@AQ_END_IMP_PUB_SLOTS@
00135 
00136 #endif /* AQSKEYEVENT_P_H_ */
00137 // @AQSVOIDPTR@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'