shift-shell/containments/homescreens/folio/homescreen.h
Marco Allegretti d89a303337 Replace navigation panel with unified dock bar
In convergence mode the separate navigation panel is redundant
with window title-bar controls. Remove it by setting its
thickness to zero and visibility to false, then embed Home and
Overview buttons at the left and right ends of the favourites
bar. Running application icons with context menus are shown
between the favourites and the Overview button.

Add HomeScreen::triggerOverview() to invoke the KWin Overview
shortcut over D-Bus so the homescreen containment can open it
without access to the task-panel Plasmoid.
2026-04-09 10:15:14 +02:00

76 lines
2.5 KiB
C++

// SPDX-FileCopyrightText: 2015 Marco Martin <mart@kde.org>
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <Plasma/Containment>
#include <QSortFilterProxyModel>
#include "applicationlistmodel.h"
#include "delegatetoucharea.h"
#include "favouritesmodel.h"
#include "folioapplication.h"
#include "folioapplicationfolder.h"
#include "foliodelegate.h"
#include "foliosettings.h"
#include "foliowidget.h"
#include "homescreenstate.h"
#include "pagelistmodel.h"
#include "pagemodel.h"
#include "widgetcontainer.h"
#include "widgetsmanager.h"
class FolioSettings;
class PageListModel;
class WidgetsManager;
class HomeScreenState;
class FavouritesModel;
class ApplicationListModel;
class ApplicationListSearchModel;
class HomeScreen : public Plasma::Containment
{
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(FolioSettings *FolioSettings READ folioSettings CONSTANT)
Q_PROPERTY(HomeScreenState *HomeScreenState READ homeScreenState CONSTANT)
Q_PROPERTY(WidgetsManager *WidgetsManager READ widgetsManager CONSTANT)
Q_PROPERTY(ApplicationListModel *ApplicationListModel READ applicationListModel CONSTANT)
Q_PROPERTY(ApplicationListSearchModel *ApplicationListSearchModel READ applicationListSearchModel CONSTANT)
Q_PROPERTY(FavouritesModel *FavouritesModel READ favouritesModel CONSTANT)
Q_PROPERTY(PageListModel *PageListModel READ pageListModel CONSTANT)
public:
HomeScreen(QObject *parent, const KPluginMetaData &data, const QVariantList &args);
~HomeScreen() override;
void configChanged() override;
Q_INVOKABLE void triggerOverview() const;
FolioSettings *folioSettings();
HomeScreenState *homeScreenState();
WidgetsManager *widgetsManager();
ApplicationListModel *applicationListModel();
ApplicationListSearchModel *applicationListSearchModel();
FavouritesModel *favouritesModel();
PageListModel *pageListModel();
Q_SIGNALS:
void showingDesktopChanged(bool showingDesktop);
private Q_SLOTS:
void onAppletAdded(Plasma::Applet *applet, const QRectF &geometryHint);
void onAppletAboutToBeRemoved(Plasma::Applet *applet);
private:
FolioSettings *m_folioSettings{nullptr};
HomeScreenState *m_homeScreenState{nullptr};
WidgetsManager *m_widgetsManager{nullptr};
ApplicationListModel *m_applicationListModel{nullptr};
ApplicationListSearchModel *m_applicationListSearchModel{nullptr};
FavouritesModel *m_favouritesModel{nullptr};
PageListModel *m_pageListModel{nullptr};
};