1 /* This file is part of the KDE project
2 Copyright (C) 1998, 1999 David Faure <faure@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU 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 program 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 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
23 #include "konqprivate_export.h"
26 #include <kparts/browserextension.h>
30 class KONQ_TESTS_EXPORT KonqMisc
35 static KonqFileManager *s_pSelf;
40 static KonqFileManager *self()
43 s_pSelf = new KonqFileManager();
49 * Stop full-screen mode in all windows.
51 static void abortFullScreenMode();
54 * Create a new window with a single view, showing @p url, using @p args
56 static KonqMainWindow
* createSimpleWindow( const KUrl
&url
, const KParts::OpenUrlArguments
&args
,
57 const KParts::BrowserArguments
& browserArgs
= KParts::BrowserArguments(),
58 bool tempFile
= false);
61 * Create a new window for @p url using @p args and the appropriate profile for this URL.
62 * @param forbidUseHTML internal. True when called by "Find Files"
63 * @param openUrl If it is false, no url is openend in the new window. The url is used to guess the profile
65 static KonqMainWindow
* createNewWindow( const KUrl
&url
,
66 const KParts::OpenUrlArguments
&args
= KParts::OpenUrlArguments(),
67 const KParts::BrowserArguments
& browserArgs
= KParts::BrowserArguments(),
68 bool forbidUseHTML
= false,
69 const QStringList
&filesToSelect
= QStringList(),
70 bool tempFile
= false,
74 * Create a new window from the profile defined by @p filename and @p path.
75 * @param url an optional URL to open in this profile.
76 * @param forbidUseHTML internal. True when called by "Find Files"
77 * @param openUrl If false no url is opened
79 static KonqMainWindow
* createBrowserWindowFromProfile( const QString
&path
,
80 const QString
&filename
,
81 const KUrl
&url
= KUrl(),
82 const KParts::OpenUrlArguments
&args
= KParts::OpenUrlArguments(),
83 const KParts::BrowserArguments
& browserArgs
= KParts::BrowserArguments(),
84 bool forbidUseHTML
= false,
85 const QStringList
& filesToSelect
= QStringList(),
86 bool tempFile
= false,
90 * Creates a new window from the history of a view, copies the history
91 * @param view the History is copied from this view
92 * @param steps Restore currentPos() + steps
94 static KonqMainWindow
* newWindowFromHistory( KonqView
* view
, int steps
);
97 * Applies the URI filters to @p url.
99 * @p parent is used in case of a message box.
100 * @p _url to be filtered.
101 * @p _path the absolute path to append to the url before filtering it.
103 static QString
konqFilteredURL( QWidget
* /*parent*/, const QString
& /*_url*/, const QString
& _path
= QString() );