File indexing completed on 2024-09-22 04:47:56

0001 /*
0002     SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "addtransportdialogng_gui.h"
0008 #include "widgets/addtransportdialogng.h"
0009 
0010 #include <QApplication>
0011 #include <QHBoxLayout>
0012 #include <QPushButton>
0013 #include <QStandardPaths>
0014 
0015 AddTransportDialogNG_gui::AddTransportDialogNG_gui(QWidget *parent)
0016     : QWidget(parent)
0017 {
0018     auto layout = new QHBoxLayout(this);
0019     auto button = new QPushButton(QStringLiteral("Add transport"));
0020     layout->addWidget(button);
0021     connect(button, &QPushButton::clicked, this, [this] {
0022         auto dlg = new MailTransport::AddTransportDialogNG(this);
0023         dlg->exec();
0024         delete dlg;
0025     });
0026 }
0027 
0028 int main(int argc, char **argv)
0029 {
0030     QApplication app(argc, argv);
0031     app.setApplicationName(QStringLiteral("addtransportnewng"));
0032     QStandardPaths::setTestModeEnabled(true);
0033     auto t = new AddTransportDialogNG_gui();
0034     t->show();
0035     app.exec();
0036     delete t;
0037 }
0038 
0039 #include "moc_addtransportdialogng_gui.cpp"