refactor: remove innclude guards, use pragma instead

This commit is contained in:
Evgenii Alekseev 2024-03-28 03:05:26 +02:00
parent f27050afbc
commit 0bcceefd47
97 changed files with 186 additions and 551 deletions

View File

@ -58,7 +58,7 @@ CFontDialog::CFontDialog(QWidget *parent, bool needWeight, bool needItalic)
setLayout(mainGrid); setLayout(mainGrid);
colorBox = new QComboBox(this); colorBox = new QComboBox(this);
connect(colorBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(updateColor(QString))); connect(colorBox, &QComboBox::currentTextChanged, this, &CFontDialog::updateColor);
QStringList colorNames = QColor::colorNames(); QStringList colorNames = QColor::colorNames();
int index = 0; int index = 0;
for (int i=0; i<colorNames.count(); i++) { for (int i=0; i<colorNames.count(); i++) {
@ -81,8 +81,8 @@ CFontDialog::CFontDialog(QWidget *parent, bool needWeight, bool needItalic)
buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
Qt::Horizontal, this); Qt::Horizontal, this);
QObject::connect(buttons, SIGNAL(accepted()), this, SLOT(accept())); QObject::connect(buttons, &QDialogButtonBox::accepted, this, &CFontDialog::accept);
QObject::connect(buttons, SIGNAL(rejected()), this, SLOT(reject())); QObject::connect(buttons, &QDialogButtonBox::rejected, this, &CFontDialog::reject);
mainGrid->addWidget(buttons, 1, 0, 1, 5); mainGrid->addWidget(buttons, 1, 0, 1, 5);
italicBox->setHidden(!needItalic); italicBox->setHidden(!needItalic);

View File

