完善桌宠内核基础设施
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <QMenu>
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
class PetWindow;
|
||||
|
||||
class TrayController
|
||||
{
|
||||
public:
|
||||
explicit TrayController(PetWindow *petWindow);
|
||||
|
||||
bool isAvailable() const;
|
||||
void show();
|
||||
|
||||
private:
|
||||
void createMenu();
|
||||
void showPetWindow();
|
||||
void hidePetWindow();
|
||||
void togglePetWindowVisibility();
|
||||
void quitApplication();
|
||||
|
||||
PetWindow *m_petWindow = nullptr;
|
||||
QSystemTrayIcon m_trayIcon;
|
||||
QMenu m_menu;
|
||||
};
|
||||
Reference in New Issue
Block a user