interval: 100; running: true; repeat: true;
onTriggered: root.now = new Date
}
-/*
+
Connections {
target: weather
temperature_item.text = temperature.split(".")[0] + '°F'
}
}
-*/
+
RowLayout {
anchors.fill: parent
spacing: 0
fillMode: Image.PreserveAspectFit
property string deviceName: "none"
property bool connStatus: false
-/*
Connections {
target: bluetooth
bt_icon.connStatus = state
}
}
-*/
}
-/*
Repeater {
model: StatusBarModel { objectName: "statusBar" }
delegate: Image {
fillMode: Image.PreserveAspectFit
}
}
-*/
}
}
}
#include <QQuickWindow>
#include <QTimer>
-#if 0
#include <weather.h>
#include <bluetooth.h>
-#endif
+
#include "applicationlauncher.h"
#include "statusbarmodel.h"
#include "mastervolume.h"
context->setContextProperty("homescreenHandler", homescreenHandler);
context->setContextProperty("launcher", launcher);
-#if 0
- context->setContextProperty("weather", new Weather(bindingAddress));
- context->setContextProperty("bluetooth", new Bluetooth(bindingAddress, context));
-#endif
+ context->setContextProperty("weather", new Weather());
+ context->setContextProperty("bluetooth", new Bluetooth(false, context));
+
// we add it here even if we don't use it
context->setContextProperty("shell", aglShell);
#include "statusbarmodel.h"
#include "statusbarserver.h"
-#if 0
-#include "network.h"
-#endif
+#include <network.h>
+#include <wifiadapter.h>
class StatusBarModel::Private
{
public:
StatusBarServer server;
QString iconList[StatusBarServer::SupportedCount];
-#if 0
Network *network;
WifiAdapter *wifi_a;
-#endif
};
StatusBarModel::Private::Private(StatusBarModel *parent)
void StatusBarModel::init(QQmlContext *context)
{
-#if 0
- d->network = new Network(url, context);
+ d->network = new Network(false, context);
context->setContextProperty("network", d->network);
d->wifi_a = static_cast<WifiAdapter*>(d->network->findAdapter("wifi"));
Q_CHECK_PTR(d->wifi_a);
this, &StatusBarModel::onWifiStrengthChanged);
setWifiStatus(d->wifi_a->wifiConnected(), d->wifi_a->wifiEnabled(), d->wifi_a->wifiStrength());
-#endif
}
void StatusBarModel::setWifiStatus(bool connected, bool enabled, int strength)
{
-#if 0
if (enabled && connected)
if (strength < 30)
d->server.setStatusIcon(0, QStringLiteral("qrc:/images/Status/HMI_Status_Wifi_1Bar-01.png"));
d->server.setStatusIcon(0, QStringLiteral("qrc:/images/Status/HMI_Status_Wifi_Full-01.png"));
else
d->server.setStatusIcon(0, QStringLiteral("qrc:/images/Status/HMI_Status_Wifi_NoBars-01.png"));
-#endif
}
void StatusBarModel::onWifiConnectedChanged(bool connected)
{
-#if 0
setWifiStatus(connected, d->wifi_a->wifiEnabled(), d->wifi_a->wifiStrength());
-#endif
}
void StatusBarModel::onWifiEnabledChanged(bool enabled)
{
-#if 0
setWifiStatus(d->wifi_a->wifiConnected(), enabled, d->wifi_a->wifiStrength());
-#endif
}
void StatusBarModel::onWifiStrengthChanged(int strength)
{
-#if 0
qInfo() << "Strength changed: " << strength;
setWifiStatus(d->wifi_a->wifiConnected(), d->wifi_a->wifiEnabled(), strength);
-#endif
}
int StatusBarModel::rowCount(const QModelIndex &parent) const