1 /* 2 * Copyright 2017 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef MainWindow_DEFINED 9 #define MainWindow_DEFINED 10 11 #include <memory> 12 #include <QMainWindow> 13 14 #include "tools/mdbviz/Model.h" 15 16 class QLabel; 17 class QMenu; 18 class QTreeWidget; 19 class QTreeWidgetItem; 20 21 22 class MainWindow : public QMainWindow { 23 Q_OBJECT 24 25 public: 26 MainWindow(); 27 28 private slots: 29 void openFile(); 30 void about(); 31 void onCurrentItemChanged(QTreeWidgetItem* cur, QTreeWidgetItem* prev); 32 33 private: 34 void loadFile(const QString &fileName); 35 void setupOpsTaskWidget(); 36 void presentCurrentRenderState(); 37 38 39 void createActions(); 40 void createStatusBar(); 41 void createDockWindows(); 42 43 void readSettings(); 44 void writeSettings(); 45 46 QImage fImage; 47 QLabel* fImageLabel; 48 49 QTreeWidget* fOpsTaskWidget; 50 51 QMenu* fViewMenu; 52 53 Model fModel; 54 }; 55 56 #endif 57