KTutorial  0.5.1
WaitFor.h
00001 /***************************************************************************
00002  *   Copyright (C) 2008 by Daniel Calviño Sánchez <danxuliu@gmail.com>     *
00003  *   Copyright (C) 2010 by Daniel Calviño Sánchez <danxuliu@gmail.com>     *
00004  *   Copyright (C) 2012 by Daniel Calviño Sánchez <danxuliu@gmail.com>     *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of the GNU General Public License as published by  *
00008  *   the Free Software Foundation; either version 2 of the License, or     *
00009  *   (at your option) any later version.                                   *
00010  *                                                                         *
00011  *   This program is distributed in the hope that it will be useful,       *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU General Public License for more details.                          *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this program; If not, see <http://www.gnu.org/licenses/>.  *
00018  ***************************************************************************/
00019 
00020 #ifndef KTUTORIAL_WAITFOR_H
00021 #define KTUTORIAL_WAITFOR_H
00022 
00023 #include <QtCore/QObject>
00024 
00025 #include "ktutorial_export.h"
00026 
00027 namespace ktutorial {
00028 
00048 class KTUTORIAL_EXPORT WaitFor: public QObject {
00049 Q_OBJECT
00050 public:
00051 
00055     virtual ~WaitFor();
00056 
00063     virtual bool conditionMet() const = 0;
00064 
00070     bool isActive() const;
00071 
00081     virtual void setActive(bool active);
00082 
00083 Q_SIGNALS:
00084 
00092     void waitEnded(WaitFor* waitFor);
00093 
00094 protected:
00095 
00102     WaitFor();
00103 
00104 private:
00105 
00106     class WaitForPrivate* d;
00107 
00108 };
00109 
00110 }
00111 
00112 #endif