• 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// FIXME: review Kate's DCOP interface for session management when the new session code is ready
27
28KateAppDCOPIface::KateAppDCOPIface (KateApp *app) : DCOPObject ("KateApplication")
29 , m_app (app)
30{
31}
32
33DCOPRef KateAppDCOPIface::documentManager ()
34{
35 return DCOPRef (m_app->documentManager()->dcopObject ());
36}
37
38DCOPRef KateAppDCOPIface::activeMainWindow ()
39{
40 KateMainWindow *win = m_app->activeMainWindow();
41
42 if (win)
43 return DCOPRef (win->dcopObject ());
44
45 return DCOPRef ();
46}
47
48uint KateAppDCOPIface::activeMainWindowNumber ()
49{
50 KateMainWindow *win = m_app->activeMainWindow();
51
52 if (win)
53 return win->mainWindowNumber ();
54
55 return 0;
56}
57
58
59uint KateAppDCOPIface::mainWindows ()
60{
61 return m_app->mainWindows ();
62}
63
64DCOPRef KateAppDCOPIface::mainWindow (uint n)
65{
66 KateMainWindow *win = m_app->mainWindow(n);
67
68 if (win)
69 return DCOPRef (win->dcopObject ());
70
71 return DCOPRef ();
72}
73
74bool KateAppDCOPIface::openURL (KURL url, TQString encoding)
75{
76 return m_app->openURL (url, encoding, false);
77}
78
79bool KateAppDCOPIface::openURL (KURL url, TQString encoding, bool isTempFile)
80{
81 return m_app->openURL (url, encoding, isTempFile);
82}
83
84bool KateAppDCOPIface::setCursor (int line, int column)
85{
86 return m_app->setCursor (line, column);
87}
88
89bool KateAppDCOPIface::openInput (TQString text)
90{
91 return m_app->openInput (text);
92}
93
94bool KateAppDCOPIface::activateSession(TQString session)
95{
96 m_app->sessionManager()->activateSession(m_app->sessionManager()->getSessionIdFromName(session));
97 return true;
98}
99
100const TQString& KateAppDCOPIface::session() const
101{
102 return m_app->sessionManager()->getActiveSessionName();
103}
KateApp
Kate Application This class represents the core kate application object.
Definition: kateapp.h:43

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.9.4
This website is maintained by Timothy Pearson.