mirror of
https://github.com/YACReader/yacreader
synced 2025-05-25 18:00:46 -04:00
Pass a more specific instance of our main window
This commit is contained in:
parent
ef8216b338
commit
674fa21717
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include "yacreader_global_gui.h"
|
#include "yacreader_global_gui.h"
|
||||||
|
|
||||||
|
#include "library_window.h"
|
||||||
|
|
||||||
#include <QtWidgets>
|
#include <QtWidgets>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
@ -11,7 +13,7 @@
|
|||||||
|
|
||||||
using namespace YACReader;
|
using namespace YACReader;
|
||||||
|
|
||||||
TrayIconController::TrayIconController(QSettings *settings, QMainWindow *window)
|
TrayIconController::TrayIconController(QSettings *settings, LibraryWindow *window)
|
||||||
: QObject(nullptr), settings(settings), window(window)
|
: QObject(nullptr), settings(settings), window(window)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include <QtWidgets>
|
#include <QtWidgets>
|
||||||
#include <QSystemTrayIcon>
|
#include <QSystemTrayIcon>
|
||||||
|
|
||||||
|
class LibraryWindow;
|
||||||
|
|
||||||
namespace YACReader {
|
namespace YACReader {
|
||||||
|
|
||||||
class TrayIconController : public QObject
|
class TrayIconController : public QObject
|
||||||
@ -11,7 +13,7 @@ class TrayIconController : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
TrayIconController(QSettings *settings,
|
TrayIconController(QSettings *settings,
|
||||||
QMainWindow *window);
|
LibraryWindow *window);
|
||||||
|
|
||||||
void updateIconVisibility();
|
void updateIconVisibility();
|
||||||
|
|
||||||
@ -24,7 +26,7 @@ public slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QSettings *settings;
|
QSettings *settings;
|
||||||
QMainWindow *window;
|
LibraryWindow *window;
|
||||||
|
|
||||||
QMenu *trayIconMenu;
|
QMenu *trayIconMenu;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user