mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-06 02:15:52 +00:00
add initial support of tag suggestion
This commit is contained in:
@ -72,15 +72,21 @@ int DPAdds::currentDesktop() const
|
||||
}
|
||||
|
||||
|
||||
QStringList DPAdds::dictKeys(const bool, const QString) const
|
||||
QStringList DPAdds::dictKeys(const bool sorted, const QString regexp) const
|
||||
{
|
||||
qCDebug(LOG_DP) << "Should be sorted" << sorted << "and filter applied"
|
||||
<< regexp;
|
||||
|
||||
QStringList allKeys;
|
||||
allKeys.append(QString("mark"));
|
||||
allKeys.append(QString("name"));
|
||||
allKeys.append(QString("number"));
|
||||
allKeys.append(QString("total"));
|
||||
|
||||
return allKeys;
|
||||
if (sorted)
|
||||
allKeys.sort();
|
||||
|
||||
return allKeys.filter(QRegExp(regexp));
|
||||
}
|
||||
|
||||
|
||||
|
@ -45,8 +45,8 @@ public:
|
||||
virtual ~DPAdds();
|
||||
Q_INVOKABLE bool isDebugEnabled() const;
|
||||
Q_INVOKABLE int currentDesktop() const;
|
||||
Q_INVOKABLE QStringList dictKeys(const bool = true,
|
||||
const QString = QString()) const;
|
||||
Q_INVOKABLE QStringList dictKeys(const bool sorted = true,
|
||||
const QString regexp = QString()) const;
|
||||
Q_INVOKABLE int numberOfDesktops() const;
|
||||
Q_INVOKABLE QString toolTipImage(const int desktop) const;
|
||||
Q_INVOKABLE QString parsePattern(const QString pattern,
|
||||
|
Reference in New Issue
Block a user