on 2ecb97b help sign in
unity8/plugins/IndicatorsClient/indicators/network/indicatorclient_network.h
51 lines 1.5 kB history raw
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors:
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
18 */
20#ifndef INDICATORCLIENT_NETWORK_H
21#define INDICATORCLIENT_NETWORK_H
23#include "indicatorclient_common.h"
24#include <QTimer>
26class QStateAction;
28class IndicatorClientNetwork : public IndicatorClientCommon
30 Q_OBJECT
31public:
32 IndicatorClientNetwork(QObject *parent=0);
33 ~IndicatorClientNetwork();
35 void init(const QSettings& settings);
36 QQmlComponent *createComponent(QQmlEngine *engine, QObject *parent=0) const;
37 WidgetsMap widgets();
38 bool parseRootElement(const QString &type, QMap<int, QVariant> data);
40private Q_SLOTS:
41 void animationNextFrame();
42 void updateNetworkStatus(const QVariant &state);
44private:
45 QStateAction *m_action;
46 QTimer m_timedAnimation;
48 QString getIconBasedOnSingal(uint signal) const;
49};
51#endif