File indexing completed on 2024-04-28 16:44:39
0001 /* 0002 * SPDX-FileCopyrightText: 2015 Marco Martin <mart@kde.org> 0003 * SPDX-FileCopyrightText: 2016 David Edmundson <davidedmundson@kde.org> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef GROUPINGCONTAINMENT_H 0009 #define GROUPINGCONTAINMENT_H 0010 0011 #include <Plasma/Containment> 0012 0013 class QQuickItem; 0014 0015 class GroupingContainment : public Plasma::Containment 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit GroupingContainment(QObject *parent, const KPluginMetaData &data, const QVariantList &args); 0020 ~GroupingContainment() override; 0021 0022 void init() override; 0023 0024 // Creates an applet 0025 Q_INVOKABLE void newTask(const QString &task); 0026 0027 // cleans all instances of a given applet 0028 void cleanupTask(const QString &task); 0029 0030 /** 0031 * Given an AppletInterface pointer, shows a proper context menu for it 0032 */ 0033 Q_INVOKABLE void showPlasmoidMenu(QQuickItem *appletInterface, int x, int y); 0034 0035 /** 0036 * Find out global coordinates for a popup given local MouseArea 0037 * coordinates 0038 */ 0039 Q_INVOKABLE QPointF popupPosition(QQuickItem *visualParent, int x, int y); 0040 0041 /** 0042 * Reparent the item "before" with the same parent as the item "after", 0043 * then restack it before it, using QQuickITem::stackBefore. 0044 * used to quickly reorder icons in the systray (or hidden popup) 0045 * @see QQuickITem::stackBefore 0046 */ 0047 Q_INVOKABLE void reorderItemBefore(QQuickItem *before, QQuickItem *after); 0048 0049 /** 0050 * Reparent the item "after" with the same parent as the item "before", 0051 * then restack it after it, using QQuickITem::stackAfter. 0052 * used to quickly reorder icons in the systray (or hidden popup) 0053 * @see QQuickITem::stackAfter 0054 */ 0055 Q_INVOKABLE void reorderItemAfter(QQuickItem *after, QQuickItem *before); 0056 }; 0057 0058 #endif