@ -15,8 +15,7 @@
* License along with this library. * * License along with this library. *
***************************************************************************/ ***************************************************************************/
#ifndef FONTDIALOG_H #pragma once
#define FONTDIALOG_H
#include <QComboBox> #include <QComboBox>
#include <QDialog> #include <QDialog>
@ -72,6 +71,3 @@ private:
QSpinBox *sizeBox; QSpinBox *sizeBox;
QSpinBox *weightBox; QSpinBox *weightBox;
}; };
#endif /* FONTDIALOG_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWDEBUG_H
#define AWDEBUG_H
#include <QLoggingCategory> #include <QLoggingCategory>
@ -42,6 +40,3 @@ Q_DECLARE_LOGGING_CATEGORY(LOG_DP)
Q_DECLARE_LOGGING_CATEGORY(LOG_ESM) Q_DECLARE_LOGGING_CATEGORY(LOG_ESM)
Q_DECLARE_LOGGING_CATEGORY(LOG_ESS) Q_DECLARE_LOGGING_CATEGORY(LOG_ESS)
Q_DECLARE_LOGGING_CATEGORY(LOG_LIB) Q_DECLARE_LOGGING_CATEGORY(LOG_LIB)
#endif /* AWDEBUG_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWABSTRACTPAIRCONFIG_H
#define AWABSTRACTPAIRCONFIG_H
#include <QDialog> #include <QDialog>
@ -67,6 +65,3 @@ private:
[[nodiscard]] QPair<QStringList, QStringList> initKeys() const; [[nodiscard]] QPair<QStringList, QStringList> initKeys() const;
void updateDialog(); void updateDialog();
}; };
#endif /* AWABSTRACTPAIRCONFIG_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWABSTRACTPAIRHELPER_H
#define AWABSTRACTPAIRHELPER_H
#include <QHash> #include <QHash>
@ -46,6 +44,3 @@ private:
QString m_filePath; QString m_filePath;
QString m_section; QString m_section;
}; };
#endif /* AWABSTRACTPAIRHELPER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWABSTRACTSELECTOR_H
#define AWABSTRACTSELECTOR_H
#include <QWidget> #include <QWidget>
@ -43,6 +41,3 @@ signals:
private: private:
Ui::AWAbstractSelector *ui = nullptr; Ui::AWAbstractSelector *ui = nullptr;
}; };
#endif /* AWABSTRACTSELECTOR_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWACTIONS_H
#define AWACTIONS_H
#include <QMap> #include <QMap>
#include <QObject> #include <QObject>
@ -47,6 +45,3 @@ public slots:
private: private:
AWUpdateHelper *m_updateHelper = nullptr; AWUpdateHelper *m_updateHelper = nullptr;
}; };
#endif /* AWACTIONS_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWBUGREPORTER_H
#define AWBUGREPORTER_H
#include <QObject> #include <QObject>
@ -48,6 +46,3 @@ private slots:
private: private:
QString m_lastBugUrl; QString m_lastBugUrl;
}; };
#endif /* AWBUGREPORTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWCONFIGHELPER_H
#define AWCONFIGHELPER_H
#include <QObject> #include <QObject>
#include <QVariant> #include <QVariant>
@ -52,6 +50,3 @@ private:
QString m_baseDir; QString m_baseDir;
QStringList m_dirs = {"desktops", "quotes", "scripts", "upgrade", "weather", "formatters"}; QStringList m_dirs = {"desktops", "quotes", "scripts", "upgrade", "weather", "formatters"};
}; };
#endif /* AWCONFIGHELPER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWCUSTOMKEYSCONFIG_H
#define AWCUSTOMKEYSCONFIG_H
#include "awabstractpairconfig.h" #include "awabstractpairconfig.h"
@ -30,6 +28,3 @@ public:
explicit AWCustomKeysConfig(QWidget *_parent = nullptr, const QStringList &_keys = QStringList()); explicit AWCustomKeysConfig(QWidget *_parent = nullptr, const QStringList &_keys = QStringList());
~AWCustomKeysConfig() override; ~AWCustomKeysConfig() override;
}; };
#endif /* AWCUSTOMKEYSCONFIG_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWCUSTOMKEYSHELPER_H
#define AWCUSTOMKEYSHELPER_H
#include <QObject> #include <QObject>
@ -42,6 +40,3 @@ public:
private: private:
}; };
#endif /* AWCUSTOMKEYSHELPER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWTOOLTIP_H
#define AWTOOLTIP_H
#include <QObject> #include <QObject>
#include <QVariant> #include <QVariant>
@ -68,6 +66,3 @@ private:
bool m_enablePopup = false; bool m_enablePopup = false;
QStringList requiredKeys; QStringList requiredKeys;
}; };
#endif /* AWTOOLTIP_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWDATAENGINEMAPPER_H
#define AWDATAENGINEMAPPER_H
#include <ksysguard/formatter/Unit.h> #include <ksysguard/formatter/Unit.h>
@ -50,6 +48,3 @@ private:
QHash<QString, AWKeysAggregator::FormatterType> m_formatter; QHash<QString, AWKeysAggregator::FormatterType> m_formatter;
QMultiHash<QString, QString> m_map; QMultiHash<QString, QString> m_map;
}; };
#endif /* AWDATAENGINEMAPPER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWDBUSADAPTOR_H
#define AWDBUSADAPTOR_H
#include <QDBusAbstractAdaptor> #include <QDBusAbstractAdaptor>
@ -50,6 +48,3 @@ private:
AWKeys *m_plugin = nullptr; AWKeys *m_plugin = nullptr;
QStringList m_logLevels = {"debug", "info", "warning", "critical"}; QStringList m_logLevels = {"debug", "info", "warning", "critical"};
}; };
#endif /* AWDBUSADAPTOR_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWPLUGIN_H
#define AWPLUGIN_H
#include <QQmlExtensionPlugin> #include <QQmlExtensionPlugin>
@ -30,6 +28,3 @@ class AWPlugin : public QQmlExtensionPlugin
public: public:
void registerTypes(const char *uri) override; void registerTypes(const char *uri) override;
}; };
#endif /* AWPLUGIN_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWFORMATTERCONFIG_H
#define AWFORMATTERCONFIG_H
#include "awabstractpairconfig.h" #include "awabstractpairconfig.h"
@ -30,6 +28,3 @@ public:
explicit AWFormatterConfig(QWidget *_parent = nullptr, const QStringList &_keys = QStringList()); explicit AWFormatterConfig(QWidget *_parent = nullptr, const QStringList &_keys = QStringList());
~AWFormatterConfig() override; ~AWFormatterConfig() override;
}; };
#endif /* AWFORMATTERCONFIG_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWFORMATTERHELPER_H
#define AWFORMATTERHELPER_H
#include "abstractextitemaggregator.h" #include "abstractextitemaggregator.h"
#include "awabstractformatter.h" #include "awabstractformatter.h"
@ -56,6 +54,3 @@ private:
QHash<QString, AWAbstractFormatter *> m_formatters; QHash<QString, AWAbstractFormatter *> m_formatters;
QHash<QString, AWAbstractFormatter *> m_formattersClasses; QHash<QString, AWAbstractFormatter *> m_formattersClasses;
}; };
#endif /* AWFORMATTERHELPER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWKEYCACHE_H
#define AWKEYCACHE_H
#include <QHash> #include <QHash>
#include <QString> #include <QString>
@ -31,6 +29,3 @@ QStringList getRequiredKeys(const QStringList &_keys, const QStringList &_bars,
const QStringList &_userKeys, const QStringList &_allKeys); const QStringList &_userKeys, const QStringList &_allKeys);
QHash<QString, QStringList> loadKeysFromCache(); QHash<QString, QStringList> loadKeysFromCache();
} // namespace AWKeyCache } // namespace AWKeyCache
#endif /* AWKEYCACHE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWKEYOPERATIONS_H
#define AWKEYOPERATIONS_H
#include <QObject> #include <QObject>
@ -78,6 +76,3 @@ private:
QHash<QString, QStringList> m_devices; QHash<QString, QStringList> m_devices;
QString m_pattern; QString m_pattern;
}; };
#endif /* AWKEYOPERATIONS_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWKEYS_H
#define AWKEYS_H
#include <QMutex> #include <QMutex>
#include <QObject> #include <QObject>
@ -90,6 +88,3 @@ private:
QThreadPool *m_threadPool = nullptr; QThreadPool *m_threadPool = nullptr;
QMutex m_mutex; QMutex m_mutex;
}; };
#endif /* AWKEYS_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWKEYSAGGREGATOR_H
#define AWKEYSAGGREGATOR_H
#include <ksysguard/formatter/Unit.h> #include <ksysguard/formatter/Unit.h>
@ -103,6 +101,3 @@ private:
QString m_tempUnits; QString m_tempUnits;
bool m_translate = false; bool m_translate = false;
}; };
#endif /* AWKEYSAGGREGATOR_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWPAIRCONFIGFACTORY_H
#define AWPAIRCONFIGFACTORY_H
#include <QObject> #include <QObject>
@ -34,6 +32,3 @@ public:
private: private:
}; };
#endif /* AWPAIRCONFIGFACTORY_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWPATTERNFUNCTIONS_H
#define AWPATTERNFUNCTIONS_H
#include <QString> #include <QString>
#include <QVariant> #include <QVariant>
@ -47,6 +45,3 @@ QString insertMacros(QString _code);
QStringList findKeys(const QString &_code, const QStringList &_keys, bool _isBars); QStringList findKeys(const QString &_code, const QStringList &_keys, bool _isBars);
QStringList findLambdas(const QString &_code); QStringList findLambdas(const QString &_code);
} // namespace AWPatternFunctions } // namespace AWPatternFunctions
#endif /* AWPATTERNFUNCTIONS_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWTELEMETRYHANDLER_H
#define AWTELEMETRYHANDLER_H
#include <QObject> #include <QObject>
@ -52,6 +50,3 @@ private:
int m_storeCount = 0; int m_storeCount = 0;
bool m_uploadEnabled = false; bool m_uploadEnabled = false;
}; };
#endif /* AWTELEMETRYHANDLER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWUPDATEHELPER_H
#define AWUPDATEHELPER_H
#include <QMessageBox> #include <QMessageBox>
#include <QObject> #include <QObject>
@ -48,6 +46,3 @@ private:
QVersionNumber m_foundVersion; QVersionNumber m_foundVersion;
QString m_genericConfig; QString m_genericConfig;
}; };
#endif /* AWUPDATEHELPER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef ABSTRACTEXTITEM_H #pragma once
#define ABSTRACTEXTITEM_H
#include <QVariant> #include <QVariant>
@ -102,6 +101,3 @@ private:
QLocalServer *m_socket = nullptr; QLocalServer *m_socket = nullptr;
QString m_socketFile = ""; QString m_socketFile = "";
}; };
#endif /* ABSTRACTEXTITEM_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef ABSTRACTEXTITEMAGGREGATOR_H #pragma once
#define ABSTRACTEXTITEMAGGREGATOR_H
#include <QStandardPaths> #include <QStandardPaths>
@ -80,6 +79,3 @@ private:
// ui methods // ui methods
virtual void doCreateItem(QListWidget *_widget) = 0; virtual void doCreateItem(QListWidget *_widget) = 0;
}; };
#endif /* ABSTRACTEXTITEMAGGREGATOR_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef ABSTRACTQUOTESPROVIDER_H #pragma once
#define ABSTRACTQUOTESPROVIDER_H
#include <QObject> #include <QObject>
#include <QUrl> #include <QUrl>
@ -40,6 +39,3 @@ public:
}; };
[[nodiscard]] virtual QUrl url() const = 0; [[nodiscard]] virtual QUrl url() const = 0;
}; };
#endif /* ABSTRACTQUOTESPROVIDER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef ABSTRACTWEATHERPROVIDER_H #pragma once
#define ABSTRACTWEATHERPROVIDER_H
#include <QObject> #include <QObject>
#include <QUrl> #include <QUrl>
@ -40,6 +39,3 @@ public:
}; };
[[nodiscard]] virtual QUrl url() const = 0; [[nodiscard]] virtual QUrl url() const = 0;
}; };
#endif /* ABSTRACTWEATHERPROVIDER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef AWABSTRACTFORMATTER_H #pragma once
#define AWABSTRACTFORMATTER_H
#include <QRegularExpression> #include <QRegularExpression>
@ -52,6 +51,3 @@ private:
// properties // properties
FormatterClass m_type = FormatterClass::NoFormat; FormatterClass m_type = FormatterClass::NoFormat;
}; };
#endif /* AWABSTRACTFORMATTER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef AWDATETIMEFORMATTER_H #pragma once
#define AWDATETIMEFORMATTER_H
#include <QLocale> #include <QLocale>
@ -52,6 +51,3 @@ private:
QString m_format = ""; QString m_format = "";
bool m_translate = true; bool m_translate = true;
}; };
#endif /* AWDATETIMEFORMATTER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef AWFLOATFORMATTER_H #pragma once
#define AWFLOATFORMATTER_H
#include "awabstractformatter.h" #include "awabstractformatter.h"
@ -68,6 +67,3 @@ private:
int m_precision = -1; int m_precision = -1;
double m_summand = 0.0; double m_summand = 0.0;
}; };
#endif /* AWFLOATFORMATTER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef AWJSONFORMATTER_H #pragma once
#define AWJSONFORMATTER_H
#include "awabstractformatter.h" #include "awabstractformatter.h"
@ -49,6 +48,3 @@ private:
QString m_path; QString m_path;
QVariantList m_splittedPath; QVariantList m_splittedPath;
}; };
#endif /* AWJSONFORMATTER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef AWLISTFORMATTER_H #pragma once
#define AWLISTFORMATTER_H
#include "awabstractformatter.h" #include "awabstractformatter.h"
@ -53,6 +52,3 @@ private:
bool m_sorted = false; bool m_sorted = false;
QRegularExpression m_regex; QRegularExpression m_regex;
}; };
#endif /* AWLISTFORMATTER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef AWNOFORMATTER_H #pragma once
#define AWNOFORMATTER_H
#include "awabstractformatter.h" #include "awabstractformatter.h"
@ -37,6 +36,3 @@ private:
void translate(void *_ui) override; void translate(void *_ui) override;
// properties // properties
}; };
#endif /* AWNOFORMATTER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef AWSCRIPTFORMATTER_H #pragma once
#define AWSCRIPTFORMATTER_H
#include "awabstractformatter.h" #include "awabstractformatter.h"
@ -56,6 +55,3 @@ private:
bool m_hasReturn = false; bool m_hasReturn = false;
QString m_program; QString m_program;
}; };
#endif /* AWSCRIPTFORMATTER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef AWSTRINGFORMATTER_H #pragma once
#define AWSTRINGFORMATTER_H
#include "awabstractformatter.h" #include "awabstractformatter.h"
@ -52,6 +51,3 @@ private:
QChar m_fillChar = QChar(); QChar m_fillChar = QChar();
bool m_forceWidth = false; bool m_forceWidth = false;
}; };
#endif /* AWSTRINGFORMATTER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef EXTITEMAGGREGATOR_H #pragma once
#define EXTITEMAGGREGATOR_H
#include <KI18n/KLocalizedString> #include <KI18n/KLocalizedString>
@ -150,6 +149,3 @@ private:
return items; return items;
}; };
}; };
#endif /* EXTITEMAGGREGATOR_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef EXTNETWORKREQUEST_H #pragma once
#define EXTNETWORKREQUEST_H
#include <QNetworkReply> #include <QNetworkReply>
@ -59,6 +58,3 @@ private:
// values // values
QVariantHash m_values; QVariantHash m_values;
}; };
#endif /* EXTNETWORKREQUEST_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef EXTQUOTES_H #pragma once
#define EXTQUOTES_H
#include <QNetworkReply> #include <QNetworkReply>
@ -61,6 +60,3 @@ private:
// values // values
QVariantHash m_values; QVariantHash m_values;
}; };
#endif /* EXTQUOTES_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef EXTSCRIPT_H #pragma once
#define EXTSCRIPT_H
#include <QProcess> #include <QProcess>
@ -76,6 +75,3 @@ private:
QVariantMap m_jsonFilters; QVariantMap m_jsonFilters;
QVariantHash m_values; QVariantHash m_values;
}; };
#endif /* EXTSCRIPT_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef EXTUPGRADE_H #pragma once
#define EXTUPGRADE_H
#include <QProcess> #include <QProcess>
@ -64,6 +63,3 @@ private:
// internal properties // internal properties
QVariantHash m_values; QVariantHash m_values;
}; };
#endif /* EXTUPGRADE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef EXTWEATHER_H #pragma once
#define EXTWEATHER_H
#include <QNetworkReply> #include <QNetworkReply>
@ -90,6 +89,3 @@ private:
// values // values
QVariantHash m_values; QVariantHash m_values;
}; };
#endif /* EXTWEATHER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef GRAPHICALITEM_H #pragma once
#define GRAPHICALITEM_H
#include <QColor> #include <QColor>
@ -118,6 +117,3 @@ private:
QStringList m_usedKeys; QStringList m_usedKeys;
int m_width = 100; int m_width = 100;
}; };
#endif /* GRAPHICALITEM_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef GRAPHICALITEMHELPER_H #pragma once
#define GRAPHICALITEMHELPER_H
#include <QColor> #include <QColor>
#include <QObject> #include <QObject>
@ -56,6 +55,3 @@ private:
// list of values which will be used to store data for graph type only // list of values which will be used to store data for graph type only
QList<float> m_values; QList<float> m_values;
}; };
#endif /* GRAPHICALITEMHELPER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef OWMWEATHERPROVIDER_H #pragma once
#define OWMWEATHERPROVIDER_H
#include "abstractweatherprovider.h" #include "abstractweatherprovider.h"
@ -42,6 +41,3 @@ private:
int m_ts = 0; int m_ts = 0;
QUrl m_url; QUrl m_url;
}; };
#endif /* OWMWEATHERPROVIDER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef QCRONSCHEDULER_H #pragma once
#define QCRONSCHEDULER_H
#include "QObject" #include "QObject"
@ -58,6 +57,3 @@ private:
QTimer *m_timer = nullptr; QTimer *m_timer = nullptr;
static QList<int> parseField(const QString &_value, int _min, int _max); static QList<int> parseField(const QString &_value, int _min, int _max);
}; };
#endif /* QCRONSCHEDULER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef STOOQQUOTESPROVIDER_H #pragma once
#define STOOQQUOTESPROVIDER_H
#include "abstractquotesprovider.h" #include "abstractquotesprovider.h"
@ -37,6 +36,3 @@ public:
private: private:
QUrl m_url; QUrl m_url;
}; };
#endif /* STOOQQUOTESPROVIDER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef YAHOOQUOTESPROVIDER_H #pragma once
#define YAHOOQUOTESPROVIDER_H
#include "abstractquotesprovider.h" #include "abstractquotesprovider.h"
@ -38,6 +37,3 @@ public:
private: private:
QUrl m_url; QUrl m_url;
}; };
#endif /* YAHOOQUOTESPROVIDER_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef YAHOOWEATHERPROVIDER_H #pragma once
#define YAHOOWEATHERPROVIDER_H
#include "abstractweatherprovider.h" #include "abstractweatherprovider.h"
@ -43,6 +42,3 @@ private:
int m_ts = 0; int m_ts = 0;
QUrl m_url; QUrl m_url;
}; };
#endif /* YAHOOWEATHERPROVIDER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef DPPLUGIN_H
#define DPPLUGIN_H
#include <QQmlExtensionPlugin> #include <QQmlExtensionPlugin>
@ -30,6 +28,3 @@ class DPPlugin : public QQmlExtensionPlugin
public: public:
void registerTypes(const char *uri) override; void registerTypes(const char *uri) override;
}; };
#endif /* DPPLUGIN_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef DPADDS_H
#define DPADDS_H
// ui library required by WId definition // ui library required by WId definition
#include <QGuiApplication> #include <QGuiApplication>
@ -78,6 +76,3 @@ private:
QString m_tooltipColor = "#000000"; QString m_tooltipColor = "#000000";
QString m_tooltipType = "none"; QString m_tooltipType = "none";
}; };
#endif /* DPADDS_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef EXTSYSMON_H #pragma once
#define EXTSYSMON_H
#include <ksysguard/systemstats/SensorPlugin.h> #include <ksysguard/systemstats/SensorPlugin.h>
@ -36,6 +35,3 @@ private:
void readConfiguration(); void readConfiguration();
[[nodiscard]] static QHash<QString, QString> updateConfiguration(QHash<QString, QString> _rawConfig); [[nodiscard]] static QHash<QString, QString> updateConfiguration(QHash<QString, QString> _rawConfig);
}; };
#endif /* EXTSYSMON_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef ABSTRACTEXTSYSMONSOURCE_H #pragma once
#define ABSTRACTEXTSYSMONSOURCE_H
#include <QObject> #include <QObject>
#include <QRegularExpression> #include <QRegularExpression>
@ -50,6 +49,3 @@ public:
signals: signals:
void dataReceived(const QVariantHash &); void dataReceived(const QVariantHash &);
}; };
#endif /* ABSTRACTEXTSYSMONSOURCE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef BATTERYSOURCE_H #pragma once
#define BATTERYSOURCE_H
#include <QDateTime> #include <QDateTime>
#include <QObject> #include <QObject>
@ -50,6 +49,3 @@ private:
QHash<int, QList<int>> m_trend; QHash<int, QList<int>> m_trend;
QVariantHash m_values; QVariantHash m_values;
}; };
#endif /* BATTERYSOURCE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef CUSTOMSOURCE_H #pragma once
#define CUSTOMSOURCE_H
#include <QObject> #include <QObject>
@ -44,6 +43,3 @@ private:
ExtItemAggregator<ExtScript> *m_extScripts = nullptr; ExtItemAggregator<ExtScript> *m_extScripts = nullptr;
QStringList m_sources; QStringList m_sources;
}; };
#endif /* CUSTOMSOURCE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef DESKTOPSOURCE_H #pragma once
#define DESKTOPSOURCE_H
#include <QObject> #include <QObject>
@ -42,6 +41,3 @@ public:
private: private:
TaskManager::VirtualDesktopInfo *m_vdi = nullptr; TaskManager::VirtualDesktopInfo *m_vdi = nullptr;
}; };
#endif /* DESKTOPSOURCE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef EXTSYSMONSENSOR_H #pragma once
#define EXTSYSMONSENSOR_H
#include <ksysguard/systemstats/SensorObject.h> #include <ksysguard/systemstats/SensorObject.h>
@ -40,6 +39,3 @@ private:
AbstractExtSysMonSource *m_source = nullptr; AbstractExtSysMonSource *m_source = nullptr;
QTimer *m_timer = nullptr; QTimer *m_timer = nullptr;
}; };
#endif /* EXTSYSMONSENSOR_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef LOADSOURCE_H #pragma once
#define LOADSOURCE_H
#include <QObject> #include <QObject>
@ -35,6 +34,3 @@ public:
void run() override{}; void run() override{};
[[nodiscard]] QStringList sources() const override; [[nodiscard]] QStringList sources() const override;
}; };
#endif /* LOADSOURCE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef NETWORKSOURCE_H #pragma once
#define NETWORKSOURCE_H
#include <QObject> #include <QObject>
@ -45,6 +44,3 @@ private:
QProcess *m_process = nullptr; QProcess *m_process = nullptr;
static QString getCurrentDevice(); static QString getCurrentDevice();
}; };
#endif /* NETWORKSOURCE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef PLAYERSOURCE_H #pragma once
#define PLAYERSOURCE_H
#include <QMutex> #include <QMutex>
#include <QObject> #include <QObject>
@ -68,6 +67,3 @@ private:
QStringList m_metadata = QStringList({"album", "artist", "title"}); QStringList m_metadata = QStringList({"album", "artist", "title"});
QVariantHash m_values; QVariantHash m_values;
}; };
#endif /* PLAYERSOURCE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef PROCESSESSOURCE_H #pragma once
#define PROCESSESSOURCE_H
#include <QObject> #include <QObject>
@ -39,6 +38,3 @@ private:
// configuration and values // configuration and values
QVariantHash m_values; QVariantHash m_values;
}; };
#endif /* PROCESSESSOURCE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef QUOTESSOURCE_H #pragma once
#define QUOTESSOURCE_H
#include <QObject> #include <QObject>
@ -45,6 +44,3 @@ private:
QStringList m_sources; QStringList m_sources;
QVariantHash m_values; QVariantHash m_values;
}; };
#endif /* QUOTESSOURCE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef REQUESTSOURCE_H #pragma once
#define REQUESTSOURCE_H
#include <QObject> #include <QObject>
@ -45,6 +44,3 @@ private:
QStringList m_sources; QStringList m_sources;
QVariantHash m_values; QVariantHash m_values;
}; };
#endif /* REQUESTSOURCE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef SYSTEMINFOSOURCE_H #pragma once
#define SYSTEMINFOSOURCE_H
#include <QObject> #include <QObject>
@ -44,6 +43,3 @@ private:
static QVariant sendDBusRequest(const QString &destination, const QString &path, const QString &interface, static QVariant sendDBusRequest(const QString &destination, const QString &path, const QString &interface,
const QString &method, const QVariantList &args = QVariantList()); const QString &method, const QVariantList &args = QVariantList());
}; };
#endif /* SYSTEMINFOSOURCE_H */

