KTutorial  0.5.1
EditorSupportAdaptor.cpp
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 #include "EditorSupportAdaptor.h"
00021 
00022 #include <QCoreApplication>
00023 
00024 #include "EditorSupport.h"
00025 #include "ObjectRegister.h"
00026 
00027 namespace ktutorial {
00028 namespace editorsupport {
00029 
00030 //public:
00031 
00032 EditorSupportAdaptor::EditorSupportAdaptor(EditorSupport* editorSupport):
00033         QDBusAbstractAdaptor(editorSupport),
00034     mEditorSupport(editorSupport) {
00035 }
00036 
00037 //public slots:
00038 
00039 int EditorSupportAdaptor::mainWindowObjectId() const {
00040     return mEditorSupport->mainWindowObjectId();
00041 }
00042 
00043 int EditorSupportAdaptor::findObject(const QString& name) {
00044     return mEditorSupport->findObject(name);
00045 }
00046 
00047 void EditorSupportAdaptor::highlight(int objectId) {
00048     mEditorSupport->highlight(objectId);
00049 }
00050 
00051 void EditorSupportAdaptor::stopHighlighting(int objectId) {
00052     mEditorSupport->stopHighlighting(objectId);
00053 }
00054 
00055 void EditorSupportAdaptor::enableEventSpy() {
00056     mEditorSupport->enableEventSpy();
00057 }
00058 
00059 void EditorSupportAdaptor::disableEventSpy() {
00060     mEditorSupport->disableEventSpy();
00061 }
00062 
00063 void EditorSupportAdaptor::testScriptedTutorial(const QString& filename,
00064                                                 const QString& stepId) {
00065     mEditorSupport->testScriptedTutorial(filename, stepId);
00066 }
00067 
00068 }
00069 }