-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_window.h
51 lines (41 loc) · 1.14 KB
/
main_window.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Copyright (c) 2021, Eberty Alves
*/
#ifndef MAIN_WINDOW_H_
#define MAIN_WINDOW_H_
#include <QtWidgets>
#include "ui_main_window.h"
/**
* @brief A main window provides a framework for building an application's user interface. Qt has QMainWindow and its
* related classes for main window management.
*/
class MainWindow : public QMainWindow {
Q_OBJECT
public:
/**
* Class constructor.
*
* @param filename: initial mesh file to be loaded by the qt opengl widget.
*/
explicit MainWindow(const QString& filename = "");
/**
* Destructor of the class.
*/
~MainWindow();
private:
/**
* Slot called by button click. It will open a QFileDialog allowing to select a file path and call the method to load
* the chosen mesh file.
*/
void selectFile();
/**
* Loads a mesh file (.obj) and displays it on the screen. Calls QtOpenGL::loadMesh.
*
* @param filename: mesh file to be loaded by the qt opengl widget.
*
* @return True if the mesh was loaded successfully.
*/
bool loadMesh(const QString &filename);
Ui::MainWindowLayout *ui_; /**< User interface layout */
};
#endif // MAIN_WINDOW_H_