src/mainwindow.h

Sun, 09 Apr 2023 15:59:08 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sun, 09 Apr 2023 15:59:08 +0300
changeset 362
e1d646a4cbd8
parent 361
c5e8b68e34f8
permissions
-rw-r--r--

Extracted the state of the program into a MainState structure, and extracted local functions of main() into static functions.
I was planning to make the core logic and state of the program into a Main class, which would be a QObject that would
have lots of signals and slots, but it looks like this works even without it

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "ui_mainwindow.h"
#include "src/gl/common.h"

class MainWindow : public QMainWindow, public Ui_MainWindow
{
	Q_OBJECT
public:
	explicit MainWindow(QWidget *parent = nullptr);
Q_SIGNALS:
	void renderStyleSelected(gl::RenderStyle newStyle);
	void recentFileSelected(const QString& path);
public Q_SLOTS:
	void setRenderStyle(gl::RenderStyle style);
	void rebuildRecentFilesMenu(const QStringList& strings);
	void updateTitle();
private Q_SLOTS:
	void showAboutDialog();
};

#endif // MAINWINDOW_H

mercurial