Kstars

customdrivers.h
1 /*
2  SPDX-FileCopyrightText: 2018 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 <QVariantMap>
11 #include <QSqlTableModel>
12 #include <QPointer>
13 
14 #include "ui_customdrivers.h"
15 
16 class 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  */
25 class CustomDrivers : public QDialog, public Ui::CustomDrivers
26 {
27  Q_OBJECT
28 
29  public:
30  explicit CustomDrivers(QWidget *parent, const QList<DriverInfo *> &driversList);
31  ~CustomDrivers();
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<DriverInfo *> &m_DriversList;
45 
46  QSqlDatabase userdb;
48 };
49 
Q_OBJECTQ_OBJECT
Handles adding new drivers to database. This would enable to add arbitrary aliases of existing driver...
Definition: customdrivers.h:25
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 03:57:50 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.