system source, some code improvements

This commit is contained in:
2019-12-14 23:54:15 +03:00
parent c05a87a540
commit 276248a748
133 changed files with 748 additions and 526 deletions

View File

@ -42,21 +42,21 @@ class DPAdds : public QObject
public:
explicit DPAdds(QObject *_parent = nullptr);
virtual ~DPAdds();
Q_INVOKABLE bool isDebugEnabled() const;
Q_INVOKABLE int currentDesktop() const;
Q_INVOKABLE QStringList dictKeys(const bool _sorted = true, const QString &_regexp = "") const;
Q_INVOKABLE int numberOfDesktops() const;
~DPAdds() override;
Q_INVOKABLE static bool isDebugEnabled();
Q_INVOKABLE static int currentDesktop();
Q_INVOKABLE static QStringList dictKeys(const bool _sorted = true, const QString &_regexp = "");
Q_INVOKABLE static int numberOfDesktops();
Q_INVOKABLE QString toolTipImage(const int _desktop) const;
Q_INVOKABLE QString parsePattern(const QString &_pattern, const int _desktop) const;
// values
Q_INVOKABLE void setMark(const QString &_newMark);
Q_INVOKABLE void setToolTipData(const QVariantMap &_tooltipData);
Q_INVOKABLE QString infoByKey(const QString &_key) const;
Q_INVOKABLE static QString infoByKey(const QString &_key);
Q_INVOKABLE QString valueByKey(const QString &_key, int _desktop = -1) const;
// configuration slots
Q_INVOKABLE QString getAboutText(const QString &_type) const;
Q_INVOKABLE QVariantMap getFont(const QVariantMap &_defaultFont) const;
Q_INVOKABLE static QString getAboutText(const QString &_type);
Q_INVOKABLE static QVariantMap getFont(const QVariantMap &_defaultFont);
signals:
void desktopChanged() const;
@ -64,10 +64,10 @@ signals:
public slots:
Q_INVOKABLE static void sendNotification(const QString &_eventId, const QString &_message);
Q_INVOKABLE void setCurrentDesktop(const int _desktop) const;
Q_INVOKABLE static void setCurrentDesktop(const int _desktop);
private:
DesktopWindowsInfo getInfoByDesktop(const int _desktop) const;
static DesktopWindowsInfo getInfoByDesktop(const int _desktop);
// variables
int m_tooltipWidth = 200;
QString m_mark = "*";