00001 /* 00002 Copyright © 2010 yan Verdavaine 00003 00004 This file is part of QExtend. 00005 00006 QExtend 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 3 of the License, or 00009 any later version. 00010 00011 QExtend 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 QExtend. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 00021 00022 #ifndef QEXTEND_ACTIONSHEDULER 00023 #define QEXTEND_ACTIONSHEDULER 00024 #include "objectptr.hpp" 00025 #include <QObject> 00026 #include <QVariant> 00027 #include <QStringList> 00028 #include "connector.hpp" 00029 00030 00031 namespace QExtend 00032 { 00033 struct ActionSchedulerPrivate; 00034 class Emitter; 00035 00036 00038 00040 00048 /* Activity diagram script for yuml.me 00049 (start)-action><d1>->(Run)-><d2>-Finish>(end) 00050 <d2>-action><d3>-Finish><d1> 00051 <d3>-action><d3> 00052 */ 00053 00054 class QEXTEND_EXPORT ActionScheduler : public QObject 00055 { 00056 Q_OBJECT 00057 00058 ObjectPtr<ActionSchedulerPrivate> m_internal; 00059 friend struct ActionSchedulerPrivate; 00060 public : 00061 ActionScheduler(QObject * =0); 00062 00063 00065 00067 00079 void addListenEmitter(const Emitter & emitter, const QStringList & names = QStringList()); 00080 00081 00082 00083 00085 00086 00088 00103 void addListenEmitterProperty(const Emitter &emitter, const char * property, const QString & name); 00104 00105 00106 00107 00108 00110 00111 00113 00129 void addListenProperty(const QObject *object,const char * property, const QString &name ); 00130 00131 public Q_SLOTS: 00132 00133 00135 00136 00138 void actionFinished(); 00139 00140 Q_SIGNALS: 00141 00142 00144 00145 00147 void launchAction(const QVariantMap &); 00148 00149 }; 00150 00151 } 00152 #endif
© 2000-2024 - www.developpez.com