Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSProgressBar_p.h 00003 ------------------- 00004 begin : 19/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 AQSPROGRESSBAR_P_H_ 00020 #define AQSPROGRESSBAR_P_H_ 00021 00022 #include "AQSFrame_p.h" 00023 #include <qprogressbar.h> 00024 00025 class AQSProgressBar : public AQSFrame 00026 { 00027 Q_OBJECT 00028 00029 AQ_DECLARE_AQS_OBJECT(ProgressBar, Frame); 00030 00031 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00032 public slots: 00033 int totalSteps() const; 00034 int progress() const; 00035 const QString &progressString() const; 00036 void setCenterIndicator(bool); 00037 bool centerIndicator() const; 00038 void setIndicatorFollowsStyle(bool); 00039 bool indicatorFollowsStyle() const; 00040 bool percentageVisible() const; 00041 void setPercentageVisible(bool); 00042 00043 protected: 00044 static void *construct(const QSArgumentList &args) { 00045 QMap<int, QStringList> candidates; 00046 candidates[0].append(QString::null); 00047 candidates[1].append(QString::fromLatin1("QWidget*")); 00048 candidates[2].append(QString::fromLatin1("QWidget*,QString")); 00049 candidates[3].append(QString::fromLatin1("QWidget*,QString,WFlags")); 00050 candidates[1].append(QString::fromLatin1("int")); 00051 candidates[2].append(QString::fromLatin1("int,QWidget*")); 00052 candidates[3].append(QString::fromLatin1("int,QWidget*,QString")); 00053 candidates[4].append(QString::fromLatin1("int,QWidget*,QString,WFlags")); 00054 QString sgt(castArgsSignature(args, candidates)); 00055 if (sgt.isEmpty()) 00056 return new QProgressBar; 00057 if (sgt == QString::fromLatin1("QWidget*")) 00058 return new QProgressBar(argValue<QWidget *>(args[0])); 00059 if (sgt == QString::fromLatin1("QWidget*,QString")) 00060 return new QProgressBar(argValue<QWidget *>(args[0]), 00061 *(argValue<QString *>(args[1]))); 00062 if (sgt == QString::fromLatin1("QWidget*,QString,WFlags")) 00063 return new QProgressBar(argValue<QWidget *>(args[0]), 00064 *(argValue<QString *>(args[1])), 00065 static_cast<WFlags>(args[2].variant().toUInt())); 00066 if (sgt == QString::fromLatin1("int")) 00067 return new QProgressBar(args[0].variant().toInt()); 00068 if (sgt == QString::fromLatin1("int,QWidget*")) 00069 return new QProgressBar(args[0].variant().toInt(), 00070 argValue<QWidget *>(args[1])); 00071 if (sgt == QString::fromLatin1("int,QWidget*,QString")) 00072 return new QProgressBar(args[0].variant().toInt(), 00073 argValue<QWidget *>(args[1]), 00074 *(argValue<QString *>(args[2]))); 00075 if (sgt == QString::fromLatin1("int,QWidget*,QString,WFlags")) 00076 return new QProgressBar(args[0].variant().toInt(), 00077 argValue<QWidget *>(args[1]), 00078 *(argValue<QString *>(args[2])), 00079 static_cast<WFlags>(args[3].variant().toUInt())); 00080 return 0; 00081 } 00082 00083 public: 00084 static QMap<int, QStringList> candidateConstructors() { 00085 QMap<int, QStringList> candidates; 00086 candidates[0].append(QString::null); 00087 candidates[1].append(QString::fromLatin1("QWidget*")); 00088 candidates[2].append(QString::fromLatin1("QWidget*,QString")); 00089 candidates[3].append(QString::fromLatin1("QWidget*,QString,WFlags")); 00090 candidates[1].append(QString::fromLatin1("int")); 00091 candidates[2].append(QString::fromLatin1("int,QWidget*")); 00092 candidates[3].append(QString::fromLatin1("int,QWidget*,QString")); 00093 candidates[4].append(QString::fromLatin1("int,QWidget*,QString,WFlags")); 00094 return candidates; 00095 } 00096 //@AQ_END_DEF_PUB_SLOTS@ 00097 }; 00098 00099 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00100 inline int AQSProgressBar::totalSteps() const 00101 { 00102 AQ_CALL_RET_V(totalSteps(), int); 00103 } 00104 inline int AQSProgressBar::progress() const 00105 { 00106 AQ_CALL_RET_V(progress(), int); 00107 } 00108 inline const QString &AQSProgressBar::progressString() const 00109 { 00110 AQ_CALL_RET_V(progressString(), QString); 00111 } 00112 inline void AQSProgressBar::setCenterIndicator(bool arg0) 00113 { 00114 AQ_CALL_VOID(setCenterIndicator(arg0)); 00115 } 00116 inline bool AQSProgressBar::centerIndicator() const 00117 { 00118 AQ_CALL_RET_V(centerIndicator(), bool); 00119 } 00120 inline void AQSProgressBar::setIndicatorFollowsStyle(bool arg0) 00121 { 00122 AQ_CALL_VOID(setIndicatorFollowsStyle(arg0)); 00123 } 00124 inline bool AQSProgressBar::indicatorFollowsStyle() const 00125 { 00126 AQ_CALL_RET_V(indicatorFollowsStyle(), bool); 00127 } 00128 inline bool AQSProgressBar::percentageVisible() const 00129 { 00130 AQ_CALL_RET_V(percentageVisible(), bool); 00131 } 00132 inline void AQSProgressBar::setPercentageVisible(bool arg0) 00133 { 00134 AQ_CALL_VOID(setPercentageVisible(arg0)); 00135 } 00136 //@AQ_END_IMP_PUB_SLOTS@ 00137 00138 #endif /* AQSPROGRESSBAR_P_H_ */ 00139 // @AQSWIDGET@