Add (and install) svg for the new krunner interface.
[kdebase/uwolfer.git] / apps / konqueror / src / KonquerorAdaptor.h
blob05d0161744f0e8d6451a11a5ae7db3413482dafd
1 /* This file is part of the KDE project
2 Copyright 2000 Simon Hausmann <hausmann@kde.org>
3 Copyright 2000-2006 David Faure <faure@kde.org>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; see the file COPYING. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 #ifndef __KonquerorAdaptor_h__
22 #define __KonquerorAdaptor_h__
24 #include <QtCore/QStringList>
25 #include <QtDBus/QtDBus>
27 #define KONQ_MAIN_PATH "/KonqMain"
29 /**
30 * DBus interface of a konqueror process
32 class KonquerorAdaptor : public QObject
34 Q_OBJECT
35 Q_CLASSINFO("D-Bus Interface", "org.kde.Konqueror.Main")
37 public:
39 KonquerorAdaptor();
40 ~KonquerorAdaptor();
42 public slots:
44 /**
45 * Opens a new window for the given @p url (using createSimpleWindow, i.e. a single view)
46 * @param url the url to open
47 * @param startup_id sets the application startup notification (ASN) property on the window, if not empty.
48 * @return the DBUS object path of the window
50 QDBusObjectPath openBrowserWindow( const QString& url, const QByteArray& startup_id );
52 /**
53 * Opens a new window for the given @p url (using createNewWindow, i.e. with an appropriate profile)
54 * @param url the url to open
55 * @param mimetype pass the mimetype of the url, if known, to speed up the process.
56 * @param startup_id sets the application startup notification (ASN) property on the window, if not empty.
57 * @param tempFile whether to delete the file after use, usually this is false
58 * @return the DBUS object path of the window
60 QDBusObjectPath createNewWindow( const QString& url, const QString& mimetype, const QByteArray& startup_id, bool tempFile );
62 /**
63 * Opens a new window like @ref createNewWindow, then selects the given @p filesToSelect
64 * @param filesToSelect the files to select in the newly opened file-manager window
65 * @param startup_id sets the application startup notification (ASN) property on the window, if not empty.
66 * @return the DBUS object path of the window
68 QDBusObjectPath createNewWindowWithSelection( const QString& url, const QStringList& filesToSelect, const QByteArray& startup_id );
70 /**
71 * As the name says, this creates a window from a profile.
72 * Used for instance by kfmclient.
73 * @param path full path to the profile file
74 * @param filename name of the profile file, if under the profiles dir (can be empty if not known, e.g. from khelpcenter)
75 * @param startup_id sets the application startup notification (ASN) property on the window, if not empty.
76 * @return the DBUS object path of the window
78 QDBusObjectPath createBrowserWindowFromProfile( const QString& path, const QString& filename,
79 const QByteArray& startup_id );
81 /**
82 * Creates a window from a profile and a URL.
83 * Used by kfmclient to open http URLs with the webbrowsing profile
84 * and others with the filemanagement profile.
85 * @param path full path to the profile file
86 * @param filename name of the profile file, if under the profiles dir
87 * @param url the URL to open
88 * @param startup_id sets the application startup notification (ASN) property on the window, if not empty.
89 * @return the DBUS object path of the window
91 QDBusObjectPath createBrowserWindowFromProfileAndUrl( const QString& path, const QString& filename, const QString& url,
92 const QByteArray& startup_id );
93 /**
94 * Creates a window the fastest way : the caller has to provide
95 * profile, URL, and mimetype.
96 * @param path full path to the profile file
97 * @param filename name of the profile file, if under the profiles dir
98 * @param url the URL to open
99 * @param mimetype the mimetype that the URL we want to open has
100 * @param startup_id sets the application startup notification (ASN) property on the window, if not empty.
101 * @return the DBUS object path of the window
103 QDBusObjectPath createBrowserWindowFromProfileUrlAndMimeType( const QString& path, const QString& filename,
104 const QString& url, const QString& mimetype,
105 const QByteArray& startup_id );
108 * @return the name of the instance's crash log file
110 QString crashLogFile();
113 * @return a list of references to all the windows
115 QList<QDBusObjectPath> getWindows();
118 * Find a window which can be used for a new tab. Called by kfmclient.
120 QDBusObjectPath windowForTab();
123 * Called internally as broadcast when the user adds/removes/renames a view profile
125 Q_NOREPLY void updateProfileList();
128 * Used by kfmclient when the 'minimize memory usage' setting is set
129 * to find out if this konqueror can be used.
131 bool processCanBeReused( int screen );
134 * Called from konqy_preloader to terminate this Konqueror instance,
135 * if it's in the preloaded mode, and there are too many preloaded Konqy's
137 Q_NOREPLY void terminatePreloaded();
139 Q_SIGNALS:
141 * Emitted by kcontrol when the global configuration changes
143 void reparseConfiguration();
145 * Emitted by konqueror when we must update list of profiles
147 void updateAllProfileList();
149 * Used internally by Konqueror to notify all instances when a URL should be added to the combobox.
151 void addToCombo( const QString& url, const QDBusMessage& msg );
153 * Used internally by Konqueror to notify all instances when a URL should be removed from the combobox.
155 void removeFromCombo( const QString& url, const QDBusMessage& msg );
157 * Used internally by Konqueror to notify all instances when the combobox should be cleared.
159 void comboCleared( const QDBusMessage& msg );
162 #endif