Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / apps / konqueror / src / konqmisc.h
bloba1e1a0f11aeb0a9ca5341708bfc2cee107b6aae4
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.
20 #ifndef _konq_misc_h
21 #define _konq_misc_h
23 #include "konqprivate_export.h"
25 #include <krun.h>
26 #include <kparts/browserextension.h>
27 class KonqMainWindow;
28 class KonqView;
30 class KONQ_TESTS_EXPORT KonqMisc
32 public:
34 private:
35 static KonqFileManager *s_pSelf;
36 public:
37 KonqFileManager() {}
38 ~KonqFileManager() {}
40 static KonqFileManager *self()
42 if ( !s_pSelf )
43 s_pSelf = new KonqFileManager();
44 return s_pSelf;
48 /**
49 * Stop full-screen mode in all windows.
51 static void abortFullScreenMode();
53 /**
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);
60 /**
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,
71 bool openUrl = true);
73 /**
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,
87 bool openUrl = true);
89 /**
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 );
96 /**
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() );
107 #endif