File indexing completed on 2024-07-07 03:51:20

0001 /*
0002     This file is part of the proxy model test suite.
0003 
0004     SPDX-FileCopyrightText: 2009 Stephen Kelly <steveire@gmail.com>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-or-later
0007 */
0008 
0009 #include "mainwindow.h"
0010 
0011 #include <QTabWidget>
0012 
0013 #include "dynamictreemodel.h"
0014 
0015 #include "breadcrumbdirectionwidget.h"
0016 #include "breadcrumbnavigationwidget.h"
0017 #include "breadcrumbswidget.h"
0018 #include "checkablewidget.h"
0019 #include "descendantpmwidget.h"
0020 #include "selectionpmwidget.h"
0021 // #include "statesaverwidget.h"
0022 #include "descendantqmltree.h"
0023 #include "proxyitemselectionwidget.h"
0024 #include "proxymodeltestwidget.h"
0025 #ifdef QT_QML_LIB
0026 #include "reparentingpmwidget.h"
0027 #endif
0028 #include "kidentityproxymodelwidget.h"
0029 #include "lessthanwidget.h"
0030 #include "matchcheckingwidget.h"
0031 #ifdef QT_QUICKWIDGETS_LIB
0032 #include "selectioninqmlwidget.h"
0033 #endif
0034 
0035 MainWindow::MainWindow()
0036     : QMainWindow()
0037 {
0038     QTabWidget *tabWidget = new QTabWidget(this);
0039 
0040     tabWidget->addTab(new MatchCheckingWidget(), QStringLiteral("Match Checking PM"));
0041     tabWidget->addTab(new DescendantProxyModelWidget(), QStringLiteral("descendant PM"));
0042     tabWidget->addTab(new SelectionProxyWidget(), QStringLiteral("selection PM"));
0043 #ifdef QT_QUICKWIDGETS_LIB
0044     tabWidget->addTab(new SelectionInQmlWidget(), QStringLiteral("selection PM in QML"));
0045 #endif
0046     tabWidget->addTab(new KIdentityProxyModelWidget(), QStringLiteral("Identity PM"));
0047     tabWidget->addTab(new CheckableWidget(), QStringLiteral("Checkable"));
0048     tabWidget->addTab(new BreadcrumbsWidget(), QStringLiteral("Breadcrumbs"));
0049     tabWidget->addTab(new BreadcrumbNavigationWidget(), QStringLiteral("Breadcrumb Navigation"));
0050     tabWidget->addTab(new BreadcrumbDirectionWidget(), QStringLiteral("Breadcrumb Direction"));
0051     tabWidget->addTab(new ProxyItemSelectionWidget(), QStringLiteral("Proxy Item selection"));
0052 #ifdef QT_QML_LIB
0053     tabWidget->addTab(new ReparentingProxyModelWidget(), QStringLiteral("reparenting PM"));
0054 #endif
0055 #ifdef QT_QUICKWIDGETS_LIB
0056     tabWidget->addTab(new DescendantQmlTreeWidget(), QStringLiteral("QML Trees"));
0057 #endif
0058     tabWidget->addTab(new LessThanWidget(), QStringLiteral("Less Than"));
0059     tabWidget->addTab(new ProxyModelTestWidget(), QStringLiteral("Proxy Model Test"));
0060     //   tabWidget->addTab(new StateSaverWidget(), "State Saver Test");
0061 
0062     setCentralWidget(tabWidget);
0063 }
0064 
0065 MainWindow::~MainWindow()
0066 {
0067 }
0068 
0069 #include "moc_mainwindow.cpp"