delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / apps / konqueror / src / konqopenurlrequest.h
blobac78960348b9869aaa3382b4109605f711f47be2
1 /* This file is part of the KDE project
2 Copyright (C) 2000-2007 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 __konqopenurlrequest_h
21 #define __konqopenurlrequest_h
23 #include "konqprivate_export.h"
25 #include <QtCore/QStringList>
27 #include <kparts/browserextension.h>
29 struct KONQ_TESTS_EXPORT KonqOpenURLRequest {
31 KonqOpenURLRequest() :
32 followMode(false), newTabInFront(false),
33 openAfterCurrentPage(false), forceAutoEmbed(false),
34 tempFile(false), userRequestedReload(false) {}
36 KonqOpenURLRequest( const QString & url ) :
37 typedUrl(url), followMode(false), newTabInFront(false),
38 openAfterCurrentPage(false), forceAutoEmbed(false),
39 tempFile(false), userRequestedReload(false) {}
41 QString debug() const {
42 #ifndef NDEBUG
43 QStringList s;
44 if ( !browserArgs.frameName.isEmpty() )
45 s << "frameName=" + browserArgs.frameName;
46 if ( browserArgs.newTab() )
47 s << "newTab";
48 if ( !nameFilter.isEmpty() )
49 s << "nameFilter=" + nameFilter;
50 if ( !typedUrl.isEmpty() )
51 s << "typedUrl=" + typedUrl;
52 if ( followMode )
53 s << "followMode";
54 if ( newTabInFront )
55 s << "newTabInFront";
56 if ( openAfterCurrentPage )
57 s << "openAfterCurrentPage";
58 if ( forceAutoEmbed )
59 s << "forceAutoEmbed";
60 if ( tempFile )
61 s << "tempFile";
62 if ( userRequestedReload )
63 s << "userRequestedReload";
64 return "[" + s.join(" ") + "]";
65 #else
66 return QString();
67 #endif
70 QString typedUrl; // empty if URL wasn't typed manually
71 QString nameFilter; // like *.cpp, extracted from the URL
72 bool followMode; // true if following another view - avoids loops
73 bool newTabInFront; // new tab in front or back (when browserArgs.newTab() == true)
74 bool openAfterCurrentPage;
75 bool forceAutoEmbed; // if true, override the user's FMSettings for embedding
76 bool tempFile; // if true, the url should be deleted after use
77 bool userRequestedReload; // args.reload because the user requested it, not a website
78 KParts::OpenUrlArguments args;
79 KParts::BrowserArguments browserArgs;
80 QStringList filesToSelect; // files to select in a konqdirpart
82 static KonqOpenURLRequest null;
85 #endif