feat(m1): 应用骨架、传送门面板与暂存区

- CMake 构建(Qt6 + dtk2widget + LayerShellQt)
- 单实例 / --daemon / --show
- DBlur 双栏面板:传送门 + 暂存区,layer-shell 定位,不抢焦点
- 暂存区模型:文件/文字/图片、去重、JSON 持久化、文件消失清理
- 列表委托:复选框、缩略图、名称、hover 关闭按钮
- 全选 / 反选 / 删除选中
- 应用图标(多尺寸 hicolor)与 desktop 入口
- 方案更新:确认 layer-shell + 遮挡自动隐藏
This commit is contained in:
2026-10-30 19:47:07 +08:00
parent 472af9722e
commit f9204a03d1
21 changed files with 1763 additions and 5 deletions
+56
View File
@@ -0,0 +1,56 @@
// SPDX-FileCopyrightText: 2026 GXDE OS Team
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <DBlurEffectWidget>
#include <QWidget>
class QLabel;
class QPushButton;
class PortalZone;
class StagingModel;
class StagingView;
/**
* The floating staging panel (传送门 + 暂存区).
*
* On Wayland this is a layer-shell overlay surface so that it does not appear
* in the dock, does not steal keyboard focus and can be positioned exactly.
* On X11 it falls back to a frameless tool window placed bottom-right.
*/
class PortalPanel : public Dtk::Widget::DBlurEffectWidget
{
Q_OBJECT
public:
explicit PortalPanel(StagingModel *model, QWidget *parent = nullptr);
~PortalPanel() override;
void refreshLayout();
void popup();
void dismiss();
signals:
void openChatRequested();
protected:
void showEvent(QShowEvent *event) override;
private:
void setupUi();
void setupWindow();
void updateGeometryForContent();
void updateSelectionBar();
StagingModel *m_model = nullptr;
StagingView *m_view = nullptr;
PortalZone *m_zone = nullptr;
QWidget *m_header = nullptr;
QWidget *m_selectionBar = nullptr;
QWidget *m_factory = nullptr;
QLabel *m_countLabel = nullptr;
QPushButton *m_selectAllButton = nullptr;
QPushButton *m_invertButton = nullptr;
QPushButton *m_deleteButton = nullptr;
};