• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

  • kate
  • app
kateappIface.cpp
1 /* This file is part of the KDE project
2  Copyright (C) 2001 Christoph Cullmann <cullmann@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 version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #include "kateappIface.h"
20 
21 #include "kateapp.h"
22 #include "katesession.h"
23 #include "katedocmanager.h"
24 #include "katemainwindow.h"
25 
26 KateAppDCOPIface::KateAppDCOPIface (KateApp *app) : DCOPObject ("KateApplication")
27  , m_app (app)
28 {
29 }
30 
31 DCOPRef KateAppDCOPIface::documentManager ()
32 {
33  return DCOPRef (m_app->documentManager()->dcopObject ());
34 }
35 
36 DCOPRef KateAppDCOPIface::activeMainWindow ()
37 {
38  KateMainWindow *win = m_app->activeMainWindow();
39 
40  if (win)
41  return DCOPRef (win->dcopObject ());
42 
43  return DCOPRef ();
44 }
45 
46 uint KateAppDCOPIface::activeMainWindowNumber ()
47 {
48  KateMainWindow *win = m_app->activeMainWindow();
49 
50  if (win)
51  return win->mainWindowNumber ();
52 
53  return 0;
54 }
55 
56 
57 uint KateAppDCOPIface::mainWindows ()
58 {
59  return m_app->mainWindows ();
60 }
61 
62 DCOPRef KateAppDCOPIface::mainWindow (uint n)
63 {
64  KateMainWindow *win = m_app->mainWindow(n);
65 
66  if (win)
67  return DCOPRef (win->dcopObject ());
68 
69  return DCOPRef ();
70 }
71 
72 bool KateAppDCOPIface::openURL (KURL url, TQString encoding)
73 {
74  return m_app->openURL (url, encoding, false);
75 }
76 
77 bool KateAppDCOPIface::openURL (KURL url, TQString encoding, bool isTempFile)
78 {
79  return m_app->openURL (url, encoding, isTempFile);
80 }
81 
82 bool KateAppDCOPIface::setCursor (int line, int column)
83 {
84  return m_app->setCursor (line, column);
85 }
86 
87 bool KateAppDCOPIface::openInput (TQString text)
88 {
89  return m_app->openInput (text);
90 }
91 
92 bool KateAppDCOPIface::activateSession (TQString session)
93 {
94  m_app->sessionManager()->activateSession (m_app->sessionManager()->giveSession (session));
95 
96  return true;
97 }
98 
99 const TQString & KateAppDCOPIface::session() const
100 {
101  return m_app->sessionManager()->activeSession()->sessionName();
102 }

kate

Skip menu "kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kate

Skip menu "kate"
  • kate
  • libkonq
  • twin
  •   lib
Generated for kate by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.