mainwindow.h 949 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #ifndef MainWindow_DEFINED
  8. #define MainWindow_DEFINED
  9. #include <memory>
  10. #include <QMainWindow>
  11. #include "tools/mdbviz/Model.h"
  12. class QLabel;
  13. class QMenu;
  14. class QTreeWidget;
  15. class QTreeWidgetItem;
  16. class MainWindow : public QMainWindow {
  17. Q_OBJECT
  18. public:
  19. MainWindow();
  20. private slots:
  21. void openFile();
  22. void about();
  23. void onCurrentItemChanged(QTreeWidgetItem* cur, QTreeWidgetItem* prev);
  24. private:
  25. void loadFile(const QString &fileName);
  26. void setupOpListWidget();
  27. void presentCurrentRenderState();
  28. void createActions();
  29. void createStatusBar();
  30. void createDockWindows();
  31. void readSettings();
  32. void writeSettings();
  33. QImage fImage;
  34. QLabel* fImageLabel;
  35. QTreeWidget* fOpListWidget;
  36. QMenu* fViewMenu;
  37. Model fModel;
  38. };
  39. #endif