blob: 7fa6152755ee3ae9a006a4438d4d42c2b9112b76 [file] [log] [blame]
Robert Phillipsa6d2d702017-09-01 12:17:03 -04001/*
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
Robert Phillips5fccf9d2017-09-05 15:10:12 -040011#include <memory>
Robert Phillipsa6d2d702017-09-01 12:17:03 -040012#include <QMainWindow>
13
Mike Kleinc0bd9f92019-04-23 12:05:21 -050014#include "tools/mdbviz/Model.h"
Robert Phillips5fccf9d2017-09-05 15:10:12 -040015
Robert Phillipsa6d2d702017-09-01 12:17:03 -040016class QLabel;
Robert Phillips5fccf9d2017-09-05 15:10:12 -040017class QMenu;
Robert Phillips276066b2017-09-06 17:17:44 -040018class QTreeWidget;
19class QTreeWidgetItem;
Robert Phillips5fccf9d2017-09-05 15:10:12 -040020
Robert Phillipsa6d2d702017-09-01 12:17:03 -040021
22class MainWindow : public QMainWindow {
23 Q_OBJECT
24
25public:
26 MainWindow();
27
28private slots:
29 void openFile();
Robert Phillips5fccf9d2017-09-05 15:10:12 -040030 void about();
Robert Phillips276066b2017-09-06 17:17:44 -040031 void onCurrentItemChanged(QTreeWidgetItem* cur, QTreeWidgetItem* prev);
Robert Phillipsa6d2d702017-09-01 12:17:03 -040032
33private:
34 void loadFile(const QString &fileName);
Robert Phillips5fccf9d2017-09-05 15:10:12 -040035 void setupOpListWidget();
Robert Phillipsdeaf5682017-09-06 13:07:21 -040036 void presentCurrentRenderState();
37
Robert Phillipsa6d2d702017-09-01 12:17:03 -040038
39 void createActions();
40 void createStatusBar();
Robert Phillips5fccf9d2017-09-05 15:10:12 -040041 void createDockWindows();
42
Robert Phillipsa6d2d702017-09-01 12:17:03 -040043 void readSettings();
44 void writeSettings();
45
46 QImage fImage;
47 QLabel* fImageLabel;
Robert Phillips5fccf9d2017-09-05 15:10:12 -040048
Robert Phillips276066b2017-09-06 17:17:44 -040049 QTreeWidget* fOpListWidget;
Robert Phillips5fccf9d2017-09-05 15:10:12 -040050
51 QMenu* fViewMenu;
52
Robert Phillipsdeaf5682017-09-06 13:07:21 -040053 Model fModel;
Robert Phillipsa6d2d702017-09-01 12:17:03 -040054};
55
56#endif