File indexing completed on 2024-04-14 03:53:41

0001 /*
0002     This file is part of the KDE libraries
0003     SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
0004     Work sponsored by the LiMux project of the city of Munich
0005 
0006     SPDX-License-Identifier: LGPL-2.0-only
0007 */
0008 
0009 #include "kfilecustomdialog.h"
0010 #include <QApplication>
0011 #include <QLabel>
0012 
0013 int main(int argc, char **argv)
0014 {
0015     QApplication::setApplicationName(QStringLiteral("KFileCustomDialogTest_gui"));
0016     QApplication app(argc, argv);
0017     KFileCustomDialog dlg;
0018     QLabel *lab = new QLabel(QStringLiteral("foo"));
0019     dlg.setCustomWidget(lab);
0020     dlg.exec();
0021 
0022     // Save dialog box
0023     KFileCustomDialog dlg2;
0024     dlg2.setOperationMode(KFileWidget::Saving);
0025     lab = new QLabel(QStringLiteral("Second"));
0026     dlg2.setCustomWidget(lab);
0027     dlg2.exec();
0028 
0029     // Open dialog box
0030     KFileCustomDialog dlg3;
0031     dlg3.setOperationMode(KFileWidget::Opening);
0032     lab = new QLabel(QStringLiteral("Third"));
0033     dlg3.setCustomWidget(lab);
0034     dlg3.exec();
0035 
0036     return 0;
0037 }