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 __KonqViewAdaptor_h__
22 #define __KonqViewAdaptor_h__
24 #include <QtCore/QStringList>
25 #include <QtDBus/QtDBus>
30 * DBus interface for a konqueror view
32 class KonqViewAdaptor
: public QObject
35 Q_CLASSINFO("D-Bus Interface", "org.kde.Konqueror.View")
39 explicit KonqViewAdaptor( KonqView
* view
);
45 * Displays another URL, but without changing the view mode
46 * (Make sure the part can display this URL)
48 void openUrl( const QString
& url
,
49 const QString
& locationBarURL
,
50 const QString
& nameFilter
);
58 * Change the type of view (i.e. loads a new konqueror view)
59 * @param serviceType the service type we want to show
60 * @param serviceName allows to enforce a particular service to be chosen,
63 bool changeViewMode( const QString
&serviceType
,
64 const QString
&serviceName
);
67 * Call this to prevent next openUrl() call from changing history lists
68 * Used when the same URL is reloaded (for instance with another view mode)
83 * Get view's location bar URL, i.e. the one that the view signals
84 * It can be different from url(), for instance if we display a index.html
86 QString
locationBarURL();
89 * @return the servicetype this view is currently displaying
91 QString
serviceType();
94 * @return the servicetypes this view is capable to display
96 QStringList
serviceTypes();
99 * @return the part embedded into this view
101 QDBusObjectPath
part();
104 * Enable/Disable the context popup menu for this view.
106 void enablePopupMenu( bool b
);
109 bool isPopupMenuEnabled() const;
112 * Return length of history
114 uint
historyLength()const;
116 * Return true if "Use index HTML" is checked
118 bool allowHTML() const;
121 * Move forward in history "-1"
125 * Move back in history "+1"
129 bool canGoBack()const;
130 bool canGoForward()const;