dde-dock/frame/controller/toolapphelper.h
donghualin b670c15d1d fix: 托盘跟随高效模式调整任务栏位置
1、DockTrayWindow类增加调整位置接口,在改变任务栏位置的时候,调整高效模式下托盘区域的尺寸,让其适应任务栏
2、根据需求,删除任务栏右侧的显示桌面区域,该区域留给窗管做活动角

Log:
Influence: 高效模式下,调整任务栏位置,观察托盘区域是否正常
Task: https://pms.uniontech.com/task-view-112073.html
Change-Id: If3ad21c12abfe67e6eff8be713ef20905d03e637
2022-11-01 10:04:58 +00:00

68 lines
1.8 KiB
C++

/*
* Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd.
*
* Author: donghualin <donghualin@uniontech.com>
*
* Maintainer: donghualin <donghualin@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 TOOLAPPHELPER_H
#define TOOLAPPHELPER_H
#include "constants.h"
#include <QObject>
class QWidget;
class DockItem;
class PluginsItem;
class PluginsItemInterface;
using namespace Dock;
class ToolAppHelper : public QObject
{
Q_OBJECT
public:
explicit ToolAppHelper(QWidget *toolAreaWidget, QObject *parent = nullptr);
void setDisplayMode(DisplayMode displayMode);
void removePluginItem(DockItem *dockItem);
bool toolIsVisible() const;
Q_SIGNALS:
void requestUpdate();
void toolVisibleChanged(bool);
private:
void appendToToolArea(int index, DockItem *dockItem);
bool removeToolArea(DockItem *dockItem);
void moveToolWidget();
void updateWidgetStatus();
bool pluginInTool(DockItem *dockItem) const;
void pluginItemAdded(PluginsItemInterface *itemInter);
bool pluginExists(PluginsItemInterface *itemInter) const;
private:
QWidget *m_toolAreaWidget;
DisplayMode m_displayMode;
QList<DockItem *> m_sequentPluginItems;
};
#endif // TOOLAPPHELPER_H