implemented tray icon
This commit is contained in:
parent
8a9ecdccff
commit
3a16b333b2
7 changed files with 70 additions and 42 deletions
|
|
@ -5,6 +5,13 @@
|
|||
|
||||
#include <QMainWindow>
|
||||
#include <QApplication>
|
||||
#include <QCloseEvent>
|
||||
|
||||
#include <QIcon>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QMenu>
|
||||
//#include <QMessageBox>
|
||||
|
||||
#include <QLabel>
|
||||
#include <QSlider>
|
||||
#include <QGridLayout>
|
||||
|
|
@ -79,7 +86,7 @@ public:
|
|||
public slots:
|
||||
void updateMainVolume(int newValue);
|
||||
void updateMute(int checked);
|
||||
|
||||
|
||||
private:
|
||||
QTimer* timer = nullptr;
|
||||
uint64_t idx;
|
||||
|
|
@ -99,6 +106,11 @@ public:
|
|||
MainWindow(QWidget *parent = nullptr);
|
||||
void reloadEndpointWidgets();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
|
||||
//TODO: destroy/empty existing EndpointWidgets
|
||||
//void setEndpointHandlers(std::vector<EndpointHandler*> *ephs);
|
||||
|
||||
|
|
@ -107,8 +119,10 @@ private:
|
|||
std::vector<EndpointWidget*> ews;
|
||||
QWidget *widget;
|
||||
QGridLayout *layout;
|
||||
//QLabel *pintas;
|
||||
|
||||
QSystemTrayIcon *trayIcon;
|
||||
QMenu *trayIconMenu;
|
||||
QAction *trayIconMenuQuit;
|
||||
//public slots:
|
||||
// void setEndpointHandlers(std::vector<EndpointHandler*> *ephs);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue