File indexing completed on 2024-04-21 04:58:22

0001 /*
0002     This file is part of the KDE project.
0003 
0004     SPDX-FileCopyrightText: 2020 Stefano Crocco <stefano.crocco@alice.it>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-or-later
0007 */
0008 
0009 #ifndef KONQURL_H
0010 #define KONQURL_H
0011 
0012 #include <QLatin1String>
0013 #include <QString>
0014 #include <QUrl>
0015 
0016 namespace KonqUrl {
0017     
0018     enum class Type{
0019         NoPath,
0020         Blank,
0021         Konqueror,
0022         Launch,
0023         Specs,
0024         Intro,
0025         Tips,
0026         Plugins
0027     };
0028     
0029     QLatin1String scheme();
0030 
0031     QLatin1String string(Type type = Type::NoPath);
0032     
0033     QUrl url(Type type = Type::NoPath);
0034     
0035     bool hasKonqScheme(const QUrl &url);
0036     
0037     bool canBeKonqUrl(const QString &url);
0038     
0039     bool hasKnownPathRoot(const QString &url);
0040     
0041     bool isValidNotBlank(const QString &url);
0042     
0043     bool isValidNotBlank(const QUrl &url);
0044     
0045     bool isKonqBlank(const QString &url);
0046     
0047     bool isKonqBlank(const QUrl &url);
0048   
0049 };
0050 
0051 #endif // KONQURL_H