mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-16 15:19:58 +00:00
more correct methods naming, prepare to move to templates
This commit is contained in:
@ -59,7 +59,7 @@ DPAdds::~DPAdds()
|
||||
}
|
||||
|
||||
|
||||
bool DPAdds::isDebugEnabled()
|
||||
bool DPAdds::isDebugEnabled() const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
@ -67,7 +67,7 @@ bool DPAdds::isDebugEnabled()
|
||||
}
|
||||
|
||||
|
||||
int DPAdds::currentDesktop()
|
||||
int DPAdds::currentDesktop() const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
@ -75,7 +75,7 @@ int DPAdds::currentDesktop()
|
||||
}
|
||||
|
||||
|
||||
QStringList DPAdds::dictKeys()
|
||||
QStringList DPAdds::dictKeys() const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
@ -89,7 +89,7 @@ QStringList DPAdds::dictKeys()
|
||||
}
|
||||
|
||||
|
||||
int DPAdds::numberOfDesktops()
|
||||
int DPAdds::numberOfDesktops() const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
@ -97,7 +97,7 @@ int DPAdds::numberOfDesktops()
|
||||
}
|
||||
|
||||
|
||||
QString DPAdds::toolTipImage(const int desktop)
|
||||
QString DPAdds::toolTipImage(const int desktop) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Desktop" << desktop;
|
||||
@ -180,7 +180,7 @@ QString DPAdds::toolTipImage(const int desktop)
|
||||
}
|
||||
|
||||
|
||||
QString DPAdds::parsePattern(const QString pattern, const int desktop)
|
||||
QString DPAdds::parsePattern(const QString pattern, const int desktop) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
@ -231,7 +231,7 @@ void DPAdds::setToolTipData(const QVariantMap tooltipData)
|
||||
}
|
||||
|
||||
|
||||
QString DPAdds::valueByKey(const QString key, int desktop)
|
||||
QString DPAdds::valueByKey(const QString key, int desktop) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Requested key" << key;
|
||||
@ -302,7 +302,7 @@ QString DPAdds::editPanelsToContol(const QString current)
|
||||
}
|
||||
|
||||
|
||||
QString DPAdds::getAboutText(const QString type)
|
||||
QString DPAdds::getAboutText(const QString type) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Type" << type;
|
||||
@ -341,7 +341,7 @@ QString DPAdds::getAboutText(const QString type)
|
||||
}
|
||||
|
||||
|
||||
QVariantMap DPAdds::getFont(const QVariantMap defaultFont)
|
||||
QVariantMap DPAdds::getFont(const QVariantMap defaultFont) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
@ -359,7 +359,7 @@ QVariantMap DPAdds::getFont(const QVariantMap defaultFont)
|
||||
}
|
||||
|
||||
|
||||
void DPAdds::changePanelsState()
|
||||
void DPAdds::changePanelsState() const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (panelsToControl.isEmpty()) return;
|
||||
@ -393,7 +393,7 @@ void DPAdds::sendNotification(const QString eventId, const QString message)
|
||||
}
|
||||
|
||||
|
||||
void DPAdds::setCurrentDesktop(const int desktop)
|
||||
void DPAdds::setCurrentDesktop(const int desktop) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Desktop" << desktop;
|
||||
@ -402,7 +402,7 @@ void DPAdds::setCurrentDesktop(const int desktop)
|
||||
}
|
||||
|
||||
|
||||
void DPAdds::changeDesktop(const int desktop)
|
||||
void DPAdds::changeDesktop(const int desktop) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Desktop" << desktop;
|
||||
@ -411,7 +411,7 @@ void DPAdds::changeDesktop(const int desktop)
|
||||
}
|
||||
|
||||
|
||||
void DPAdds::changeWindowList(const WId window)
|
||||
void DPAdds::changeWindowList(const WId window) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Window" << window;
|
||||
@ -420,7 +420,7 @@ void DPAdds::changeWindowList(const WId window)
|
||||
}
|
||||
|
||||
|
||||
DPAdds::DesktopWindowsInfo DPAdds::getInfoByDesktop(const int desktop)
|
||||
DPAdds::DesktopWindowsInfo DPAdds::getInfoByDesktop(const int desktop) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Desktop" << desktop;
|
||||
@ -452,7 +452,7 @@ DPAdds::DesktopWindowsInfo DPAdds::getInfoByDesktop(const int desktop)
|
||||
}
|
||||
|
||||
|
||||
QList<Plasma::Containment *> DPAdds::getPanels()
|
||||
QList<Plasma::Containment *> DPAdds::getPanels() const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
@ -467,7 +467,7 @@ QList<Plasma::Containment *> DPAdds::getPanels()
|
||||
}
|
||||
|
||||
|
||||
QString DPAdds::panelLocationToStr(Plasma::Types::Location location)
|
||||
QString DPAdds::panelLocationToStr(Plasma::Types::Location location) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Location" << location;
|
||||
|
@ -46,39 +46,39 @@ public:
|
||||
DPAdds(QObject *parent = nullptr);
|
||||
~DPAdds();
|
||||
|
||||
Q_INVOKABLE bool isDebugEnabled();
|
||||
Q_INVOKABLE int currentDesktop();
|
||||
Q_INVOKABLE QStringList dictKeys();
|
||||
Q_INVOKABLE int numberOfDesktops();
|
||||
Q_INVOKABLE QString toolTipImage(const int desktop);
|
||||
Q_INVOKABLE QString parsePattern(const QString pattern, const int desktop);
|
||||
Q_INVOKABLE bool isDebugEnabled() const;
|
||||
Q_INVOKABLE int currentDesktop() const;
|
||||
Q_INVOKABLE QStringList dictKeys() const;
|
||||
Q_INVOKABLE int numberOfDesktops() const;
|
||||
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 setPanelsToControl(const QString newPanels);
|
||||
Q_INVOKABLE void setToolTipData(const QVariantMap tooltipData);
|
||||
Q_INVOKABLE QString valueByKey(const QString key, int desktop = -1);
|
||||
Q_INVOKABLE QString valueByKey(const QString key, int desktop = -1) const;
|
||||
// configuration slots
|
||||
Q_INVOKABLE QString editPanelsToContol(const QString current);
|
||||
Q_INVOKABLE QString getAboutText(const QString type = "header");
|
||||
Q_INVOKABLE QVariantMap getFont(const QVariantMap defaultFont);
|
||||
Q_INVOKABLE QString getAboutText(const QString type = "header") const;
|
||||
Q_INVOKABLE QVariantMap getFont(const QVariantMap defaultFont) const;
|
||||
|
||||
signals:
|
||||
void desktopChanged();
|
||||
void windowListChanged();
|
||||
void desktopChanged() const;
|
||||
void windowListChanged() const;
|
||||
|
||||
public slots:
|
||||
Q_INVOKABLE void changePanelsState();
|
||||
Q_INVOKABLE void changePanelsState() const;
|
||||
Q_INVOKABLE static void sendNotification(const QString eventId, const QString message);
|
||||
Q_INVOKABLE void setCurrentDesktop(const int desktop);
|
||||
Q_INVOKABLE void setCurrentDesktop(const int desktop) const;
|
||||
|
||||
private slots:
|
||||
void changeDesktop(const int desktop);
|
||||
void changeWindowList(const WId window);
|
||||
void changeDesktop(const int desktop) const;
|
||||
void changeWindowList(const WId window) const;
|
||||
|
||||
private:
|
||||
DesktopWindowsInfo getInfoByDesktop(const int desktop);
|
||||
QList<Plasma::Containment *> getPanels();
|
||||
QString panelLocationToStr(Plasma::Types::Location location);
|
||||
DesktopWindowsInfo getInfoByDesktop(const int desktop) const;
|
||||
QList<Plasma::Containment *> getPanels() const;
|
||||
QString panelLocationToStr(Plasma::Types::Location location) const;
|
||||
// variables
|
||||
bool debug = false;
|
||||
int oldState, tooltipWidth = 200;
|
||||
|
Reference in New Issue
Block a user