Motiv
Marvelous OTF2 Traces Interactive Visualizer
Loading...
Searching...
No Matches
MainWindow.hpp
1/*
2 * Marvelous OTF2 Traces Interactive Visualizer (MOTIV)
3 * Copyright (C) 2023 Florian Gallrein, Björn Gehrke
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18#ifndef MOTIV_MAINWINDOW_HPP
19#define MOTIV_MAINWINDOW_HPP
20
21
22#include <QMainWindow>
23
24#include "src/ui/widgets/TimeInputField.hpp"
25#include "src/ui/TraceDataProxy.hpp"
26#include "src/ReaderCallbacks.hpp"
27#include "src/ui/widgets/TraceOverviewDock.hpp"
28#include "src/ui/widgets/InformationDock.hpp"
29#include "src/ui/widgets/License.hpp"
30#include "src/ui/widgets/Help.hpp"
31#include "src/ui/widgets/About.hpp"
32
38class MainWindow : public QMainWindow {
39 Q_OBJECT
40
41public: // constructors
47 explicit MainWindow(QString filepath = QString());
48 ~MainWindow() override;
49
50public: Q_SIGNALS:
51 // TODO
52
53public Q_SLOTS:
57 void resetZoom();
58
62 void openFilterPopup();
63
67 void openNewTrace();
68
69private: // methods
70 void createMenus();
71 void createToolBars();
72 void createDockWidgets();
73 void createCentralWidget();
74
75 QString promptFile();
76 void loadTrace();
77 void loadSettings();
78 void openNewWindow(QString path);
79
80private: // widgets
81 QToolBar *topToolbar = nullptr;
82 QToolBar *bottomToolbar = nullptr;
83
84 InformationDock *information = nullptr;
85 TraceOverviewDock *traceOverview = nullptr;
86
87 TimeInputField *startTimeInputField = nullptr;
88 TimeInputField *endTimeInputField = nullptr;
89
90 License *licenseWindow = nullptr;
91 Help *helpWindow = nullptr;
92 About *aboutWindow = nullptr;
93
94private: // properties
95 QString filepath;
96 TraceDataProxy *data = nullptr;
97
98 otf2::reader::reader *reader = nullptr;
99 ReaderCallbacks *callbacks = nullptr;
100
101 ViewSettings *settings = nullptr;
102};
103
104
105#endif //MOTIV_MAINWINDOW_HPP
A widget showcasing information about this software.
Definition: About.hpp:30
A widget which provides users with information about the various views and controls available in the ...
Definition: Help.hpp:27
A UI component that shows additional information.
A widget showcasing displaying license information about this software.
Definition: License.hpp:27
The main window of the application.
Definition: MainWindow.hpp:38
void resetZoom()
Resets the zoom to show the entire trace.
Definition: MainWindow.cpp:275
void openNewTrace()
Asks for a new trace file and opens the trace.
Definition: MainWindow.cpp:289
void openFilterPopup()
Opens and shows the FilterPopup.
Definition: MainWindow.cpp:279
Class implementing handlers for the otf readers events.
A widget for entering a time point.
Model class providing access to data and pub/sub architecture of change events.
A DockWidget holding a TraceOverviewTimelineView.
The ViewSettings class encapsulates settings for the main view.