skia2/tools/mdbviz/mainwindow.h
Robert Phillips 276066b517 [MDBViz] Switch from a QListView to a QTreeView for the ops
This lets us open & close groups and automates the hierarchy.

Change-Id: Ib6f0850a49b793d824fc25aa16be78e6a1a93d9e
Reviewed-on: https://skia-review.googlesource.com/43280
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-06 23:12:28 +00:00

57 lines
936 B
C++

/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef MainWindow_DEFINED
#define MainWindow_DEFINED
#include <memory>
#include <QMainWindow>
#include "Model.h"
class QLabel;
class QMenu;
class QTreeWidget;
class QTreeWidgetItem;
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow();
private slots:
void openFile();
void about();
void onCurrentItemChanged(QTreeWidgetItem* cur, QTreeWidgetItem* prev);
private:
void loadFile(const QString &fileName);
void setupOpListWidget();
void presentCurrentRenderState();
void createActions();
void createStatusBar();
void createDockWindows();
void readSettings();
void writeSettings();
QImage fImage;
QLabel* fImageLabel;
QTreeWidget* fOpListWidget;
QMenu* fViewMenu;
Model fModel;
};
#endif