* add preview function

* more comments inside
* variables renaming
* unite several lists to one hash
* add build_future definition checking to source code
This commit is contained in:
arcan1s 2015-09-15 00:02:59 +03:00
parent dddc3962a5
commit 95b6b2d9e9
18 changed files with 204 additions and 211 deletions

View File

@ -17,6 +17,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 1.3 as QtControls import QtQuick.Controls 1.3 as QtControls
import QtQuick.Dialogs 1.2 as QtDialogs
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.private.awesomewidget 1.0 import org.kde.plasma.private.awesomewidget 1.0
@ -42,6 +43,7 @@ Item {
property alias cfg_text: textPattern.text property alias cfg_text: textPattern.text
signal dropSource(string sourceName) signal dropSource(string sourceName)
signal needTextUpdate(string newText)
Column { Column {
@ -197,7 +199,7 @@ Item {
height: implicitHeight height: implicitHeight
width: parent.width width: parent.width
QtControls.ComboBox { QtControls.ComboBox {
width: (parent.width - addTagButton.width - showValueButton.width - addLambdaButton.width) / 2 width: parent.width * 1 / 5
textRole: "label" textRole: "label"
model: [ model: [
{ {
@ -262,10 +264,10 @@ Item {
} }
QtControls.ComboBox { QtControls.ComboBox {
id: tags id: tags
width: (parent.width - addTagButton.width - showValueButton.width - addLambdaButton.width) / 2 width: parent.width * 1 / 5
} }
QtControls.Button { QtControls.Button {
id: addTagButton width: parent.width * 1 / 5
text: i18n("Add") text: i18n("Add")
onClicked: { onClicked: {
@ -278,7 +280,7 @@ Item {
} }
} }
QtControls.Button { QtControls.Button {
id: showValueButton width: parent.width * 1 / 5
text: i18n("Show value") text: i18n("Show value")
onClicked: { onClicked: {
@ -293,7 +295,7 @@ Item {
} }
} }
QtControls.Button { QtControls.Button {
id: addLambdaButton width: parent.width * 1 / 5
text: i18n("Add lambda") text: i18n("Add lambda")
onClicked: { onClicked: {
@ -310,10 +312,18 @@ Item {
height: implicitHeight height: implicitHeight
width: parent.width width: parent.width
QtControls.Button { QtControls.Button {
width: parent.width width: parent.width * 3 / 5
text: i18n("Edit bars") text: i18n("Edit bars")
onClicked: awKeys.editItem("graphicalitem") onClicked: awKeys.editItem("graphicalitem")
} }
QtControls.Button {
width: parent.width * 2 / 5
text: i18n("Preview")
onClicked: {
awKeys.initKeys(textPattern.text)
awKeys.needToBeUpdated()
}
}
} }
QtControls.TextArea { QtControls.TextArea {
@ -325,6 +335,12 @@ Item {
} }
} }
QtDialogs.MessageDialog {
id: compiledText
modality: Qt.NonModal
title: i18n("Preview")
}
// we need to initializate DataEngines here too // we need to initializate DataEngines here too
// because we need to get keys and values // because we need to get keys and values
PlasmaCore.DataSource { PlasmaCore.DataSource {
@ -346,6 +362,8 @@ Item {
interval: 5000 interval: 5000
onNewData: { onNewData: {
// even after a disconnect it is possible that we'll receive an update
if (sourceName == "update") return
if (debug) console.debug("Update source", sourceName) if (debug) console.debug("Update source", sourceName)
awKeys.dataUpdateReceived(sourceName, data) awKeys.dataUpdateReceived(sourceName, data)
} }
@ -369,6 +387,7 @@ Item {
// drop "update" source which does not required by this page // drop "update" source which does not required by this page
extsysmonDE.disconnectSource("update") extsysmonDE.disconnectSource("update")
awKeys.dropSourceFromDataengine.connect(dropSource) awKeys.dropSourceFromDataengine.connect(dropSource)
awKeys.needTextToBeUpdated.connect(needTextUpdate)
// init submodule // init submodule
awKeys.initKeys(plasmoid.configuration.text) awKeys.initKeys(plasmoid.configuration.text)
awKeys.setAggregatorProperty("acOffline", plasmoid.configuration.acOffline) awKeys.setAggregatorProperty("acOffline", plasmoid.configuration.acOffline)
@ -385,4 +404,11 @@ Item {
systemmonitorDE.disconnectSource(sourceName) systemmonitorDE.disconnectSource(sourceName)
} }
onNeedTextUpdate: {
if (debug) console.debug()
compiledText.text = newText.replace(/ /g, " ")
compiledText.open()
}
} }

View File

@ -55,7 +55,10 @@ AWActions::~AWActions()
void AWActions::checkUpdates(const bool showAnyway) void AWActions::checkUpdates(const bool showAnyway)
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Show anyway" << showAnyway;
// showAnyway options requires to show message if no updates found on direct
// request. In case of automatic check no message will be shown
QNetworkAccessManager *manager = new QNetworkAccessManager(this); QNetworkAccessManager *manager = new QNetworkAccessManager(this);
connect(manager, &QNetworkAccessManager::finished, connect(manager, &QNetworkAccessManager::finished,
[showAnyway, this](QNetworkReply *reply) { [showAnyway, this](QNetworkReply *reply) {
@ -77,6 +80,7 @@ bool AWActions::dropCache() const
} }
// HACK: since QML could not use QLoggingCategory I need this hack
bool AWActions::isDebugEnabled() const bool AWActions::isDebugEnabled() const
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
@ -85,18 +89,18 @@ bool AWActions::isDebugEnabled() const
} }
void AWActions::runCmd(const QString cmd) const bool AWActions::runCmd(const QString cmd) const
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Cmd" << cmd; qCDebug(LOG_AW) << "Cmd" << cmd;
QProcess command;
sendNotification(QString("Info"), i18n("Run %1", cmd)); sendNotification(QString("Info"), i18n("Run %1", cmd));
command.startDetached(cmd); return QProcess::startDetached(cmd);
} }
// HACK: this method uses variable from version.h
void AWActions::showReadme() const void AWActions::showReadme() const
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
@ -105,6 +109,7 @@ void AWActions::showReadme() const
} }
// HACK: this method uses variables from version.h
QString AWActions::getAboutText(const QString type) const QString AWActions::getAboutText(const QString type) const
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
@ -184,6 +189,8 @@ QVariantMap AWActions::readDataEngineConfiguration() const
configuration[QString("PLAYERSYMBOLS")] = settings.value(QString("PLAYERSYMBOLS"), QString("10")); configuration[QString("PLAYERSYMBOLS")] = settings.value(QString("PLAYERSYMBOLS"), QString("10"));
settings.endGroup(); settings.endGroup();
qCInfo(LOG_AW) << "Configuration" << configuration;
return configuration; return configuration;
} }
@ -212,6 +219,7 @@ void AWActions::writeDataEngineConfiguration(const QVariantMap configuration) co
} }
// to avoid additional object definition this method is static
void AWActions::sendNotification(const QString eventId, const QString message) void AWActions::sendNotification(const QString eventId, const QString message)
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
@ -259,6 +267,7 @@ void AWActions::versionReplyRecieved(QNetworkReply *reply, const bool showAnyway
qCDebug(LOG_AW); qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Return code" << reply->error(); qCDebug(LOG_AW) << "Return code" << reply->error();
qCDebug(LOG_AW) << "Reply error message" << reply->errorString(); qCDebug(LOG_AW) << "Reply error message" << reply->errorString();
qCDebug(LOG_AW) << "Show anyway" << showAnyway;
QJsonParseError error; QJsonParseError error;
QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll(), &error); QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll(), &error);
@ -275,6 +284,7 @@ void AWActions::versionReplyRecieved(QNetworkReply *reply, const bool showAnyway
version.remove(QString("V.")); version.remove(QString("V."));
qCInfo(LOG_AW) << "Found version" << version; qCInfo(LOG_AW) << "Found version" << version;
// FIXME: possible there is a better way to check versions
int old_major = QString(VERSION).split(QChar('.')).at(0).toInt(); int old_major = QString(VERSION).split(QChar('.')).at(0).toInt();
int old_minor = QString(VERSION).split(QChar('.')).at(1).toInt(); int old_minor = QString(VERSION).split(QChar('.')).at(1).toInt();
int old_patch = QString(VERSION).split(QChar('.')).at(2).toInt(); int old_patch = QString(VERSION).split(QChar('.')).at(2).toInt();

View File

@ -36,7 +36,7 @@ public:
Q_INVOKABLE void checkUpdates(const bool showAnyway = false); Q_INVOKABLE void checkUpdates(const bool showAnyway = false);
Q_INVOKABLE bool dropCache() const; Q_INVOKABLE bool dropCache() const;
Q_INVOKABLE bool isDebugEnabled() const; Q_INVOKABLE bool isDebugEnabled() const;
Q_INVOKABLE void runCmd(const QString cmd = QString("/usr/bin/true")) const; Q_INVOKABLE bool runCmd(const QString cmd = QString("/usr/bin/true")) const;
Q_INVOKABLE void showReadme() const; Q_INVOKABLE void showReadme() const;
// configuration slots // configuration slots
Q_INVOKABLE QString getAboutText(const QString type = QString("header")) const; Q_INVOKABLE QString getAboutText(const QString type = QString("header")) const;
@ -52,8 +52,6 @@ private slots:
void showInfo(const QString version) const; void showInfo(const QString version) const;
void showUpdates(const QString version) const; void showUpdates(const QString version) const;
void versionReplyRecieved(QNetworkReply *reply, const bool showAnyway) const; void versionReplyRecieved(QNetworkReply *reply, const bool showAnyway) const;
private:
}; };

View File

@ -34,8 +34,8 @@ AWDataAggregator::AWDataAggregator(QObject *parent)
initScene(); initScene();
connect(this, SIGNAL(updateData(QHash<QString, QString>)), connect(this, SIGNAL(const updateData(QHash<QString, QString>)),
this, SLOT(dataUpdate(QHash<QString, QString>))); this, SLOT(const dataUpdate(QHash<QString, QString>)));
} }
@ -56,14 +56,6 @@ QList<float> AWDataAggregator::getData(const QString key) const
} }
QSize AWDataAggregator::getTooltipSize() const
{
qCDebug(LOG_AW);
return size;
}
QString AWDataAggregator::htmlImage(const QPixmap source) const QString AWDataAggregator::htmlImage(const QPixmap source) const
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
@ -82,9 +74,10 @@ void AWDataAggregator::setParameters(QVariantMap settings)
qCDebug(LOG_AW); qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Settings" << settings; qCDebug(LOG_AW) << "Settings" << settings;
// cast from QVariantMap to QVariantHash without data lost
configuration = qvariant_cast<QVariantHash>(settings); configuration = qvariant_cast<QVariantHash>(settings);
enablePopup = configuration[QString("notify")].toBool(); m_enablePopup = configuration[QString("notify")].toBool();
counts += configuration[QString("cpuTooltip")].toInt(); counts += configuration[QString("cpuTooltip")].toInt();
counts += configuration[QString("cpuclTooltip")].toInt(); counts += configuration[QString("cpuclTooltip")].toInt();
@ -92,6 +85,8 @@ void AWDataAggregator::setParameters(QVariantMap settings)
counts += configuration[QString("swapTooltip")].toInt(); counts += configuration[QString("swapTooltip")].toInt();
counts += configuration[QString("downTooltip")].toInt(); counts += configuration[QString("downTooltip")].toInt();
counts += configuration[QString("batTooltip")].toInt(); counts += configuration[QString("batTooltip")].toInt();
// resize tooltip image
toolTipView->resize(100.0 * counts, 105.0);
boundaries[QString("cpuTooltip")] = 100.0; boundaries[QString("cpuTooltip")] = 100.0;
boundaries[QString("cpuclTooltip")] = 4000.0; boundaries[QString("cpuclTooltip")] = 4000.0;
@ -100,8 +95,6 @@ void AWDataAggregator::setParameters(QVariantMap settings)
boundaries[QString("downTooltip")] = 1.0; boundaries[QString("downTooltip")] = 1.0;
boundaries[QString("upTooltip")] = 1.0; boundaries[QString("upTooltip")] = 1.0;
boundaries[QString("batTooltip")] = 100.0; boundaries[QString("batTooltip")] = 100.0;
size.setHeight(105.0);
size.setWidth(100.0 * counts);
if (configuration[QString("cpuTooltip")].toBool()) requiredKeys.append(QString("cpuTooltip")); if (configuration[QString("cpuTooltip")].toBool()) requiredKeys.append(QString("cpuTooltip"));
if (configuration[QString("cpuclTooltip")].toBool()) requiredKeys.append(QString("cpuclTooltip")); if (configuration[QString("cpuclTooltip")].toBool()) requiredKeys.append(QString("cpuclTooltip"));
@ -122,10 +115,9 @@ QPixmap AWDataAggregator::tooltipImage()
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
toolTipView->resize(size);
// create image // create image
toolTipScene->clear(); toolTipScene->clear();
QPen pen = QPen(); QPen pen;
bool down = false; bool down = false;
foreach(QString key, requiredKeys) { foreach(QString key, requiredKeys) {
// create frame // create frame
@ -158,7 +150,7 @@ QPixmap AWDataAggregator::tooltipImage()
} }
void AWDataAggregator::dataUpdate(QHash<QString, QString> values) void AWDataAggregator::dataUpdate(const QHash<QString, QString> values)
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
@ -187,7 +179,8 @@ void AWDataAggregator::dataUpdate(QHash<QString, QString> values)
} }
void AWDataAggregator::checkValue(const QString source, const float value, const float extremum) const void AWDataAggregator::checkValue(const QString source, const float value,
const float extremum) const
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Notification source" << source; qCDebug(LOG_AW) << "Notification source" << source;
@ -195,23 +188,24 @@ void AWDataAggregator::checkValue(const QString source, const float value, const
qCDebug(LOG_AW) << "Called with extremum" << extremum; qCDebug(LOG_AW) << "Called with extremum" << extremum;
if (value >= 0.0) { if (value >= 0.0) {
if ((enablePopup) && (value > extremum) && (data[source].last() < extremum)) if ((m_enablePopup) && (value > extremum) && (data[source].last() < extremum))
return AWActions::sendNotification(QString("event"), notificationText(source, value)); return AWActions::sendNotification(QString("event"), notificationText(source, value));
} else { } else {
if ((enablePopup) && (value < extremum) && (data[source].last() > extremum)) if ((m_enablePopup) && (value < extremum) && (data[source].last() > extremum))
return AWActions::sendNotification(QString("event"), notificationText(source, value)); return AWActions::sendNotification(QString("event"), notificationText(source, value));
} }
} }
void AWDataAggregator::checkValue(const QString source, const QString current, const QString received) const void AWDataAggregator::checkValue(const QString source, const QString current,
const QString received) const
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Notification source" << source; qCDebug(LOG_AW) << "Notification source" << source;
qCDebug(LOG_AW) << "Current value" << current; qCDebug(LOG_AW) << "Current value" << current;
qCDebug(LOG_AW) << "Received value" << received; qCDebug(LOG_AW) << "Received value" << received;
if ((enablePopup) && (current != received)) if ((m_enablePopup) && (current != received))
return AWActions::sendNotification(QString("event"), notificationText(source, received)); return AWActions::sendNotification(QString("event"), notificationText(source, received));
} }
@ -238,10 +232,7 @@ QString AWDataAggregator::notificationText(const QString source, const float val
QString output; QString output;
if (source == QString("batTooltip")) { if (source == QString("batTooltip")) {
if (value > 0.0) output = value > 0.0 ? i18n("AC online") : i18n("AC offline");
output = i18n("AC online");
else
output = i18n("AC offline");
} else if (source == QString("cpuTooltip")) { } else if (source == QString("cpuTooltip")) {
output = i18n("High CPU load"); output = i18n("High CPU load");
} else if (source == QString("memTooltip")) { } else if (source == QString("memTooltip")) {

View File

@ -35,17 +35,16 @@ public:
explicit AWDataAggregator(QObject *parent = nullptr); explicit AWDataAggregator(QObject *parent = nullptr);
virtual ~AWDataAggregator(); virtual ~AWDataAggregator();
QList<float> getData(const QString key) const; QList<float> getData(const QString key) const;
QSize getTooltipSize() const;
QString htmlImage(const QPixmap source) const; QString htmlImage(const QPixmap source) const;
void setParameters(QVariantMap settings); void setParameters(QVariantMap settings);
QPixmap tooltipImage(); QPixmap tooltipImage();
signals: signals:
void updateData(QHash<QString, QString> values); void updateData(const QHash<QString, QString> values);
void toolTipPainted(QString image); void toolTipPainted(const QString image) const;
private slots: private slots:
void dataUpdate(QHash<QString, QString> values); void dataUpdate(const QHash<QString, QString> values);
private: private:
// ui // ui
@ -66,9 +65,8 @@ private:
QString currentNetworkDevice = QString("lo"); QString currentNetworkDevice = QString("lo");
QHash<QString, float> boundaries; QHash<QString, float> boundaries;
QHash<QString, QList<float>> data; QHash<QString, QList<float>> data;
bool enablePopup = false; bool m_enablePopup = false;
QStringList requiredKeys; QStringList requiredKeys;
QSize size;
}; };

View File

@ -49,8 +49,8 @@ AWKeys::AWKeys(QObject *parent)
dataAggregator = new AWDataAggregator(this); dataAggregator = new AWDataAggregator(this);
connect(this, SIGNAL(needToBeUpdated()), this, SLOT(dataUpdate())); connect(this, SIGNAL(needToBeUpdated()), this, SLOT(dataUpdate()));
// transfer signal from AWDataAggregator object to QML ui // transfer signal from AWDataAggregator object to QML ui
connect(dataAggregator, SIGNAL(toolTipPainted(QString)), connect(dataAggregator, SIGNAL(toolTipPainted(const QString)),
this, SIGNAL(needToolTipToBeUpdated(QString))); this, SIGNAL(needToolTipToBeUpdated(const QString)));
} }
@ -84,10 +84,10 @@ void AWKeys::initKeys(const QString currentPattern)
qCDebug(LOG_AW) << "Pattern" << currentPattern; qCDebug(LOG_AW) << "Pattern" << currentPattern;
// init // init
pattern = currentPattern; m_pattern = currentPattern;
// update network and hdd list // update network and hdd list
addKeyToCache(QString("Hdd")); addKeyToCache(QString("hdd"));
addKeyToCache(QString("Network")); addKeyToCache(QString("net"));
loadKeysFromCache(); loadKeysFromCache();
} }
@ -100,30 +100,12 @@ void AWKeys::setAggregatorProperty(const QString key, const QVariant value)
} }
void AWKeys::setPopupEnabled(const bool popup)
{
qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Is popup enabled" << popup;
enablePopup = popup;
}
void AWKeys::setWrapNewLines(const bool wrap) void AWKeys::setWrapNewLines(const bool wrap)
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Is wrapping enabled" << wrap; qCDebug(LOG_AW) << "Is wrapping enabled" << wrap;
wrapNewLines = wrap; m_wrapNewLines = wrap;
}
QSize AWKeys::toolTipSize() const
{
qCDebug(LOG_AW);
return dataAggregator->getTooltipSize();
} }
@ -138,13 +120,13 @@ void AWKeys::addDevice(const QString source)
if (source.contains(diskRegexp)) { if (source.contains(diskRegexp)) {
QString device = source; QString device = source;
device.remove(QString("/Rate/rblk")); device.remove(QString("/Rate/rblk"));
addKeyToCache(QString("Disk"), device); addKeyToCache(QString("disk"), device);
} else if (source.contains(mountRegexp)) { } else if (source.contains(mountRegexp)) {
QString device = source; QString device = source;
device.remove(QString("partitions")).remove(QString("/filllevel")); device.remove(QString("partitions")).remove(QString("/filllevel"));
addKeyToCache(QString("Mount"), device); addKeyToCache(QString("mount"), device);
} else if (source.startsWith(QString("lmsensors"))) { } else if (source.startsWith(QString("lmsensors"))) {
addKeyToCache(QString("Temp"), source); addKeyToCache(QString("temp"), source);
} }
} }
@ -182,7 +164,7 @@ QStringList AWKeys::dictKeys(const bool sorted, const QString regexp) const
allKeys.append(QString("cpucl")); allKeys.append(QString("cpucl"));
allKeys.append(QString("cpu")); allKeys.append(QString("cpu"));
// temperature // temperature
for (int i=tempDevices.count()-1; i>=0; i--) for (int i=m_devices[QString("temp")].count()-1; i>=0; i--)
allKeys.append(QString("temp%1").arg(i)); allKeys.append(QString("temp%1").arg(i));
// gputemp // gputemp
allKeys.append(QString("gputemp")); allKeys.append(QString("gputemp"));
@ -207,7 +189,7 @@ QStringList AWKeys::dictKeys(const bool sorted, const QString regexp) const
allKeys.append(QString("swaptotgb")); allKeys.append(QString("swaptotgb"));
allKeys.append(QString("swap")); allKeys.append(QString("swap"));
// hdd // hdd
for (int i=mountDevices.count()-1; i>=0; i--) { for (int i=m_devices[QString("mount")].count()-1; i>=0; i--) {
allKeys.append(QString("hddmb%1").arg(i)); allKeys.append(QString("hddmb%1").arg(i));
allKeys.append(QString("hddgb%1").arg(i)); allKeys.append(QString("hddgb%1").arg(i));
allKeys.append(QString("hddfreemb%1").arg(i)); allKeys.append(QString("hddfreemb%1").arg(i));
@ -217,15 +199,15 @@ QStringList AWKeys::dictKeys(const bool sorted, const QString regexp) const
allKeys.append(QString("hdd%1").arg(i)); allKeys.append(QString("hdd%1").arg(i));
} }
// hdd speed // hdd speed
for (int i=diskDevices.count()-1; i>=0; i--) { for (int i=m_devices[QString("disk")].count()-1; i>=0; i--) {
allKeys.append(QString("hddr%1").arg(i)); allKeys.append(QString("hddr%1").arg(i));
allKeys.append(QString("hddw%1").arg(i)); allKeys.append(QString("hddw%1").arg(i));
} }
// hdd temp // hdd temp
for (int i=hddDevices.count()-1; i>=0; i--) for (int i=m_devices[QString("hdd")].count()-1; i>=0; i--)
allKeys.append(QString("hddtemp%1").arg(i)); allKeys.append(QString("hddtemp%1").arg(i));
// network // network
for (int i=networkDevices.count()-1; i>=0; i--) { for (int i=m_devices[QString("net")].count()-1; i>=0; i--) {
allKeys.append(QString("downunits%1").arg(i)); allKeys.append(QString("downunits%1").arg(i));
allKeys.append(QString("upunits%1").arg(i)); allKeys.append(QString("upunits%1").arg(i));
allKeys.append(QString("downkb%1").arg(i)); allKeys.append(QString("downkb%1").arg(i));
@ -310,8 +292,8 @@ QStringList AWKeys::getHddDevices() const
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
QStringList devices = hddDevices; QStringList devices = m_devices[QString("hdd")];
// required by ui interface // required by selector in the UI
devices.insert(0, QString("disable")); devices.insert(0, QString("disable"));
devices.insert(0, QString("auto")); devices.insert(0, QString("auto"));
@ -325,11 +307,14 @@ void AWKeys::dataUpdateReceived(const QString sourceName, const QVariantMap data
qCDebug(LOG_AW) << "Source" << sourceName; qCDebug(LOG_AW) << "Source" << sourceName;
qCDebug(LOG_AW) << "Data" << data; qCDebug(LOG_AW) << "Data" << data;
if (sourceName == QString("update")) return emit(needToBeUpdated()); // run concurrent data update
#ifdef BUILD_FUTURE
QtConcurrent::run([this, sourceName, data]() { QtConcurrent::run([this, sourceName, data]() {
return setDataBySource(sourceName, data); return setDataBySource(sourceName, data);
}); });
#else /* BUILD_FUTURE */
return setDataBySource(sourceName, data);
#endif /* BUILD_FUTURE */
} }
@ -340,35 +325,29 @@ QString AWKeys::infoByKey(QString key) const
key.remove(QRegExp(QString("^bar[0-9]{1,}"))); key.remove(QRegExp(QString("^bar[0-9]{1,}")));
if (key.startsWith(QString("custom"))) if (key.startsWith(QString("custom")))
foreach(ExtScript *item, extScripts->items()) { return extScripts->itemByTagNumber(key.remove(QString("custom")).toInt())->uniq();
if (item->tag(QString("custom")) != key) continue;
return item->executable();
}
else if (key.contains(QRegExp(QString("^hdd[rw]")))) else if (key.contains(QRegExp(QString("^hdd[rw]"))))
return QString("%1").arg(diskDevices[key.remove(QRegExp(QString("hdd[rw]"))).toInt()]); return QString("%1").arg(m_devices[QString("disk")][key.remove(QRegExp(QString("hdd[rw]"))).toInt()]);
else if (key.contains(QRegExp(QString("^hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb)")))) else if (key.contains(QRegExp(QString("^hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb)"))))
return QString("%1").arg(mountDevices[key.remove(QRegExp(QString("^hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb)"))).toInt()]); return QString("%1").arg(m_devices[QString("mount")][key.remove(QRegExp(QString("^hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb)"))).toInt()]);
else if (key.startsWith(QString("hddtemp"))) else if (key.startsWith(QString("hddtemp")))
return QString("%1").arg(hddDevices[key.remove(QString("hddtemp")).toInt()]); return QString("%1").arg(m_devices[QString("hdd")][key.remove(QString("hddtemp")).toInt()]);
else if (key.contains(QRegExp(QString("^(down|up)[0-9]")))) else if (key.contains(QRegExp(QString("^(down|up)[0-9]"))))
return QString("%1").arg(networkDevices[key.remove(QRegExp(QString("^(down|up)"))).toInt()]); return QString("%1").arg(m_devices[QString("net")][key.remove(QRegExp(QString("^(down|up)"))).toInt()]);
else if (key.startsWith(QString("pkgcount"))) else if (key.startsWith(QString("pkgcount")))
foreach(ExtUpgrade *item, extUpgrade->items()) { return extUpgrade->itemByTagNumber(key.remove(QString("pkgcount")).toInt())->uniq();
if (item->tag(QString("pkgcount")) != key) continue;
return item->executable();
}
else if (key.contains(QRegExp(QString("(^|perc)(ask|bid|price)(chg|)")))) else if (key.contains(QRegExp(QString("(^|perc)(ask|bid|price)(chg|)"))))
foreach(ExtQuotes *item, extQuotes->items()) { return extQuotes->itemByTagNumber(key.remove(QRegExp(QString("(^|perc)(ask|bid|price)(chg|)"))).toInt())->uniq();
if (item->number() != key.remove(QRegExp(QString("(^|perc)(ask|bid|price)(chg|)"))).toInt()) continue; else if (key.contains(QRegExp(QString("(weather|weatherId|humidity|pressure|temperature)"))))
return item->ticker(); return extWeather->itemByTagNumber(key.remove(QRegExp(QString("(weather|weatherId|humidity|pressure|temperature)"))).toInt())->uniq();
}
else if (key.startsWith(QString("temp"))) else if (key.startsWith(QString("temp")))
return QString("%1").arg(tempDevices[key.remove(QString("temp")).toInt()]); return QString("%1").arg(m_devices[QString("temp")][key.remove(QString("temp")).toInt()]);
return QString("(none)"); return QString("(none)");
} }
// HACK this method requires to define tag value from bar from UI interface
QString AWKeys::valueByKey(QString key) const QString AWKeys::valueByKey(QString key) const
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
@ -403,8 +382,7 @@ void AWKeys::dataUpdate()
qCDebug(LOG_AW); qCDebug(LOG_AW);
calculateValues(); calculateValues();
calculateLambdas(); emit(needTextToBeUpdated(parsePattern(m_pattern)));
emit(needTextToBeUpdated(parsePattern()));
emit(dataAggregator->updateData(values)); emit(dataAggregator->updateData(values));
} }
@ -418,35 +396,13 @@ void AWKeys::loadKeysFromCache()
qCInfo(LOG_AW) << "Cache file" << fileName; qCInfo(LOG_AW) << "Cache file" << fileName;
QSettings cache(fileName, QSettings::IniFormat); QSettings cache(fileName, QSettings::IniFormat);
cache.beginGroup(QString("Disk")); foreach(QString group, cache.childGroups()) {
diskDevices.clear(); cache.beginGroup(group);
m_devices.remove(group);
foreach(QString key, cache.allKeys()) foreach(QString key, cache.allKeys())
diskDevices.append(cache.value(key).toString()); m_devices[group].append(cache.value(key).toString());
cache.endGroup();
cache.beginGroup(QString("Hdd"));
hddDevices.clear();
foreach(QString key, cache.allKeys())
hddDevices.append(cache.value(key).toString());
cache.endGroup();
cache.beginGroup(QString("Mount"));
mountDevices.clear();
foreach(QString key, cache.allKeys())
mountDevices.append(cache.value(key).toString());
cache.endGroup();
cache.beginGroup(QString("Network"));
networkDevices.clear();
foreach(QString key, cache.allKeys())
networkDevices.append(cache.value(key).toString());
cache.endGroup();
cache.beginGroup(QString("Temp"));
tempDevices.clear();
foreach(QString key, cache.allKeys())
tempDevices.append(cache.value(key).toString());
cache.endGroup(); cache.endGroup();
}
return reinitKeys(); return reinitKeys();
} }
@ -474,7 +430,7 @@ void AWKeys::reinitKeys()
QStringList allKeys = dictKeys(); QStringList allKeys = dictKeys();
// not documented feature - place all available tags // not documented feature - place all available tags
pattern = pattern.replace(QString("$ALL"), [allKeys](){ m_pattern = m_pattern.replace(QString("$ALL"), [allKeys](){
QStringList strings; QStringList strings;
foreach(QString tag, allKeys) foreach(QString tag, allKeys)
strings.append(QString("%1: $%1").arg(tag)); strings.append(QString("%1: $%1").arg(tag));
@ -483,7 +439,7 @@ void AWKeys::reinitKeys()
// append lists // append lists
// bars // bars
foundBars = [allKeys](QString pattern) { m_foundBars = [allKeys](QString pattern) {
QStringList selectedKeys; QStringList selectedKeys;
foreach(QString key, allKeys) foreach(QString key, allKeys)
if ((key.startsWith(QString("bar"))) && if ((key.startsWith(QString("bar"))) &&
@ -493,10 +449,10 @@ void AWKeys::reinitKeys()
} }
if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No bars found"; if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No bars found";
return selectedKeys; return selectedKeys;
}(pattern); }(m_pattern);
// main key list // main key list
foundKeys = [allKeys](QString pattern) { m_foundKeys = [allKeys](QString pattern) {
QStringList selectedKeys; QStringList selectedKeys;
foreach(QString key, allKeys) foreach(QString key, allKeys)
if ((!key.startsWith(QString("bar"))) && if ((!key.startsWith(QString("bar"))) &&
@ -506,10 +462,10 @@ void AWKeys::reinitKeys()
} }
if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No keys found"; if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No keys found";
return selectedKeys; return selectedKeys;
}(pattern); }(m_pattern);
// lambdas // lambdas
foundLambdas = [](QString pattern) { m_foundLambdas = [](QString pattern) {
QStringList selectedKeys; QStringList selectedKeys;
// substring inside ${{ }} (with brackets) which should not contain ${{ // substring inside ${{ }} (with brackets) which should not contain ${{
QRegularExpression lambdaRegexp(QString("\\$\\{\\{((?!\\$\\{\\{).)*?\\}\\}")); QRegularExpression lambdaRegexp(QString("\\$\\{\\{((?!\\$\\{\\{).)*?\\}\\}"));
@ -528,18 +484,10 @@ void AWKeys::reinitKeys()
} }
if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No lambdas found"; if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No lambdas found";
return selectedKeys; return selectedKeys;
}(pattern); }(m_pattern);
// set key data to aggregator // set key data to aggregator
aggregator->setDevices([this]() { aggregator->setDevices(m_devices);
QHash<QString, QStringList> deviceList;
deviceList[QString("disk")] = diskDevices;
deviceList[QString("hdd")] = hddDevices;
deviceList[QString("mount")] = mountDevices;
deviceList[QString("net")] = networkDevices;
deviceList[QString("temp")] = tempDevices;
return deviceList;
}());
} }
@ -558,7 +506,7 @@ void AWKeys::addKeyToCache(const QString type, const QString key)
foreach(QString key, cache.allKeys()) foreach(QString key, cache.allKeys())
cachedValues.append(cache.value(key).toString()); cachedValues.append(cache.value(key).toString());
if (type == QString("Hdd")) { if (type == QString("hdd")) {
QStringList allDevices = QDir(QString("/dev")).entryList(QDir::System, QDir::Name); QStringList allDevices = QDir(QString("/dev")).entryList(QDir::System, QDir::Name);
QStringList devices = allDevices.filter(QRegExp(QString("^[hms]d[a-z]$"))); QStringList devices = allDevices.filter(QRegExp(QString("^[hms]d[a-z]$")));
foreach(QString dev, devices) { foreach(QString dev, devices) {
@ -567,7 +515,7 @@ void AWKeys::addKeyToCache(const QString type, const QString key)
qCInfo(LOG_AW) << "Found new key" << device << "for type" << type; qCInfo(LOG_AW) << "Found new key" << device << "for type" << type;
cache.setValue(QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')), device); cache.setValue(QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')), device);
} }
} else if (type == QString("Network")) { } else if (type == QString("net")) {
QList<QNetworkInterface> rawInterfaceList = QNetworkInterface::allInterfaces(); QList<QNetworkInterface> rawInterfaceList = QNetworkInterface::allInterfaces();
foreach(QNetworkInterface interface, rawInterfaceList) { foreach(QNetworkInterface interface, rawInterfaceList) {
QString device = interface.name(); QString device = interface.name();
@ -587,29 +535,6 @@ void AWKeys::addKeyToCache(const QString type, const QString key)
} }
void AWKeys::calculateLambdas()
{
qCDebug(LOG_AW);
foreach(QString key, foundLambdas)
values[key] = [this](QString key) {
QScriptEngine engine;
// apply $this values
key.replace(QString("$this"), values[key]);
foreach(QString lambdaKey, foundKeys)
key.replace(QString("$%1").arg(lambdaKey), values[lambdaKey]);
qCInfo(LOG_AW) << "Expression" << key;
QScriptValue result = engine.evaluate(key);
if (engine.hasUncaughtException()) {
int line = engine.uncaughtExceptionLineNumber();
qCWarning(LOG_AW) << "Uncaught exception at line" << line << ":" << result.toString();
return QString();
} else
return result.toString();
}(key);
}
// HACK this method is required since I could not define some values by using // HACK this method is required since I could not define some values by using
// specified pattern. Usually they are values which depend on several others // specified pattern. Usually they are values which depend on several others
void AWKeys::calculateValues() void AWKeys::calculateValues()
@ -617,8 +542,8 @@ void AWKeys::calculateValues()
qCDebug(LOG_AW); qCDebug(LOG_AW);
// hddtot* // hddtot*
foreach(QString device, hddDevices) { foreach(QString device, m_devices[QString("mount")]) {
int index = hddDevices.indexOf(device); int index = m_devices[QString("mount")].indexOf(device);
values[QString("hddtotmb%1").arg(index)] = QString("%1").arg( values[QString("hddtotmb%1").arg(index)] = QString("%1").arg(
values[QString("hddfreemb%1").arg(index)].toFloat() + values[QString("hddfreemb%1").arg(index)].toFloat() +
values[QString("hddmb%1").arg(index)].toFloat(), 5, 'f', 0); values[QString("hddmb%1").arg(index)].toFloat(), 5, 'f', 0);
@ -638,7 +563,7 @@ void AWKeys::calculateValues()
5, 'f', 1); 5, 'f', 1);
// up, down, upkb, downkb, upunits, downunits // up, down, upkb, downkb, upunits, downunits
int netIndex = networkDevices.indexOf(values[QString("netdev")]); int netIndex = m_devices[QString("net")].indexOf(values[QString("netdev")]);
values[QString("down")] = values[QString("down%1").arg(netIndex)]; values[QString("down")] = values[QString("down%1").arg(netIndex)];
values[QString("downkb")] = values[QString("downkb%1").arg(netIndex)]; values[QString("downkb")] = values[QString("downkb%1").arg(netIndex)];
values[QString("downunits")] = values[QString("downunits%1").arg(netIndex)]; values[QString("downunits")] = values[QString("downunits%1").arg(netIndex)];
@ -655,23 +580,41 @@ void AWKeys::calculateValues()
values[QString("swap")] = QString("%1").arg( values[QString("swap")] = QString("%1").arg(
100.0 * values[QString("swapmb")].toFloat() / values[QString("swaptotmb")].toFloat(), 100.0 * values[QString("swapmb")].toFloat() / values[QString("swaptotmb")].toFloat(),
5, 'f', 1); 5, 'f', 1);
// lambdas
foreach(QString key, m_foundLambdas)
values[key] = [this](QString key) {
QScriptEngine engine;
// apply $this values
key.replace(QString("$this"), values[key]);
foreach(QString lambdaKey, m_foundKeys)
key.replace(QString("$%1").arg(lambdaKey), values[lambdaKey]);
qCInfo(LOG_AW) << "Expression" << key;
QScriptValue result = engine.evaluate(key);
if (engine.hasUncaughtException()) {
int line = engine.uncaughtExceptionLineNumber();
qCWarning(LOG_AW) << "Uncaught exception at line" << line << ":" << result.toString();
return QString();
} else
return result.toString();
}(key);
} }
QString AWKeys::parsePattern() const QString AWKeys::parsePattern(QString pattern) const
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
QString parsed = pattern; // screen sign
parsed.replace(QString("$$"), QString("$\\$\\")); pattern.replace(QString("$$"), QString("$\\$\\"));
// lambdas // lambdas
foreach(QString key, foundLambdas) foreach(QString key, m_foundLambdas)
parsed.replace(QString("${{%1}}").arg(key), values[key]); pattern.replace(QString("${{%1}}").arg(key), values[key]);
// main keys // main keys
foreach(QString key, foundKeys) foreach(QString key, m_foundKeys)
parsed.replace(QString("$%1").arg(key), [](QString key, QString value) { pattern.replace(QString("$%1").arg(key), [](QString key, QString value) {
if ((!key.startsWith(QString("custom"))) && if ((!key.startsWith(QString("custom"))) &&
(!key.startsWith(QString("weather")))) (!key.startsWith(QString("weather"))))
value.replace(QString(" "), QString("&nbsp;")); value.replace(QString(" "), QString("&nbsp;"));
@ -679,37 +622,41 @@ QString AWKeys::parsePattern() const
}(key, values[key])); }(key, values[key]));
// bars // bars
foreach(QString bar, foundBars) { foreach(QString bar,m_foundBars) {
GraphicalItem *item = graphicalItems->itemByTag(bar); GraphicalItem *item = graphicalItems->itemByTag(bar);
QString key = bar; QString key = bar;
key.remove(QRegExp(QString("^bar[0-9]{1,}"))); key.remove(QRegExp(QString("^bar[0-9]{1,}")));
if (item->type() == GraphicalItem::Graph) if (item->type() == GraphicalItem::Graph)
parsed.replace(QString("$%1").arg(bar), item->image([](const QList<float> data) { pattern.replace(QString("$%1").arg(bar), item->image([](const QList<float> data) {
return QVariant::fromValue<QList<float>>(data); return QVariant::fromValue<QList<float>>(data);
}(dataAggregator->getData(key)))); }(dataAggregator->getData(key))));
else else
parsed.replace(QString("$%1").arg(bar), item->image(values[key])); pattern.replace(QString("$%1").arg(bar), item->image(values[key]));
} }
// prepare strings // prepare strings
parsed.replace(QString("$\\$\\"), QString("$$")); pattern.replace(QString("$\\$\\"), QString("$$"));
if (wrapNewLines) parsed.replace(QString("\n"), QString("<br>")); if (m_wrapNewLines) pattern.replace(QString("\n"), QString("<br>"));
return parsed; return pattern;
} }
void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data) void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data)
{ {
#ifdef BUILD_FUTURE
// check if data stream is locked // check if data stream is locked
lock = ((lock) && (queue > 0)); lock = ((lock) && (queue > 0));
if (lock) return; if (lock) return;
#endif /* BUILD_FUTURE */
qCDebug(LOG_AW); qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Source" << sourceName; qCDebug(LOG_AW) << "Source" << sourceName;
qCDebug(LOG_AW) << "Data" << data; qCDebug(LOG_AW) << "Data" << data;
// update
if (sourceName == QString("update")) return emit(needToBeUpdated());
// drop if limits are reached // drop if limits are reached
if (++queue > QUEUE_LIMIT) { if (++queue > QUEUE_LIMIT) {
qCWarning(LOG_AW) << "Messages queue" << queue-- << "more than limits" << QUEUE_LIMIT << ", lock"; qCWarning(LOG_AW) << "Messages queue" << queue-- << "more than limits" << QUEUE_LIMIT << ", lock";
@ -718,7 +665,7 @@ void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data)
} }
// first list init // first list init
QStringList tags = aggregator->keyFromSource(sourceName); QStringList tags = aggregator->keysFromSource(sourceName);
if (tags.isEmpty()) if (tags.isEmpty())
tags = aggregator->registerSource(sourceName, data[QString("units")].toString()); tags = aggregator->registerSource(sourceName, data[QString("units")].toString());

View File

@ -42,12 +42,10 @@ public:
explicit AWKeys(QObject *parent = nullptr); explicit AWKeys(QObject *parent = nullptr);
virtual ~AWKeys(); virtual ~AWKeys();
Q_INVOKABLE void initKeys(const QString currentPattern);
Q_INVOKABLE void initDataAggregator(const QVariantMap tooltipParams); Q_INVOKABLE void initDataAggregator(const QVariantMap tooltipParams);
Q_INVOKABLE void initKeys(const QString currentPattern);
Q_INVOKABLE void setAggregatorProperty(const QString key, const QVariant value); Q_INVOKABLE void setAggregatorProperty(const QString key, const QVariant value);
Q_INVOKABLE void setPopupEnabled(const bool popup = false);
Q_INVOKABLE void setWrapNewLines(const bool wrap = false); Q_INVOKABLE void setWrapNewLines(const bool wrap = false);
Q_INVOKABLE QSize toolTipSize() const;
// keys // keys
Q_INVOKABLE void addDevice(const QString source); Q_INVOKABLE void addDevice(const QString source);
Q_INVOKABLE QStringList dictKeys(const bool sorted = false, Q_INVOKABLE QStringList dictKeys(const bool sorted = false,
@ -74,14 +72,12 @@ private slots:
private: private:
// methods // methods
void addKeyToCache(const QString type, const QString key = QString("")); void addKeyToCache(const QString type, const QString key = QString(""));
void calculateLambdas();
void calculateValues(); void calculateValues();
QString parsePattern() const; QString parsePattern(QString pattern) const;
void setDataBySource(const QString sourceName, const QVariantMap data); void setDataBySource(const QString sourceName, const QVariantMap data);
AWKeysAggregator *aggregator = nullptr; AWKeysAggregator *aggregator = nullptr;
AWDataAggregator *dataAggregator = nullptr; AWDataAggregator *dataAggregator = nullptr;
bool enablePopup = false; bool m_wrapNewLines = false;
bool wrapNewLines = false;
ExtItemAggregator<GraphicalItem> *graphicalItems = nullptr; ExtItemAggregator<GraphicalItem> *graphicalItems = nullptr;
ExtItemAggregator<ExtQuotes> *extQuotes = nullptr; ExtItemAggregator<ExtQuotes> *extQuotes = nullptr;
ExtItemAggregator<ExtScript> *extScripts = nullptr; ExtItemAggregator<ExtScript> *extScripts = nullptr;
@ -89,10 +85,10 @@ private:
ExtItemAggregator<ExtWeather> *extWeather = nullptr; ExtItemAggregator<ExtWeather> *extWeather = nullptr;
bool lock = false; bool lock = false;
int queue = 0; int queue = 0;
QString pattern; QString m_pattern;
QStringList foundBars, foundKeys, foundLambdas; QStringList m_foundBars, m_foundKeys, m_foundLambdas;
QHash<QString, QString> values; QHash<QString, QString> values;
QStringList diskDevices, hddDevices, mountDevices, networkDevices, tempDevices; QHash<QString, QStringList> m_devices;
}; };

View File

@ -90,7 +90,7 @@ QString AWKeysAggregator::formater(const QVariant data, const QString key) const
case Quotes: case Quotes:
// first cast // first cast
output = QString("%1").arg(data.toDouble(), 0, 'f'); output = QString("%1").arg(data.toDouble(), 0, 'f');
output = output.leftJustified(8, QLatin1Char(' '), true); output = output.rightJustified(8, QLatin1Char(' '), true);
break; break;
case Temperature: case Temperature:
output = QString("%1").arg(temperature(data.toFloat()), 5, 'f', 1); output = QString("%1").arg(temperature(data.toFloat()), 5, 'f', 1);
@ -140,7 +140,7 @@ QString AWKeysAggregator::formater(const QVariant data, const QString key) const
} }
QStringList AWKeysAggregator::keyFromSource(const QString source) const QStringList AWKeysAggregator::keysFromSource(const QString source) const
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Search for source" << source; qCDebug(LOG_AW) << "Search for source" << source;
@ -502,7 +502,7 @@ QStringList AWKeysAggregator::registerSource(const QString source, const QString
m_formater[key] = NoFormat; m_formater[key] = NoFormat;
} }
return keyFromSource(source); return keysFromSource(source);
} }

