File indexing completed on 2024-04-14 04:53:13

0001 /* This file is part of the KDE project
0002     SPDX-FileCopyrightText: 1998, 1999 David Faure <faure@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef _konq_misc_h
0008 #define _konq_misc_h
0009 
0010 #include "konqprivate_export.h"
0011 
0012 #include <QUrl>
0013 
0014 #include "kf5compat.h" //For NavigationExtension
0015 
0016 class KonqMainWindow;
0017 class KonqView;
0018 
0019 namespace KonqMisc
0020 {
0021 /**
0022  * Creates a new window from the history of a view, copies the history
0023  * @param view the History is copied from this view
0024  * @param steps Restore currentPos() + steps
0025  */
0026 KonqMainWindow *newWindowFromHistory(KonqView *view, int steps);
0027 
0028 /**
0029  * Applies the URI filters to @p url, and convert it to a QUrl.
0030  *
0031  * @p parent is used in case of a message box.
0032  * @p url to be filtered.
0033  * @p currentDirectory the directory to use, in case the url is relative.
0034  */
0035 QUrl konqFilteredURL(KonqMainWindow *parent, const QString &url, const QUrl &currentDirectory = QUrl());
0036 
0037 /**
0038 * These are some helper functions to encode/decode session filenames. The
0039 * problem here is that windows doesn't like files with ':' inside.
0040 */
0041 
0042 QString encodeFilename(QString filename);
0043 
0044 QString decodeFilename(QString filename);
0045 }
0046 
0047 #endif