mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-11-03 19:41:22 +03:00
chore: wrap more workspace signals
This commit is contained in:
parent
6aa60fabce
commit
ecdfeeafe4
@ -41,8 +41,17 @@ void Workspace::wrapSignals()
|
||||
connect(m_kwinImpl, implNormSignature, this, thisNormSignature);
|
||||
};
|
||||
|
||||
wrapComplexSignal(SIGNAL(currentDesktopChanged(int, KWin::AbstractClient *)), SLOT(currentDesktopChangedTransformer(int, KWin::AbstractClient *)));
|
||||
wrapSimpleSignal(SIGNAL(numberScreensChanged(int count)));
|
||||
wrapSimpleSignal(SIGNAL(screenResized(int screen)));
|
||||
wrapSimpleSignal(SIGNAL(currentActivityChanged(const QString &)));
|
||||
|
||||
wrapComplexSignal(SIGNAL(currentDesktopChanged(int, KWin::AbstractClient *)), SLOT(currentDesktopChangedTransformer(int, KWin::AbstractClient *)));
|
||||
wrapComplexSignal(SIGNAL(clientAdded(KWin::AbstractClient *)), SLOT(clientAddedTransformer(KWin::AbstractClient *)));
|
||||
wrapComplexSignal(SIGNAL(clientRemoved(KWin::AbstractClient *)), SLOT(clientRemovedTransformer(KWin::AbstractClient *)));
|
||||
wrapComplexSignal(SIGNAL(clientMinimized(KWin::AbstractClient *)), SLOT(clientMinimizedTransformer(KWin::AbstractClient *)));
|
||||
wrapComplexSignal(SIGNAL(clientUnminimized(KWin::AbstractClient *)), SLOT(clientUnminimizedTransformer(KWin::AbstractClient *)));
|
||||
wrapComplexSignal(SIGNAL(clientMaximizeSet(KWin::AbstractClient *, bool h, bool v)),
|
||||
SLOT(clientMaximizeSetTransformer(KWin::AbstractClient *, bool h, bool v)));
|
||||
};
|
||||
|
||||
QRect Workspace::clientArea(ClientAreaOption option, int screen, int desktop)
|
||||
@ -57,4 +66,34 @@ void Workspace::currentDesktopChangedTransformer(int desktop, KWin::AbstractClie
|
||||
Q_EMIT currentDesktopChanged(desktop, clientWrapper);
|
||||
};
|
||||
|
||||
void Workspace::clientAddedTransformer(KWin::AbstractClient *kwinClient)
|
||||
{
|
||||
auto clientWrapper = Client(reinterpret_cast<QObject *>(kwinClient));
|
||||
Q_EMIT clientAdded(clientWrapper);
|
||||
}
|
||||
|
||||
void Workspace::clientRemovedTransformer(KWin::AbstractClient *kwinClient)
|
||||
{
|
||||
auto clientWrapper = Client(reinterpret_cast<QObject *>(kwinClient));
|
||||
Q_EMIT clientRemoved(clientWrapper);
|
||||
}
|
||||
|
||||
void Workspace::clientMinimizedTransformer(KWin::AbstractClient *kwinClient)
|
||||
{
|
||||
auto clientWrapper = Client(reinterpret_cast<QObject *>(kwinClient));
|
||||
Q_EMIT clientMinimized(clientWrapper);
|
||||
}
|
||||
|
||||
void Workspace::clientUnminimizedTransformer(KWin::AbstractClient *kwinClient)
|
||||
{
|
||||
auto clientWrapper = Client(reinterpret_cast<QObject *>(kwinClient));
|
||||
Q_EMIT clientUnminimized(clientWrapper);
|
||||
}
|
||||
|
||||
void Workspace::clientMaximizeSetTransformer(KWin::AbstractClient *kwinClient, bool h, bool v)
|
||||
{
|
||||
auto clientWrapper = Client(reinterpret_cast<QObject *>(kwinClient));
|
||||
Q_EMIT clientMaximizeSet(clientWrapper, h, v);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -57,16 +57,45 @@ public:
|
||||
|
||||
private Q_SLOTS:
|
||||
void currentDesktopChangedTransformer(int desktop, KWin::AbstractClient *kwinClient);
|
||||
void clientAddedTransformer(KWin::AbstractClient *);
|
||||
void clientRemovedTransformer(KWin::AbstractClient *);
|
||||
void clientMinimizedTransformer(KWin::AbstractClient *);
|
||||
void clientUnminimizedTransformer(KWin::AbstractClient *);
|
||||
void clientMaximizeSetTransformer(KWin::AbstractClient *, bool h, bool v);
|
||||
|
||||
Q_SIGNALS:
|
||||
void currentDesktopChanged(int desktop, PlasmaApi::Client kwinClient);
|
||||
|
||||
/**
|
||||
* Signal emitted when the number of screens changes.
|
||||
* @param count The new number of screens
|
||||
*/
|
||||
void numberScreensChanged(int count);
|
||||
|
||||
/**
|
||||
* This signal is emitted when the size of @p screen changes.
|
||||
* Don't forget to fetch an updated client area.
|
||||
*
|
||||
* @deprecated Use QScreen::geometryChanged signal instead.
|
||||
*/
|
||||
void screenResized(int screen);
|
||||
|
||||
/**
|
||||
* Signal emitted whenever the current activity changed.
|
||||
* @param id id of the new activity
|
||||
*/
|
||||
void currentActivityChanged(const QString &id);
|
||||
|
||||
void clientAdded(PlasmaApi::Client client);
|
||||
|
||||
void clientRemoved(PlasmaApi::Client client);
|
||||
|
||||
void clientMinimized(PlasmaApi::Client client);
|
||||
|
||||
void clientUnminimized(PlasmaApi::Client client);
|
||||
|
||||
void clientMaximizeSet(PlasmaApi::Client client, bool h, bool v);
|
||||
|
||||
private:
|
||||
void wrapSignals();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user