View File

@ -20,7 +20,6 @@
#include <QObject> #include <QObject>
#include "abstractextsysmonsource.h" #include "abstractextsysmonsource.h"
#include "extitemaggregator.h"
class TimeSource : public AbstractExtSysMonSource class TimeSource : public AbstractExtSysMonSource

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef UPGRADESOURCE_H #pragma once
#define UPGRADESOURCE_H
#include <QObject> #include <QObject>
@ -44,6 +43,3 @@ private:
ExtItemAggregator<ExtUpgrade> *m_extUpgrade = nullptr; ExtItemAggregator<ExtUpgrade> *m_extUpgrade = nullptr;
QStringList m_sources; QStringList m_sources;
}; };
#endif /* UPGRADESOURCE_H */

View File

@ -15,8 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#ifndef WEATHERSOURCE_H #pragma once
#define WEATHERSOURCE_H
#include <QObject> #include <QObject>
@ -45,6 +44,3 @@ private:
QStringList m_sources; QStringList m_sources;
QVariantHash m_values; QVariantHash m_values;
}; };
#endif /* WEATHERSOURCE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef AWTESTLIBRARY_H
#define AWTESTLIBRARY_H
#include <QPair> #include <QPair>
#include <QStringList> #include <QStringList>
@ -34,6 +32,3 @@ QString randomString(const int _min = 1, const int _max = 100);
QStringList randomStringList(const int _max = 100); QStringList randomStringList(const int _max = 100);
QStringList randomSelect(const QStringList &_available); QStringList randomSelect(const QStringList &_available);
} // namespace AWTestLibrary } // namespace AWTestLibrary
#endif /* AWTESTLIBRARY_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTABSTRACTEXTITEM_H
#define TESTABSTRACTEXTITEM_H
#include <QObject> #include <QObject>
@ -49,6 +47,3 @@ private:
QString fileName; QString fileName;
QString writeFileName; QString writeFileName;
}; };
#endif /* TESTABSTRACTEXTITEM_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTABSTRACTFORMATTER_H
#define TESTABSTRACTFORMATTER_H
#include <QObject> #include <QObject>
@ -40,6 +38,3 @@ private slots:
private: private:
AWNoFormatter *formatter = nullptr; AWNoFormatter *formatter = nullptr;
}; };
#endif /* TESTABSTRACTFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTAWBUGREPORTER_H
#define TESTAWBUGREPORTER_H
#include <QObject> #include <QObject>
@ -40,6 +38,3 @@ private:
AWBugReporter *plugin = nullptr; AWBugReporter *plugin = nullptr;
QStringList data; QStringList data;
}; };
#endif /* TESTAWBUGREPORTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTAWCONFIGHELPER_H
#define TESTAWCONFIGHELPER_H
#include <QObject> #include <QObject>
#include <QQmlPropertyMap> #include <QQmlPropertyMap>
@ -47,6 +45,3 @@ private:
QQmlPropertyMap map; QQmlPropertyMap map;
QVariantMap deConfig; QVariantMap deConfig;
}; };
#endif /* TESTAWCONFIGHELPER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTAWKEYCACHE_H
#define TESTAWKEYCACHE_H
#include <QObject> #include <QObject>
@ -34,6 +32,3 @@ private slots:
private: private:
}; };
#endif /* TESTAWKEYCACHE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTAWKEYS_H
#define TESTAWKEYS_H
#include <QObject> #include <QObject>
@ -47,6 +45,3 @@ private:
QString pattern; QString pattern;
int interval = 1000; int interval = 1000;
}; };
#endif /* TESTAWKEYS_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTAWPATTERNFUNCTIONS_H
#define TESTAWPATTERNFUNCTIONS_H
#include <QObject> #include <QObject>
@ -38,6 +36,3 @@ private slots:
private: private:
}; };
#endif /* TESTAWPATTERNFUNCTIONS_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTAWTELEMETRYHANDLER_H
#define TESTAWTELEMETRYHANDLER_H
#include <QObject> #include <QObject>
@ -46,6 +44,3 @@ private:
QString telemetryStatus = "saved"; QString telemetryStatus = "saved";
QString telemetryValidGroup = "awwidgetconfig"; QString telemetryValidGroup = "awwidgetconfig";
}; };
#endif /* TESTAWTELEMETRYHANDLER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTAWUPDATEHELPER_H
#define TESTAWUPDATEHELPER_H
#include <QObject> #include <QObject>
@ -38,6 +36,3 @@ private slots:
private: private:
AWUpdateHelper *plugin = nullptr; AWUpdateHelper *plugin = nullptr;
}; };
#endif /* TESTAWUPDATEHELPER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTBATTERYSOURCE_H
#define TESTBATTERYSOURCE_H
#include <QObject> #include <QObject>
#include <QPair> #include <QPair>
@ -42,6 +40,3 @@ private:
QString acpiPath = "/sys/class/power_supply/"; QString acpiPath = "/sys/class/power_supply/";
QPair<int, int> battery = QPair<int, int>(0, 100); QPair<int, int> battery = QPair<int, int>(0, 100);
}; };
#endif /* TESTBATTERYSOURCE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTDATETIMEFORMATTER_H
#define TESTDATETIMEFORMATTER_H
#include <QObject> #include <QObject>
@ -41,6 +39,3 @@ private:
AWDateTimeFormatter *formatter = nullptr; AWDateTimeFormatter *formatter = nullptr;
QString format; QString format;
}; };
#endif /* TESTDATETIMEFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTDESKTOPSOURCE_H
#define TESTDESKTOPSOURCE_H
#include <QObject> #include <QObject>
@ -39,6 +37,3 @@ private slots:
private: private:
DesktopSource *source = nullptr; DesktopSource *source = nullptr;
}; };
#endif /* TESTDESKTOPSOURCE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTDPPLUGIN_H
#define TESTDPPLUGIN_H
#include <QObject> #include <QObject>
@ -44,6 +42,3 @@ private:
bool m_isKwinActive = false; bool m_isKwinActive = false;
QString pattern = "$"; QString pattern = "$";
}; };
#endif /* TESTDPPLUGIN_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTEXTITEMAGGREGATOR_H
#define TESTEXTITEMAGGREGATOR_H
#include <QObject> #include <QObject>
@ -40,6 +38,3 @@ private:
ExtItemAggregator<AWNoFormatter> *aggregator = nullptr; ExtItemAggregator<AWNoFormatter> *aggregator = nullptr;
QString type = "tmp"; QString type = "tmp";
}; };
#endif /* TESTEXTITEMAGGREGATOR_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTEXTQUOTES_H
#define TESTEXTQUOTES_H
#include <QObject> #include <QObject>
#include <QVariant> #include <QVariant>
@ -47,6 +45,3 @@ private:
// we assume that price will not be differ more than in 2 times // we assume that price will not be differ more than in 2 times
QPair<double, double> price = QPair<double, double>(0.0, 2.0); QPair<double, double> price = QPair<double, double>(0.0, 2.0);
}; };
#endif /* TESTEXTQUOTES_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTEXTSCRIPT_H
#define TESTEXTSCRIPT_H
#include <QObject> #include <QObject>
@ -42,6 +40,3 @@ private:
ExtScript *extScript = nullptr; ExtScript *extScript = nullptr;
QString randomString; QString randomString;
}; };
#endif /* TESTEXTSCRIPT_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTEXTUPGRADE_H
#define TESTEXTUPGRADE_H
#include <QObject> #include <QObject>
@ -44,6 +42,3 @@ private:
QString cmd; QString cmd;
QStringList randomStrings; QStringList randomStrings;
}; };
#endif /* TESTEXTUPGRADE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTEXTWEATHER_H
#define TESTEXTWEATHER_H
#include <QObject> #include <QObject>
#include <QPair> #include <QPair>
@ -52,6 +50,3 @@ private:
// dont know about temperature, but I suppose it will be between -40 and 40 // dont know about temperature, but I suppose it will be between -40 and 40
QPair<float, float> temp = QPair<float, float>(-40.0f, 40.0f); QPair<float, float> temp = QPair<float, float>(-40.0f, 40.0f);
}; };
#endif /* TESTEXTWEATHER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTFLOATFORMATTER_H
#define TESTFLOATFORMATTER_H
#include <QObject> #include <QObject>
@ -47,6 +45,3 @@ private:
void doRandom(); void doRandom();
AWFloatFormatter *formatter = nullptr; AWFloatFormatter *formatter = nullptr;
}; };
#endif /* TESTFLOATFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTJSONFORMATTER_H
#define TESTJSONFORMATTER_H
#include <QObject> #include <QObject>
#include <QVariant> #include <QVariant>
@ -45,6 +43,3 @@ private:
QString path; QString path;
QString value; QString value;
}; };
#endif /* TESTJSONFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTLISTFORMATTER_H
#define TESTLISTFORMATTER_H
#include <QObject> #include <QObject>
@ -43,6 +41,3 @@ private:
AWListFormatter *formatter = nullptr; AWListFormatter *formatter = nullptr;
QString separator; QString separator;
}; };
#endif /* TESTLISTFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTNETWORKSOURCE_H
#define TESTNETWORKSOURCE_H
#include <QObject> #include <QObject>
@ -39,6 +37,3 @@ private slots:
private: private:
NetworkSource *source = nullptr; NetworkSource *source = nullptr;
}; };
#endif /* TESTNETWORKSOURCE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTNOFORMATTER_H
#define TESTNOFORMATTER_H
#include <QObject> #include <QObject>
@ -40,6 +38,3 @@ private slots:
private: private:
AWNoFormatter *formatter = nullptr; AWNoFormatter *formatter = nullptr;
}; };
#endif /* TESTNOFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTPLAYERSOURCE_H
#define TESTPLAYERSOURCE_H
#include <QObject> #include <QObject>
@ -44,6 +42,3 @@ private:
QString mpdAddress = "localhost"; QString mpdAddress = "localhost";
int mpdPort = 6600; int mpdPort = 6600;
}; };
#endif /* TESTPLAYERSOURCE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTPROCESSESSOURCE_H
#define TESTPROCESSESSOURCE_H
#include <QObject> #include <QObject>
@ -39,6 +37,3 @@ private slots:
private: private:
ProcessesSource *source = nullptr; ProcessesSource *source = nullptr;
}; };
#endif /* TESTPROCESSESSOURCE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTSCRIPTFORMATTER_H
#define TESTSCRIPTFORMATTER_H
#include <QObject> #include <QObject>
@ -45,6 +43,3 @@ private:
QString codeWithReturn = QString("%1; return output;").arg(code); QString codeWithReturn = QString("%1; return output;").arg(code);
QString fullCode = QString("(function(value) { %1 })").arg(codeWithReturn); QString fullCode = QString("(function(value) { %1 })").arg(codeWithReturn);
}; };
#endif /* TESTSCRIPTFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/ ***************************************************************************/
#pragma once
#ifndef TESTSTRINGFORMATTER_H
#define TESTSTRINGFORMATTER_H
#include <QObject> #include <QObject>
@ -43,6 +41,3 @@ private:
void doRandom(); void doRandom();
AWStringFormatter *formatter = nullptr; AWStringFormatter *formatter = nullptr;
}; };
#endif /* TESTSTRINGFORMATTER_H */

