Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSToolButton_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSToolButton_p.h
00003  -------------------
00004  begin                : 30/01/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 AQSTOOLBUTTON_P_H_
00020 #define AQSTOOLBUTTON_P_H_
00021 
00022 #include "AQSButton_p.h"
00023 #include "AQSIconSet_p.h"
00024 #include <qtoolbutton.h>
00025 
00026 class AQSToolButton : public AQSButton
00027 {
00028   Q_OBJECT
00029 
00030   AQ_DECLARE_AQS_OBJECT(ToolButton, Button);
00031 
00032   //@AQ_BEGIN_DEF_PUB_SLOTS@
00033 public slots:
00034   virtual void setIconSet(QIconSet *);
00035   virtual void setIconSet(AQSIconSet *);
00036   QIconSet *iconSet() const;
00037   void setPopup(QPopupMenu *);
00038   QPopupMenu *popup() const;
00039   void setPopupDelay(int);
00040   void openPopup();
00041   void setAutoRaise(bool);
00042 
00043 protected:
00044   static void *construct(const QSArgumentList &args) {
00045     QMap<int, QStringList> candidates;
00046     candidates[1].append(QString::fromLatin1("QWidget*"));
00047     candidates[2].append(QString::fromLatin1("QWidget*,QString"));
00048     candidates[6].append(QString::fromLatin1("QIconSet*,QString,QString,QObject*,QString,QToolBar*"));
00049     candidates[7].append(QString::fromLatin1("QIconSet*,QString,QString,QObject*,QString,QToolBar*,QString"));
00050     candidates[2].append(QString::fromLatin1("Qt::ArrowType,QWidget*"));
00051     candidates[3].append(QString::fromLatin1("Qt::ArrowType,QWidget*,QString"));
00052     QString sgt(castArgsSignature(args, candidates));
00053     if (sgt == QString::fromLatin1("QWidget*"))
00054       return new QToolButton(argValue<QWidget *>(args[0]));
00055     if (sgt == QString::fromLatin1("QWidget*,QString"))
00056       return new QToolButton(argValue<QWidget *>(args[0]),
00057                              *(argValue<QString *>(args[1])));
00058     if (sgt == QString::fromLatin1("QIconSet*,QString,QString,QObject*,QString,QToolBar*"))
00059       return new QToolButton(*argValue<QIconSet *>(args[0]),
00060                              *(argValue<QString *>(args[1])),
00061                              *(argValue<QString *>(args[2])),
00062                              argValue<QObject *>(args[3]),
00063                              *(argValue<QString *>(args[4])),
00064                              argValue<QToolBar *>(args[5]));
00065     if (sgt == QString::fromLatin1("QIconSet*,QString,QString,QObject*,QString,QToolBar*,QString"))
00066       return new QToolButton(*argValue<QIconSet *>(args[0]),
00067                              *(argValue<QString *>(args[1])),
00068                              *(argValue<QString *>(args[2])),
00069                              argValue<QObject *>(args[3]),
00070                              *(argValue<QString *>(args[4])),
00071                              argValue<QToolBar *>(args[5]),
00072                              *(argValue<QString *>(args[6])));
00073     if (sgt == QString::fromLatin1("Qt::ArrowType,QWidget*"))
00074       return new QToolButton(static_cast<Qt::ArrowType>(args[0].variant().toUInt()),
00075                              argValue<QWidget *>(args[1]));
00076     if (sgt == QString::fromLatin1("Qt::ArrowType,QWidget*,QString"))
00077       return new QToolButton(static_cast<Qt::ArrowType>(args[0].variant().toUInt()),
00078                              argValue<QWidget *>(args[1]),
00079                              *(argValue<QString *>(args[2])));
00080     return 0;
00081   }
00082 
00083 public:
00084   static QMap<int, QStringList> candidateConstructors() {
00085     QMap<int, QStringList> candidates;
00086     candidates[1].append(QString::fromLatin1("QWidget*"));
00087     candidates[2].append(QString::fromLatin1("QWidget*,QString"));
00088     candidates[6].append(QString::fromLatin1("QIconSet*,QString,QString,QObject*,QString,QToolBar*"));
00089     candidates[7].append(QString::fromLatin1("QIconSet*,QString,QString,QObject*,QString,QToolBar*,QString"));
00090     candidates[2].append(QString::fromLatin1("Qt::ArrowType,QWidget*"));
00091     candidates[3].append(QString::fromLatin1("Qt::ArrowType,QWidget*,QString"));
00092     return candidates;
00093   }
00094   //@AQ_END_DEF_PUB_SLOTS@
00095 };
00096 
00097 //@AQ_BEGIN_IMP_PUB_SLOTS@
00098 inline void AQSToolButton::setIconSet(QIconSet *arg0)
00099 {
00100   AQ_CALL_VOID(setIconSet(*arg0));
00101 }
00102 inline void AQSToolButton::setIconSet(AQSIconSet *arg0)
00103 {
00104   AQ_CALL_VOID(setIconSet(*arg0));
00105 }
00106 inline QIconSet *AQSToolButton::iconSet() const
00107 {
00108   AQ_CALL_RET_PTR(iconSet(), QIconSet);
00109 }
00110 inline void AQSToolButton::setPopup(QPopupMenu *arg0)
00111 {
00112   AQ_CALL_VOID(setPopup(arg0));
00113 }
00114 inline QPopupMenu *AQSToolButton::popup() const
00115 {
00116   AQ_CALL_RET(popup());
00117 }
00118 inline void AQSToolButton::setPopupDelay(int arg0)
00119 {
00120   AQ_CALL_VOID(setPopupDelay(arg0));
00121 }
00122 inline void AQSToolButton::openPopup()
00123 {
00124   AQ_CALL_VOID(openPopup());
00125 }
00126 inline void AQSToolButton::setAutoRaise(bool arg0)
00127 {
00128   AQ_CALL_VOID(setAutoRaise(arg0));
00129 }
00130 //@AQ_END_IMP_PUB_SLOTS@
00131 
00132 #endif /* AQSTOOLBUTTON_P_H_ */
00133 // @AQSWIDGET@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'