2016-12-24 15:03:37 +00:00
|
|
|
#pragma once
|
|
|
|
#include <QtWidgets/QMainWindow>
|
2017-01-28 15:54:36 +00:00
|
|
|
#include <QWidget>
|
|
|
|
#include "ui_MainWindow.h"
|
|
|
|
#include "FileInfoWindow.h"
|
2017-01-07 14:59:16 +00:00
|
|
|
#include <QByteArray>
|
2017-01-16 13:24:30 +00:00
|
|
|
#include <QLabel>
|
2017-01-28 15:54:36 +00:00
|
|
|
|
2016-12-24 15:03:37 +00:00
|
|
|
|
2017-01-15 11:26:15 +00:00
|
|
|
struct Material;
|
|
|
|
|
2016-12-24 15:03:37 +00:00
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
MainWindow(QWidget *parent = Q_NULLPTR);
|
|
|
|
~MainWindow();
|
|
|
|
|
2017-01-28 15:54:36 +00:00
|
|
|
// attributes
|
2016-12-24 15:03:37 +00:00
|
|
|
private:
|
|
|
|
Ui::MainWindowClass* ui;
|
2017-01-28 15:54:36 +00:00
|
|
|
|
2017-01-07 14:59:16 +00:00
|
|
|
QByteArray m_fileInfo;
|
2017-01-16 13:24:30 +00:00
|
|
|
QLabel* m_output;
|
2017-01-28 15:54:36 +00:00
|
|
|
int m_curSeverity;
|
|
|
|
|
2017-01-16 14:41:37 +00:00
|
|
|
FileInfoWindow* m_infoWindow;
|
2016-12-31 15:18:35 +00:00
|
|
|
|
2017-01-28 15:54:36 +00:00
|
|
|
// functions
|
2017-01-11 15:28:51 +00:00
|
|
|
private:
|
2017-01-28 15:54:36 +00:00
|
|
|
void setupWidgets();
|
2016-12-31 15:18:35 +00:00
|
|
|
void openFile();
|
2017-01-11 15:28:51 +00:00
|
|
|
void takeScreenShot();
|
2017-01-28 15:54:36 +00:00
|
|
|
void aboutTool();
|
2016-12-31 15:18:35 +00:00
|
|
|
|
2017-01-16 13:24:30 +00:00
|
|
|
protected:
|
|
|
|
virtual void resizeEvent(QResizeEvent * e) Q_DECL_OVERRIDE;
|
|
|
|
|
2017-01-28 15:54:36 +00:00
|
|
|
// slots
|
2017-01-04 13:35:27 +00:00
|
|
|
public slots:
|
2017-01-05 13:46:01 +00:00
|
|
|
void printMessage(QString message, int severity);
|
2017-01-15 11:26:15 +00:00
|
|
|
void setFileInfo(QString name, QVector<Material>* materials, int vertices, int triangle);
|
2017-01-04 13:35:27 +00:00
|
|
|
|
2017-01-28 15:54:36 +00:00
|
|
|
// signals
|
add exe icon,
signal-slot for openFile,
resetView on openFile,
cleanup when open a new file,
triangulate quad poly now correctly, more not working, bug from previous version,
next:
fix 5,6,.. triangulation,
triClothMan, IC Helmet, still buggy,
2017-01-02 11:21:32 +00:00
|
|
|
signals:
|
2017-01-07 14:59:16 +00:00
|
|
|
void loadFile(QString);
|
2016-12-24 15:03:37 +00:00
|
|
|
};
|