View File

@ -1,5 +1,4 @@
#ifndef VERSION_H #pragma once
#define VERSION_H
// information // information
@ -7,23 +6,28 @@ const char NAME[] = "Awesome Widgets";
const char VERSION[] = "@PROJECT_VERSION@"; const char VERSION[] = "@PROJECT_VERSION@";
const char COMMIT_SHA[] = "@PROJECT_COMMIT_SHA@"; const char COMMIT_SHA[] = "@PROJECT_COMMIT_SHA@";
const char AUTHOR[] = "@PROJECT_AUTHOR@"; const char AUTHOR[] = "@PROJECT_AUTHOR@";
const char TRANSLATORS[] = "Ernesto Aviles Vzqz (Spanish),Mermouy " const char TRANSLATORS[] = "Ernesto Aviles Vzqz (Spanish),"
"(French),underr (Brazillian Portuguese),Viktor " "Mermouy (French),"
"Slobodyan (Ukrainian),Lemueler (Chinese),Heimen " "underr (Brazillian Portuguese),"
"Stoffels (Dutch),Mariusz Kocoń (Polish),Ibnu " "Viktor Slobodyan (Ukrainian),"
"Daru Aji (Indonesian),Antonio Vivace (Italian)"; "Lemueler (Chinese),"
"Heimen Stoffels (Dutch),"
"Mariusz Kocoń (Polish),"
"Ibnu Daru Aji (Indonesian),"
"Antonio Vivace (Italian)";
const char EMAIL[] = "@PROJECT_CONTACT@"; const char EMAIL[] = "@PROJECT_CONTACT@";
const char LICENSE[] = "@PROJECT_LICENSE@"; const char LICENSE[] = "@PROJECT_LICENSE@";
const char TRDPARTY_LICENSE[] = "QReplyTimeout " const char TRDPARTY_LICENSE[] = "QReplyTimeout "
"wrapper,no,http://" "wrapper,no,http://"
"codereview.stackexchange.com/questions/30031/" "codereview.stackexchange.com/questions/30031/"
"qnetworkreply-network-reply-timeout-helper"; "qnetworkreply-network-reply-timeout-helper";
const char SPECIAL_THANKS[] = "Stooq,https://stooq.com/;Yahoo! " const char SPECIAL_THANKS[] = "Stooq,https://stooq.com/;"
"Weather,https://weather.yahoo.com/;JetBrains,https://" "Yahoo! Weather,https://weather.yahoo.com/;"
"www.jetbrains.com/;OpenWeatherMap,http://openweathermap.org/"; "JetBrains,https://www.jetbrains.com/;"
"OpenWeatherMap,http://openweathermap.org/";
const char CHANGELOG[] = "@PROJECT_CHANGELOG@"; const char CHANGELOG[] = "@PROJECT_CHANGELOG@";
// configuraion // configuration
// graphical items api version // graphical items api version
const int AW_GRAPHITEM_API = 6; const int AW_GRAPHITEM_API = 6;
// extquotes api version // extquotes api version
@ -50,16 +54,80 @@ const int REQUEST_TIMEOUT = 3000;
// available time keys // available time keys
const char TIME_KEYS[] = "d,dd,ddd,dddd,M,MM,MMM,MMMM,yy,yyyy,h,hh,H,HH,m,mm,s,ss,t,a,ap,A,AP"; const char TIME_KEYS[] = "d,dd,ddd,dddd,M,MM,MMM,MMMM,yy,yyyy,h,hh,H,HH,m,mm,s,ss,t,a,ap,A,AP";
// static keys // static keys
const char STATIC_FUNCTIONS[] = "{{\n\n}},template{{\n\n}},aw_all<>{{}},aw_" const char STATIC_FUNCTIONS[] = "{{\n\n}},"
"count<>{{}},aw_keys<>{{}},aw_macro<>{{}},aw_" "template{{\n\n}},"
"names<>{{}}"; "aw_all<>{{}},"
const char STATIC_KEYS[] = "time,isotime,shorttime,longtime,tstime,ctime,uptime,cuptime,cpucl,cpu," "aw_count<>{{}},"
"gpu,memmb,memgb,memfreemb,memfreegb,memtotmb,memtotgb,memusedmb," "aw_keys<>{{}},"
"memusedgb,mem,swapmb,swapgb,swapfreemb,swapfreegb,swaptotmb,swaptotgb," "aw_macro<>{{}},"
"swap,downunits,upunits,downkb,downtotkb,downtot,down,uptotkb,uptot,upkb," "aw_names<>{{}}";
"up,netdev,ac,bat,batleft,batnow,batrate,battotal,album,artist,duration," const char STATIC_KEYS[] = "time,"
"progress,title,dalbum,dartist,dtitle,salbum,sartist,stitle,pscount,pstot" "isotime,"
",ps,desktop,ndesktop,tdesktops,la15,la5,la1,ssid,volume,brightness"; "shorttime,"
"longtime,"
"tstime,"
"ctime,"
"uptime,"
"cuptime,"
"cpucl,"
"cpu,"
"gpu,"
"memmb,"
"memgb,"
"memfreemb,"
"memfreegb,"
"memtotmb,"
"memtotgb,"
"memusedmb,"
"memusedgb,"
"mem,"
"swapmb,"
"swapgb,"
"swapfreemb,"
"swapfreegb,"
"swaptotmb,"
"swaptotgb,"
"swap,"
"downunits,"
"upunits,"
"downkb,"
"downtotkb,"
"downtot,"
"down,"
"uptotkb,"
"uptot,"
"upkb,"
"up,"
"netdev,"
"ac,"
"bat,"
"batleft,"
"batnow,"
"batrate,"
"battotal,"
"album,"
"artist,"
"duration,"
"progress,"
"title,"
"dalbum,"
"dartist,"
"dtitle,"
"salbum,"
"sartist,"
"stitle,"
"pscount,"
"pstot,"
"ps,"
"desktop,"
"ndesktop,"
"tdesktops,"
"la15,"
"la5,"
"la1,"
"ssid,"
"volume,"
"brightness";
#cmakedefine BUILD_FUTURE #cmakedefine BUILD_FUTURE
#cmakedefine BUILD_LOAD #cmakedefine BUILD_LOAD
#cmakedefine BUILD_TESTING #cmakedefine BUILD_TESTING
@ -105,6 +173,3 @@ const char CPPCHECK_EXECUTABLE[] = "@CPPCHECK_EXECUTABLE@";
const char PROP_FUTURE[] = "@BUILD_FUTURE@"; const char PROP_FUTURE[] = "@BUILD_FUTURE@";
const char PROP_LOAD[] = "@BUILD_LOAD@"; const char PROP_LOAD[] = "@BUILD_LOAD@";
const char PROP_TEST[] = "@BUILD_TESTING@"; const char PROP_TEST[] = "@BUILD_TESTING@";
#endif /* VERSION_H */