File indexing completed on 2025-03-09 04:54:53

0001 /*
0002   SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
0003 
0004   SPDX-License-Identifier: GPL-2.0-only
0005 */
0006 
0007 #include "templateeditor_gui.h"
0008 #include "templateparser/templatestextedit.h"
0009 
0010 #include <QApplication>
0011 #include <QCommandLineParser>
0012 #include <QHBoxLayout>
0013 #include <QStandardPaths>
0014 
0015 TemplateEditorTestWidget::TemplateEditorTestWidget(QWidget *parent)
0016     : QWidget(parent)
0017 {
0018     auto lay = new QHBoxLayout(this);
0019     lay->addWidget(new TemplateParser::TemplatesTextEdit(this));
0020 }
0021 
0022 TemplateEditorTestWidget::~TemplateEditorTestWidget() = default;
0023 
0024 int main(int argc, char **argv)
0025 {
0026     QApplication app(argc, argv);
0027     QStandardPaths::setTestModeEnabled(true);
0028 
0029     QCommandLineParser parser;
0030     parser.addVersionOption();
0031     parser.addHelpOption();
0032     parser.process(app);
0033 
0034     auto w = new TemplateEditorTestWidget();
0035     w->resize(800, 600);
0036 
0037     w->show();
0038     app.exec();
0039     delete w;
0040     return 0;
0041 }
0042 
0043 #include "moc_templateeditor_gui.cpp"