1
/* This file is part of the KDE project
2
Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
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.
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.
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.
20
#ifndef _kateapp_adaptor_h_
21
#define _kateapp_adaptor_h_
27
class KateAppAdaptor : public QDBusAbstractAdaptor
30
Q_CLASSINFO("D-Bus Interface", "org.kde.Kate.Application")
31
Q_PROPERTY(QString activeSession READ activeSession)
33
KateAppAdaptor(KateApp *app);
36
* emit the exiting signal
39
void emitDocumentClosed(const QString &token);
43
* open a file with given url and encoding
44
* will get view created
45
* @param url url of the file
46
* @param encoding encoding name
49
bool openUrl(QString url, QString encoding);
52
* open a file with given url and encoding
53
* will get view created
54
* @param url url of the file
55
* @param encoding encoding name
56
* @return token or ERROR
58
QString tokenOpenUrl(QString url, QString encoding);
61
* Like the above, but adds an option to let the documentManager know
62
* if the file should be deleted when closed.
63
* @p isTempFile should be set to true with the --tempfile option set ONLY,
64
* files opened with this set to true will be deleted when closed.
66
bool openUrl(QString url, QString encoding, bool isTempFile);
68
QString tokenOpenUrl(QString url, QString encoding, bool isTempFile);
71
* set cursor of active view in active main window
72
* @param line line for cursor
73
* @param column column for cursor
76
bool setCursor(int line, int column);
79
* helper to handle stdin input
80
* open a new document/view, fill it with the text given
81
* @param text text to fill in the new doc/view
84
bool openInput(QString text);
87
* activate a given session
88
* @param session session name
91
bool activateSession(QString session);
94
* activate this kate instance
100
* Notify the world that this kate instance is exiting.
101
* All apps should stop using the dbus interface of this instance after this signal got emitted.
104
void documentClosed(const QString &token);
106
QString activeSession();