KTutorial
0.5.1
|
00001 /*************************************************************************** 00002 * Copyright (C) 2011 by Daniel Calviño Sánchez <danxuliu@gmail.com> * 00003 * Copyright (C) 2012 by Daniel Calviño Sánchez <danxuliu@gmail.com> * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; If not, see <http://www.gnu.org/licenses/>. * 00017 ***************************************************************************/ 00018 00019 #ifndef KTUTORIAL_WAITFORPROPERTY_H 00020 #define KTUTORIAL_WAITFORPROPERTY_H 00021 00022 #include "ktutorial_export.h" 00023 00024 #include "WaitFor.h" 00025 00026 namespace ktutorial { 00027 00065 class KTUTORIAL_EXPORT WaitForProperty: public WaitFor { 00066 Q_OBJECT 00067 public: 00068 00078 Q_INVOKABLE WaitForProperty(); 00079 00087 WaitForProperty(QObject* object, const QString& propertyName, 00088 const QVariant& value); 00089 00093 virtual ~WaitForProperty(); 00094 00108 Q_INVOKABLE void setProperty(QObject* object, const QString& propertyName, 00109 const QVariant& value); 00110 00125 Q_INVOKABLE void setPropertyToWaitFor(QObject* object, 00126 const QString& propertyName, 00127 const QVariant& value); 00128 00138 virtual bool conditionMet() const; 00139 00140 private: 00141 00142 class WaitForPropertyPrivate* d; 00143 00144 private Q_SLOTS: 00145 00151 void checkPropertyValueToEndTheWait(); 00152 00153 }; 00154 00155 } 00156 00157 #endif