You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
885 B
47 lines
885 B
3 years ago
|
#ifndef MAINWINDOW_H
|
||
|
#define MAINWINDOW_H
|
||
|
|
||
|
#include <QtGlobal>
|
||
|
#include <QResource>
|
||
|
#include <QApplication>
|
||
|
#include <QScreen>
|
||
|
#include <QtWidgets/QMenu>
|
||
|
#include <QMainWindow>
|
||
|
#include <QObject>
|
||
|
#include <QtCore>
|
||
|
#include <QtGui>
|
||
|
#include <QFileInfo>
|
||
|
|
||
|
#include <iostream>
|
||
|
#include "ctx.h"
|
||
|
|
||
|
namespace Ui {
|
||
|
class MainWindow;
|
||
|
}
|
||
|
|
||
|
class MainWindow : public QMainWindow {
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
explicit MainWindow(ConvContext *ctx, QWidget *parent = nullptr);
|
||
|
static MainWindow *getInstance();
|
||
|
static ConvContext *getContext();
|
||
|
~MainWindow() override;
|
||
|
Ui::MainWindow *ui;
|
||
|
|
||
|
qreal screenDpiRef;
|
||
|
QRect screenGeo;
|
||
|
QRect screenRect;
|
||
|
qreal screenDpi;
|
||
|
qreal screenDpiPhysical;
|
||
|
qreal screenRatio;
|
||
|
|
||
|
|
||
|
private:
|
||
|
ConvContext *m_ctx;
|
||
|
static MainWindow *pMainWindow;
|
||
|
void closeEvent(QCloseEvent *event) override;
|
||
|
void showDebugInfo();
|
||
|
};
|
||
|
|
||
|
#endif
|