Warning, file /plasma/plasma-nm/libs/editor/widgets/mobileconnectionwizard.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     SPDX-FileCopyrightText: 2010-2011 Lamarque Souza <lamarque@kde.org>
0003     SPDX-FileCopyrightText: 2013 Lukas Tinkl <ltinkl@redhat.com>
0004 
0005     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0006 */
0007 
0008 #ifndef PLASMA_NM_MOBILE_CONNECTION_WIZARD_H
0009 #define PLASMA_NM_MOBILE_CONNECTION_WIZARD_H
0010 
0011 #include <QLabel>
0012 #include <QListWidget>
0013 #include <QRadioButton>
0014 #include <QWizardPage>
0015 
0016 #include <KComboBox>
0017 #include <KLineEdit>
0018 
0019 #include <NetworkManagerQt/ConnectionSettings>
0020 #include <NetworkManagerQt/Manager>
0021 
0022 #include "mobileproviders.h"
0023 
0024 class Q_DECL_EXPORT MobileConnectionWizard : public QWizard
0025 {
0026     Q_OBJECT
0027 public:
0028     /*
0029      * Do not use NetworkManager::ConnectionSettings::Bluetooth here, use either NetworkManager::ConnectionSettings::Gsm
0030      * or NetworkManager::ConnectionSettings::Cdma.
0031      */
0032     explicit MobileConnectionWizard(NetworkManager::ConnectionSettings::ConnectionType connectionType = NetworkManager::ConnectionSettings::Unknown,
0033                                     QWidget *parent = nullptr);
0034     ~MobileConnectionWizard() override;
0035 
0036     /*
0037      * Returns the information to configure one connection from the last wizard run.
0038      * The format is:
0039      * for GSM connections: provider's name + QList of Gsm NetworkIds for that provider (can be an empty QList) + QMap with apn information
0040      * where apn information is: dial number + apn + apn name (optional) + username (optional) + password (optional) + QList of name servers (optional)
0041      *
0042      * for CDMA connections: provider's name + QMap with cdma information.
0043      * where cdma information is: name (optional) + username (optional) + password (optional) + list of sids (optional)
0044      */
0045     QVariantList args();
0046 
0047     NetworkManager::ConnectionSettings::ConnectionType type() const
0048     {
0049         return mType;
0050     }
0051     MobileProviders::ErrorCodes getError();
0052 
0053 private Q_SLOTS:
0054     void introDeviceAdded(const QString &uni);
0055     void introDeviceRemoved(const QString &uni);
0056     void introStatusChanged(NetworkManager::Status);
0057     void slotEnablePlanEditBox(int index);
0058     void slotEnableProviderEdit(bool enable);
0059     void slotCheckProviderEdit();
0060     void slotCheckProviderList();
0061 
0062 private:
0063     QWizardPage *createIntroPage();
0064     QWizardPage *createCountryPage();
0065     QWizardPage *createProvidersPage();
0066     QWizardPage *createPlansPage();
0067     QWizardPage *createConfirmPage();
0068     void initializePage(int id) override;
0069     int nextId() const override;
0070 
0071     MobileProviders *mProviders;
0072     QString country;
0073     QString provider;
0074     QString apn;
0075     NetworkManager::ConnectionSettings::ConnectionType mType;
0076     bool mInitialMethodType;
0077 
0078     // Intro page
0079     KComboBox *mDeviceComboBox = nullptr;
0080     void introAddInitialDevices();
0081     void introRemoveAllDevices();
0082     void introAddDevice(const NetworkManager::Device::Ptr &device);
0083 
0084     // Country page
0085     QListWidget *mCountryList = nullptr;
0086 
0087     // Providers page
0088     QListWidget *mProvidersList = nullptr;
0089     QRadioButton *radioAutoProvider = nullptr;
0090     QRadioButton *radioManualProvider = nullptr;
0091     KLineEdit *lineEditProvider = nullptr;
0092 
0093     // Plan page
0094     KComboBox *mPlanComboBox = nullptr;
0095     KLineEdit *userApn = nullptr;
0096 
0097     // Confirm page
0098     QLabel *labelProvider = nullptr;
0099     QLabel *labelPlanLabel = nullptr;
0100     QLabel *labelPlan = nullptr;
0101     QLabel *labelApn = nullptr;
0102 };
0103 #endif // PLASMA_NM_MOBILE_CONNECTION_WIZARD_H