Merge pull request #93 from arcan1s/development

Release master update
This commit is contained in:
Evgenii Alekseev 2016-05-09 01:13:10 +04:00
commit 082efcc127
51 changed files with 1357 additions and 359 deletions

8
.tx/config Normal file
View File

@ -0,0 +1,8 @@
[main]
host = https://www.transifex.com
[awesome-widgets.awesome-widgetspot]
source_file = sources/translations/awesome-widgets.pot
source_lang = en
type = PO
file_filter = sources/translations/<lang>.po

View File

@ -1,3 +1,25 @@
Ver.3.1.2:
+ add standalone widget configuration example
+ new tag tstime
+ new tags uptotal* and downtotal*
+ add background configuration button
+ allow X-AW-Direction property works with graphs and bars (graphical items)
+ add bars support to Graphical Items
+ add integration with transifex
+ add integration with coverity
- drop update source (breaking changes if you are using it as developer)
- fix pen generation from file image (graphical items)
- fix bug with which font html parameters will be pasted even if there cancel clicked
- fix bug with invalid total memory formating
- fix bug in configuration UI with which there is no selected text pasted
- fixes in graphical item configuration UI and behaviour
- fix changelog building
- fix invalid cast (found by coverity)
* change text update mechanism
* grahical item improvements
* code improvements
* translation update
Ver.3.1.1: Ver.3.1.1:
- fix broken gcc build (#87) - fix broken gcc build (#87)
* translation update * translation update

View File

@ -1,6 +1,9 @@
awesome-widgets (ex-pytextmonitor) awesome-widgets (ex-pytextmonitor)
================================== ==================================
[![Build Status](https://travis-ci.org/arcan1s/awesome-widgets.svg?branch=development)](https://travis-ci.org/arcan1s/awesome-widgets)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/8254/badge.svg)](https://scan.coverity.com/projects/awesome-widgets)
Information Information
----------- -----------

View File

@ -2,7 +2,7 @@
pkgname=plasma5-applet-awesome-widgets pkgname=plasma5-applet-awesome-widgets
_pkgname=awesome-widgets _pkgname=awesome-widgets
pkgver=3.1.1 pkgver=3.1.2
pkgrel=1 pkgrel=1
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)" pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -17,7 +17,7 @@ optdepends=("catalyst: for GPU monitor"
makedepends=('cmake' 'extra-cmake-modules' 'python') makedepends=('cmake' 'extra-cmake-modules' 'python')
source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz) source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
install=${pkgname}.install install=${pkgname}.install
md5sums=('1a4dc1d912b663dfd24d00712ab68f07') md5sums=('99514bf6d1a5ca8660dd0210ee58af28')
backup=('etc/xdg/plasma-dataengine-extsysmon.conf') backup=('etc/xdg/plasma-dataengine-extsysmon.conf')
prepare() { prepare() {

View File

@ -1,45 +0,0 @@
diff --git a/sources/awdebug.cpp b/sources/awdebug.cpp
index eee61e1..9da8dad 100644
--- a/sources/awdebug.cpp
+++ b/sources/awdebug.cpp
@@ -20,13 +20,10 @@
#include "version.h"
-Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget",
- QtMsgType::QtWarningMsg)
-Q_LOGGING_CATEGORY(LOG_DP, "org.kde.plasma.desktoppanel",
- QtMsgType::QtWarningMsg)
-Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmon", QtMsgType::QtWarningMsg)
-Q_LOGGING_CATEGORY(LOG_LIB, "org.kde.plasma.awesomewidgets",
- QtMsgType::QtWarningMsg)
+Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget")
+Q_LOGGING_CATEGORY(LOG_DP, "org.kde.plasma.desktoppanel")
+Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmon")
+Q_LOGGING_CATEGORY(LOG_LIB, "org.kde.plasma.awesomewidgets")
const QStringList getBuildData()
diff --git a/sources/awesome-widget/plugin/awkeys.cpp b/sources/awesome-widget/plugin/awkeys.cpp
index e5b9861..eb73073 100644
--- a/sources/awesome-widget/plugin/awkeys.cpp
+++ b/sources/awesome-widget/plugin/awkeys.cpp
@@ -439,4 +439,4 @@ void AWKeys::dataUpdated(const QString &sourceName,
// run concurrent data update
- QtConcurrent::run(m_threadPool, this, &AWKeys::setDataBySource, sourceName,
+ QtConcurrent::run(this, &AWKeys::setDataBySource, sourceName,
data);
diff --git a/sources/libraries.cmake b/sources/libraries.cmake
index 33192f7..46e2b1e 100644
--- a/sources/libraries.cmake
+++ b/sources/libraries.cmake
@@ -2,7 +2,7 @@
find_package(Gettext REQUIRED)
# main qt libraries
-find_package(Qt5 5.4.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
+find_package(Qt5 5.3.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
add_definitions(
${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS}
${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}

View File

@ -352,3 +352,48 @@ index a8300f1..8edc3bd 100644
// values // values
Q_INVOKABLE QString infoByKey(QString key) const; Q_INVOKABLE QString infoByKey(QString key) const;
Q_INVOKABLE QString valueByKey(QString key) const; Q_INVOKABLE QString valueByKey(QString key) const;
diff --git a/sources/awdebug.cpp b/sources/awdebug.cpp
index eee61e1..9da8dad 100644
--- a/sources/awdebug.cpp
+++ b/sources/awdebug.cpp
@@ -20,13 +20,10 @@
#include "awdebug.h"
-Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget",
- QtMsgType::QtWarningMsg)
-Q_LOGGING_CATEGORY(LOG_DP, "org.kde.plasma.desktoppanel",
- QtMsgType::QtWarningMsg)
-Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmon", QtMsgType::QtWarningMsg)
-Q_LOGGING_CATEGORY(LOG_LIB, "org.kde.plasma.awesomewidgets",
- QtMsgType::QtWarningMsg)
+Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget")
+Q_LOGGING_CATEGORY(LOG_DP, "org.kde.plasma.desktoppanel")
+Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmon")
+Q_LOGGING_CATEGORY(LOG_LIB, "org.kde.plasma.awesomewidgets")
const QStringList getBuildData()
diff --git a/sources/awesome-widget/plugin/awkeys.cpp b/sources/awesome-widget/plugin/awkeys.cpp
index e5b9861..eb73073 100644
--- a/sources/awesome-widget/plugin/awkeys.cpp
+++ b/sources/awesome-widget/plugin/awkeys.cpp
@@ -439,4 +439,4 @@ void AWKeys::dataUpdated(const QString &sourceName,
{
// run concurrent data update
- QtConcurrent::run(m_threadPool, this, &AWKeys::setDataBySource, sourceName,
+ QtConcurrent::run(this, &AWKeys::setDataBySource, sourceName,
data);
diff --git a/sources/libraries.cmake b/sources/libraries.cmake
index 33192f7..46e2b1e 100644
--- a/sources/libraries.cmake
+++ b/sources/libraries.cmake
@@ -2,7 +2,7 @@
find_package(Gettext REQUIRED)
# main qt libraries
-find_package(Qt5 5.4.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
+find_package(Qt5 5.3.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
add_definitions(
${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS}
${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}

View File

@ -16,7 +16,7 @@ index 43944ce..c679281 100644
+++ b/sources/awdebug.h +++ b/sources/awdebug.h
@@ -21,9 +21,13 @@ @@ -21,9 +21,13 @@
#include <QLoggingCategory> #include "version.h"
+#ifndef qCInfo +#ifndef qCInfo
+#define qCInfo qCDebug +#define qCInfo qCDebug

View File

@ -11,7 +11,7 @@ index 3698602..42871c8 100644
m_genericConfig = QString("%1/awesomewidgets/general.ini") m_genericConfig = QString("%1/awesomewidgets/general.ini")
.arg(QStandardPaths::writableLocation( .arg(QStandardPaths::writableLocation(
QStandardPaths::GenericDataLocation)); QStandardPaths::GenericDataLocation));
@@ -69,14 +69,14 @@ void AWUpdateHelper::checkUpdates(const bool showAnyway) @@ -69,15 +69,15 @@ void AWUpdateHelper::checkUpdates(const bool showAnyway)
bool AWUpdateHelper::checkVersion() bool AWUpdateHelper::checkVersion()
{ {
QSettings settings(m_genericConfig, QSettings::IniFormat); QSettings settings(m_genericConfig, QSettings::IniFormat);
@ -22,10 +22,11 @@ index 3698602..42871c8 100644
// update version // update version
settings.setValue(QString("Version"), QString(VERSION)); settings.setValue(QString("Version"), QString(VERSION));
settings.sync(); settings.sync();
qCInfo(LOG_AW) << "Found version" << version << "actual one is"
<< m_foundVersion;
qCInfo(LOG_AW) << "Found version" << version << "actual one is" << VERSION; - if ((version != m_foundVersion) && (!QString(CHANGELOG).isEmpty())) {
- if (version != QVersionNumber::fromString(VERSION)) { + if ((version != QString(VERSION)) && (!QString(CHANGELOG).isEmpty())) {
+ if (version != QString(VERSION)) {
genMessageBox(i18n("Changelog of %1", QString(VERSION)), genMessageBox(i18n("Changelog of %1", QString(VERSION)),
QString(CHANGELOG).replace(QChar('@'), QChar('\n')), QString(CHANGELOG).replace(QChar('@'), QChar('\n')),
QMessageBox::Ok) QMessageBox::Ok)
@ -65,12 +66,12 @@ index 3698602..42871c8 100644
@@ -128,8 +127,7 @@ void AWUpdateHelper::userReplyOnUpdates(QAbstractButton *button) @@ -128,8 +127,7 @@ void AWUpdateHelper::userReplyOnUpdates(QAbstractButton *button)
switch (ret) { switch (ret) {
case QMessageBox::Ok: case QMessageBox::AcceptRole:
- QDesktopServices::openUrl(QString(RELEASES) - QDesktopServices::openUrl(QString(RELEASES)
- + m_foundVersion.toString()); - + m_foundVersion.toString());
+ QDesktopServices::openUrl(QString(RELEASES) + m_foundVersion); + QDesktopServices::openUrl(QString(RELEASES) + m_foundVersion);
break; break;
case QMessageBox::Cancel: case QMessageBox::RejectRole:
default: default:
@@ -157,14 +155,23 @@ void AWUpdateHelper::versionReplyRecieved(QNetworkReply *reply, @@ -157,14 +155,23 @@ void AWUpdateHelper::versionReplyRecieved(QNetworkReply *reply,
QVariantMap firstRelease = jsonDoc.toVariant().toList().first().toMap(); QVariantMap firstRelease = jsonDoc.toVariant().toList().first().toMap();

View File

@ -1,37 +0,0 @@
diff --git a/sources/awesome-widget/plugin/awkeysaggregator.cpp b/sources/awesome-widget/plugin/awkeysaggregator.cpp
index 7a1887b..9f39e2f 100644
--- a/sources/awesome-widget/plugin/awkeysaggregator.cpp
+++ b/sources/awesome-widget/plugin/awkeysaggregator.cpp
@@ -34,8 +34,8 @@ AWKeysAggregator::AWKeysAggregator(QObject *parent)
// default formaters
// memory
m_formater[QString("mem")] = Float;
- m_formater[QString("memtotmb")] = IntegerFive;
- m_formater[QString("memtotgb")] = Float;
+ m_formater[QString("memtotmb")] = MemMBFormat;
+ m_formater[QString("memtotgb")] = MemGBFormat;
// network
m_formater[QString("down")] = NetSmartFormat;
m_formater[QString("downkb")] = Integer;
@@ -45,8 +45,8 @@ AWKeysAggregator::AWKeysAggregator(QObject *parent)
m_formater[QString("upunits")] = NetSmartUnits;
// swap
m_formater[QString("swap")] = Float;
- m_formater[QString("swaptotmb")] = IntegerFive;
- m_formater[QString("swaptotgb")] = Float;
+ m_formater[QString("swaptotmb")] = MemMBFormat;
+ m_formater[QString("swaptotgb")] = MemGBFormat;
}
@@ -338,8 +338,8 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
m_map[source] = key;
m_formater[key] = Float;
// additional keys
- m_formater[QString("hddtotmb%1").arg(index)] = IntegerFive;
- m_formater[QString("hddtotgb%1").arg(index)] = Float;
+ m_formater[QString("hddtotmb%1").arg(index)] = MemMBFormat;
+ m_formater[QString("hddtotgb%1").arg(index)] = MemGBFormat;
}
} else if (source.contains(mountFreeRegExp)) {
// free space

View File

@ -15,7 +15,7 @@ set(PROJECT_CONTACT "esalexeev@gmail.com")
set(PROJECT_LICENSE "GPL3") set(PROJECT_LICENSE "GPL3")
set(PROJECT_VERSION_MAJOR "3") set(PROJECT_VERSION_MAJOR "3")
set(PROJECT_VERSION_MINOR "1") set(PROJECT_VERSION_MINOR "1")
set(PROJECT_VERSION_PATCH "1") set(PROJECT_VERSION_PATCH "2")
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
# append git version if any # append git version if any
set(PROJECT_COMMIT_SHA "Commit hash" CACHE INTERNAL "") set(PROJECT_COMMIT_SHA "Commit hash" CACHE INTERNAL "")

View File

@ -17,7 +17,6 @@
#include "awdebug.h" #include "awdebug.h"
#include "version.h"
Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget", Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget",
@ -46,6 +45,7 @@ const QStringList getBuildData()
metadata.append(QString(" AWEUAPI: %1").arg(AWEUAPI)); metadata.append(QString(" AWEUAPI: %1").arg(AWEUAPI));
metadata.append(QString(" AWEWAPI: %1").arg(AWEWAPI)); metadata.append(QString(" AWEWAPI: %1").arg(AWEWAPI));
metadata.append(QString(" TIME_KEYS: %1").arg(TIME_KEYS)); metadata.append(QString(" TIME_KEYS: %1").arg(TIME_KEYS));
metadata.append(QString(" STATIC_KEYS: %1").arg(STATIC_KEYS));
// cmake properties // cmake properties
metadata.append(QString("cmake properties:")); metadata.append(QString("cmake properties:"));
metadata.append(QString(" CMAKE_BUILD_TYPE: %1").arg(CMAKE_BUILD_TYPE)); metadata.append(QString(" CMAKE_BUILD_TYPE: %1").arg(CMAKE_BUILD_TYPE));
@ -68,6 +68,7 @@ const QStringList getBuildData()
.arg(CMAKE_SHARED_LINKER_FLAGS)); .arg(CMAKE_SHARED_LINKER_FLAGS));
// components // components
metadata.append(QString("Components data:")); metadata.append(QString("Components data:"));
metadata.append(QString(" BUILD_COVERAGE: %1").arg(BUILD_COVERAGE));
metadata.append(QString(" BUILD_PLASMOIDS: %1").arg(BUILD_PLASMOIDS)); metadata.append(QString(" BUILD_PLASMOIDS: %1").arg(BUILD_PLASMOIDS));
metadata.append( metadata.append(
QString(" BUILD_DEB_PACKAGE: %1").arg(BUILD_DEB_PACKAGE)); QString(" BUILD_DEB_PACKAGE: %1").arg(BUILD_DEB_PACKAGE));
@ -75,8 +76,16 @@ const QStringList getBuildData()
QString(" BUILD_RPM_PACKAGE: %1").arg(BUILD_RPM_PACKAGE)); QString(" BUILD_RPM_PACKAGE: %1").arg(BUILD_RPM_PACKAGE));
metadata.append( metadata.append(
QString(" CLANGFORMAT_EXECUTABLE: %1").arg(CLANGFORMAT_EXECUTABLE)); QString(" CLANGFORMAT_EXECUTABLE: %1").arg(CLANGFORMAT_EXECUTABLE));
metadata.append(QString(" COVERITY_COMMENT: %1").arg(COVERITY_COMMENT));
metadata.append(
QString(" COVERITY_DIRECTORY: %1").arg(COVERITY_DIRECTORY));
metadata.append(QString(" COVERITY_EMAIL: %1").arg(COVERITY_EMAIL));
metadata.append(
QString(" COVERITY_EXECUTABLE: %1").arg(COVERITY_EXECUTABLE));
metadata.append(QString(" COVERITY_URL: %1").arg(COVERITY_URL));
metadata.append( metadata.append(
QString(" CPPCHECK_EXECUTABLE: %1").arg(CPPCHECK_EXECUTABLE)); QString(" CPPCHECK_EXECUTABLE: %1").arg(CPPCHECK_EXECUTABLE));
// additional functions
metadata.append(QString(" PROP_FUTURE: %1").arg(PROP_FUTURE)); metadata.append(QString(" PROP_FUTURE: %1").arg(PROP_FUTURE));
metadata.append(QString(" PROP_TEST: %1").arg(PROP_TEST)); metadata.append(QString(" PROP_TEST: %1").arg(PROP_TEST));

View File

@ -21,6 +21,8 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include "version.h"
#ifndef LOG_FORMAT #ifndef LOG_FORMAT
#define LOG_FORMAT \ #define LOG_FORMAT \
"[%{time process}][%{if-debug}DD%{endif}%{if-info}II%{endif}%{if-" \ "[%{time process}][%{if-debug}DD%{endif}%{if-info}II%{endif}%{if-" \

View File

@ -331,7 +331,6 @@ Item {
lock = false lock = false
awKeys.initKeys(textPattern.text, plasmoid.configuration.interval, awKeys.initKeys(textPattern.text, plasmoid.configuration.interval,
plasmoid.configuration.queueLimit, false) plasmoid.configuration.queueLimit, false)
awKeys.needToBeUpdated()
} }
} }
} }

View File

@ -20,7 +20,7 @@ X-Plasma-RemoteLocation=
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
X-KDE-PluginInfo-Email=esalexeev@gmail.com X-KDE-PluginInfo-Email=esalexeev@gmail.com
X-KDE-PluginInfo-Name=org.kde.plasma.awesomewidget X-KDE-PluginInfo-Name=org.kde.plasma.awesomewidget
X-KDE-PluginInfo-Version=3.1.1 X-KDE-PluginInfo-Version=3.1.2
X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/ X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/
X-KDE-PluginInfo-Category=System Information X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-Depends=

View File

@ -0,0 +1,37 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef AWABSTRACTFORMATTER_H
#define AWABSTRACTFORMATTER_H
#include <QObject>
#include <QVariant>
class AWAbstractFormatter : public QObject
{
public:
explicit AWAbstractFormatter(QObject *parent, const QString, const QString)
: QObject(parent){};
explicit AWAbstractFormatter(QObject *parent)
: QObject(parent){};
virtual ~AWAbstractFormatter(){};
virtual QString convert(const QVariant &value) const = 0;
};
#endif /* AWABSTRACTFORMATTER_H */

View File

@ -28,7 +28,6 @@
#include "awdebug.h" #include "awdebug.h"
#include "awupdatehelper.h" #include "awupdatehelper.h"
#include "version.h"
AWActions::AWActions(QObject *parent) AWActions::AWActions(QObject *parent)

View File

@ -0,0 +1,84 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "awdatetimeformatter.h"
#include <QDateTime>
#include <QSettings>
#include "awdebug.h"
AWDateTimeFormatter::AWDateTimeFormatter(QObject *parent,
const QString filename,
const QString section)
: AWAbstractFormatter(parent, filename, section)
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
init(filename, section);
}
AWDateTimeFormatter::AWDateTimeFormatter(QObject *parent, const QString format)
: AWAbstractFormatter(parent)
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
setFormat(format);
}
AWDateTimeFormatter::~AWDateTimeFormatter()
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
}
QString AWDateTimeFormatter::convert(const QVariant &value) const
{
qCDebug(LOG_AW) << "Convert value" << value;
return value.toDateTime().toString(m_format);
}
QString AWDateTimeFormatter::format() const
{
return m_format;
}
void AWDateTimeFormatter::setFormat(const QString _format)
{
qCDebug(LOG_AW) << "Set format" << _format;
m_format = _format;
}
void AWDateTimeFormatter::init(const QString filename, const QString section)
{
qCDebug(LOG_AW) << "Looking for section" << section << "in" << filename;
QSettings settings(filename, QSettings::IniFormat);
settings.beginGroup(section);
setFormat(settings.value(QString("Format"), QString()).toString());
settings.endGroup();
}

View File

@ -0,0 +1,46 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef AWDATETIMEFORMATTER_H
#define AWDATETIMEFORMATTER_H
#include "awabstractformatter.h"
class AWDateTimeFormatter : public AWAbstractFormatter
{
Q_OBJECT
Q_PROPERTY(QString format READ format WRITE setFormat)
public:
explicit AWDateTimeFormatter(QObject *parent, const QString filename,
const QString section);
explicit AWDateTimeFormatter(QObject *parent, const QString format);
virtual ~AWDateTimeFormatter();
QString convert(const QVariant &value) const;
// properties
QString format() const;
void setFormat(const QString _format);
private:
void init(const QString filename, const QString section);
// properties
QString m_format;
};
#endif /* AWDATETIMEFORMATTER_H */

View File

@ -0,0 +1,176 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "awfloatformatter.h"
#include <QSettings>
#include "awdebug.h"
AWFloatFormatter::AWFloatFormatter(QObject *parent, const QString filename,
const QString section)
: AWAbstractFormatter(parent, filename, section)
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
init(filename, section);
}
AWFloatFormatter::AWFloatFormatter(QObject *parent, const QChar fillChar,
const char format, const double multiplier,
const int precision, const double summand,
const int width)
: AWAbstractFormatter(parent)
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
setFillChar(fillChar);
setFormat(format);
setMultiplier(multiplier);
setPrecision(precision);
setSummand(summand);
setWidth(width);
}
AWFloatFormatter::~AWFloatFormatter()
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
}
QString AWFloatFormatter::convert(const QVariant &value) const
{
qCDebug(LOG_AW) << "Convert value" << value;
return QString("%1").arg(value.toDouble() * m_multiplier + m_summand,
m_width, m_format, m_precision, m_fillChar);
}
QChar AWFloatFormatter::fillChar() const
{
return m_fillChar;
}
char AWFloatFormatter::format() const
{
return m_format;
}
double AWFloatFormatter::multiplier() const
{
return m_multiplier;
}
int AWFloatFormatter::precision() const
{
return m_precision;
}
double AWFloatFormatter::summand() const
{
return m_summand;
}
int AWFloatFormatter::width() const
{
return m_width;
}
void AWFloatFormatter::setFillChar(const QChar _fillChar)
{
qCDebug(LOG_AW) << "Set char" << _fillChar;
m_fillChar = _fillChar;
}
void AWFloatFormatter::setFormat(char _format)
{
qCDebug(LOG_AW) << "Set format" << _format;
// http://doc.qt.io/qt-5/qstring.html#argument-formats
if ((_format != 'e') && (_format != 'E') && (_format != 'f')
&& (_format != 'g') && (_format != 'G')) {
qCWarning(LOG_AW) << "Invalid format" << _format;
_format = 'f';
}
m_format = _format;
}
void AWFloatFormatter::setMultiplier(const double _multiplier)
{
qCDebug(LOG_AW) << "Set multiplier" << _multiplier;
m_multiplier = _multiplier;
}
void AWFloatFormatter::setPrecision(const int _precision)
{
qCDebug(LOG_AW) << "Set precision" << _precision;
m_precision = _precision;
}
void AWFloatFormatter::setSummand(const double _summand)
{
qCDebug(LOG_AW) << "Set summand" << _summand;
m_summand = _summand;
}
void AWFloatFormatter::setWidth(const int _width)
{
qCDebug(LOG_AW) << "Set width" << _width;
m_width = _width;
}
void AWFloatFormatter::init(const QString filename, const QString section)
{
qCDebug(LOG_AW) << "Looking for section" << section << "in" << filename;
QSettings settings(filename, QSettings::IniFormat);
settings.beginGroup(section);
setFillChar(
settings.value(QString("FillChar"), QString()).toString().at(0));
setFormat(settings.value(QString("Format"), QString("f"))
.toString()
.at(0)
.toLatin1());
setMultiplier(settings.value(QString("Multiplier"), 1.0).toDouble());
setPrecision(settings.value(QString("Precision"), -1).toInt());
setSummand(settings.value(QString("Summand"), 0.0).toDouble());
setWidth(settings.value(QString("Width"), 0).toInt());
settings.endGroup();
}

View File

@ -0,0 +1,69 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef AWFLOATFORMATTER_H
#define AWFLOATFORMATTER_H
#include "awabstractformatter.h"
class AWFloatFormatter : public AWAbstractFormatter
{
Q_OBJECT
Q_PROPERTY(QChar fillChar READ fillChar WRITE setFillChar)
Q_PROPERTY(char format READ format WRITE setFormat)
Q_PROPERTY(double multiplier READ multiplier WRITE setMultiplier)
Q_PROPERTY(int precision READ precision WRITE setPrecision)
Q_PROPERTY(double summand READ summand WRITE setSummand)
Q_PROPERTY(int width READ width WRITE setWidth)
public:
explicit AWFloatFormatter(QObject *parent, const QString filename,
const QString section);
explicit AWFloatFormatter(QObject *parent, const QChar fillChar,
const char format, const double multiplier,
const int precision, const double summand,
const int width);
virtual ~AWFloatFormatter();
QString convert(const QVariant &value) const;
// properties
QChar fillChar() const;
char format() const;
double multiplier() const;
int precision() const;
double summand() const;
int width() const;
void setFillChar(const QChar _fillChar);
void setFormat(char _format);
void setMultiplier(const double _multiplier);
void setPrecision(const int _precision);
void setSummand(const double _summand);
void setWidth(const int _width);
private:
void init(const QString filename, const QString section);
// properties
QChar m_fillChar;
char m_format;
double m_multiplier;
int m_precision;
double m_summand;
int m_width;
};
#endif /* AWFLOATFORMATTER_H */

View File

@ -0,0 +1,125 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "awformatterhelper.h"
#include <QSettings>
#include <QStandardPaths>
#include "awdebug.h"
#include "awdatetimeformatter.h"
#include "awfloatformatter.h"
#include "awnoformatter.h"
#include "awscriptformatter.h"
AWFormatterHelper::AWFormatterHelper(QObject *parent)
: QObject(parent)
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
m_genericConfig = QString("%1/awesomewidgets/general.ini")
.arg(QStandardPaths::writableLocation(
QStandardPaths::GenericDataLocation));
#ifdef BUILD_FUTURE
init();
#endif /* BUILD_FUTURE */
}
AWFormatterHelper::~AWFormatterHelper()
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
m_formatters.clear();
}
QString AWFormatterHelper::convert(const QVariant &value,
const QString name) const
{
qCDebug(LOG_AW) << "Convert value" << value << "for" << name;
return m_formatters.contains(name) ? m_formatters[name]->convert(value)
: value.toString();
}
QStringList AWFormatterHelper::definedFormatters() const
{
return m_formatters.keys();
}
AWFormatterHelper::FormatterClass
AWFormatterHelper::defineFormatterClass(const QString name) const
{
qCDebug(LOG_AW) << "Define formatter class for" << name;
QSettings settings(m_genericConfig, QSettings::IniFormat);
settings.beginGroup(name);
QString stringType
= settings.value(QString("Type"), QString("NoFormat")).toString();
settings.endGroup();
FormatterClass formatter = FormatterClass::NoFormat;
if (stringType == QString("DateTime"))
formatter = FormatterClass::DateTime;
else if (stringType == QString("Float"))
formatter = FormatterClass::Float;
else if (stringType == QString("Script"))
formatter = FormatterClass::Script;
else
qCWarning(LOG_AW) << "Unknown formatter" << stringType;
return formatter;
}
void AWFormatterHelper::init()
{
QSettings settings(m_genericConfig, QSettings::IniFormat);
settings.beginGroup(QString("Formatters"));
QStringList keys = settings.childKeys();
for (auto key : keys) {
QString name = settings.value(key).toString();
FormatterClass formatter = defineFormatterClass(name);
qCInfo(LOG_AW) << "Found formatter" << name << "for key" << key
<< "defined as" << static_cast<int>(formatter);
switch (formatter) {
case FormatterClass::DateTime:
m_formatters[key]
= new AWDateTimeFormatter(this, m_genericConfig, name);
break;
case FormatterClass::Float:
m_formatters[key]
= new AWFloatFormatter(this, m_genericConfig, name);
break;
case FormatterClass::Script:
m_formatters[key]
= new AWScriptFormatter(this, m_genericConfig, name);
break;
case FormatterClass::NoFormat:
m_formatters[key] = new AWNoFormatter(this, m_genericConfig, name);
break;
}
}
settings.endGroup();
}

View File

@ -0,0 +1,49 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef AWFORMATTERHELPER_H
#define AWFORMATTERHELPER_H
#include <QObject>
#include "awabstractformatter.h"
class AWFormatterHelper : public QObject
{
Q_OBJECT
public:
enum class FormatterClass { DateTime, Float, Script, NoFormat };
explicit AWFormatterHelper(QObject *parent = nullptr);
virtual ~AWFormatterHelper();
QString convert(const QVariant &value, const QString name) const;
QStringList definedFormatters() const;
private:
AWFormatterHelper::FormatterClass
defineFormatterClass(const QString name) const;
void init();
// properties
QString m_genericConfig;
QHash<QString, AWAbstractFormatter *> m_formatters;
};
#endif /* AWFORMATTERHELPER_H */

View File

@ -25,7 +25,6 @@
#include "awdebug.h" #include "awdebug.h"
#include "awkeycache.h" #include "awkeycache.h"
#include "awpatternfunctions.h" #include "awpatternfunctions.h"
#include "version.h"
// extensions // extensions
#include "extquotes.h" #include "extquotes.h"
#include "extscript.h" #include "extscript.h"

View File

@ -31,7 +31,6 @@
#include "awkeysaggregator.h" #include "awkeysaggregator.h"
#include "awpatternfunctions.h" #include "awpatternfunctions.h"
#include "graphicalitem.h" #include "graphicalitem.h"
#include "version.h"
AWKeys::AWKeys(QObject *parent) AWKeys::AWKeys(QObject *parent)
@ -179,7 +178,7 @@ QString AWKeys::valueByKey(QString key) const
qCDebug(LOG_AW) << "Requested value for key" << key; qCDebug(LOG_AW) << "Requested value for key" << key;
key.remove(QRegExp(QString("^bar[0-9]{1,}"))); key.remove(QRegExp(QString("^bar[0-9]{1,}")));
return aggregator->formater(values[key], key); return aggregator->formatter(values[key], key);
} }
@ -312,7 +311,7 @@ QString AWKeys::parsePattern(QString pattern) const
for (auto key : m_foundKeys) for (auto key : m_foundKeys)
pattern.replace(QString("$%1").arg(key), [this](const QString &tag, pattern.replace(QString("$%1").arg(key), [this](const QString &tag,
const QVariant &value) { const QVariant &value) {
QString strValue = aggregator->formater(value, tag); QString strValue = aggregator->formatter(value, tag);
if ((!tag.startsWith(QString("custom"))) if ((!tag.startsWith(QString("custom")))
&& (!tag.startsWith(QString("weather")))) && (!tag.startsWith(QString("weather"))))
strValue.replace(QString(" "), QString("&nbsp;")); strValue.replace(QString(" "), QString("&nbsp;"));

View File

@ -24,6 +24,7 @@
#include <QRegExp> #include <QRegExp>
#include "awdebug.h" #include "awdebug.h"
#include "awformatterhelper.h"
AWKeysAggregator::AWKeysAggregator(QObject *parent) AWKeysAggregator::AWKeysAggregator(QObject *parent)
@ -31,69 +32,73 @@ AWKeysAggregator::AWKeysAggregator(QObject *parent)
{ {
qCDebug(LOG_AW) << __PRETTY_FUNCTION__; qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
// default formaters // default formatters
// memory // memory
m_formater[QString("mem")] = FormaterType::Float; m_formatter[QString("mem")] = FormatterType::Float;
m_formater[QString("memtotmb")] = FormaterType::MemMBFormat; m_formatter[QString("memtotmb")] = FormatterType::MemMBFormat;
m_formater[QString("memtotgb")] = FormaterType::MemGBFormat; m_formatter[QString("memtotgb")] = FormatterType::MemGBFormat;
// network // network
m_formater[QString("down")] = FormaterType::NetSmartFormat; m_formatter[QString("down")] = FormatterType::NetSmartFormat;
m_formater[QString("downkb")] = FormaterType::Integer; m_formatter[QString("downkb")] = FormatterType::Integer;
m_formater[QString("downunits")] = FormaterType::NetSmartUnits; m_formatter[QString("downunits")] = FormatterType::NetSmartUnits;
m_formater[QString("up")] = FormaterType::NetSmartFormat; m_formatter[QString("up")] = FormatterType::NetSmartFormat;
m_formater[QString("upkb")] = FormaterType::Integer; m_formatter[QString("upkb")] = FormatterType::Integer;
m_formater[QString("upunits")] = FormaterType::NetSmartUnits; m_formatter[QString("upunits")] = FormatterType::NetSmartUnits;
// swap // swap
m_formater[QString("swap")] = FormaterType::Float; m_formatter[QString("swap")] = FormatterType::Float;
m_formater[QString("swaptotmb")] = FormaterType::MemMBFormat; m_formatter[QString("swaptotmb")] = FormatterType::MemMBFormat;
m_formater[QString("swaptotgb")] = FormaterType::MemGBFormat; m_formatter[QString("swaptotgb")] = FormatterType::MemGBFormat;
m_customFormatters = new AWFormatterHelper(this);
} }
AWKeysAggregator::~AWKeysAggregator() AWKeysAggregator::~AWKeysAggregator()
{ {
qCDebug(LOG_AW) << __PRETTY_FUNCTION__; qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
delete m_customFormatters;
} }
QString AWKeysAggregator::formater(const QVariant &data, QString AWKeysAggregator::formatter(const QVariant &data,
const QString &key) const const QString &key) const
{ {
qCDebug(LOG_AW) << "Data" << data << "for key" << key; qCDebug(LOG_AW) << "Data" << data << "for key" << key;
QString output; QString output;
QLocale loc = m_translate ? QLocale::system() : QLocale::c(); QLocale loc = m_translate ? QLocale::system() : QLocale::c();
// case block // case block
switch (m_formater[key]) { switch (m_formatter[key]) {
case FormaterType::Float: case FormatterType::Float:
output = QString("%1").arg(data.toFloat(), 5, 'f', 1); output = QString("%1").arg(data.toFloat(), 5, 'f', 1);
break; break;
case FormaterType::FloatTwoSymbols: case FormatterType::FloatTwoSymbols:
output = QString("%1").arg(data.toFloat(), 5, 'f', 2); output = QString("%1").arg(data.toFloat(), 5, 'f', 2);
break; break;
case FormaterType::Integer: case FormatterType::Integer:
output = QString("%1").arg(data.toFloat(), 4, 'f', 0); output = QString("%1").arg(data.toFloat(), 4, 'f', 0);
break; break;
case FormaterType::IntegerFive: case FormatterType::IntegerFive:
output = QString("%1").arg(data.toFloat(), 5, 'f', 0); output = QString("%1").arg(data.toFloat(), 5, 'f', 0);
break; break;
case FormaterType::IntegerThree: case FormatterType::IntegerThree:
output = QString("%1").arg(data.toFloat(), 3, 'f', 0); output = QString("%1").arg(data.toFloat(), 3, 'f', 0);
break; break;
case FormaterType::List: case FormatterType::List:
output = data.toStringList().join(QChar(',')); output = data.toStringList().join(QChar(','));
break; break;
case FormaterType::ACFormat: case FormatterType::ACFormat:
output = data.toBool() ? m_acOnline : m_acOffline; output = data.toBool() ? m_acOnline : m_acOffline;
break; break;
case FormaterType::MemGBFormat: case FormatterType::MemGBFormat:
output output
= QString("%1").arg(data.toFloat() / (1024.0 * 1024.0), 5, 'f', 1); = QString("%1").arg(data.toFloat() / (1024.0 * 1024.0), 5, 'f', 1);
break; break;
case FormaterType::MemMBFormat: case FormatterType::MemMBFormat:
output = QString("%1").arg(data.toFloat() / 1024.0, 5, 'f', 0); output = QString("%1").arg(data.toFloat() / 1024.0, 5, 'f', 0);
break; break;
case FormaterType::NetSmartFormat: case FormatterType::NetSmartFormat:
output = [](const float value) { output = [](const float value) {
if (value > 1024.0) if (value > 1024.0)
return QString("%1").arg(value / 1024.0, 4, 'f', 1); return QString("%1").arg(value / 1024.0, 4, 'f', 1);
@ -101,41 +106,45 @@ QString AWKeysAggregator::formater(const QVariant &data,
return QString("%1").arg(value, 4, 'f', 0); return QString("%1").arg(value, 4, 'f', 0);
}(data.toFloat()); }(data.toFloat());
break; break;
case FormaterType::NetSmartUnits: case FormatterType::NetSmartUnits:
if (data.toFloat() > 1024.0) if (data.toFloat() > 1024.0)
output = m_translate ? i18n("MB/s") : QString("MB/s"); output = m_translate ? i18n("MB/s") : QString("MB/s");
else else
output = m_translate ? i18n("KB/s") : QString("KB/s"); output = m_translate ? i18n("KB/s") : QString("KB/s");
break; break;
case FormaterType::Quotes: case FormatterType::Quotes:
// first cast // first cast
output = QString("%1").arg(data.toDouble(), 0, 'f'); output = QString("%1").arg(data.toDouble(), 0, 'f');
output = output.rightJustified(8, QLatin1Char(' '), true); output = output.rightJustified(8, QLatin1Char(' '), true);
break; break;
case FormaterType::Temperature: case FormatterType::Temperature:
output = QString("%1").arg(temperature(data.toFloat()), 5, 'f', 1); output = QString("%1").arg(temperature(data.toFloat()), 5, 'f', 1);
break; break;
case FormaterType::Time: case FormatterType::Time:
output = data.toDateTime().toString(); output = data.toDateTime().toString();
break; break;
case FormaterType::TimeCustom: case FormatterType::TimeCustom:
output = m_customTime; output = m_customTime;
[&output, loc, this](const QDateTime dt) { [&output, loc, this](const QDateTime dt) {
for (auto key : timeKeys) for (auto key : timeKeys)
output.replace(QString("$%1").arg(key), loc.toString(dt, key)); output.replace(QString("$%1").arg(key), loc.toString(dt, key));
}(data.toDateTime()); }(data.toDateTime());
break; break;
case FormaterType::TimeISO: case FormatterType::TimeISO:
output = data.toDateTime().toString(Qt::ISODate); output = data.toDateTime().toString(Qt::ISODate);
break; break;
case FormaterType::TimeLong: case FormatterType::TimeLong:
output = loc.toString(data.toDateTime(), QLocale::LongFormat); output = loc.toString(data.toDateTime(), QLocale::LongFormat);
break; break;
case FormaterType::TimeShort: case FormatterType::TimeShort:
output = loc.toString(data.toDateTime(), QLocale::ShortFormat); output = loc.toString(data.toDateTime(), QLocale::ShortFormat);
break; break;
case FormaterType::Uptime: case FormatterType::Timestamp:
case FormaterType::UptimeCustom: output = QString("%1").arg(
data.toDateTime().toMSecsSinceEpoch() / 1000.0, 10, 'f', 0);
break;
case FormatterType::Uptime:
case FormatterType::UptimeCustom:
output = output =
[](QString source, const int uptime) { [](QString source, const int uptime) {
int seconds = uptime - uptime % 60; int seconds = uptime - uptime % 60;
@ -152,13 +161,17 @@ QString AWKeysAggregator::formater(const QVariant &data,
QString("%1").arg(minutes, 2, 10, QChar('0'))); QString("%1").arg(minutes, 2, 10, QChar('0')));
source.replace(QString("$m"), QString("%1").arg(minutes)); source.replace(QString("$m"), QString("%1").arg(minutes));
return source; return source;
}(m_formater[key] == FormaterType::Uptime ? QString("$ddd$hhh$mmm") }(m_formatter[key] == FormatterType::Uptime
: m_customUptime, ? QString("$ddd$hhh$mmm")
: m_customUptime,
static_cast<int>(data.toFloat())); static_cast<int>(data.toFloat()));
break; break;
case FormaterType::NoFormat: case FormatterType::NoFormat:
output = data.toString(); output = data.toString();
break; break;
case FormatterType::Custom:
output = m_customFormatters->convert(data, key);
break;
} }
return output; return output;
@ -253,52 +266,52 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
if (source == QString("battery/ac")) { if (source == QString("battery/ac")) {
// AC // AC
m_map[source] = QString("ac"); m_map[source] = QString("ac");
m_formater[QString("ac")] = FormaterType::ACFormat; m_formatter[QString("ac")] = FormatterType::ACFormat;
} else if (source.startsWith(QString("battery/"))) { } else if (source.startsWith(QString("battery/"))) {
// battery stats // battery stats
QString key = source; QString key = source;
key.remove(QString("battery/")); key.remove(QString("battery/"));
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::IntegerThree; m_formatter[key] = FormatterType::IntegerThree;
} else if (source == QString("cpu/system/TotalLoad")) { } else if (source == QString("cpu/system/TotalLoad")) {
// cpu // cpu
m_map[source] = QString("cpu"); m_map[source] = QString("cpu");
m_formater[QString("cpu")] = FormaterType::Float; m_formatter[QString("cpu")] = FormatterType::Float;
} else if (source.contains(cpuRegExp)) { } else if (source.contains(cpuRegExp)) {
// cpus // cpus
QString key = source; QString key = source;
key.remove(QString("cpu/")).remove(QString("/TotalLoad")); key.remove(QString("cpu/")).remove(QString("/TotalLoad"));
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::Float; m_formatter[key] = FormatterType::Float;
} else if (source == QString("cpu/system/AverageClock")) { } else if (source == QString("cpu/system/AverageClock")) {
// cpucl // cpucl
m_map[source] = QString("cpucl"); m_map[source] = QString("cpucl");
m_formater[QString("cpucl")] = FormaterType::Integer; m_formatter[QString("cpucl")] = FormatterType::Integer;
} else if (source.contains(cpuclRegExp)) { } else if (source.contains(cpuclRegExp)) {
// cpucls // cpucls
QString key = source; QString key = source;
key.remove(QString("cpu/cpu")).remove(QString("/clock")); key.remove(QString("cpu/cpu")).remove(QString("/clock"));
key = QString("cpucl%1").arg(key); key = QString("cpucl%1").arg(key);
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::Integer; m_formatter[key] = FormatterType::Integer;
} else if (source.startsWith(QString("custom"))) { } else if (source.startsWith(QString("custom"))) {
// custom // custom
QString key = source; QString key = source;
key.remove(QString("custom/")); key.remove(QString("custom/"));
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::NoFormat; m_formatter[key] = FormatterType::NoFormat;
} else if (source == QString("desktop/current/name")) { } else if (source == QString("desktop/current/name")) {
// current desktop name // current desktop name
m_map[source] = QString("desktop"); m_map[source] = QString("desktop");
m_formater[QString("desktop")] = FormaterType::NoFormat; m_formatter[QString("desktop")] = FormatterType::NoFormat;
} else if (source == QString("desktop/current/number")) { } else if (source == QString("desktop/current/number")) {
// current desktop number // current desktop number
m_map[source] = QString("ndesktop"); m_map[source] = QString("ndesktop");
m_formater[QString("ndesktop")] = FormaterType::NoFormat; m_formatter[QString("ndesktop")] = FormatterType::NoFormat;
} else if (source == QString("desktop/total/number")) { } else if (source == QString("desktop/total/number")) {
// desktop count // desktop count
m_map[source] = QString("tdesktops"); m_map[source] = QString("tdesktops");
m_formater[QString("tdesktops")] = FormaterType::NoFormat; m_formatter[QString("tdesktops")] = FormatterType::NoFormat;
} else if (source.contains(hddrRegExp)) { } else if (source.contains(hddrRegExp)) {
// read speed // read speed
QString device = source; QString device = source;
@ -307,7 +320,7 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
if (index > -1) { if (index > -1) {
QString key = QString("hddr%1").arg(index); QString key = QString("hddr%1").arg(index);
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::Integer; m_formatter[key] = FormatterType::Integer;
} }
} else if (source.contains(hddwRegExp)) { } else if (source.contains(hddwRegExp)) {
// write speed // write speed
@ -317,16 +330,16 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
if (index > -1) { if (index > -1) {
QString key = QString("hddw%1").arg(index); QString key = QString("hddw%1").arg(index);
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::Integer; m_formatter[key] = FormatterType::Integer;
} }
} else if (source == QString("gpu/load")) { } else if (source == QString("gpu/load")) {
// gpu load // gpu load
m_map[source] = QString("gpu"); m_map[source] = QString("gpu");
m_formater[QString("gpu")] = FormaterType::Float; m_formatter[QString("gpu")] = FormatterType::Float;
} else if (source == QString("gpu/temperature")) { } else if (source == QString("gpu/temperature")) {
// gpu temperature // gpu temperature
m_map[source] = QString("gputemp"); m_map[source] = QString("gputemp");
m_formater[QString("gputemp")] = FormaterType::Temperature; m_formatter[QString("gputemp")] = FormatterType::Temperature;
} else if (source.contains(mountFillRegExp)) { } else if (source.contains(mountFillRegExp)) {
// fill level // fill level
QString device = source; QString device = source;
@ -335,12 +348,12 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
if (index > -1) { if (index > -1) {
QString key = QString("hdd%1").arg(index); QString key = QString("hdd%1").arg(index);
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::Float; m_formatter[key] = FormatterType::Float;
// additional keys // additional keys
m_formater[QString("hddtotmb%1").arg(index)] m_formatter[QString("hddtotmb%1").arg(index)]
= FormaterType::MemMBFormat; = FormatterType::MemMBFormat;
m_formater[QString("hddtotgb%1").arg(index)] m_formatter[QString("hddtotgb%1").arg(index)]
= FormaterType::MemGBFormat; = FormatterType::MemGBFormat;
} }
} else if (source.contains(mountFreeRegExp)) { } else if (source.contains(mountFreeRegExp)) {
// free space // free space
@ -351,11 +364,11 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
// mb // mb
QString key = QString("hddfreemb%1").arg(index); QString key = QString("hddfreemb%1").arg(index);
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::MemMBFormat; m_formatter[key] = FormatterType::MemMBFormat;
// gb // gb
key = QString("hddfreegb%1").arg(index); key = QString("hddfreegb%1").arg(index);
m_map.insertMulti(source, key); m_map.insertMulti(source, key);
m_formater[key] = FormaterType::MemGBFormat; m_formatter[key] = FormatterType::MemGBFormat;
} }
} else if (source.contains(mountUsedRegExp)) { } else if (source.contains(mountUsedRegExp)) {
// used // used
@ -366,11 +379,11 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
// mb // mb
QString key = QString("hddmb%1").arg(index); QString key = QString("hddmb%1").arg(index);
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::MemMBFormat; m_formatter[key] = FormatterType::MemMBFormat;
// gb // gb
key = QString("hddgb%1").arg(index); key = QString("hddgb%1").arg(index);
m_map.insertMulti(source, key); m_map.insertMulti(source, key);
m_formater[key] = FormaterType::MemGBFormat; m_formatter[key] = FormatterType::MemGBFormat;
} }
} else if (source.startsWith(QString("hdd/temperature"))) { } else if (source.startsWith(QString("hdd/temperature"))) {
// hdd temperature // hdd temperature
@ -380,7 +393,7 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
if (index > -1) { if (index > -1) {
QString key = QString("hddtemp%1").arg(index); QString key = QString("hddtemp%1").arg(index);
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::Temperature; m_formatter[key] = FormatterType::Temperature;
} }
} else if (source.startsWith(QString("cpu/system/loadavg"))) { } else if (source.startsWith(QString("cpu/system/loadavg"))) {
// load average // load average
@ -388,35 +401,35 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
time.remove(QString("cpu/system/loadavg")); time.remove(QString("cpu/system/loadavg"));
QString key = QString("la%1").arg(time); QString key = QString("la%1").arg(time);
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::FloatTwoSymbols; m_formatter[key] = FormatterType::FloatTwoSymbols;
} else if (source == QString("mem/physical/application")) { } else if (source == QString("mem/physical/application")) {
// app memory // app memory
// mb // mb
m_map[source] = QString("memmb"); m_map[source] = QString("memmb");
m_formater[QString("memmb")] = FormaterType::MemMBFormat; m_formatter[QString("memmb")] = FormatterType::MemMBFormat;
// gb // gb
m_map.insertMulti(source, QString("memgb")); m_map.insertMulti(source, QString("memgb"));
m_formater[QString("memgb")] = FormaterType::MemGBFormat; m_formatter[QString("memgb")] = FormatterType::MemGBFormat;
} else if (source == QString("mem/physical/free")) { } else if (source == QString("mem/physical/free")) {
// free memory // free memory
// mb // mb
m_map[source] = QString("memfreemb"); m_map[source] = QString("memfreemb");
m_formater[QString("memfreemb")] = FormaterType::MemMBFormat; m_formatter[QString("memfreemb")] = FormatterType::MemMBFormat;
// gb // gb
m_map.insertMulti(source, QString("memfreegb")); m_map.insertMulti(source, QString("memfreegb"));
m_formater[QString("memfreegb")] = FormaterType::MemGBFormat; m_formatter[QString("memfreegb")] = FormatterType::MemGBFormat;
} else if (source == QString("mem/physical/used")) { } else if (source == QString("mem/physical/used")) {
// used memory // used memory
// mb // mb
m_map[source] = QString("memusedmb"); m_map[source] = QString("memusedmb");
m_formater[QString("memusedmb")] = FormaterType::MemMBFormat; m_formatter[QString("memusedmb")] = FormatterType::MemMBFormat;
// gb // gb
m_map.insertMulti(source, QString("memusedgb")); m_map.insertMulti(source, QString("memusedgb"));
m_formater[QString("memusedgb")] = FormaterType::MemGBFormat; m_formatter[QString("memusedgb")] = FormatterType::MemGBFormat;
} else if (source == QString("network/current/name")) { } else if (source == QString("network/current/name")) {
// network device // network device
m_map[source] = QString("netdev"); m_map[source] = QString("netdev");
m_formater[QString("netdev")] = FormaterType::NoFormat; m_formatter[QString("netdev")] = FormatterType::NoFormat;
} else if (source.contains(netRegExp)) { } else if (source.contains(netRegExp)) {
// network speed // network speed
QString type = source.contains(QString("receiver")) ? QString("down") QString type = source.contains(QString("receiver")) ? QString("down")
@ -427,15 +440,15 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
// kb // kb
QString key = QString("%1kb%2").arg(type).arg(index); QString key = QString("%1kb%2").arg(type).arg(index);
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::Integer; m_formatter[key] = FormatterType::Integer;
// smart // smart
key = QString("%1%2").arg(type).arg(index); key = QString("%1%2").arg(type).arg(index);
m_map.insertMulti(source, key); m_map.insertMulti(source, key);
m_formater[key] = FormaterType::NetSmartFormat; m_formatter[key] = FormatterType::NetSmartFormat;
// units // units
key = QString("%1units%2").arg(type).arg(index); key = QString("%1units%2").arg(type).arg(index);
m_map.insertMulti(source, key); m_map.insertMulti(source, key);
m_formater[key] = FormaterType::NetSmartUnits; m_formatter[key] = FormatterType::NetSmartUnits;
} }
} else if (source.contains(netTotalRegExp)) { } else if (source.contains(netTotalRegExp)) {
// network data total // network data total
@ -447,58 +460,58 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
// kb // kb
QString key = QString("%1totalkb%2").arg(type).arg(index); QString key = QString("%1totalkb%2").arg(type).arg(index);
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::Integer; m_formatter[key] = FormatterType::Integer;
// mb // mb
key = QString("%1total%2").arg(type).arg(index); key = QString("%1total%2").arg(type).arg(index);
m_map.insertMulti(source, key); m_map.insertMulti(source, key);
m_formater[key] = FormaterType::MemMBFormat; m_formatter[key] = FormatterType::MemMBFormat;
} }
} else if (source.startsWith(QString("upgrade"))) { } else if (source.startsWith(QString("upgrade"))) {
// package manager // package manager
QString key = source; QString key = source;
key.remove(QString("upgrade/")); key.remove(QString("upgrade/"));
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::IntegerThree; m_formatter[key] = FormatterType::IntegerThree;
} else if (source.startsWith(QString("player"))) { } else if (source.startsWith(QString("player"))) {
// player // player
QString key = source; QString key = source;
key.remove(QString("player/")); key.remove(QString("player/"));
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::NoFormat; m_formatter[key] = FormatterType::NoFormat;
} else if (source == QString("ps/running/count")) { } else if (source == QString("ps/running/count")) {
// running processes count // running processes count
m_map[source] = QString("pscount"); m_map[source] = QString("pscount");
m_formater[QString("pscount")] = FormaterType::NoFormat; m_formatter[QString("pscount")] = FormatterType::NoFormat;
} else if (source == QString("ps/running/list")) { } else if (source == QString("ps/running/list")) {
// list of running processes // list of running processes
m_map[source] = QString("ps"); m_map[source] = QString("ps");
m_formater[QString("ps")] = FormaterType::List; m_formatter[QString("ps")] = FormatterType::List;
} else if (source == QString("ps/total/count")) { } else if (source == QString("ps/total/count")) {
// total processes count // total processes count
m_map[source] = QString("pstotal"); m_map[source] = QString("pstotal");
m_formater[QString("pstotal")] = FormaterType::NoFormat; m_formatter[QString("pstotal")] = FormatterType::NoFormat;
} else if (source.startsWith(QString("quotes"))) { } else if (source.startsWith(QString("quotes"))) {
// quotes // quotes
QString key = source; QString key = source;
key.remove(QString("quotes/")); key.remove(QString("quotes/"));
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::Quotes; m_formatter[key] = FormatterType::Quotes;
} else if (source == QString("mem/swap/free")) { } else if (source == QString("mem/swap/free")) {
// free swap // free swap
// mb // mb
m_map[source] = QString("swapfreemb"); m_map[source] = QString("swapfreemb");
m_formater[QString("swapfreemb")] = FormaterType::MemMBFormat; m_formatter[QString("swapfreemb")] = FormatterType::MemMBFormat;
// gb // gb
m_map.insertMulti(source, QString("swapfreegb")); m_map.insertMulti(source, QString("swapfreegb"));
m_formater[QString("swapfreegb")] = FormaterType::MemGBFormat; m_formatter[QString("swapfreegb")] = FormatterType::MemGBFormat;
} else if (source == QString("mem/swap/used")) { } else if (source == QString("mem/swap/used")) {
// used swap // used swap
// mb // mb
m_map[source] = QString("swapmb"); m_map[source] = QString("swapmb");
m_formater[QString("swapmb")] = FormaterType::MemMBFormat; m_formatter[QString("swapmb")] = FormatterType::MemMBFormat;
// gb // gb
m_map.insertMulti(source, QString("swapgb")); m_map.insertMulti(source, QString("swapgb"));
m_formater[QString("swapgb")] = FormaterType::MemGBFormat; m_formatter[QString("swapgb")] = FormatterType::MemGBFormat;
} else if (source.startsWith(QString("lmsensors/"))) { } else if (source.startsWith(QString("lmsensors/"))) {
// temperature // temperature
int index = m_devices[QString("temp")].indexOf(source); int index = m_devices[QString("temp")].indexOf(source);
@ -508,64 +521,80 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
if (index > -1) { if (index > -1) {
QString key = QString("temp%1").arg(index); QString key = QString("temp%1").arg(index);
m_map[source] = key; m_map[source] = key;
m_formater[key] = units == QString("°C") ? FormaterType::Temperature m_formatter[key] = units == QString("°C")
: FormaterType::Integer; ? FormatterType::Temperature
: FormatterType::Integer;
} }
} else if (source == QString("Local")) { } else if (source == QString("Local")) {
// time // time
m_map[source] = QString("time"); m_map[source] = QString("time");
m_formater[QString("time")] = FormaterType::Time; m_formatter[QString("time")] = FormatterType::Time;
// custom time // custom time
m_map.insertMulti(source, QString("ctime")); m_map.insertMulti(source, QString("ctime"));
m_formater[QString("ctime")] = FormaterType::TimeCustom; m_formatter[QString("ctime")] = FormatterType::TimeCustom;
// ISO time // ISO time
m_map.insertMulti(source, QString("isotime")); m_map.insertMulti(source, QString("isotime"));
m_formater[QString("isotime")] = FormaterType::TimeISO; m_formatter[QString("isotime")] = FormatterType::TimeISO;
// long time // long time
m_map.insertMulti(source, QString("longtime")); m_map.insertMulti(source, QString("longtime"));
m_formater[QString("longtime")] = FormaterType::TimeLong; m_formatter[QString("longtime")] = FormatterType::TimeLong;
// short time // short time
m_map.insertMulti(source, QString("shorttime")); m_map.insertMulti(source, QString("shorttime"));
m_formater[QString("shorttime")] = FormaterType::TimeShort; m_formatter[QString("shorttime")] = FormatterType::TimeShort;
// timestamp
m_map.insertMulti(source, QString("tstime"));
m_formatter[QString("tstime")] = FormatterType::Timestamp;
} else if (source == QString("system/uptime")) { } else if (source == QString("system/uptime")) {
// uptime // uptime
m_map[source] = QString("uptime"); m_map[source] = QString("uptime");
m_formater[QString("uptime")] = FormaterType::Uptime; m_formatter[QString("uptime")] = FormatterType::Uptime;
// custom uptime // custom uptime
m_map.insertMulti(source, QString("cuptime")); m_map.insertMulti(source, QString("cuptime"));
m_formater[QString("cuptime")] = FormaterType::UptimeCustom; m_formatter[QString("cuptime")] = FormatterType::UptimeCustom;
} else if (source.startsWith(QString("weather/temperature"))) { } else if (source.startsWith(QString("weather/temperature"))) {
// temperature // temperature
QString key = source; QString key = source;
key.remove(QString("weather/")); key.remove(QString("weather/"));
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::Temperature; m_formatter[key] = FormatterType::Temperature;
} else if (source.startsWith(QString("weather/"))) { } else if (source.startsWith(QString("weather/"))) {
// other weather // other weather
QString key = source; QString key = source;
key.remove(QString("weather/")); key.remove(QString("weather/"));
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::NoFormat; m_formatter[key] = FormatterType::NoFormat;
} else if (source.startsWith(QString("load/load"))) { } else if (source.startsWith(QString("load/load"))) {
// load source // load source
QString key = source; QString key = source;
key.remove(QString("load/")); key.remove(QString("load/"));
m_map[source] = key; m_map[source] = key;
m_formater[key] = FormaterType::Temperature; m_formatter[key] = FormatterType::Temperature;
}
QStringList foundKeys = keysFromSource(source);
// rewrite formatters for custom ones
QStringList customFormattersKeys = m_customFormatters->definedFormatters();
qCInfo(LOG_AW) << "Looking for fprmatters" << foundKeys << "in"
<< customFormattersKeys;
for (auto key : foundKeys) {
if (!customFormattersKeys.contains(key))
continue;
m_formatter[key] = FormatterType::Custom;
} }
// drop key from dictionary if no one user requested key required it // drop key from dictionary if no one user requested key required it
QStringList foundKeys = keysFromSource(source);
qCInfo(LOG_AW) << "Looking for keys" << foundKeys << "in" << keys; qCInfo(LOG_AW) << "Looking for keys" << foundKeys << "in" << keys;
// this source is required if list is empty (which means skip checking)
// or if key in required key list
bool required bool required
= keys.isEmpty() || std::any_of(foundKeys.cbegin(), foundKeys.cend(), = keys.isEmpty() || std::any_of(foundKeys.cbegin(), foundKeys.cend(),
[&keys](const QString &key) { [&keys](const QString &key) {
return keys.contains(key); return keys.contains(key);
}); });
if (!required) if (!required) {
m_map.remove(source); m_map.remove(source);
for (auto key : foundKeys)
m_formatter.remove(key);
}
return keysFromSource(source); return keysFromSource(source);
} }

