File indexing completed on 2024-05-12 05:29:37
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 0021 // Creates an applet 0022 Q_INVOKABLE void newTask(const QString &task); 0023 0024 // cleans all instances of a given applet 0025 void cleanupTask(const QString &task); 0026 0027 /** 0028 * Given an AppletInterface pointer, shows a proper context menu for it 0029 */ 0030 Q_INVOKABLE void showPlasmoidMenu(QQuickItem *appletInterface, int x, int y); 0031 0032 /** 0033 * Find out global coordinates for a popup given local MouseArea 0034 * coordinates 0035 */ 0036 Q_INVOKABLE QPointF popupPosition(QQuickItem *visualParent, int x, int y); 0037 0038 /** 0039 * Reparent the item "before" with the same parent as the item "after", 0040 * then restack it before it, using QQuickITem::stackBefore. 0041 * used to quickly reorder icons in the systray (or hidden popup) 0042 * @see QQuickITem::stackBefore 0043 */ 0044 Q_INVOKABLE void reorderItemBefore(QQuickItem *before, QQuickItem *after); 0045 0046 /** 0047 * Reparent the item "after" with the same parent as the item "before", 0048 * then restack it after it, using QQuickITem::stackAfter. 0049 * used to quickly reorder icons in the systray (or hidden popup) 0050 * @see QQuickITem::stackAfter 0051 */ 0052 Q_INVOKABLE void reorderItemAfter(QQuickItem *after, QQuickItem *before); 0053 }; 0054 0055 #endif