Add per-tool settings and gesture customization
This commit is contained in:
1 parent
d6f30c5735
commit
38142b9499
26 files changed
+1383
-83
No files matched your search
@@ -21,6 +21,16 @@ class FedoraToolsKcm : public KQuickConfigModule
|
||||
Q_PROPERTY(QString message READ message NOTIFY messageChanged)
|
||||
Q_PROPERTY(bool error READ error NOTIFY messageChanged)
|
||||
Q_PROPERTY(bool fingerprintEnabled READ fingerprintEnabled NOTIFY fingerprintEnabledChanged)
|
||||
Q_PROPERTY(QString activePackage READ activePackage NOTIFY packageOperationChanged)
|
||||
Q_PROPERTY(QString packageOperation READ packageOperation NOTIFY packageOperationChanged)
|
||||
Q_PROPERTY(bool shortcutStartWithFirst READ shortcutStartWithFirst NOTIFY toolSettingsChanged)
|
||||
Q_PROPERTY(bool shortcutInitialShiftOpensNew READ shortcutInitialShiftOpensNew NOTIFY toolSettingsChanged)
|
||||
Q_PROPERTY(bool shortcutShiftCyclesBackward READ shortcutShiftCyclesBackward NOTIFY toolSettingsChanged)
|
||||
Q_PROPERTY(int touchpadMinimumAnchorAge READ touchpadMinimumAnchorAge NOTIFY toolSettingsChanged)
|
||||
Q_PROPERTY(int touchpadMinimumPause READ touchpadMinimumPause NOTIFY toolSettingsChanged)
|
||||
Q_PROPERTY(int touchpadMinimumTap READ touchpadMinimumTap NOTIFY toolSettingsChanged)
|
||||
Q_PROPERTY(int touchpadMaximumTap READ touchpadMaximumTap NOTIFY toolSettingsChanged)
|
||||
Q_PROPERTY(QString touchpadOutputEvent READ touchpadOutputEvent NOTIFY toolSettingsChanged)
|
||||
|
||||
public:
|
||||
FedoraToolsKcm(QObject *parent, const KPluginMetaData &data);
|
||||
@@ -30,10 +40,25 @@ public:
|
||||
QString message() const;
|
||||
bool error() const;
|
||||
bool fingerprintEnabled() const;
|
||||
QString activePackage() const;
|
||||
QString packageOperation() const;
|
||||
bool shortcutStartWithFirst() const;
|
||||
bool shortcutInitialShiftOpensNew() const;
|
||||
bool shortcutShiftCyclesBackward() const;
|
||||
int touchpadMinimumAnchorAge() const;
|
||||
int touchpadMinimumPause() const;
|
||||
int touchpadMinimumTap() const;
|
||||
int touchpadMaximumTap() const;
|
||||
QString touchpadOutputEvent() const;
|
||||
|
||||
Q_INVOKABLE void refresh(bool refreshMetadata = false);
|
||||
Q_INVOKABLE void clearMessage();
|
||||
Q_INVOKABLE void installTool(const QString &packageName);
|
||||
Q_INVOKABLE void removeTool(const QString &packageName);
|
||||
Q_INVOKABLE void saveShortcutSettings(bool startWithFirst, bool initialShiftOpensNew, bool shiftCyclesBackward);
|
||||
Q_INVOKABLE void resetShortcutSettings();
|
||||
Q_INVOKABLE void saveTouchpadSettings(int minimumAnchorAge, int minimumPause, int minimumTap, int maximumTap, const QString &outputEvent);
|
||||
Q_INVOKABLE void resetTouchpadSettings();
|
||||
Q_INVOKABLE void enableFingerprintWorkaround(const QUrl &rpmFile, bool force);
|
||||
Q_INVOKABLE void disableFingerprintWorkaround();
|
||||
|
||||
@@ -41,6 +66,8 @@ Q_SIGNALS:
|
||||
void busyChanged();
|
||||
void messageChanged();
|
||||
void fingerprintEnabledChanged();
|
||||
void packageOperationChanged();
|
||||
void toolSettingsChanged();
|
||||
|
||||
private:
|
||||
enum class QueryStage {
|
||||
@@ -57,8 +84,10 @@ private:
|
||||
void runAuthorizedAction(const QString &name, const QVariantMap &arguments, const QString &successMessage, bool refreshTools);
|
||||
void actionFinished(KJob *job, const QString &successMessage, bool refreshTools);
|
||||
void setBusy(bool busy);
|
||||
void setPackageOperation(const QString &packageName, const QString &operation);
|
||||
void setMessage(const QString &message, bool error = false);
|
||||
void updateFingerprintStatus();
|
||||
void loadToolSettings();
|
||||
|
||||
ToolModel m_tools;
|
||||
QProcess m_query;
|
||||
@@ -70,5 +99,15 @@ private:
|
||||
bool m_busy = false;
|
||||
bool m_error = false;
|
||||
bool m_fingerprintEnabled = false;
|
||||
QString m_activePackage;
|
||||
QString m_packageOperation;
|
||||
QString m_message;
|
||||
bool m_shortcutStartWithFirst = true;
|
||||
bool m_shortcutInitialShiftOpensNew = true;
|
||||
bool m_shortcutShiftCyclesBackward = true;
|
||||
int m_touchpadMinimumAnchorAge = 100;
|
||||
int m_touchpadMinimumPause = 100;
|
||||
int m_touchpadMinimumTap = 10;
|
||||
int m_touchpadMaximumTap = 150;
|
||||
QString m_touchpadOutputEvent = QStringLiteral("BTN_MIDDLE");
|
||||
};
|
||||
Reference in new issue
Block a user