Kstars

stellarsolverprofileeditor.h
1 /*
2  SPDX-FileCopyrightText: 2017 Jasem Mutlaq <[email protected]>
3  SPDX-FileCopyrightText: 2017 Robert Lancaster <[email protected]>
4 
5  SPDX-License-Identifier: GPL-2.0-or-later
6 */
7 
8 #pragma once
9 
10 #include "ui_stellarsolverprofileeditor.h"
11 #include "parameters.h"
12 #include "stellarsolverprofile.h"
13 
14 
15 #include <QWidget>
16 #include <QDir>
17 
18 class KConfigDialog;
19 
20 namespace Ekos
21 {
22 class Align;
23 
24 class StellarSolverProfileEditor : public QWidget, public Ui::StellarSolverProfileEditor
25 {
26  Q_OBJECT
27 
28  public:
29  void setProfileGroup(ProfileGroup group);
30 
31  explicit StellarSolverProfileEditor(QWidget *parent, ProfileGroup group, KConfigDialog *dialog);
32  virtual ~StellarSolverProfileEditor() override = default;
33 
34  //These functions handle the settings for the Sextractors and Solvers
35  SSolver::Parameters getSettingsFromUI();
36  void sendSettingsToUI(SSolver::Parameters a);
37 
38  //These functions save and load the settings of the program.
39  void openSingleProfile();
40  void saveSingleProfile();
41  void copySingleProfile();
42  void loadProfiles();
43  void saveProfiles();
44  void loadOptionsProfile();
45  void loadOptionsProfileIgnoreOldSettings(int index);
46  void saveBackupProfiles();
47  void openBackupProfiles();
48  QList<SSolver::Parameters> getDefaultProfiles();
49  void loadDefaultProfiles();
50 
51  void connectOptionsProfileComboBox();
52  void disconnectOptionsProfileComboBox();
53  public slots:
54  void loadProfile(int profile);
55  signals:
56  void optionsProfilesUpdated();
57  protected:
58 
59  private slots:
60 
61  void slotApply();
62 
63 
64  private:
65  QString savedOptionsProfiles;
66  int openOptionsProfileNum = 0;
67  void settingJustChanged();
68  QString dirPath = QDir::homePath();
69  QList<SSolver::Parameters> optionsList;
70  bool optionsAreSaved = true;
71  KConfigDialog *m_ConfigDialog { nullptr };
72 
73  ProfileGroup selectedProfileGroup = AlignProfiles;
74 };
75 }
Q_OBJECTQ_OBJECT
Ekos is an advanced Astrophotography tool for Linux. It is based on a modular extensible framework to...
Definition: align.cpp:66
QString homePath()
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 03:57:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.