1 Star 1 Fork 18

Qt(开源集合)/ZenShot

forked from Gitee 极速下载/ZenShot 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
widget.h 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
leexu007 提交于 2022-09-20 17:05 . * Fix bugs
/* Copyright (C) 2021 Nature Easy Soft Network Technology Co., LTD
*
* This file is part of Zenshot (https://github.com/easysoft/zenshot/).
*
* Zenshot is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zenshot is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Zenshot. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <screen/workspace.h>
#include <QPixmap>
#include <QPainter>
#include "core/screenlist.h"
#include <memory>
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = nullptr);
~Widget();
void start(std::shared_ptr<ScreenList> list, int index);
void cleanup();
Workspace* workspace() const;
void finishConfirmArea();
protected:
void showEvent(QShowEvent* event) override;
void hideEvent(QHideEvent* event) override;
void closeEvent(QCloseEvent* event) override;
void mousePressEvent(QMouseEvent *) override;
void mouseReleaseEvent(QMouseEvent *) override;
void mouseMoveEvent(QMouseEvent *) override;
void keyPressEvent(QKeyEvent *) override;
void paintEvent(QPaintEvent *) override;
void enterEvent(QEvent* event) override;
void leaveEvent(QEvent *event) override;
private:
QString m_status; //unknown, active, giveup
Workspace* m_workspace;
std::shared_ptr<ScreenList> m_screenlist;
};
#endif // WIDGET_H
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/qt-open-source-collection/ZenShot.git
git@gitee.com:qt-open-source-collection/ZenShot.git
qt-open-source-collection
ZenShot
ZenShot
main

搜索帮助