2020-08-05 19:46:15 +08:00
|
|
|
/*
|
2021-06-18 17:36:06 +08:00
|
|
|
* Copyright (C) 2018 ~ 2020 Deepin Technology Co., Ltd.
|
2020-08-05 19:46:15 +08:00
|
|
|
*
|
|
|
|
* Author: fanpengcheng <fanpengcheng_cm@deepin.com>
|
|
|
|
*
|
|
|
|
* Maintainer: fanpengcheng <fanpengcheng_cm@deepin.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 MENUWORKER_H
|
|
|
|
#define MENUWORKER_H
|
|
|
|
|
|
|
|
#include "constants.h"
|
2022-06-22 11:18:29 +08:00
|
|
|
#include "dbusutil.h"
|
2020-08-05 19:46:15 +08:00
|
|
|
|
2022-08-25 19:31:31 +00:00
|
|
|
#include <QObject>
|
|
|
|
|
2021-03-12 13:20:13 +08:00
|
|
|
class QMenu;
|
2021-02-19 18:08:06 +08:00
|
|
|
class QGSettings;
|
2020-08-05 19:46:15 +08:00
|
|
|
/**
|
|
|
|
* @brief The MenuWorker class 此类用于处理任务栏右键菜单的逻辑
|
|
|
|
*/
|
|
|
|
class MenuWorker : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2022-08-25 19:31:31 +00:00
|
|
|
explicit MenuWorker(QObject *parent = nullptr);
|
2021-03-11 18:03:12 +08:00
|
|
|
|
2022-08-25 19:31:31 +00:00
|
|
|
void exec();
|
2020-08-05 19:46:15 +08:00
|
|
|
|
2021-03-11 18:03:12 +08:00
|
|
|
private:
|
2022-08-25 19:31:31 +00:00
|
|
|
void createMenu(QMenu *settingsMenu);
|
2020-08-05 19:46:15 +08:00
|
|
|
|
2021-09-28 15:59:06 +08:00
|
|
|
private slots:
|
|
|
|
void onDockSettingsTriggered();
|
|
|
|
|
2020-08-05 19:46:15 +08:00
|
|
|
private:
|
2022-06-22 11:18:29 +08:00
|
|
|
DockInter *m_dockInter;
|
2020-08-05 19:46:15 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MENUWORKER_H
|