View File

@ -65,7 +65,7 @@ public:
virtual ~AWKeysAggregator(); virtual ~AWKeysAggregator();
// get methods // get methods
QString formater(const QVariant data, const QString key) const; QString formater(const QVariant data, const QString key) const;
QStringList keyFromSource(const QString source) const; QStringList keysFromSource(const QString source) const;
// set methods // set methods
void setAcOffline(const QString inactive); void setAcOffline(const QString inactive);
void setAcOnline(const QString active); void setAcOnline(const QString active);

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE 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: 2015-09-11 22:03+0300\n" "POT-Creation-Date: 2015-09-14 10:03+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -312,6 +312,9 @@ msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "" msgstr ""
msgid "Preview"
msgstr ""
msgid "Run %1" msgid "Run %1"
msgstr "" msgstr ""

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" 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: 2015-09-11 22:03+0300\n" "POT-Creation-Date: 2015-09-14 10:03+0300\n"
"PO-Revision-Date: 2015-09-11 22:03+0300\n" "PO-Revision-Date: 2015-09-14 10:04+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: English <kde-russian@lists.kde.ru>\n" "Language-Team: English <kde-russian@lists.kde.ru>\n"
"Language: ru\n" "Language: ru\n"
@ -317,6 +317,9 @@ msgstr "Add lambda"
msgid "Edit bars" msgid "Edit bars"
msgstr "Edit bars" msgstr "Edit bars"
msgid "Preview"
msgstr "Preview"
msgid "Run %1" msgid "Run %1"
msgstr "Run %1" msgstr "Run %1"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" 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: 2015-09-11 22:03+0300\n" "POT-Creation-Date: 2015-09-14 10:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:13+0300\n" "PO-Revision-Date: 2015-07-31 22:13+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Spanish <kde-russian@lists.kde.ru>\n" "Language-Team: Spanish <kde-russian@lists.kde.ru>\n"
@ -328,6 +328,9 @@ msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "Editar barras" msgstr "Editar barras"
msgid "Preview"
msgstr ""
msgid "Run %1" msgid "Run %1"
msgstr "Ejecutar %1" msgstr "Ejecutar %1"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" 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: 2015-09-11 22:03+0300\n" "POT-Creation-Date: 2015-09-14 10:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:16+0300\n" "PO-Revision-Date: 2015-07-31 22:16+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: French <kde-russian@lists.kde.ru>\n" "Language-Team: French <kde-russian@lists.kde.ru>\n"
@ -330,6 +330,9 @@ msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "Modifier les barres" msgstr "Modifier les barres"
msgid "Preview"
msgstr ""
msgid "Run %1" msgid "Run %1"
msgstr "Éxecuter %1" msgstr "Éxecuter %1"

