2019-08-17 17:33:36 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 ~ 2019 Deepin Technology Co., Ltd.
|
|
|
|
*
|
|
|
|
* Author: wangshaojun <wangshaojun_cm@deepin.com>
|
|
|
|
*
|
|
|
|
* Maintainer: wangshaojun <wangshaojun_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/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "dockitemmanager.h"
|
2020-12-16 17:38:41 +08:00
|
|
|
#include "appitem.h"
|
|
|
|
#include "launcheritem.h"
|
|
|
|
#include "pluginsitem.h"
|
|
|
|
#include "traypluginitem.h"
|
2021-03-06 17:17:27 +08:00
|
|
|
#include "qgsettingsinterfaceimpl.h"
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
#include <QGSettings>
|
|
|
|
|
|
|
|
DockItemManager *DockItemManager::INSTANCE = nullptr;
|
|
|
|
|
2021-03-10 18:40:46 +08:00
|
|
|
static QGSettingsInterface *GSettingsByApp(QGSettingsInterface::Type type)
|
|
|
|
{
|
|
|
|
switch (type) {
|
|
|
|
case QGSettingsInterface::Type::ImplType:
|
|
|
|
{
|
|
|
|
static QGSettingsInterfaceImpl settings("com.deepin.dde.dock.module.app");
|
|
|
|
return &settings;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
qWarning("Unless you are doing unit testing, you should't see this message");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static QGSettingsInterface *GSettingsByActiveApp(QGSettingsInterface::Type type)
|
|
|
|
{
|
|
|
|
switch (type) {
|
|
|
|
case QGSettingsInterface::Type::ImplType:
|
|
|
|
{
|
|
|
|
static QGSettingsInterfaceImpl settings("com.deepin.dde.dock.module.activeapp");
|
|
|
|
return &settings;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
qWarning("Unless you are doing unit testing, you should't see this message");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static QGSettingsInterface *GSettingsByDockApp(QGSettingsInterface::Type type)
|
|
|
|
{
|
|
|
|
switch (type) {
|
|
|
|
case QGSettingsInterface::Type::ImplType:
|
|
|
|
{
|
|
|
|
static QGSettingsInterfaceImpl settings("com.deepin.dde.dock.module.dockapp");
|
|
|
|
return &settings;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
qWarning("Unless you are doing unit testing, you should't see this message");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-08-17 17:33:36 +08:00
|
|
|
DockItemManager::DockItemManager(QObject *parent)
|
|
|
|
: QObject(parent)
|
|
|
|
, m_appInter(new DBusDock("com.deepin.dde.daemon.Dock", "/com/deepin/dde/daemon/Dock", QDBusConnection::sessionBus(), this))
|
|
|
|
, m_pluginsInter(new DockPluginsController(this))
|
|
|
|
{
|
2019-09-04 13:22:43 +08:00
|
|
|
//固定区域:启动器
|
2021-03-06 17:17:27 +08:00
|
|
|
m_itemList.append(new LauncherItem(new QGSettingsInterfaceImpl("com.deepin.dde.dock.module.launcher")));
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
// 应用区域
|
|
|
|
for (auto entry : m_appInter->entries()) {
|
2021-03-10 18:40:46 +08:00
|
|
|
AppItem *it = new AppItem(GSettingsByApp(QGSettingsInterface::ImplType)
|
|
|
|
, GSettingsByActiveApp(QGSettingsInterface::ImplType)
|
|
|
|
, GSettingsByDockApp(QGSettingsInterface::ImplType)
|
|
|
|
, entry);
|
2019-08-21 14:07:24 +08:00
|
|
|
manageItem(it);
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
connect(it, &AppItem::requestActivateWindow, m_appInter, &DBusDock::ActivateWindow, Qt::QueuedConnection);
|
|
|
|
connect(it, &AppItem::requestPreviewWindow, m_appInter, &DBusDock::PreviewWindow);
|
|
|
|
connect(it, &AppItem::requestCancelPreview, m_appInter, &DBusDock::CancelPreviewWindow);
|
|
|
|
|
2020-10-29 18:08:30 +08:00
|
|
|
connect(this, &DockItemManager::requestUpdateDockItem, it, &AppItem::requestUpdateEntryGeometries);
|
|
|
|
|
2019-08-17 17:33:36 +08:00
|
|
|
m_itemList.append(it);
|
|
|
|
}
|
|
|
|
|
|
|
|
// 托盘区域和插件区域 由DockPluginsController获取
|
|
|
|
|
|
|
|
// 应用信号
|
|
|
|
connect(m_appInter, &DBusDock::EntryAdded, this, &DockItemManager::appItemAdded);
|
|
|
|
connect(m_appInter, &DBusDock::EntryRemoved, this, static_cast<void (DockItemManager::*)(const QString &)>(&DockItemManager::appItemRemoved), Qt::QueuedConnection);
|
|
|
|
connect(m_appInter, &DBusDock::ServiceRestarted, this, &DockItemManager::reloadAppItems);
|
|
|
|
|
|
|
|
// 插件信号
|
|
|
|
connect(m_pluginsInter, &DockPluginsController::pluginItemInserted, this, &DockItemManager::pluginItemInserted, Qt::QueuedConnection);
|
|
|
|
connect(m_pluginsInter, &DockPluginsController::pluginItemRemoved, this, &DockItemManager::pluginItemRemoved, Qt::QueuedConnection);
|
|
|
|
connect(m_pluginsInter, &DockPluginsController::pluginItemUpdated, this, &DockItemManager::itemUpdated, Qt::QueuedConnection);
|
2019-10-29 14:53:35 +08:00
|
|
|
connect(m_pluginsInter, &DockPluginsController::trayVisableCountChanged, this, &DockItemManager::trayVisableCountChanged, Qt::QueuedConnection);
|
2021-01-27 15:38:13 +08:00
|
|
|
connect(m_pluginsInter, &DockPluginsController::pluginLoaderFinished, this, &DockItemManager::updatePluginsItemOrderKey, Qt::QueuedConnection);
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
// 刷新图标
|
|
|
|
QMetaObject::invokeMethod(this, "refershItemsIcon", Qt::QueuedConnection);
|
|
|
|
}
|
|
|
|
|
|
|
|
DockItemManager *DockItemManager::instance(QObject *parent)
|
|
|
|
{
|
|
|
|
if (!INSTANCE)
|
|
|
|
INSTANCE = new DockItemManager(parent);
|
|
|
|
|
|
|
|
return INSTANCE;
|
|
|
|
}
|
|
|
|
|
|
|
|
const QList<QPointer<DockItem>> DockItemManager::itemList() const
|
|
|
|
{
|
|
|
|
return m_itemList;
|
|
|
|
}
|
|
|
|
|
|
|
|
const QList<PluginsItemInterface *> DockItemManager::pluginList() const
|
|
|
|
{
|
|
|
|
return m_pluginsInter->pluginsMap().keys();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DockItemManager::appIsOnDock(const QString &appDesktop) const
|
|
|
|
{
|
|
|
|
return m_appInter->IsOnDock(appDesktop);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DockItemManager::startLoadPlugins() const
|
|
|
|
{
|
2021-03-05 14:26:28 +08:00
|
|
|
if (!QGSettings::isSchemaInstalled("com.deepin.dde.dock")) {
|
|
|
|
qWarning("com.deepin.dde.dock is not installed");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-08-17 17:33:36 +08:00
|
|
|
QGSettings gsetting("com.deepin.dde.dock", "/com/deepin/dde/dock/");
|
|
|
|
|
|
|
|
QTimer::singleShot(gsetting.get("delay-plugins-time").toUInt(), m_pluginsInter, &DockPluginsController::startLoader);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DockItemManager::refershItemsIcon()
|
|
|
|
{
|
|
|
|
for (auto item : m_itemList) {
|
2021-03-06 18:40:13 +08:00
|
|
|
item->refreshIcon();
|
2019-08-17 17:33:36 +08:00
|
|
|
item->update();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-28 09:51:35 +08:00
|
|
|
/**
|
|
|
|
* @brief 将插件的参数(Order, Visible, etc)写入gsettings
|
|
|
|
* 自动化测试需要通过dbus(GetPluginSettings)获取这些参数
|
|
|
|
*/
|
2019-08-17 17:33:36 +08:00
|
|
|
void DockItemManager::updatePluginsItemOrderKey()
|
|
|
|
{
|
|
|
|
int index = 0;
|
|
|
|
for (auto item : m_itemList) {
|
2019-08-21 12:52:53 +08:00
|
|
|
if (item.isNull() || item->itemType() != DockItem::Plugins)
|
2019-08-17 17:33:36 +08:00
|
|
|
continue;
|
|
|
|
static_cast<PluginsItem *>(item.data())->setItemSortKey(++index);
|
|
|
|
}
|
2019-09-04 13:22:43 +08:00
|
|
|
|
|
|
|
// 固定区域插件排序
|
|
|
|
index = 0;
|
|
|
|
for (auto item : m_itemList) {
|
|
|
|
if (item.isNull() || item->itemType() != DockItem::FixedPlugin)
|
|
|
|
continue;
|
|
|
|
static_cast<PluginsItem *>(item.data())->setItemSortKey(++index);
|
|
|
|
}
|
2019-08-17 17:33:36 +08:00
|
|
|
}
|
|
|
|
|
2019-08-21 12:52:53 +08:00
|
|
|
void DockItemManager::itemMoved(DockItem *const sourceItem, DockItem *const targetItem)
|
2019-08-17 17:33:36 +08:00
|
|
|
{
|
2019-08-21 12:52:53 +08:00
|
|
|
Q_ASSERT(sourceItem != targetItem);
|
2019-08-17 17:33:36 +08:00
|
|
|
|
2019-08-21 12:52:53 +08:00
|
|
|
const DockItem::ItemType moveType = sourceItem->itemType();
|
|
|
|
const DockItem::ItemType replaceType = targetItem->itemType();
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
// app move
|
|
|
|
if (moveType == DockItem::App || moveType == DockItem::Placeholder)
|
2019-10-17 19:52:55 +08:00
|
|
|
if (replaceType != DockItem::App)
|
2019-08-17 17:33:36 +08:00
|
|
|
return;
|
|
|
|
|
|
|
|
// plugins move
|
|
|
|
if (moveType == DockItem::Plugins || moveType == DockItem::TrayPlugin)
|
|
|
|
if (replaceType != DockItem::Plugins && replaceType != DockItem::TrayPlugin)
|
|
|
|
return;
|
|
|
|
|
2019-08-21 12:52:53 +08:00
|
|
|
const int moveIndex = m_itemList.indexOf(sourceItem);
|
2019-10-17 19:52:55 +08:00
|
|
|
const int replaceIndex = m_itemList.indexOf(targetItem);
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
m_itemList.removeAt(moveIndex);
|
2019-08-21 12:52:53 +08:00
|
|
|
m_itemList.insert(replaceIndex, sourceItem);
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
// update plugins sort key if order changed
|
|
|
|
if (moveType == DockItem::Plugins || replaceType == DockItem::Plugins
|
2020-12-28 09:51:35 +08:00
|
|
|
|| moveType == DockItem::TrayPlugin || replaceType == DockItem::TrayPlugin
|
|
|
|
|| moveType == DockItem::FixedPlugin || replaceType == DockItem::FixedPlugin) {
|
|
|
|
updatePluginsItemOrderKey();
|
|
|
|
}
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
// for app move, index 0 is launcher item, need to pass it.
|
|
|
|
if (moveType == DockItem::App && replaceType == DockItem::App)
|
|
|
|
m_appInter->MoveEntry(moveIndex - 1, replaceIndex - 1);
|
|
|
|
}
|
|
|
|
|
2019-08-29 20:21:36 +08:00
|
|
|
void DockItemManager::itemAdded(const QString &appDesktop, int idx)
|
|
|
|
{
|
|
|
|
m_appInter->RequestDock(appDesktop, idx);
|
|
|
|
}
|
|
|
|
|
2019-08-17 17:33:36 +08:00
|
|
|
void DockItemManager::appItemAdded(const QDBusObjectPath &path, const int index)
|
|
|
|
{
|
2019-10-11 16:04:12 +08:00
|
|
|
// 第一个是启动器
|
|
|
|
int insertIndex = 1;
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
// -1 for append to app list end
|
|
|
|
if (index != -1) {
|
|
|
|
insertIndex += index;
|
|
|
|
} else {
|
|
|
|
for (auto item : m_itemList)
|
|
|
|
if (item->itemType() == DockItem::App)
|
|
|
|
++insertIndex;
|
|
|
|
}
|
|
|
|
|
2021-03-10 18:40:46 +08:00
|
|
|
AppItem *item = new AppItem(GSettingsByApp(QGSettingsInterface::ImplType)
|
|
|
|
, GSettingsByActiveApp(QGSettingsInterface::ImplType)
|
|
|
|
, GSettingsByDockApp(QGSettingsInterface::ImplType)
|
|
|
|
, path);
|
2020-07-22 17:08:59 +08:00
|
|
|
|
|
|
|
if (m_appIDist.contains(item->appId())) {
|
|
|
|
delete item;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-08-21 14:07:24 +08:00
|
|
|
manageItem(item);
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
connect(item, &AppItem::requestActivateWindow, m_appInter, &DBusDock::ActivateWindow, Qt::QueuedConnection);
|
|
|
|
connect(item, &AppItem::requestPreviewWindow, m_appInter, &DBusDock::PreviewWindow);
|
|
|
|
connect(item, &AppItem::requestCancelPreview, m_appInter, &DBusDock::CancelPreviewWindow);
|
2020-12-02 14:50:49 +08:00
|
|
|
connect(this, &DockItemManager::requestUpdateDockItem, item, &AppItem::requestUpdateEntryGeometries);
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
m_itemList.insert(insertIndex, item);
|
2020-07-22 17:08:59 +08:00
|
|
|
m_appIDist.append(item->appId());
|
2019-11-04 11:31:54 +08:00
|
|
|
|
|
|
|
if (index != -1) {
|
|
|
|
emit itemInserted(insertIndex - 1, item);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-08-17 17:33:36 +08:00
|
|
|
emit itemInserted(insertIndex, item);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DockItemManager::appItemRemoved(const QString &appId)
|
|
|
|
{
|
|
|
|
for (int i(0); i != m_itemList.size(); ++i) {
|
|
|
|
if (m_itemList[i]->itemType() != DockItem::App)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
AppItem *app = static_cast<AppItem *>(m_itemList[i].data());
|
|
|
|
if (!app) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (!app->isValid() || app->appId() == appId) {
|
|
|
|
appItemRemoved(app);
|
2020-08-04 15:38:41 +08:00
|
|
|
break;
|
2019-08-17 17:33:36 +08:00
|
|
|
}
|
|
|
|
}
|
2020-07-22 17:08:59 +08:00
|
|
|
|
|
|
|
m_appIDist.removeAll(appId);
|
2019-08-17 17:33:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void DockItemManager::appItemRemoved(AppItem *appItem)
|
|
|
|
{
|
|
|
|
emit itemRemoved(appItem);
|
|
|
|
m_itemList.removeOne(appItem);
|
2019-12-30 11:10:36 +08:00
|
|
|
|
|
|
|
if (appItem->isDragging()) {
|
|
|
|
QDrag::cancel();
|
|
|
|
}
|
2019-08-17 17:33:36 +08:00
|
|
|
appItem->deleteLater();
|
|
|
|
}
|
|
|
|
|
|
|
|
void DockItemManager::pluginItemInserted(PluginsItem *item)
|
|
|
|
{
|
2019-08-21 14:07:24 +08:00
|
|
|
manageItem(item);
|
|
|
|
|
2019-12-06 14:25:36 +08:00
|
|
|
DockItem::ItemType pluginType = item->itemType();
|
|
|
|
|
2019-08-17 17:33:36 +08:00
|
|
|
// find first plugins item position
|
|
|
|
int firstPluginPosition = -1;
|
|
|
|
for (int i(0); i != m_itemList.size(); ++i) {
|
|
|
|
DockItem::ItemType type = m_itemList[i]->itemType();
|
2019-12-06 14:25:36 +08:00
|
|
|
if (type != pluginType)
|
2019-08-17 17:33:36 +08:00
|
|
|
continue;
|
|
|
|
|
|
|
|
firstPluginPosition = i;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (firstPluginPosition == -1)
|
|
|
|
firstPluginPosition = m_itemList.size();
|
|
|
|
|
|
|
|
// find insert position
|
|
|
|
int insertIndex = 0;
|
|
|
|
const int itemSortKey = item->itemSortKey();
|
|
|
|
if (itemSortKey == -1 || firstPluginPosition == -1) {
|
|
|
|
insertIndex = m_itemList.size();
|
|
|
|
} else if (itemSortKey == 0) {
|
|
|
|
insertIndex = firstPluginPosition;
|
|
|
|
} else {
|
|
|
|
insertIndex = m_itemList.size();
|
|
|
|
for (int i(firstPluginPosition + 1); i != m_itemList.size() + 1; ++i) {
|
|
|
|
PluginsItem *pItem = static_cast<PluginsItem *>(m_itemList[i - 1].data());
|
|
|
|
Q_ASSERT(pItem);
|
|
|
|
|
|
|
|
const int sortKey = pItem->itemSortKey();
|
2019-12-27 13:04:56 +08:00
|
|
|
if (pluginType == DockItem::FixedPlugin) {
|
|
|
|
if (sortKey != -1 && itemSortKey > sortKey)
|
|
|
|
continue;
|
|
|
|
insertIndex = i - 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (sortKey != -1 && itemSortKey > sortKey && pItem->itemType() != DockItem::FixedPlugin)
|
2019-08-17 17:33:36 +08:00
|
|
|
continue;
|
|
|
|
insertIndex = i - 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
m_itemList.insert(insertIndex, item);
|
2019-12-06 14:25:36 +08:00
|
|
|
if(pluginType == DockItem::FixedPlugin)
|
2020-03-13 12:59:02 +08:00
|
|
|
{
|
2019-12-06 14:25:36 +08:00
|
|
|
insertIndex ++;
|
2020-03-13 12:59:02 +08:00
|
|
|
}
|
2019-08-17 17:33:36 +08:00
|
|
|
|
2019-12-06 14:25:36 +08:00
|
|
|
emit itemInserted(insertIndex - firstPluginPosition, item);
|
2019-08-17 17:33:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void DockItemManager::pluginItemRemoved(PluginsItem *item)
|
|
|
|
{
|
|
|
|
item->hidePopup();
|
|
|
|
|
2019-10-17 19:52:55 +08:00
|
|
|
emit itemRemoved(item);
|
2019-08-17 17:33:36 +08:00
|
|
|
|
|
|
|
m_itemList.removeOne(item);
|
2020-12-28 09:51:35 +08:00
|
|
|
|
|
|
|
updatePluginsItemOrderKey();
|
2019-08-17 17:33:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void DockItemManager::reloadAppItems()
|
|
|
|
{
|
|
|
|
// remove old item
|
|
|
|
for (auto item : m_itemList)
|
|
|
|
if (item->itemType() == DockItem::App)
|
|
|
|
appItemRemoved(static_cast<AppItem *>(item.data()));
|
|
|
|
|
|
|
|
// append new item
|
|
|
|
for (auto path : m_appInter->entries())
|
|
|
|
appItemAdded(path, -1);
|
|
|
|
}
|
|
|
|
|
2019-08-21 12:52:53 +08:00
|
|
|
// 不同的模式下,插件顺序不一样
|
2019-08-17 17:33:36 +08:00
|
|
|
void DockItemManager::sortPluginItems()
|
|
|
|
{
|
|
|
|
int firstPluginIndex = -1;
|
|
|
|
for (int i(0); i != m_itemList.size(); ++i) {
|
2019-08-21 12:52:53 +08:00
|
|
|
if (m_itemList[i]->itemType() == DockItem::Plugins) {
|
2019-08-17 17:33:36 +08:00
|
|
|
firstPluginIndex = i;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (firstPluginIndex == -1)
|
|
|
|
return;
|
|
|
|
|
|
|
|
std::sort(m_itemList.begin() + firstPluginIndex, m_itemList.end(), [](DockItem * a, DockItem * b) -> bool {
|
|
|
|
PluginsItem *pa = static_cast<PluginsItem *>(a);
|
|
|
|
PluginsItem *pb = static_cast<PluginsItem *>(b);
|
|
|
|
|
|
|
|
const int aKey = pa->itemSortKey();
|
|
|
|
const int bKey = pb->itemSortKey();
|
|
|
|
|
|
|
|
if (bKey == -1)
|
|
|
|
return true;
|
|
|
|
if (aKey == -1)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
return aKey < bKey;
|
|
|
|
});
|
|
|
|
|
|
|
|
// reset order
|
2019-08-21 12:52:53 +08:00
|
|
|
for (int i(firstPluginIndex); i != m_itemList.size(); ++i) {
|
|
|
|
emit itemRemoved(m_itemList[i]);
|
|
|
|
emit itemInserted(-1, m_itemList[i]);
|
|
|
|
}
|
2019-08-17 17:33:36 +08:00
|
|
|
}
|
2019-08-21 14:07:24 +08:00
|
|
|
|
|
|
|
void DockItemManager::manageItem(DockItem *item)
|
|
|
|
{
|
|
|
|
connect(item, &DockItem::requestRefreshWindowVisible, this, &DockItemManager::requestRefershWindowVisible, Qt::UniqueConnection);
|
|
|
|
connect(item, &DockItem::requestWindowAutoHide, this, &DockItemManager::requestWindowAutoHide, Qt::UniqueConnection);
|
|
|
|
}
|