Kstars

execute.h
1/*
2 SPDX-FileCopyrightText: 2009 Prakash Mohan <prakash.mohan*@kdemail.net>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "ui_execute.h"
10#include "oal/oal.h"
11#include "oal/session.h"
12#include "skyobjects/skyobject.h"
13
14#include <QDialog>
15
16class GeoLocation;
17class SkyObject;
18
19/**
20 * @class Execute
21 *
22 * Executes an observation session.
23 */
24class Execute : public QDialog
25{
27
28 public:
29 /** @short Default constructor */
30 Execute();
31
32 /**
33 * @short This initializes the combo boxes, and sets up the
34 * dateTime and geolocation from the OL
35 */
36 void init();
37
38 public slots:
39 /**
40 * @short Function to handle the UI when the 'next' button is pressed
41 * This calls the corresponding functions based on the currentIndex
42 */
43 void slotNext();
44
45 /** Function to Save the session details */
46 bool saveSession();
47
48 /**
49 * @short Function to save the user notes set for the current object in the target combo box
50 */
51 void addTargetNotes();
52
53 void slotObserverAdd();
54
55 /** @short Function to add the current observation to the observation list */
56 bool addObservation();
57
58 /**
59 * @short Function to handle the state of current observation, and hiding the execute window
60 */
61 void slotEndSession();
62
63 /** @short Opens the location dialog for setting the current location */
64 void slotLocation();
65
66 /** @short Loads the sessionlist from the OL into the target combo box */
67 void loadTargets();
68
69 /** @short Sorts the target list using the scheduled time */
70 void sortTargetList();
71
72 /**
73 * @short set the currentTarget when the user selection is changed in the target combo box
74 */
75 void slotSetTarget(const QString &name);
76
77 /** @short loads the equipment list from the global logObject into the comboBoxes */
78 void loadEquipment();
79
80 /** @short loads the observer list from the global logObject into the comboBoxes */
81 void loadObservers();
82
83 /** @short loads the observation edit page
84 */
85 void loadObservationTab();
86
87 /**
88 * @short get object name. If star has no name, generate a name based on catalog number.
89 * @param o sky object
90 * @param translated set to true if the translated name is required.
91 */
92 QString getObjectName(const SkyObject *o, bool translated = true);
93
94 void selectNextTarget();
95
96 void loadCurrentItems();
97
98 void slotSetCurrentObjects();
99
100 void slotSlew();
101
102 void slotShowSession();
103
104 void slotShowTargets();
105
106 int findIndexOfTarget(QString);
107
108 void slotAddObject();
109
110 void slotRemoveObject();
111
112 private:
113 Ui::Execute ui;
114 OAL::Session *currentSession { nullptr };
115 OAL::Log *logObject { nullptr };
116 OAL::Observer *currentObserver { nullptr };
117 OAL::Scope *currentScope { nullptr };
118 OAL::Eyepiece *currentEyepiece { nullptr };
119 OAL::Lens *currentLens { nullptr };
120 OAL::Filter *currentFilter { nullptr };
121 GeoLocation *geo { nullptr };
122 SkyObject *currentTarget { nullptr };
123 int nextSession { 0 };
124 int nextObservation { 0 };
125 int nextSite { 0 };
126};
Executes an observation session.
Definition execute.h:25
Execute()
Default constructor.
Definition execute.cpp:21
void slotEndSession()
Function to handle the state of current observation, and hiding the execute window.
Definition execute.cpp:298
void slotLocation()
Opens the location dialog for setting the current location.
Definition execute.cpp:195
void slotNext()
Function to handle the UI when the 'next' button is pressed This calls the corresponding functions ba...
Definition execute.cpp:136
QString getObjectName(const SkyObject *o, bool translated=true)
get object name.
Definition execute.cpp:455
void sortTargetList()
Sorts the target list using the scheduled time.
Definition execute.cpp:240
bool saveSession()
Function to Save the session details.
Definition execute.cpp:164
void addTargetNotes()
Function to save the user notes set for the current object in the target combo box.
Definition execute.cpp:262
void init()
This initializes the combo boxes, and sets up the dateTime and geolocation from the OL.
Definition execute.cpp:70
void loadObservationTab()
loads the observation edit page
Definition execute.cpp:276
void loadTargets()
Loads the sessionlist from the OL into the target combo box.
Definition execute.cpp:206
void loadObservers()
loads the observer list from the global logObject into the comboBoxes
Definition execute.cpp:233
bool addObservation()
Function to add the current observation to the observation list.
Definition execute.cpp:283
void loadEquipment()
loads the equipment list from the global logObject into the comboBoxes
Definition execute.cpp:217
void slotSetTarget(const QString &name)
set the currentTarget when the user selection is changed in the target combo box
Definition execute.cpp:343
Contains all relevant information for specifying a location on Earth: City Name, State/Province name,...
Definition geolocation.h:28
Information of user filters.
Definition filter.h:48
Information of lens utilized in the observation.
Definition lens.h:18
FIXME: why not just use a QHash?
Definition observer.h:20
Information on telescope used in observation.
Definition scope.h:18
Information on session details.
Definition session.h:19
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.