View File

@ -25,6 +25,8 @@
#include "version.h" #include "version.h"
class AWFormatterHelper;
class AWKeysAggregator : public QObject class AWKeysAggregator : public QObject
{ {
Q_OBJECT Q_OBJECT
@ -36,16 +38,17 @@ class AWKeysAggregator : public QObject
Q_PROPERTY(QString tempUnits MEMBER m_tempUnits WRITE setTempUnits); Q_PROPERTY(QString tempUnits MEMBER m_tempUnits WRITE setTempUnits);
Q_PROPERTY(bool translate MEMBER m_translate WRITE setTranslate); Q_PROPERTY(bool translate MEMBER m_translate WRITE setTranslate);
enum class FormaterType { enum class FormatterType {
// general formaters // general formatters
NoFormat = 0, Custom,
NoFormat,
Float, Float,
FloatTwoSymbols, FloatTwoSymbols,
Integer, Integer,
IntegerFive, IntegerFive,
IntegerThree, IntegerThree,
List, List,
// unit specific formaters // unit specific formatters
ACFormat, ACFormat,
MemGBFormat, MemGBFormat,
MemMBFormat, MemMBFormat,
@ -58,6 +61,7 @@ class AWKeysAggregator : public QObject
TimeISO, TimeISO,
TimeLong, TimeLong,
TimeShort, TimeShort,
Timestamp,
Uptime, Uptime,
UptimeCustom UptimeCustom
}; };
@ -66,7 +70,7 @@ public:
explicit AWKeysAggregator(QObject *parent = nullptr); explicit AWKeysAggregator(QObject *parent = nullptr);
virtual ~AWKeysAggregator(); virtual ~AWKeysAggregator();
// get methods // get methods
QString formater(const QVariant &data, const QString &key) const; QString formatter(const QVariant &data, const QString &key) const;
QStringList keysFromSource(const QString &source) const; QStringList keysFromSource(const QString &source) const;
// set methods // set methods
void setAcOffline(const QString inactive); void setAcOffline(const QString inactive);
@ -83,6 +87,7 @@ public slots:
private: private:
float temperature(const float temp) const; float temperature(const float temp) const;
AWFormatterHelper *m_customFormatters = nullptr;
QStringList timeKeys = QString(TIME_KEYS).split(QChar(',')); QStringList timeKeys = QString(TIME_KEYS).split(QChar(','));
// variables // variables
QString m_acOffline; QString m_acOffline;
@ -90,7 +95,7 @@ private:
QString m_customTime; QString m_customTime;
QString m_customUptime; QString m_customUptime;
QHash<QString, QStringList> m_devices; QHash<QString, QStringList> m_devices;
QHash<QString, FormaterType> m_formater; QHash<QString, FormatterType> m_formatter;
QHash<QString, QString> m_map; QHash<QString, QString> m_map;
QString m_tempUnits; QString m_tempUnits;
bool m_translate = false; bool m_translate = false;

View File

@ -0,0 +1,59 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "awnoformatter.h"
#include "awdebug.h"
AWNoFormatter::AWNoFormatter(QObject *parent, const QString filename,
const QString section)
: AWAbstractFormatter(parent, filename, section)
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
init(filename, section);
}
AWNoFormatter::AWNoFormatter(QObject *parent)
: AWAbstractFormatter(parent)
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
}
AWNoFormatter::~AWNoFormatter()
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
}
QString AWNoFormatter::convert(const QVariant &value) const
{
qCDebug(LOG_AW) << "Convert value" << value;
return value.toString();
}
void AWNoFormatter::init(const QString filename, const QString section)
{
qCDebug(LOG_AW) << "Looking for section" << section << "in" << filename;
// dummy method for future references
}

