• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • TDevelop Interfaces Library
 

TDevelop Interfaces Library

  • lib
  • interfaces
KDevPartControllerIface.cpp
1 /* This file is part of the KDE project
2  Copyright (C) 2002 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 #include <kdebug.h>
20 #include <dcopclient.h>
21 #include <kurl.h>
22 
23 
24 #include "KDevPartControllerIface.h"
25 #include "kdevpartcontroller.h"
26 
27 
28 KDevPartControllerIface::KDevPartControllerIface(KDevPartController *pc)
29  : TQObject(pc), DCOPObject("KDevPartController"), m_controller(pc)
30 {
31  connect(pc, TQT_SIGNAL(loadedFile(const KURL &)), this, TQT_SLOT(forwardLoadedFile(const KURL &)));
32  connect(pc, TQT_SIGNAL(savedFile(const KURL &)), this, TQT_SLOT(forwardSavedFile(const KURL &)));
33  connect(pc, TQT_SIGNAL(closedFile(const KURL &)), this, TQT_SLOT(forwardClosedFile(const KURL &)));
34 }
35 
36 
37 KDevPartControllerIface::~KDevPartControllerIface()
38 {
39 }
40 
41 
42 void KDevPartControllerIface::editDocument(const TQString &url, int lineNum)
43 {
44  m_controller->editDocument(KURL(url), lineNum);
45 }
46 
47 
48 void KDevPartControllerIface::showDocument(const TQString &url, bool newWin)
49 {
50  m_controller->showDocument(KURL(url), newWin);
51 }
52 
53 
54 void KDevPartControllerIface::saveAllFiles()
55 {
56  m_controller->saveAllFiles();
57 }
58 
59 
60 void KDevPartControllerIface::revertAllFiles()
61 {
62  m_controller->revertAllFiles();
63 }
64 
65 
66 void KDevPartControllerIface::forwardLoadedFile(const KURL &fileName)
67 {
68  kdDebug(9000) << "dcop emitting loadedFile " << fileName << endl;
69  emitDCOPSignal("projectOpened()", TQByteArray());
70 }
71 
72 
73 void KDevPartControllerIface::forwardSavedFile(const KURL &fileName)
74 {
75  kdDebug(9000) << "dcop emitting savedFile " << fileName << endl;
76  emitDCOPSignal("projectClosed()", TQByteArray());
77 }
78 
79 void KDevPartControllerIface::forwardClosedFile(const KURL &fileName)
80 {
81  kdDebug(9000) << "dcop emitting closedFile " << fileName << endl;
82  emitDCOPSignal("projectClosed()", TQByteArray());
83 }
84 
85 bool KDevPartControllerIface::closeAllFiles( )
86 {
87  return m_controller->closeAllFiles();
88 }
89 
90 uint KDevPartControllerIface::documentState( const KURL & url )
91 {
92  return (uint) m_controller->documentState(url);
93 }
94 
95 #include "KDevPartControllerIface.moc"
KDevPartController::savedFile
void savedFile(const KURL &)
Emitted when a document has been saved.
kdevpartcontroller.h
KDevelop part controller interface.
KDevPartController::closedFile
void closedFile(const KURL &)
Emitted when a document has been closed.
KDevPartController::loadedFile
void loadedFile(const KURL &)
Emitted when a document has been loaded.
KDevPartController
Interface to control loaded parts and other documents.
Definition: kdevpartcontroller.h:56

TDevelop Interfaces Library

Skip menu "TDevelop Interfaces Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

TDevelop Interfaces Library

Skip menu "TDevelop Interfaces Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for TDevelop Interfaces Library by doxygen 1.8.13
This website is maintained by Timothy Pearson.