feat(m1): 应用骨架、传送门面板与暂存区
- CMake 构建(Qt6 + dtk2widget + LayerShellQt) - 单实例 / --daemon / --show - DBlur 双栏面板:传送门 + 暂存区,layer-shell 定位,不抢焦点 - 暂存区模型:文件/文字/图片、去重、JSON 持久化、文件消失清理 - 列表委托:复选框、缩略图、名称、hover 关闭按钮 - 全选 / 反选 / 删除选中 - 应用图标(多尺寸 hicolor)与 desktop 入口 - 方案更新:确认 layer-shell + 遮挡自动隐藏
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
// SPDX-FileCopyrightText: 2026 GXDE OS Team
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class PortalPanel;
|
||||
class QLocalServer;
|
||||
class StagingModel;
|
||||
|
||||
/**
|
||||
* Application controller: owns the staging model, the panel and the single
|
||||
* instance machinery.
|
||||
*/
|
||||
class App : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit App(QObject *parent = nullptr);
|
||||
|
||||
/**
|
||||
* @param daemon run in the background, only show the panel when needed
|
||||
* @param forceShow always show the panel on startup
|
||||
* @return false when another instance is already running
|
||||
*/
|
||||
bool init(bool daemon, bool forceShow);
|
||||
|
||||
private:
|
||||
void ensurePanel();
|
||||
void showPanel();
|
||||
|
||||
StagingModel *m_model = nullptr;
|
||||
PortalPanel *m_panel = nullptr;
|
||||
QLocalServer *m_server = nullptr;
|
||||
bool m_daemon = false;
|
||||
};
|
||||
Reference in New Issue
Block a user