1 Star 2 Fork 0

depend/x11opacitytool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mainwindow.h 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
depend 提交于 2021-04-10 15:29 . 修复了deepinv20.1的问题
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QMap>
#include <QWindow>
#include <QMutex>
#include <xcb/xcb.h>
#include <xcb/xcb_ewmh.h>
#include <QtX11Extras/QX11Info>
#include <QCloseEvent>
class QSystemTrayIcon;
class QThread;
struct strucWindow {
int wid = 0;
QString name = "";
QWindow *window{nullptr};
double opacity{1.0};
};
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
void setAllWindows();
void setAllWindowsOpacity(double opacity = 0.99);
void searchAllWindowType();
uint32_t searchWindowType(int wid);
QList<unsigned long> searchWindowid(const QString &name);
void initTray();
void initXcb();
void initNoopacity();
void closeEvent(QCloseEvent *event);
private slots:
void on_setBtn_clicked();
void quitApp();
void on_opacitySlider_sliderReleased();
void on_pushButton_clicked();
private:
Ui::MainWindow *ui;
QMap <int, strucWindow> m_windowVec;
xcb_ewmh_connection_t m_ewmh_connection;
xcb_intern_atom_cookie_t *m_cookie{nullptr};
QMutex m_mutex;
bool m_bEvent = true;
QThread *m_eventThread{nullptr};
unsigned long m_myId = 0;
bool m_bFisrt = true;
QSystemTrayIcon *m_trayIcon{nullptr};
QMenu *m_traymenu{nullptr};
QList <unsigned long> m_noOpacityId;
};
#endif // MAINWINDOW_H
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liuminghang/x11opacitytool.git
git@gitee.com:liuminghang/x11opacitytool.git
liuminghang
x11opacitytool
x11opacitytool
master

搜索帮助