View File

@ -8,7 +8,7 @@ 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: 2015-09-11 22:03+0300\n" "POT-Creation-Date: 2015-09-14 10:03+0300\n"
"PO-Revision-Date: 2015-08-20 22:52+0300\n" "PO-Revision-Date: 2015-08-20 22:52+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Dutch <kde-i18n-nl@kde.org>\n" "Language-Team: Dutch <kde-i18n-nl@kde.org>\n"
@ -329,6 +329,9 @@ msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "Balken bewerken" msgstr "Balken bewerken"
msgid "Preview"
msgstr ""
msgid "Run %1" msgid "Run %1"
msgstr "%1 uitvoeren" msgstr "%1 uitvoeren"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr "" 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: 2015-09-11 22:03+0300\n" "POT-Creation-Date: 2015-09-14 10:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:21+0300\n" "PO-Revision-Date: 2015-07-31 22:21+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n" "Language-Team: Russian <kde-russian@lists.kde.ru>\n"
@ -328,6 +328,9 @@ msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "Editar barras" msgstr "Editar barras"
msgid "Preview"
msgstr ""
msgid "Run %1" msgid "Run %1"
msgstr "Rodar %1" msgstr "Rodar %1"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" 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: 2015-09-11 22:03+0300\n" "POT-Creation-Date: 2015-09-14 10:03+0300\n"
"PO-Revision-Date: 2015-09-11 22:03+0300\n" "PO-Revision-Date: 2015-09-14 10:04+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n" "Language-Team: Russian <kde-russian@lists.kde.ru>\n"
"Language: ru\n" "Language: ru\n"
@ -317,6 +317,9 @@ msgstr "Добавить лямбду"
msgid "Edit bars" msgid "Edit bars"
msgstr "Редактировать бары" msgstr "Редактировать бары"
msgid "Preview"
msgstr "Предварительный просмотр"
msgid "Run %1" msgid "Run %1"
msgstr "Запуск %1" msgstr "Запуск %1"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr "" 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: 2015-09-11 22:03+0300\n" "POT-Creation-Date: 2015-09-14 10:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:23+0300\n" "PO-Revision-Date: 2015-07-31 22:23+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"
@ -328,6 +328,9 @@ msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "Редагувати бари" msgstr "Редагувати бари"
msgid "Preview"
msgstr ""
msgid "Run %1" msgid "Run %1"
msgstr "Запуск %1" msgstr "Запуск %1"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" 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: 2015-09-11 22:03+0300\n" "POT-Creation-Date: 2015-09-14 10:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:24+0300\n" "PO-Revision-Date: 2015-07-31 22:24+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n" "Language-Team: Russian <kde-russian@lists.kde.ru>\n"
@ -330,6 +330,9 @@ msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "可编辑的" msgstr "可编辑的"
msgid "Preview"
msgstr ""
msgid "Run %1" msgid "Run %1"
msgstr "" msgstr ""