mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-14 22:35:49 +00:00
drop own workaround for update functions
use qtimer instead
This commit is contained in:
@ -29,7 +29,6 @@
|
||||
#include "sources/playersource.h"
|
||||
#include "sources/processessource.h"
|
||||
#include "sources/quotessource.h"
|
||||
#include "sources/updatesource.h"
|
||||
#include "sources/upgradesource.h"
|
||||
#include "sources/weathersource.h"
|
||||
#include "version.h"
|
||||
@ -140,10 +139,6 @@ void ExtSysMonAggregator::init(const QHash<QString, QString> config)
|
||||
AbstractExtSysMonSource *quotesItem = new QuotesSource(this, QStringList());
|
||||
for (auto source : quotesItem->sources())
|
||||
m_map[source] = quotesItem;
|
||||
// update
|
||||
AbstractExtSysMonSource *updateItem = new UpdateSource(this, QStringList());
|
||||
for (auto source : updateItem->sources())
|
||||
m_map[source] = updateItem;
|
||||
// upgrade
|
||||
AbstractExtSysMonSource *upgradeItem
|
||||
= new UpgradeSource(this, QStringList());
|
||||
|
@ -1,69 +0,0 @@
|
||||
/***************************************************************************
|
||||
* 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 "updatesource.h"
|
||||
|
||||
#include "awdebug.h"
|
||||
|
||||
|
||||
UpdateSource::UpdateSource(QObject *parent, const QStringList args)
|
||||
: AbstractExtSysMonSource(parent, args)
|
||||
{
|
||||
Q_ASSERT(args.count() == 0);
|
||||
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
|
||||
}
|
||||
|
||||
|
||||
UpdateSource::~UpdateSource()
|
||||
{
|
||||
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
|
||||
}
|
||||
|
||||
|
||||
QVariant UpdateSource::data(QString source)
|
||||
{
|
||||
qCDebug(LOG_ESM) << "Source" << source;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
QVariantMap UpdateSource::initialData(QString source) const
|
||||
{
|
||||
qCDebug(LOG_ESM) << "Source" << source;
|
||||
|
||||
QVariantMap data;
|
||||
if (source == QString("update")) {
|
||||
data[QString("min")] = true;
|
||||
data[QString("max")] = true;
|
||||
data[QString("name")] = QString("Simple value which is always true");
|
||||
data[QString("type")] = QString("bool");
|
||||
data[QString("units")] = QString("");
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
QStringList UpdateSource::sources() const
|
||||
{
|
||||
QStringList sources;
|
||||
sources.append(QString("update"));
|
||||
|
||||
return sources;
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
/***************************************************************************
|
||||
* 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 UPDATESOURCE_H
|
||||
#define UPDATESOURCE_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "abstractextsysmonsource.h"
|
||||
|
||||
|
||||
class UpdateSource : public AbstractExtSysMonSource
|
||||
{
|
||||
public:
|
||||
explicit UpdateSource(QObject *parent, const QStringList args);
|
||||
virtual ~UpdateSource();
|
||||
QVariant data(QString source);
|
||||
QVariantMap initialData(QString source) const;
|
||||
void run(){};
|
||||
QStringList sources() const;
|
||||
};
|
||||
|
||||
|
||||
#endif /* UPDATESOURCE_H */
|
Reference in New Issue
Block a user