-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
DesktopApplet.hxx
51 lines (36 loc) · 1.08 KB
/
DesktopApplet.hxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
This file is part of liquidshell.
SPDX-FileCopyrightText: 2017 - 2024 Martin Koller <[email protected]>
SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef _DesktopApplet_H_
#define _DesktopApplet_H_
#include <QFrame>
#include <QDialogButtonBox>
#include <KWinCompat.hxx>
class DesktopApplet : public QFrame
{
Q_OBJECT
public:
DesktopApplet(QWidget *parent, const QString &theId, bool addConfigureAction = true);
virtual void loadConfig();
bool isConfiguring() const { return buttons->isVisible(); }
const QString &getId() const { return id; }
int isOnDesktop(int d) const { return (onDesktop == NET::OnAllDesktops) || (onDesktop == d); }
public Q_SLOTS:
virtual void configure() { }
virtual void saveConfig();
Q_SIGNALS:
void removeThis(DesktopApplet *);
protected:
QString id;
private Q_SLOTS:
void startGeometryChange();
void finishGeometryChange(QAbstractButton *clicked);
void removeThisApplet();
private:
QDialogButtonBox *buttons = nullptr;
QRect oldRect;
int onDesktop = NET::OnAllDesktops;
};
#endif