Kstars

customdrivers.h
1/*
2 SPDX-FileCopyrightText: 2018 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QDialog>
10#include <QVariantMap>
11#include <QSqlTableModel>
12#include <QPointer>
13
14#include "ui_customdrivers.h"
15
16class DriverInfo;
17
18/**
19 * @class CustomDrivers
20 * @short Handles adding new drivers to database. This would enable to add arbitrary aliases of existing drivers.
21 *
22 * @author Jasem Mutlaq
23 * @version 1.0
24 */
25class CustomDrivers : public QDialog, public Ui::CustomDrivers
26{
28
29 public:
30 explicit CustomDrivers(QWidget *parent, const QList<QSharedPointer<DriverInfo>> &driversList);
32
33 const QList<QVariantMap> & customDrivers() const { return m_CustomDrivers; }
34 void refreshFromDB();
35
36 protected slots:
37 void syncDriver();
38 void addDriver();
39 void removeDriver();
40
41 private:
42
43 QList<QVariantMap> m_CustomDrivers;
44 const QList<QSharedPointer<DriverInfo>> &m_DriversList;
45
46 QSqlDatabase userdb;
48};
49
Handles adding new drivers to database.
DriverInfo holds all metadata associated with a particular INDI driver.
Definition driverinfo.h:46
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.