View File

@ -0,0 +1,41 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef AWNOFORMATTER_H
#define AWNOFORMATTER_H
#include "awabstractformatter.h"
class AWNoFormatter : public AWAbstractFormatter
{
Q_OBJECT
public:
explicit AWNoFormatter(QObject *parent, const QString filename,
const QString section);
explicit AWNoFormatter(QObject *parent);
virtual ~AWNoFormatter();
QString convert(const QVariant &value) const;
private:
void init(const QString filename, const QString section);
// properties
};
#endif /* AWNOFORMATTER_H */

View File

@ -37,7 +37,7 @@ QString AWPatternFunctions::expandLambdas(QString code,
// parsed values // parsed values
for (auto lambdaKey : usedKeys) for (auto lambdaKey : usedKeys)
code.replace(QString("$%1").arg(lambdaKey), code.replace(QString("$%1").arg(lambdaKey),
aggregator->formater(metadata[lambdaKey], lambdaKey)); aggregator->formatter(metadata[lambdaKey], lambdaKey));
qCInfo(LOG_AW) << "Expression" << code; qCInfo(LOG_AW) << "Expression" << code;
QJSValue result = engine.evaluate(code); QJSValue result = engine.evaluate(code);
if (result.isError()) { if (result.isError()) {

View File

@ -0,0 +1,151 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "awscriptformatter.h"
#include <QJSEngine>
#include <QSettings>
#include "awdebug.h"
AWScriptFormatter::AWScriptFormatter(QObject *parent, const QString filename,
const QString section)
: AWAbstractFormatter(parent, filename, section)
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
init(filename, section);
initProgram();
}
AWScriptFormatter::AWScriptFormatter(QObject *parent, const bool appendCode,
const QString code, const bool hasReturn)
: AWAbstractFormatter(parent)
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
setAppendCode(appendCode);
setCode(code);
setHasReturn(hasReturn);
initProgram();
}
AWScriptFormatter::~AWScriptFormatter()
{
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
}
QString AWScriptFormatter::convert(const QVariant &value) const
{
qCDebug(LOG_AW) << "Convert value" << value;
// init engine
QJSEngine engine;
QJSValue fn = engine.evaluate(m_program);
QJSValueList args = QJSValueList() << value.toString();
QJSValue result = fn.call(args);
if (result.isError()) {
qCWarning(LOG_AW) << "Uncaught exception at line"
<< result.property("lineNumber").toInt() << ":"
<< result.toString();
return QString();
} else {
return result.toString();
}
}
bool AWScriptFormatter::appendCode() const
{
return m_appendCode;
}
QString AWScriptFormatter::code() const
{
return m_code;
}
bool AWScriptFormatter::hasReturn() const
{
return m_hasReturn;
}
QString AWScriptFormatter::program() const
{
return m_program;
}
void AWScriptFormatter::setAppendCode(const bool _appendCode)
{
qCDebug(LOG_AW) << "Set append code" << _appendCode;
m_appendCode = _appendCode;
}
void AWScriptFormatter::setCode(const QString _code)
{
qCDebug(LOG_AW) << "Set code" << _code;
m_code = _code;
}
void AWScriptFormatter::setHasReturn(const bool _hasReturn)
{
qCDebug(LOG_AW) << "Set has return" << _hasReturn;
m_hasReturn = _hasReturn;
}
void AWScriptFormatter::init(const QString filename, const QString section)
{
qCDebug(LOG_AW) << "Looking for section" << section << "in" << filename;
QSettings settings(filename, QSettings::IniFormat);
settings.beginGroup(section);
setAppendCode(settings.value(QString("AppendCode"), true).toBool());
setCode(settings.value(QString("Code"), QString()).toString());
setHasReturn(settings.value(QString("HasReturn"), false).toBool());
settings.endGroup();
}
void AWScriptFormatter::initProgram()
{
if (m_appendCode)
m_program
= QString("(function(value) { %1%2 })")
.arg(m_code)
.arg(m_hasReturn ? QString("") : QString("; return output;"));
else
m_program = m_code;
qCInfo(LOG_AW) << "Create JS engine with code" << m_program;
}

View File

@ -0,0 +1,59 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef AWSCRIPTFORMATTER_H
#define AWSCRIPTFORMATTER_H
#include "awabstractformatter.h"
class AWScriptFormatter : public AWAbstractFormatter
{
Q_OBJECT
Q_PROPERTY(bool appendCode READ appendCode WRITE setAppendCode)
Q_PROPERTY(QString code READ code WRITE setCode)
Q_PROPERTY(bool hasReturn READ hasReturn WRITE setHasReturn)
Q_PROPERTY(QString program READ program)
public:
explicit AWScriptFormatter(QObject *parent, const QString filename,
const QString section);
explicit AWScriptFormatter(QObject *parent, const bool appendCode,
const QString code, const bool hasReturn);
virtual ~AWScriptFormatter();
QString convert(const QVariant &value) const;
// properties
bool appendCode() const;
QString code() const;
bool hasReturn() const;
QString program() const;
void setAppendCode(const bool _appendCode);
void setCode(const QString _code);
void setHasReturn(const bool _hasReturn);
private:
void init(const QString filename, const QString section);
void initProgram();
// properties
bool m_appendCode;
QString m_code;
bool m_hasReturn;
QString m_program;
};
#endif /* AWSCRIPTFORMATTER_H */

View File

@ -29,7 +29,6 @@
#include <QSettings> #include <QSettings>
#include "awdebug.h" #include "awdebug.h"
#include "version.h"
AWUpdateHelper::AWUpdateHelper(QObject *parent) AWUpdateHelper::AWUpdateHelper(QObject *parent)

View File

@ -23,7 +23,6 @@
#include <QTime> #include <QTime>
#include "awdebug.h" #include "awdebug.h"
#include "version.h"
#include "abstractextitemaggregator.h" #include "abstractextitemaggregator.h"

View File

@ -0,0 +1,134 @@
[desktops]
cpu-bar.desktop\Comment=Example cpu bar
cpu-bar.desktop\Encoding=UTF-8
cpu-bar.desktop\Name=cpu-bar.desktop
cpu-bar.desktop\X-AW-Active=true
cpu-bar.desktop\X-AW-ActiveColor="color://0,0,255,255"
cpu-bar.desktop\X-AW-ApiVersion=5
cpu-bar.desktop\X-AW-Count=100
cpu-bar.desktop\X-AW-Custom=false
cpu-bar.desktop\X-AW-Direction=LeftToRight
cpu-bar.desktop\X-AW-Height=10
cpu-bar.desktop\X-AW-InactiveColor="color://0,0,0,255"
cpu-bar.desktop\X-AW-Interval=1
cpu-bar.desktop\X-AW-Max=@Variant(\0\0\0\x87\x42\xc8\0\0)
cpu-bar.desktop\X-AW-Min=@Variant(\0\0\0\x87\0\0\0\0)
cpu-bar.desktop\X-AW-Number=7
cpu-bar.desktop\X-AW-Type=Horizontal
cpu-bar.desktop\X-AW-Value=cpu
cpu-bar.desktop\X-AW-Width=200
down-graph.desktop\Comment=Example download speed graph
down-graph.desktop\Encoding=UTF-8
down-graph.desktop\Name=down-graph.desktop
down-graph.desktop\X-AW-Active=true
down-graph.desktop\X-AW-ActiveColor="color://0,170,0,255"
down-graph.desktop\X-AW-ApiVersion=5
down-graph.desktop\X-AW-Count=100
down-graph.desktop\X-AW-Custom=true
down-graph.desktop\X-AW-Direction=LeftToRight
down-graph.desktop\X-AW-Height=25
down-graph.desktop\X-AW-InactiveColor="color://0,0,0,255"
down-graph.desktop\X-AW-Interval=1
down-graph.desktop\X-AW-Max=100.0
down-graph.desktop\X-AW-Min=@Variant(\0\0\0\x87\0\0\0\0)
down-graph.desktop\X-AW-Number=8
down-graph.desktop\X-AW-Type=Bars
down-graph.desktop\X-AW-Value=$downkb
down-graph.desktop\X-AW-Width=300
ram-bar.desktop\Comment=Example RAM bar
ram-bar.desktop\Encoding=UTF-8
ram-bar.desktop\Name=ram-bar.desktop
ram-bar.desktop\X-AW-Active=true
ram-bar.desktop\X-AW-ActiveColor="color://0,0,255,255"
ram-bar.desktop\X-AW-ApiVersion=5
ram-bar.desktop\X-AW-Count=100
ram-bar.desktop\X-AW-Custom=false
ram-bar.desktop\X-AW-Direction=LeftToRight
ram-bar.desktop\X-AW-Height=10
ram-bar.desktop\X-AW-InactiveColor="color://0,0,0,255"
ram-bar.desktop\X-AW-Interval=1
ram-bar.desktop\X-AW-Max=@Variant(\0\0\0\x87\x42\xc8\0\0)
ram-bar.desktop\X-AW-Min=@Variant(\0\0\0\x87\0\0\0\0)
ram-bar.desktop\X-AW-Number=5
ram-bar.desktop\X-AW-Type=Horizontal
ram-bar.desktop\X-AW-Value=mem
ram-bar.desktop\X-AW-Width=200
swap-bar.desktop\Comment=Example swap bar
swap-bar.desktop\Encoding=UTF-8
swap-bar.desktop\Name=swap-bar.desktop
swap-bar.desktop\X-AW-Active=true
swap-bar.desktop\X-AW-ActiveColor="color://0,0,255,255"
swap-bar.desktop\X-AW-ApiVersion=5
swap-bar.desktop\X-AW-Count=100
swap-bar.desktop\X-AW-Custom=false
swap-bar.desktop\X-AW-Direction=LeftToRight
swap-bar.desktop\X-AW-Height=10
swap-bar.desktop\X-AW-InactiveColor="color://0,0,0,255"
swap-bar.desktop\X-AW-Interval=1
swap-bar.desktop\X-AW-Max=@Variant(\0\0\0\x87\x42\xc8\0\0)
swap-bar.desktop\X-AW-Min=@Variant(\0\0\0\x87\0\0\0\0)
swap-bar.desktop\X-AW-Number=6
swap-bar.desktop\X-AW-Type=Horizontal
swap-bar.desktop\X-AW-Value=swap
swap-bar.desktop\X-AW-Width=200
up-graph.desktop\Comment=Example upload speed graph
up-graph.desktop\Encoding=UTF-8
up-graph.desktop\Name=upload-graph.desktop
up-graph.desktop\X-AW-Active=true
up-graph.desktop\X-AW-ActiveColor="color://0,170,0,255"
up-graph.desktop\X-AW-ApiVersion=5
up-graph.desktop\X-AW-Count=100
up-graph.desktop\X-AW-Custom=true
up-graph.desktop\X-AW-Direction=LeftToRight
up-graph.desktop\X-AW-Height=25
up-graph.desktop\X-AW-InactiveColor="color://0,0,0,255"
up-graph.desktop\X-AW-Interval=1
up-graph.desktop\X-AW-Max=100.0
up-graph.desktop\X-AW-Min=@Variant(\0\0\0\x87\0\0\0\0)
up-graph.desktop\X-AW-Number=9
up-graph.desktop\X-AW-Type=Bars
up-graph.desktop\X-AW-Value=$cpu
up-graph.desktop\X-AW-Width=300
[plasmoid]
acOffline=( )
acOnline=(*)
background=false
batInTooltipColor=#880000
batTooltip=true
batTooltipColor=#008800
checkUpdates=true
cpuTooltip=true
cpuTooltipColor=#ff0000
cpuclTooltip=true
cpuclTooltipColor=#00ff00
customTime=$hh:$mm
customUptime=$ddd $hhh $mmm
downkbTooltip=true
downkbTooltipColor=#00ffff
fontColor=#ffffff
fontFamily=Terminus
fontSize=12
fontStyle=normal
fontWeight=normal
height=400
interval=1000
memTooltip=true
memTooltipColor=#0000ff
notify=true
optimize=true
queueLimit=0
swapTooltip=true
swapTooltipColor=#ffff00
tempUnits=Celsius
text="<body bgcolor=\"#000000\">\n<p align=\"justify\">Uptime: $cuptime<br>\nRAM: &nbsp;$mem&nbsp;&nbsp;$bar5<br>\nSwap: $swap&nbsp;&nbsp;$bar6<br>\nCPU: &nbsp;$cpu&nbsp;&nbsp;$bar7<br>\nCPU Temp: $temp0&deg;C<br>\nDown: $down$downunits&nbsp;&nbsp;&nbsp;&nbsp;$downtotal<br>\n$bar8<br>\nUp:&nbsp;&nbsp; $up$upunits&nbsp;&nbsp;&nbsp;&nbsp;$uptotal<br>\n$bar9<br></p>\n</body>\n"
textAlign=center
tooltipBackground=#ffffff
tooltipNumber=100
translateStrings=true
upkbTooltipColor=#ff00ff
useTooltipBackground=true
width=300
wrapNewLines=false
wrapText=false

View File

@ -31,7 +31,6 @@
#include <qreplytimeout/qreplytimeout.h> #include <qreplytimeout/qreplytimeout.h>
#include "awdebug.h" #include "awdebug.h"
#include "version.h"
ExtQuotes::ExtQuotes(QWidget *parent, const QString quotesName, ExtQuotes::ExtQuotes(QWidget *parent, const QString quotesName,

View File

@ -28,7 +28,6 @@
#include <QTextCodec> #include <QTextCodec>
#include "awdebug.h" #include "awdebug.h"
#include "version.h"
ExtScript::ExtScript(QWidget *parent, const QString scriptName, ExtScript::ExtScript(QWidget *parent, const QString scriptName,

View File

@ -37,7 +37,7 @@ class ExtScript : public AbstractExtItem
Q_PROPERTY(Redirect redirect READ redirect WRITE setRedirect) Q_PROPERTY(Redirect redirect READ redirect WRITE setRedirect)
public: public:
enum class Redirect { stdout2stderr = 0, nothing, stderr2stdout, swap }; enum class Redirect { stdout2stderr, nothing, stderr2stdout, swap };
explicit ExtScript(QWidget *parent = nullptr, explicit ExtScript(QWidget *parent = nullptr,
const QString scriptName = QString(), const QString scriptName = QString(),

View File

@ -26,7 +26,6 @@
#include <QTextCodec> #include <QTextCodec>
#include "awdebug.h" #include "awdebug.h"
#include "version.h"
ExtUpgrade::ExtUpgrade(QWidget *parent, const QString upgradeName, ExtUpgrade::ExtUpgrade(QWidget *parent, const QString upgradeName,

View File

@ -32,7 +32,6 @@
#include <qreplytimeout/qreplytimeout.h> #include <qreplytimeout/qreplytimeout.h>
#include "awdebug.h" #include "awdebug.h"
#include "version.h"
ExtWeather::ExtWeather(QWidget *parent, const QString weatherName, ExtWeather::ExtWeather(QWidget *parent, const QString weatherName,

View File

@ -30,7 +30,6 @@
#include "awdebug.h" #include "awdebug.h"
#include "graphicalitemhelper.h" #include "graphicalitemhelper.h"
#include "version.h"
GraphicalItem::GraphicalItem(QWidget *parent, const QString desktopName, GraphicalItem::GraphicalItem(QWidget *parent, const QString desktopName,

View File

@ -50,7 +50,7 @@ class GraphicalItem : public AbstractExtItem
public: public:
enum class Direction { LeftToRight = 0, RightToLeft = 1 }; enum class Direction { LeftToRight = 0, RightToLeft = 1 };
enum class Type { Horizontal = 0, Vertical, Circle, Graph, Bars }; enum class Type { Horizontal, Vertical, Circle, Graph, Bars };
explicit GraphicalItem(QWidget *parent = nullptr, explicit GraphicalItem(QWidget *parent = nullptr,
const QString desktopName = QString(), const QString desktopName = QString(),

View File

@ -5,7 +5,6 @@ set(COVERITY_EMAIL "" CACHE STRING "Coverity user email")
set(COVERITY_EXECUTABLE "cov-build" CACHE STRING "Path to coverity build tool") set(COVERITY_EXECUTABLE "cov-build" CACHE STRING "Path to coverity build tool")
set(COVERITY_TOKEN "" CACHE STRING "Coverity token") set(COVERITY_TOKEN "" CACHE STRING "Coverity token")
set(COVERITY_URL "https://scan.coverity.com/builds?project=Awesome+Widgets" CACHE STRING "Coverity project url") set(COVERITY_URL "https://scan.coverity.com/builds?project=Awesome+Widgets" CACHE STRING "Coverity project url")
set(CURL_EXECUTABLE "/usr/bin/curl" CACHE STRING "Path to curl executable")
add_custom_target( add_custom_target(
coverity coverity
@ -19,7 +18,7 @@ add_custom_target(
add_custom_target( add_custom_target(
coverity-upload coverity-upload
COMMAND ${CURL_EXECUTABLE} COMMAND curl
--form token=${COVERITY_TOKEN} --form token=${COVERITY_TOKEN}
--form email=${COVERITY_EMAIL} --form email=${COVERITY_EMAIL}
--form file=@${PROJECT_NAME}.zip --form file=@${PROJECT_NAME}.zip

View File

@ -16,6 +16,7 @@ add_custom_target(
COMMAND ${CPPCHECK_EXECUTABLE} COMMAND ${CPPCHECK_EXECUTABLE}
--enable=warning,performance,portability,information,missingInclude --enable=warning,performance,portability,information,missingInclude
--std=c++11 --std=c++11
--language=c++
--library=qt.cfg --library=qt.cfg
--template="[{severity}][{id}] {message} {callstack} \(On {file}:{line}\)" --template="[{severity}][{id}] {message} {callstack} \(On {file}:{line}\)"
--verbose --verbose

View File

@ -20,7 +20,7 @@ X-Plasma-RemoteLocation=
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
X-KDE-PluginInfo-Email=esalexeev@gmail.com X-KDE-PluginInfo-Email=esalexeev@gmail.com
X-KDE-PluginInfo-Name=org.kde.plasma.desktoppanel X-KDE-PluginInfo-Name=org.kde.plasma.desktoppanel
X-KDE-PluginInfo-Version=3.1.1 X-KDE-PluginInfo-Version=3.1.2
X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/ X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/
X-KDE-PluginInfo-Category=System Information X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-Depends=

View File

@ -34,7 +34,6 @@
#include <fontdialog/fontdialog.h> #include <fontdialog/fontdialog.h>
#include "awdebug.h" #include "awdebug.h"
#include "version.h"
DPAdds::DPAdds(QObject *parent) DPAdds::DPAdds(QObject *parent)

View File

@ -25,7 +25,6 @@
#include "awdebug.h" #include "awdebug.h"
#include "extsysmonaggregator.h" #include "extsysmonaggregator.h"
#include "version.h"
ExtendedSysMon::ExtendedSysMon(QObject *parent, const QVariantList &args) ExtendedSysMon::ExtendedSysMon(QObject *parent, const QVariantList &args)

View File

@ -31,7 +31,6 @@
#include "sources/quotessource.h" #include "sources/quotessource.h"
#include "sources/upgradesource.h" #include "sources/upgradesource.h"
#include "sources/weathersource.h" #include "sources/weathersource.h"
#include "version.h"
ExtSysMonAggregator::ExtSysMonAggregator(QObject *parent, ExtSysMonAggregator::ExtSysMonAggregator(QObject *parent,

View File

@ -1,23 +1,22 @@
# SOME DESCRIPTIVE TITLE. # SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the PACKAGE package.
# #
# Translators: # Translators:
# Ernesto Avilés Vázquez <whippiii@gmail.com>, 2014-2015 # Ernesto Avilés Vázquez <whippiii@gmail.com>, 2014-2016
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014-2015 # Evgeniy Alekseev <esalexeev@gmail.com>, 2014-2015
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Awesome widgets\n" "Project-Id-Version: Awesome widgets\n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2016-04-29 12:21+0300\n" "POT-Creation-Date: 2016-04-29 12:21+0300\n"
"PO-Revision-Date: 2015-09-26 22:07+0000\n" "PO-Revision-Date: 2016-05-03 06:47+0000\n"
"Last-Translator: Ernesto Avilés Vázquez <whippiii@gmail.com>\n" "Last-Translator: Ernesto Avilés Vázquez <whippiii@gmail.com>\n"
"Language-Team: Spanish (http://www.transifex.com/arcanis/awesome-widgets/" "Language-Team: Spanish (http://www.transifex.com/arcanis/awesome-widgets/language/es/)\n"
"language/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Widget" msgid "Widget"
@ -60,7 +59,7 @@ msgid "Check updates on startup"
msgstr "Comprobar actualizaciones al inicio" msgstr "Comprobar actualizaciones al inicio"
msgid "Optimize subscription" msgid "Optimize subscription"
msgstr "" msgstr "Optimizar suscripción"
msgid "Widget height, px" msgid "Widget height, px"
msgstr "Alto del widget, px" msgstr "Alto del widget, px"
@ -114,39 +113,37 @@ msgid "Drop key cache"
msgstr "Borrar caché de claves" msgstr "Borrar caché de claves"
msgid "Export configuration" msgid "Export configuration"
msgstr "" msgstr "Exportar configuración"
msgid "Export" msgid "Export"
msgstr "" msgstr "Exportar"
msgid "Success" msgid "Success"
msgstr "" msgstr "Realizado"
msgid "Please note that binary files were not copied" msgid "Please note that binary files were not copied"
msgstr "" msgstr "Por favor, note que los archivos binarios no fueron copiados"
msgid "Ooops..." msgid "Ooops..."
msgstr "" msgstr "Uy..."
msgid "Could not save configuration file" msgid "Could not save configuration file"
msgstr "" msgstr "No se pudo guardar el archivo de configuración"
msgid "Import configuration" msgid "Import configuration"
msgstr "" msgstr "Importar configuración"
msgid "Import" msgid "Import"
msgstr "" msgstr "Importar"
msgid "Import plasmoid settings" msgid "Import plasmoid settings"
msgstr "" msgstr "Importar configuraciones de plasmoide"
#, fuzzy
msgid "Import extensions" msgid "Import extensions"
msgstr "Extensiones" msgstr "Extensiones a importar"
#, fuzzy
msgid "Import additional files" msgid "Import additional files"
msgstr "Filtros adicionales" msgstr "Importar archivos adicionales"
msgid "Font" msgid "Font"
msgstr "Tipo de letra" msgstr "Tipo de letra"
@ -277,10 +274,7 @@ msgstr "Comprobar actualizaciones"
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox checked." "To enable them just make needed checkbox checked."
msgstr "" msgstr "Las etiquetas para CPU, reloj de CPU, memoria, swap y red soportan ventanas emergentes. Para habilitarlas, simplemente marca las casillas correspondientes."
"Las etiquetas para CPU, reloj de CPU, memoria, swap y red soportan ventanas "
"emergentes. Para habilitarlas, simplemente marca las casillas "
"correspondientes."
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Número de valores para las ventanas emergentes" msgstr "Número de valores para las ventanas emergentes"
@ -334,15 +328,12 @@ msgid "Battery inactive color"
msgstr "Color de la batería inactiva" msgstr "Color de la batería inactiva"
msgid "" msgid ""
"Detailed information may be found on <a href=\"https://arcanis.me/projects/" "Detailed information may be found on <a href=\"https://arcanis.me/projects"
"awesome-widgets/\">project homepage</a>" "/awesome-widgets/\">project homepage</a>"
msgstr "" msgstr "Puedes encontrar información detallada en el <a href=\"https://arcanis.me/projects/awesome-widgets/\">sitio del proyecto</a>"
"Puedes encontrar información detallada en el <a href=\"https://arcanis.me/"
"projects/awesome-widgets/\">sitio del proyecto</a>"
#, fuzzy
msgid "Bgcolor" msgid "Bgcolor"
msgstr "Color de la CPU" msgstr "Color de fondo"
msgid "AC" msgid "AC"
msgstr "CA" msgstr "CA"
@ -369,7 +360,7 @@ msgid "Weathers"
msgstr "Tiempo" msgstr "Tiempo"
msgid "Functions" msgid "Functions"
msgstr "" msgstr "Funciones"
msgid "Add" msgid "Add"
msgstr "Añadir" msgstr "Añadir"
@ -423,7 +414,7 @@ msgid "This software uses: %1"
msgstr "Este software usa: %1" msgstr "Este software usa: %1"
msgid "Special thanks to %1" msgid "Special thanks to %1"
msgstr "" msgstr "Agradecimientos especiales a %1"
msgid "Select font" msgid "Select font"
msgstr "Elegir tipo de letra" msgstr "Elegir tipo de letra"
@ -456,7 +447,7 @@ msgid "KB/s"
msgstr "KB/s" msgstr "KB/s"
msgid "Changelog of %1" msgid "Changelog of %1"
msgstr "" msgstr "Cambios de %1"
msgid "You are using the actual version %1" msgid "You are using the actual version %1"
msgstr "Estás usando al versión actual %1" msgstr "Estás usando al versión actual %1"
@ -512,13 +503,9 @@ msgstr "Etiqueta"
msgid "" msgid ""
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the " "<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" " "instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
"text-decoration: underline; color:#0057ae;\">http://finance.yahoo.com/</" "text-decoration: underline; "
"span></a></p></body></html>" "color:#0057ae;\">http://finance.yahoo.com/</span></a></p></body></html>"
msgstr "" msgstr "<html><head/><body><p>Usa el tablero electrónico de YAHOO! para obtener la cotización del medio. Dirígete a <a href=\"http://finance.yahoo.com/\"><span style=\" text-decoration: underline; color:#0057ae;\">http://finance.yahoo.com/</span></a></p></body></html>"
"<html><head/><body><p>Usa el tablero electrónico de YAHOO! para obtener la "
"cotización del medio. Dirígete a <a href=\"http://finance.yahoo.com/\"><span "
"style=\" text-decoration: underline; color:#0057ae;\">http://finance.yahoo."
"com/</span></a></p></body></html>"
msgid "Ticker" msgid "Ticker"
msgstr "Tablero" msgstr "Tablero"
@ -565,34 +552,29 @@ msgstr "Marca de tiempo"
msgid "Use images" msgid "Use images"
msgstr "Usar imágenes" msgstr "Usar imágenes"
#, fuzzy
msgid "Use custom formula" msgid "Use custom formula"
msgstr "Formato personalizado de hora" msgstr "Usar fórmula personalizada"
msgid "Value" msgid "Value"
msgstr "Valor" msgstr "Valor"
#, fuzzy
msgid "Max value" msgid "Max value"
msgstr "Mostrar valor" msgstr "Valor máximo"
#, fuzzy
msgid "Min value" msgid "Min value"
msgstr "Mostrar valor" msgstr "Valor mínimo"
#, fuzzy
msgid "Active filling type" msgid "Active filling type"
msgstr "Activo" msgstr "Activar tipo de relleno"
#, fuzzy
msgid "Inctive filling type" msgid "Inctive filling type"
msgstr "Escritorio inactivo" msgstr "Inhabilitar tipo de relleno"
msgid "Type" msgid "Type"
msgstr "Tipo" msgstr "Tipo"
msgid "Points count" msgid "Points count"
msgstr "" msgstr "Conteo de puntos"
msgid "Direction" msgid "Direction"
msgstr "Dirección" msgstr "Dirección"
@ -603,13 +585,11 @@ msgstr "Alto"
msgid "Width" msgid "Width"
msgstr "Ancho" msgstr "Ancho"
#, fuzzy
msgid "color" msgid "color"
msgstr "Color de la CPU" msgstr "color"
#, fuzzy
msgid "image" msgid "image"
msgstr "Usar imágenes" msgstr "imagen"
msgid "Active desktop" msgid "Active desktop"
msgstr "Escritorio activo" msgstr "Escritorio activo"
@ -651,16 +631,3 @@ msgstr "Tu nombre"
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "Tu correo electrónico" msgstr "Tu correo electrónico"
#, fuzzy
#~ msgid "Use image for active"
#~ msgstr "Usar imágenes"
#~ msgid "Active color"
#~ msgstr "Color de activo"
#~ msgid "Inactive color"
#~ msgstr "Color de inactivo"
#~ msgid "Add lambda"
#~ msgstr "Añadir lambda"

View File

@ -7,16 +7,16 @@ msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2016-04-29 12:21+0300\n" "POT-Creation-Date: 2016-04-29 12:21+0300\n"
"PO-Revision-Date: 2015-09-27 12:37+0300\n" "PO-Revision-Date: 2016-05-05 17:18+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Ukrainian <kde-russian@lists.kde.ru>\n" "Language-Team: Ukrainian <kde-russian@lists.kde.ru>\n"
"Language: ua\n" "Language: uk\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 2.0\n" "X-Generator: Poedit 1.8.7.1\n"
msgid "Widget" msgid "Widget"
msgstr "Віджет" msgstr "Віджет"
@ -42,7 +42,6 @@ msgstr "Подяка"
msgid "Enable background" msgid "Enable background"
msgstr "Включити фон" msgstr "Включити фон"
#, fuzzy
msgid "Translate strings" msgid "Translate strings"
msgstr "Перекладати рядки" msgstr "Перекладати рядки"
@ -55,12 +54,11 @@ msgstr "Включити перенос слів"
msgid "Enable notifications" msgid "Enable notifications"
msgstr "Включити повідомлення" msgstr "Включити повідомлення"
#, fuzzy
msgid "Check updates on startup" msgid "Check updates on startup"
msgstr "Перевіряти оновлення при запуску" msgstr "Перевіряти оновлення при запуску"
msgid "Optimize subscription" msgid "Optimize subscription"
msgstr "" msgstr "Оптимізувати підписку"
msgid "Widget height, px" msgid "Widget height, px"
msgstr "Висота віджету, пікселі" msgstr "Висота віджету, пікселі"
@ -113,43 +111,38 @@ msgstr "AC відключений"
msgid "Drop key cache" msgid "Drop key cache"
msgstr "Скинути кеш ключів" msgstr "Скинути кеш ключів"
#, fuzzy
msgid "Export configuration" msgid "Export configuration"
msgstr "Налаштування" msgstr "Експорт налаштувань"
msgid "Export" msgid "Export"
msgstr "" msgstr "Експорт"
msgid "Success" msgid "Success"
msgstr "" msgstr "Успішно"
msgid "Please note that binary files were not copied" msgid "Please note that binary files were not copied"
msgstr "" msgstr "Будь ласка, зверніть увагу, що бінарні файли не були скопійовані"
msgid "Ooops..." msgid "Ooops..."
msgstr "" msgstr "Ууупс..."
#, fuzzy
msgid "Could not save configuration file" msgid "Could not save configuration file"
msgstr "Налаштування" msgstr "Не можу зберегти файл налаштувань"
#, fuzzy
msgid "Import configuration" msgid "Import configuration"
msgstr "Налаштування" msgstr "Імпорт налаштувань"
msgid "Import" msgid "Import"
msgstr "" msgstr "Імпорт"
msgid "Import plasmoid settings" msgid "Import plasmoid settings"
msgstr "" msgstr "Імпорт налаштувань плазмоїда"
#, fuzzy
msgid "Import extensions" msgid "Import extensions"
msgstr "Розширення" msgstr "Імпорт розширень"
#, fuzzy
msgid "Import additional files" msgid "Import additional files"
msgstr "Додаткові фільтри" msgstr "Імпорт додаткових файлів"
msgid "Font" msgid "Font"
msgstr "Шрифт" msgstr "Шрифт"
@ -190,9 +183,8 @@ msgstr "Оберіть колір"
msgid "Select a font" msgid "Select a font"
msgstr "Оберіть шрифт" msgstr "Оберіть шрифт"
#, fuzzy
msgid "ACPI" msgid "ACPI"
msgstr "Шлях до ACPI" msgstr "ACPI"
msgid "ACPI path" msgid "ACPI path"
msgstr "Шлях до ACPI" msgstr "Шлях до ACPI"
@ -203,7 +195,6 @@ msgstr "GPU"
msgid "GPU device" msgid "GPU device"
msgstr "Пристій GPU" msgstr "Пристій GPU"
#, fuzzy
msgid "HDD temperature" msgid "HDD temperature"
msgstr "Температура HDD" msgstr "Температура HDD"
@ -255,7 +246,6 @@ msgstr "Редагувати команду"
msgid "Weather" msgid "Weather"
msgstr "Погода" msgstr "Погода"
#, fuzzy
msgid "Edit weather" msgid "Edit weather"
msgstr "Редагувати погоду" msgstr "Редагувати погоду"
@ -280,14 +270,13 @@ msgstr "Показати README"
msgid "Check updates" msgid "Check updates"
msgstr "Шукати оновлення" msgstr "Шукати оновлення"
#, fuzzy
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox checked." "To enable them just make needed checkbox checked."
msgstr "" msgstr ""
"Поля \"CPU\", \"Частота CPU\", \"Пам’ять\", \"Swap\" та \"Мережа\" " "Поля \"CPU\", \"Частота CPU\", \"Пам’ять\", \"Swap\" та \"Мережа\" "
"підтримують графічні підказки. Щоб їх задіяти, просто зробіть необхідні " "підтримують графічні підказки. Щоб їх задіяти, просто виділіть необхідні "
"чекбокси повністю чекнутими." "чекбокси."
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Кількість значень для підказки" msgstr "Кількість значень для підказки"
@ -295,7 +284,6 @@ msgstr "Кількість значень для підказки"
msgid "Background" msgid "Background"
msgstr "Фон" msgstr "Фон"
#, fuzzy
msgid "Background color" msgid "Background color"
msgstr "Колір фону" msgstr "Колір фону"
@ -305,7 +293,6 @@ msgstr "CPU"
msgid "CPU color" msgid "CPU color"
msgstr "Колір CPU" msgstr "Колір CPU"
#, fuzzy
msgid "CPU clock" msgid "CPU clock"
msgstr "Частота CPU" msgstr "Частота CPU"
@ -349,9 +336,8 @@ msgstr ""
"Детальна інформація може бути знайдена на <a href=\"https://arcanis.me/" "Детальна інформація може бути знайдена на <a href=\"https://arcanis.me/"
"projects/awesome-widgets/\">домашній сторінці проекту</a>" "projects/awesome-widgets/\">домашній сторінці проекту</a>"
#, fuzzy
msgid "Bgcolor" msgid "Bgcolor"
msgstr "Колір CPU" msgstr "Колір фону"
msgid "AC" msgid "AC"
msgstr "Адаптер живлення" msgstr "Адаптер живлення"
@ -362,27 +348,23 @@ msgstr "Бари"
msgid "Desktops" msgid "Desktops"
msgstr "Робочі столи" msgstr "Робочі столи"
#, fuzzy
msgid "Scripts" msgid "Scripts"
msgstr "Скрипти" msgstr "Скрипти"
#, fuzzy
msgid "Time" msgid "Time"
msgstr "Час" msgstr "Час"
#, fuzzy
msgid "Quotes" msgid "Quotes"
msgstr "Котирування" msgstr "Котирування"
msgid "Upgrades" msgid "Upgrades"
msgstr "Оновлення" msgstr "Оновлення"
#, fuzzy
msgid "Weathers" msgid "Weathers"
msgstr "Погода" msgstr "Погода"
msgid "Functions" msgid "Functions"
msgstr "" msgstr "Функції"
msgid "Add" msgid "Add"
msgstr "Додати" msgstr "Додати"
@ -436,7 +418,7 @@ msgid "This software uses: %1"
msgstr "Ця програма використовує: %1" msgstr "Ця програма використовує: %1"
msgid "Special thanks to %1" msgid "Special thanks to %1"
msgstr "" msgstr "Особлива подяка %1"
msgid "Select font" msgid "Select font"
msgstr "Оберіть шрифт" msgstr "Оберіть шрифт"
@ -469,12 +451,11 @@ msgid "KB/s"
msgstr "КБ/с" msgstr "КБ/с"
msgid "Changelog of %1" msgid "Changelog of %1"
msgstr "" msgstr "Список змін %1"
msgid "You are using the actual version %1" msgid "You are using the actual version %1"
msgstr "Ви використовуєте актуальну версію %1" msgstr "Ви використовуєте актуальну версію %1"
#, fuzzy
msgid "No new version found" msgid "No new version found"
msgstr "Оновлень не знайдено" msgstr "Оновлень не знайдено"
@ -511,7 +492,6 @@ msgstr "Ім’я: %1"
msgid "Comment: %1" msgid "Comment: %1"
msgstr "Коментар: %1" msgstr "Коментар: %1"
#, fuzzy
msgid "Identity: %1" msgid "Identity: %1"
msgstr "Ідентифікатор: %1" msgstr "Ідентифікатор: %1"
@ -535,19 +515,15 @@ msgstr ""
"style=\" text-decoration: underline; color:#0057ae;\">http://finance.yahoo." "style=\" text-decoration: underline; color:#0057ae;\">http://finance.yahoo."
"com/</span></a></p></body></html>" "com/</span></a></p></body></html>"
#, fuzzy
msgid "Ticker" msgid "Ticker"
msgstr "Тікер: %1" msgstr "Тікер"
#, fuzzy
msgid "Active" msgid "Active"
msgstr "Активний" msgstr "Активний"
#, fuzzy
msgid "Interval" msgid "Interval"
msgstr "Інтервал" msgstr "Інтервал"
#, fuzzy
msgid "Command" msgid "Command"
msgstr "Команда" msgstr "Команда"
@ -560,7 +536,6 @@ msgstr "Перенаправлення"
msgid "Additional filters" msgid "Additional filters"
msgstr "Додаткові фільтри" msgstr "Додаткові фільтри"
#, fuzzy
msgid "Wrap colors" msgid "Wrap colors"
msgstr "Обробити кольори" msgstr "Обробити кольори"
@ -579,41 +554,35 @@ msgstr "Місто"
msgid "Country" msgid "Country"
msgstr "Країна" msgstr "Країна"
#, fuzzy
msgid "Timestamp" msgid "Timestamp"
msgstr "Відмітка часу" msgstr "Відмітка часу"
msgid "Use images" msgid "Use images"
msgstr "Використовувати зображення" msgstr "Використовувати зображення"
#, fuzzy
msgid "Use custom formula" msgid "Use custom formula"
msgstr "Свій формат часу" msgstr "Використовувати свою формулу"
msgid "Value" msgid "Value"
msgstr "Значення" msgstr "Значення"
#, fuzzy
msgid "Max value" msgid "Max value"
msgstr "Показати значення" msgstr "Максимальне значення"
#, fuzzy
msgid "Min value" msgid "Min value"
msgstr "Показати значення" msgstr "Мінімальне значення"
#, fuzzy
msgid "Active filling type" msgid "Active filling type"
msgstr "Активний" msgstr "Тип активного заповнення"
#, fuzzy
msgid "Inctive filling type" msgid "Inctive filling type"
msgstr "Неактивний робочий стіл" msgstr "Тип неактивного заповнення"
msgid "Type" msgid "Type"
msgstr "Тип" msgstr "Тип"
msgid "Points count" msgid "Points count"
msgstr "" msgstr "Кількість точок"
msgid "Direction" msgid "Direction"
msgstr "Напрямок" msgstr "Напрямок"
@ -624,13 +593,11 @@ msgstr "Висота"
msgid "Width" msgid "Width"
msgstr "Ширина" msgstr "Ширина"
#, fuzzy
msgid "color" msgid "color"
msgstr "Колір CPU" msgstr "колір"
#, fuzzy
msgid "image" msgid "image"
msgstr "Використовувати зображення" msgstr "зображення"
msgid "Active desktop" msgid "Active desktop"
msgstr "Активний робочий стіл" msgstr "Активний робочий стіл"

View File

@ -40,8 +40,8 @@
"dddd,ddd,dd,d,MMMM,MMM,MM,M,yyyy,yy,hh,h,HH,H,mm,m,ss,s,t,ap,a,AP,A" "dddd,ddd,dd,d,MMMM,MMM,MM,M,yyyy,yy,hh,h,HH,H,mm,m,ss,s,t,ap,a,AP,A"
// static keys // static keys
#define STATIC_KEYS \ #define STATIC_KEYS \
"time,isotime,shorttime,longtime,ctime,uptime,cuptime,cpucl,cpu,gputemp," \ "time,isotime,shorttime,longtime,tstime,ctime,uptime,cuptime,cpucl,cpu," \
"gpu,memmb,memgb,memfreemb,memfreegb,memtotmb,memtotgb,memusedmb," \ "gputemp,gpu,memmb,memgb,memfreemb,memfreegb,memtotmb,memtotgb,memusedmb," \
"memusedgb,mem,swapmb,swapgb,swapfreemb,swapfreegb,swaptotmb,swaptotgb," \ "memusedgb,mem,swapmb,swapgb,swapfreemb,swapfreegb,swaptotmb,swaptotgb," \
"swap,downunits,upunits,downkb,downtotalkb,downtotal,down,uptotalkb," \ "swap,downunits,upunits,downkb,downtotalkb,downtotal,down,uptotalkb," \
"uptotal,upkb,up,netdev,ac,bat,album,artist,duration,progress,title," \ "uptotal,upkb,up,netdev,ac,bat,album,artist,duration,progress,title," \
@ -78,10 +78,16 @@
#define CMAKE_MODULE_LINKER_FLAGS "@CMAKE_MODULE_LINKER_FLAGS@" #define CMAKE_MODULE_LINKER_FLAGS "@CMAKE_MODULE_LINKER_FLAGS@"
#define CMAKE_SHARED_LINKER_FLAGS "@CMAKE_SHARED_LINKER_FLAGS@" #define CMAKE_SHARED_LINKER_FLAGS "@CMAKE_SHARED_LINKER_FLAGS@"
// components // components
#define BUILD_COVERAGE "@BUILD_COVERAGE@"
#define BUILD_PLASMOIDS "@BUILD_PLASMOIDS@" #define BUILD_PLASMOIDS "@BUILD_PLASMOIDS@"
#define BUILD_DEB_PACKAGE "@BUILD_DEB_PACKAGE@" #define BUILD_DEB_PACKAGE "@BUILD_DEB_PACKAGE@"
#define BUILD_RPM_PACKAGE "@BUILD_RPM_PACKAGE@" #define BUILD_RPM_PACKAGE "@BUILD_RPM_PACKAGE@"
#define CLANGFORMAT_EXECUTABLE "@CLANGFORMAT_EXECUTABLE@" #define CLANGFORMAT_EXECUTABLE "@CLANGFORMAT_EXECUTABLE@"
#define COVERITY_COMMENT "@COVERITY_COMMENT@"
#define COVERITY_DIRECTORY "@COVERITY_DIRECTORY@"
#define COVERITY_EMAIL "@COVERITY_EMAIL@"
#define COVERITY_EXECUTABLE "@COVERITY_EXECUTABLE@"
#define COVERITY_URL "@COVERITY_URL@"
#define CPPCHECK_EXECUTABLE "@CPPCHECK_EXECUTABLE@" #define CPPCHECK_EXECUTABLE "@CPPCHECK_EXECUTABLE@"
// additional functions // additional functions
#define PROP_FUTURE "@BUILD_FUTURE@" #define PROP_FUTURE "@BUILD_FUTURE@"