2018-02-10 18:04:31 +00:00
|
|
|
#ifndef CUTTERAPPLICATION_H
|
|
|
|
#define CUTTERAPPLICATION_H
|
|
|
|
|
|
|
|
#include <QEvent>
|
|
|
|
#include <QApplication>
|
2018-06-26 07:40:08 +00:00
|
|
|
#include <QList>
|
2019-02-05 07:46:39 +00:00
|
|
|
#include <QProxyStyle>
|
2018-02-10 18:04:31 +00:00
|
|
|
|
2019-02-22 16:50:45 +00:00
|
|
|
#include "core/MainWindow.h"
|
2018-02-10 18:04:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
class CutterApplication : public QApplication
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
CutterApplication(int &argc, char **argv);
|
2018-02-27 13:06:04 +00:00
|
|
|
~CutterApplication();
|
2018-02-10 18:04:31 +00:00
|
|
|
|
2018-03-21 20:32:32 +00:00
|
|
|
MainWindow *getMainWindow()
|
|
|
|
{
|
|
|
|
return mainWindow;
|
|
|
|
}
|
2018-02-10 18:04:31 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
bool event(QEvent *e);
|
|
|
|
|
2019-01-20 17:00:23 +00:00
|
|
|
private:
|
|
|
|
/*!
|
|
|
|
* \brief Load and translations depending on Language settings
|
|
|
|
* \return true on success
|
|
|
|
*/
|
|
|
|
bool loadTranslations();
|
|
|
|
|
2018-02-10 18:04:31 +00:00
|
|
|
private:
|
|
|
|
bool m_FileAlreadyDropped;
|
2018-02-27 13:06:04 +00:00
|
|
|
MainWindow *mainWindow;
|
2018-02-10 18:04:31 +00:00
|
|
|
};
|
|
|
|
|
2019-02-05 07:46:39 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief CutterProxyStyle is used to force shortcuts displaying in context menu
|
|
|
|
*/
|
|
|
|
class CutterProxyStyle : public QProxyStyle
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
/*!
|
|
|
|
* \brief it is enough to get notification about QMenu polishing to force shortcut displaying
|
|
|
|
*/
|
|
|
|
void polish(QWidget *widget) override;
|
|
|
|
};
|
|
|
|
|
2018-02-10 18:04:31 +00:00
|
|
|
#endif // CUTTERAPPLICATION_H
|