Kstars

serialportassistant.h
1 /*
2  SPDX-FileCopyrightText: 2019 Jasem Mutlaq <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QDialog>
10 #include <QStandardItemModel>
11 #include <QNetworkAccessManager>
12 #include <QJsonObject>
13 
14 #include <memory>
15 
16 #include "indi/indistd.h"
17 #include "profileinfo.h"
18 
19 #include "ui_serialportassistant.h"
20 
21 class SerialPortAssistant : public QDialog, public Ui::SerialPortAssistant
22 {
23  public:
24  explicit SerialPortAssistant(ProfileInfo *profile, QWidget *parent = nullptr);
25 
26  void addDevice(ISD::GenericDevice *device);
27 
28 
29  private:
30  bool loadRules();
31  bool removeActiveRule();
32  bool addRule(const QJsonObject &rule);
33  void addDevicePage(ISD::GenericDevice *device);
34  void gotoDevicePage(ISD::GenericDevice *device);
35  void resetCurrentPage();
36 
37  void scanDevices();
38  void parseDevices();
39  void discoverDevice();
40 
42 
43  std::unique_ptr<QStandardItemModel> model;
44  ISD::GenericDevice *m_CurrentDevice { nullptr };
45  const ProfileInfo *m_Profile;
46 
47  QNetworkAccessManager manager;
48 };
MODEMMANAGERQT_EXPORT void scanDevices()
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.