dde-dock/plugins/airplane-mode/airplanemodeitem.h
songwentao a8becc02df fix: 修复飞行模式插件翻译问题
1. 根据飞行模式需求,优化飞行模式显示逻辑
2. 更新控制任务栏右键菜单项-任务栏设置翻译内容

Log: 优化任务栏翻译内容
Bug: https://pms.uniontech.com/zentao/bug-view-110011.html
Influence: 任务栏-飞行模式开启-tips翻译显示问题;任务栏右键-任务栏设置菜单项翻译显示问题
Change-Id: Ifc3bdc46372b5b816c1cbdd0a613d241a0155ad3
2022-01-05 12:49:53 +08:00

67 lines
1.7 KiB
C++

/*
* Copyright (C) 2020 ~ 2022 Deepin Technology Co., Ltd.
*
* Author: weizhixiang <weizhixiang@uniontech.com>
*
* Maintainer: weizhixiang <weizhixiang@uniontech.com>
*
*
* This program 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
* any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef AIRPLANEMODEITEM_H
#define AIRPLANEMODEITEM_H
#include <com_deepin_daemon_airplanemode.h>
#include <QWidget>
using DBusAirplaneMode = com::deepin::daemon::AirplaneMode;
namespace Dock {
class TipsWidget;
}
class AirplaneModeApplet;
class AirplaneModeItem : public QWidget
{
Q_OBJECT
public:
explicit AirplaneModeItem(QWidget *parent = nullptr);
QWidget *tipsWidget();
QWidget *popupApplet();
const QString contextMenu() const;
void invokeMenuItem(const QString menuId, const bool checked);
void refreshIcon();
void updateTips();
protected:
void resizeEvent(QResizeEvent *e);
void paintEvent(QPaintEvent *e);
signals:
void removeItem();
void addItem();
private:
Dock::TipsWidget *m_tipsLabel;
AirplaneModeApplet *m_applet;
DBusAirplaneMode *m_airplaneModeInter;
QPixmap m_iconPixmap;
};
#endif // AIRPLANEMODEITEM_H