Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSSettings_p.h 00003 ------------------- 00004 begin : 18/04/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 AQSSETTINGS_P_H_ 00020 #define AQSSETTINGS_P_H_ 00021 00022 #include "AQSVoidPtr_p.h" 00023 #include "AQObjects.h" 00024 00025 class AQSSettings : public AQSVoidPtr 00026 { 00027 Q_OBJECT 00028 00029 AQ_DECLARE_AQS_VOID_AQOBJECT(Settings, VoidPtr); 00030 00031 protected: 00032 void specializedInternalFinish() { 00033 if (!wrap_) 00034 delete o_; 00035 } 00036 00037 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00038 public slots: 00039 QStringList readListEntry(const QString &, bool* = 0); 00040 QString readEntry(const QString &, const QString& = QString::null, bool* = 0); 00041 int readNumEntry(const QString &, int = 0, bool* = 0); 00042 double readDoubleEntry(const QString &, double = 0, bool* = 0); 00043 bool readBoolEntry(const QString &, bool = false, bool* = 0); 00044 bool writeEntry(const QString &, bool); 00045 bool writeEntry(const QString &, double); 00046 bool writeEntry(const QString &, int); 00047 bool writeEntry(const QString &, const QString &); 00048 bool writeEntryList(const QString &, const QStringList &); 00049 00050 protected: 00051 static void *construct(const QSArgumentList &args) { 00052 QMap<int, QStringList> candidates; 00053 candidates[0].append(QString::null); 00054 QString sgt(castArgsSignature(args, candidates)); 00055 if (sgt.isEmpty()) 00056 return new AQSettings; 00057 return 0; 00058 } 00059 00060 public: 00061 static QMap<int, QStringList> candidateConstructors() { 00062 QMap<int, QStringList> candidates; 00063 candidates[0].append(QString::null); 00064 return candidates; 00065 } 00066 //@AQ_END_DEF_PUB_SLOTS@ 00067 }; 00068 00069 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00070 inline QStringList AQSSettings::readListEntry(const QString &arg0, bool *arg1) 00071 { 00072 AQ_CALL_RET_V(readListEntry(arg0, arg1), QStringList); 00073 } 00074 inline QString AQSSettings::readEntry(const QString &arg0, const QString &arg1, bool *arg2) 00075 { 00076 AQ_CALL_RET_V(readEntry(arg0, arg1, arg2), QString); 00077 } 00078 inline int AQSSettings::readNumEntry(const QString &arg0, int arg1, bool *arg2) 00079 { 00080 AQ_CALL_RET_V(readNumEntry(arg0, arg1, arg2), int); 00081 } 00082 inline double AQSSettings::readDoubleEntry(const QString &arg0, double arg1, bool *arg2) 00083 { 00084 AQ_CALL_RET_V(readDoubleEntry(arg0, arg1, arg2), double); 00085 } 00086 inline bool AQSSettings::readBoolEntry(const QString &arg0, bool arg1, bool *arg2) 00087 { 00088 AQ_CALL_RET_V(readBoolEntry(arg0, arg1, arg2), bool); 00089 } 00090 inline bool AQSSettings::writeEntry(const QString &arg0, bool arg1) 00091 { 00092 AQ_CALL_RET_V(writeEntry(arg0, arg1), bool); 00093 } 00094 inline bool AQSSettings::writeEntry(const QString &arg0, double arg1) 00095 { 00096 AQ_CALL_RET_V(writeEntry(arg0, arg1), bool); 00097 } 00098 inline bool AQSSettings::writeEntry(const QString &arg0, int arg1) 00099 { 00100 AQ_CALL_RET_V(writeEntry(arg0, arg1), bool); 00101 } 00102 inline bool AQSSettings::writeEntry(const QString &arg0, const QString &arg1) 00103 { 00104 AQ_CALL_RET_V(writeEntry(arg0, arg1), bool); 00105 } 00106 inline bool AQSSettings::writeEntryList(const QString &arg0, const QStringList &arg1) 00107 { 00108 AQ_CALL_RET_V(writeEntryList(arg0, arg1), bool); 00109 } 00110 //@AQ_END_IMP_PUB_SLOTS@ 00111 00112 #endif /* AQSSETTINGS_P_H_ */ 00113 // @AQOBJECT_VOID@