KTutorial
0.5.1
|
00001 /*************************************************************************** 00002 * Copyright (C) 2010 by Daniel Calviño Sánchez <danxuliu@gmail.com> * 00003 * Copyright (C) 2011 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_EDITORSUPPORT_EDITORSUPPORTADAPTOR_H 00021 #define KTUTORIAL_EDITORSUPPORT_EDITORSUPPORTADAPTOR_H 00022 00023 #include <QDBusAbstractAdaptor> 00024 00025 namespace ktutorial { 00026 namespace editorsupport { 00027 class EditorSupport; 00028 class ObjectRegister; 00029 } 00030 } 00031 00032 namespace ktutorial { 00033 namespace editorsupport { 00034 00040 class EditorSupportAdaptor: public QDBusAbstractAdaptor { 00041 Q_OBJECT 00042 Q_CLASSINFO("D-Bus Interface", "org.kde.ktutorial.EditorSupport") 00043 public: 00044 00050 explicit EditorSupportAdaptor(EditorSupport* editorSupport); 00051 00052 public Q_SLOTS: 00053 00059 int mainWindowObjectId() const; 00060 00068 int findObject(const QString& name); 00069 00076 void highlight(int objectId); 00077 00084 void stopHighlighting(int objectId); 00085 00089 void enableEventSpy(); 00090 00094 void disableEventSpy(); 00095 00104 void testScriptedTutorial(const QString& filename, 00105 const QString& stepId = QString()); 00106 00107 private: 00108 00112 EditorSupport* mEditorSupport; 00113 00114 }; 00115 00116 } 00117 } 00118 00119 #endif