File indexing completed on 2024-04-21 04:56:46
0001 /* 0002 * SPDX-FileCopyrightText: 2016 Aleix Pol Gonzalez <aleixpol@kde.org> 0003 * SPDX-FileCopyrightText: 2020 Piyush Aggarwal <piyushaggarwal002@gmail.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0006 */ 0007 0008 #ifndef CONNECTIVITYACTION_H 0009 #define CONNECTIVITYACTION_H 0010 0011 #include <KLocalizedString> 0012 #include <QFileDialog> 0013 #include <QMenu> 0014 0015 #include "interfaces/dbusinterfaces.h" 0016 0017 #include <dbushelper.h> 0018 0019 namespace connectivity_action 0020 { 0021 const QStringList networkTypesWithIcons{ 0022 // contains the name of network types that have an associated icon in Breeze-icons 0023 QStringLiteral("EDGE"), 0024 QStringLiteral("GPRS"), 0025 QStringLiteral("HSPA"), 0026 QStringLiteral("LTE"), 0027 QStringLiteral("UMTS"), 0028 }; 0029 } 0030 0031 class ConnectivityAction : public QAction 0032 { 0033 Q_OBJECT 0034 public: 0035 ConnectivityAction(DeviceDbusInterface *device); 0036 void update(); 0037 private Q_SLOTS: 0038 void setCellularNetworkStrength(int cellularNetworkStrength); 0039 void setCellularNetworkType(QString cellularNetworkType); 0040 0041 private: 0042 ConnectivityReportDbusInterface m_connectivityiface; 0043 QString m_cellularNetworkType; 0044 int m_cellularNetworkStrength = -1; 0045 }; 0046 0047 #endif // CONNECTIVITYACTION_H