Floating polish: visibility, resize, saved geometry, D-Bus, desktop entry
- VisibilityController: show on field focus, dismiss until next focus, manual show/hide/toggle overrides - FloatingWindow: resize from the corner grip, clamp to screen - WindowSettings: geometry per screen, debounced saves - DBusControl: org.sloposk.Keyboard Show/Hide/Toggle for global shortcuts - org.sloposk.keyboard.desktop so System Settings lists it as a virtual keyboard - README with build/run/layout docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class VisibilityController;
|
||||
|
||||
// Session-bus remote control, e.g. for a global shortcut:
|
||||
// qdbus org.sloposk.Keyboard /Keyboard org.sloposk.Keyboard.Toggle
|
||||
class DBusControl : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "org.sloposk.Keyboard")
|
||||
|
||||
public:
|
||||
explicit DBusControl(VisibilityController &visibility, QObject *parent = nullptr);
|
||||
|
||||
// False if the bus is unavailable or another instance owns the name.
|
||||
bool registerOnSessionBus();
|
||||
|
||||
public Q_SLOTS:
|
||||
Q_SCRIPTABLE void Show();
|
||||
Q_SCRIPTABLE void Hide();
|
||||
Q_SCRIPTABLE void Toggle();
|
||||
|
||||
private:
|
||||
VisibilityController &m_visibility;
|
||||
};
|
||||
Reference in New Issue
Block a user