Kstars

filter.h
1/*
2 SPDX-FileCopyrightText: 2009 Prakash Mohan <prakash.mohan@kdemail.net>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6#pragma once
7
8#include "oal/oal.h"
9#include <QString>
10#include "ekos/ekos.h"
11
12#define NULL_FILTER "--"
13
14struct filterProperties
15{
16 QString vendor;
17 QString model;
18 QString type;
19 QString color;
20 int offset;
21 double exposure;
22 bool useAutoFocus;
23 QString lockedFilter;
24 int absFocusPos;
25 double focusTemperature;
26 double focusAltitude;
27 double focusTicksPerTemp;
28 double focusTicksPerAlt;
29 double wavelength;
30
31 filterProperties(QString _vendor, QString _model, QString _type, QString _color,
32 int _offset = 0, double _exposure = 1.0, bool _useAutoFocus = false, QString _lockedFilter = NULL_FILTER,
33 int _absFocusPos = 0, double _focusTemperature = Ekos::INVALID_VALUE, double _focusAltitude = Ekos::INVALID_VALUE,
34 double _focusTicksPerTemp = 0.0, double _focusTicksPerAlt = 0.0, double _wavelength = 500.0) :
35 vendor(_vendor), model(_model), type(_type), color(_color),
36 offset(_offset), exposure(_exposure), useAutoFocus(_useAutoFocus), lockedFilter(_lockedFilter),
37 absFocusPos(_absFocusPos), focusTemperature(_focusTemperature), focusAltitude(_focusAltitude),
38 focusTicksPerTemp(_focusTicksPerTemp), focusTicksPerAlt(_focusTicksPerAlt), wavelength(_wavelength) {}
39};
40
41/**
42 * @class OAL::Filter
43 *
44 * Information of user filters
45 */
46
48{
49 public:
50 Filter(const QString &id, const filterProperties *fp);
51
52 QString id() const
53 {
54 return m_Id;
55 }
56 QString name() const
57 {
58 return m_Name;
59 }
60 QString model() const
61 {
62 return m_Model;
63 }
64 QString vendor() const
65 {
66 return m_Vendor;
67 }
68 QString type() const
69 {
70 return m_Type;
71 }
72 QString color() const
73 {
74 return m_Color;
75 }
76
77 // Additional fields used by Ekos
78 int offset() const
79 {
80 return m_Offset;
81 }
82 void setOffset(int _offset)
83 {
84 m_Offset = _offset;
85 }
86
87 double exposure() const
88 {
89 return m_Exposure;
90 }
91 void setExposure(double _exposure)
92 {
93 m_Exposure = _exposure;
94 }
95
96 QString lockedFilter() const
97 {
98 return m_LockedFilter;
99 }
100 void setLockedFilter(const QString &_filter)
101 {
102 m_LockedFilter = _filter;
103 }
104
105 bool useAutoFocus() const
106 {
107 return m_UseAutoFocus;
108 }
109 void setUseAutoFocus(bool enabled)
110 {
111 m_UseAutoFocus = enabled;
112 }
113
114 int absoluteFocusPosition()
115 {
116 return m_AbsoluteFocusPosition;
117 }
118 void setAbsoluteFocusPosition(int newAbsFocusPos)
119 {
120 m_AbsoluteFocusPosition = newAbsFocusPos;
121 }
122
123 double focusTemperature()
124 {
125 return m_FocusTemperature;
126 }
127 void setFocusTemperature(double newFocusTemperature)
128 {
129 m_FocusTemperature = newFocusTemperature;
130 }
131
132 double focusAltitude()
133 {
134 return m_FocusAltitude;
135 }
136 void setFocusAltitude(double newFocusAltitude)
137 {
138 m_FocusAltitude = newFocusAltitude;
139 }
140
141 double focusTicksPerTemp()
142 {
143 return m_FocusTicksPerTemp;
144 }
145 void setFocusTicksPerTemp(double newFocusTicksPerTemp)
146 {
147 m_FocusTicksPerTemp = newFocusTicksPerTemp;
148 }
149
150 double focusTicksPerAlt()
151 {
152 return m_FocusTicksPerAlt;
153 }
154 void setFocusTicksPerAlt(double newFocusTicksPerAlt)
155 {
156 m_FocusTicksPerAlt = newFocusTicksPerAlt;
157 }
158
159 double wavelength()
160 {
161 return m_Wavelength;
162 }
163 void setWavelength(double newWavelength)
164 {
165 m_Wavelength = newWavelength;
166 }
167
168 private:
169 QString m_Id, m_Model, m_Vendor, m_Type, m_Color, m_Name, m_LockedFilter;
170 int m_Offset { 0 };
171 int m_AbsoluteFocusPosition { 0 };
172 double m_Exposure { 1.0 };
173 bool m_UseAutoFocus { false };
174 double m_FocusTemperature { 0 };
175 double m_FocusAltitude { 0 };
176 double m_FocusTicksPerTemp { 0 };
177 double m_FocusTicksPerAlt { 0 };
178 double m_Wavelength { 0 };
179};
Information of user filters.
Definition filter.h:48
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:59:52 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.