add more spacing
[personal-kdebase.git] / apps / konqueror / src / KonqViewAdaptor.h
blob3050260514649c6b32b104da5ec03000e335fc71
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>
27 class KonqView;
29 /**
30 * DBus interface for a konqueror view
32 class KonqViewAdaptor : public QObject
34 Q_OBJECT
35 Q_CLASSINFO("D-Bus Interface", "org.kde.Konqueror.View")
37 public:
39 explicit KonqViewAdaptor( KonqView * view );
40 ~KonqViewAdaptor();
42 public slots:
44 /**
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 );
52 /**
53 * Reload
55 void reload();
57 /**
58 * Change the type of view (i.e. loads a new konqueror view)
59 * @param mimeType the mime type we want to show
60 * @param serviceName allows to enforce a particular service to be chosen,
61 * @see KonqFactory.
63 bool changeViewMode( const QString &mimeType,
64 const QString &serviceName );
66 /**
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)
70 void lockHistory();
72 /**
73 * Stop loading
75 void stop();
77 /**
78 * Retrieve view's URL
80 QString url();
82 /**
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();
88 /**
89 * @return the servicetype this view is currently displaying
91 QString serviceType();
93 /**
94 * @return the servicetypes this view is capable to display
96 QStringList serviceTypes();
98 /**
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"
123 void goForward();
125 * Move back in history "+1"
127 void goBack();
129 bool canGoBack()const;
130 bool canGoForward()const;
132 private:
134 KonqView * m_pView;
138 #endif