File indexing completed on 2024-06-16 13:00:18

0001 /*
0002     This file is part of the KDE project.
0003     SPDX-FileCopyrightText: 2001 Carsten Pfeiffer <pfeiffer@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-only
0006 */
0007 
0008 #include <QApplication>
0009 #include <QDebug>
0010 #include <kurlrequester.h>
0011 #include <kurlrequesterdialog.h>
0012 
0013 int main(int argc, char **argv)
0014 {
0015     QApplication app(argc, argv);
0016     app.setQuitOnLastWindowClosed(false);
0017 
0018     QUrl url = KUrlRequesterDialog::getUrl(QUrl(QStringLiteral("ftp://ftp.kde.org")));
0019     qDebug() << "Selected url:" << url;
0020 
0021     KUrlRequester *req = new KUrlRequester();
0022     KEditListWidget *el = new KEditListWidget(req->customEditor());
0023     el->setWindowTitle(QStringLiteral("Test"));
0024     el->show();
0025 
0026     KUrlRequester *req1 = new KUrlRequester();
0027     req1->setWindowTitle(QStringLiteral("AAAAAAAAAAAA"));
0028     req1->show();
0029 
0030     KUrlComboRequester *comboReq = new KUrlComboRequester();
0031     comboReq->setWindowTitle(QStringLiteral("KUrlComboRequester"));
0032     comboReq->show();
0033 
0034     auto *mimeFilterReq = new KUrlRequester();
0035     mimeFilterReq->setMimeTypeFilters({QStringLiteral("text/x-c++src")});
0036     mimeFilterReq->setWindowTitle(QStringLiteral("MimeFilter"));
0037     mimeFilterReq->show();
0038 
0039     return app.exec();
0040 }