1 /* 2 * 3 * OpenGL hardware capability viewer and database 4 * 5 * Main window class 6 * 7 * Copyright (C) 2011-2015 by Sascha Willems (www.saschawillems.de) 8 * 9 * This code is free software, you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License version 3 as published by the Free Software Foundation. 12 * 13 * Please review the following information to ensure the GNU Lesser 14 * General Public License version 3 requirements will be met: 15 * http://opensource.org/licenses/lgpl-3.0.html 16 * 17 * The code is distributed WITHOUT ANY WARRANTY; without even the 18 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 19 * PURPOSE. See the GNU LGPL 3.0 for more details. 20 * 21 */ 22 23 #ifndef GLCAPSVIEWER_H 24 #define GLCAPSVIEWER_H 25 26 #include <QtWidgets/QMainWindow> 27 #include <QNetworkReply> 28 #include "ui_glCapsViewer.h" 29 #include "glCapsViewerCore.h" 30 #include "settings.h" 31 #include <QStandardItemModel> 32 #include <QStandardItem> 33 #include <treeproxyfilter.h> 34 35 class glCapsViewer : public QMainWindow 36 { 37 Q_OBJECT 38 39 public: 40 glCapsViewer(QWidget *parent = 0); 41 ~glCapsViewer(); 42 Ui::glcapsviewerClass ui; 43 glCapsViewerCore core; 44 GLFWwindow* window; 45 void updateReportState(); 46 void generateReport(); 47 bool contextTypeSelection(); 48 private: 49 QNetworkAccessManager* nam; 50 capsViewer::settings appSettings; 51 struct 52 TreeProxyFilter extensionFilterProxy; 53 QStandardItemModel extensionTreeModel; 54 TreeProxyFilter implementationFilterProxy; 55 QStandardItemModel implementationTreeModel; 56 TreeProxyFilter texFormatFilterProxy; 57 QStandardItemModel texFormatListModel; 58 TreeProxyFilter SPIRVextensionFilterProxy; 59 QStandardItemModel SPIRVextensionTreeModel; 60 bool canUpdateReport(int reportId); 61 void refreshDeviceList(); 62 void displayCapabilities(); 63 void displayExtensions(); 64 void displayCompressedFormats(); 65 void displayInternalFormatInfo(); 66 void displaySPIRVextensions(); 67 private slots: 68 void slotRefreshReport(); 69 void slotClose(); 70 void slotExportXml(); 71 void slotBrowseDatabase(); 72 void slotShowDeviceOnline(); 73 void slotAbout(); 74 void slotSettings(); 75 void slotUpload(); 76 void slotRefreshDatabase(); 77 void slotDatabaseDevicesItemChanged(); 78 void slotDeviceVersionChanged(int index); 79 void slotTabChanged(int index); 80 void slotFilterExtensions(QString text); 81 void slotFilterSPIRVExtensions(QString text); 82 void slotFilterImplementation(QString text); 83 void slotFilterTextureFormats(QString text); 84 }; 85 86 #endif // GLCAPSVIEWER_H 87 ; 88