Kstars

opships.h
1 /*
2  SPDX-FileCopyrightText: 2017 Jasem Mutlaq <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "ui_opships.h"
10 #include "ui_opshipsdisplay.h"
11 #include "ui_opshipscache.h"
12 
13 class KConfigDialog;
14 class FileDownloader;
15 
16 class OpsHIPSDisplay : public QFrame, public Ui::OpsHIPSDisplay
17 {
18  Q_OBJECT
19 
20  public:
21  explicit OpsHIPSDisplay();
22 };
23 
24 class OpsHIPSCache : public QFrame, public Ui::OpsHIPSCache
25 {
26  Q_OBJECT
27 
28  public:
29  explicit OpsHIPSCache();
30 };
31 
32 /**
33  * @class OpsHIPS
34  *
35  * HIPS Settings including download of external sources and enabling/disabling them accordingly.
36  *
37  * @author Jasem Mutlaq
38  */
39 class OpsHIPS : public QFrame, public Ui::OpsHIPS
40 {
41  Q_OBJECT
42 
43  public:
44  explicit OpsHIPS();
45  virtual ~OpsHIPS() override = default;
46 
47  public slots:
48  void slotRefresh();
49 
50  protected slots:
51  void downloadReady();
52  void downloadError(const QString &errorString);
53  void previewReady();
54  void slotItemUpdated(QListWidgetItem *item);
55  void slotItemClicked(QListWidgetItem *item);
56 
57  private:
58 
59  void setPreview(const QString &id, const QString &url);
60 
61  KConfigDialog *m_ConfigDialog { nullptr };
62  FileDownloader *downloadJob { nullptr };
63  FileDownloader *previewJob { nullptr };
64 
66  bool dirty { false };
67 };
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 03:57:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.