Warning, file /sdk/ktechlab/src/docmanageriface.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /***************************************************************************
0002  *   Copyright (C) 2005 by David Saxton                                    *
0003  *   david@bluehaze.org                                                    *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  ***************************************************************************/
0010 
0011 #include "docmanageriface.h"
0012 #include "docmanager.h"
0013 #include "document.h"
0014 
0015 DocManagerIface::DocManagerIface(DocManager *docManager)
0016     : DCOPObject(/* TODO "DocumentManager" */)
0017 {
0018     m_pDocManager = docManager;
0019 }
0020 
0021 DocManagerIface::~DocManagerIface()
0022 {
0023 }
0024 
0025 bool DocManagerIface::closeAll()
0026 {
0027     return m_pDocManager->closeAll();
0028 }
0029 
0030 DCOPRef DocManagerIface::openURL(const QString &url)
0031 {
0032     return docToRef(m_pDocManager->openURL(QUrl(url)));
0033 }
0034 
0035 void DocManagerIface::gotoTextLine(const QString &url, int line)
0036 {
0037     m_pDocManager->gotoTextLine(QUrl(url), line);
0038 }
0039 
0040 DCOPRef DocManagerIface::createTextDocument()
0041 {
0042     return docToRef((Document *)m_pDocManager->createTextDocument());
0043 }
0044 
0045 DCOPRef DocManagerIface::createCircuitDocument()
0046 {
0047     return docToRef((Document *)m_pDocManager->createCircuitDocument());
0048 }
0049 
0050 DCOPRef DocManagerIface::createFlowCodeDocument()
0051 {
0052     return docToRef((Document *)m_pDocManager->createFlowCodeDocument());
0053 }
0054 
0055 DCOPRef DocManagerIface::createMechanicsDocument()
0056 {
0057     return docToRef((Document *)m_pDocManager->createMechanicsDocument());
0058 }
0059 
0060 DCOPRef DocManagerIface::docToRef(Document *document)
0061 {
0062     if (document)
0063         return DCOPRef(); // TODO document->dcopObject());
0064     return DCOPRef();
0065 }