Kstars

imagingcameradata.cpp
1/*
2 SPDX-FileCopyrightText: 2023 Joseph McGee <joseph.mcgee@sbcglobal.net>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7
8#include "cameragainreadmode.h"
9#include "imagingcameradata.h"
10#include <QAbstractItemModel>
11#include <QVector>
12
13namespace OptimalExposure
14{
15
16int OptimalExposure::ImagingCameraData::getDataClassVersion()
17{
18 return dataClassVersion;
19}
20
21void OptimalExposure::ImagingCameraData::setDataClassVersion(int newClassVersion)
22{
23 dataClassVersion = newClassVersion;
24}
25
26QString OptimalExposure::ImagingCameraData::getCameraId()
27{
28 return cameraId;
29}
30
31void OptimalExposure::ImagingCameraData::setCameraId(QString newCameraId)
32{
33 cameraId = newCameraId;
34}
35
36OptimalExposure::SensorType OptimalExposure::ImagingCameraData::getSensorType() const
37{
38 return sensorType;
39}
40
41void OptimalExposure::ImagingCameraData::setSensorType(SensorType newSensorType)
42{
43 sensorType = newSensorType;
44}
45
46OptimalExposure::GainSelectionType ImagingCameraData::getGainSelectionType() const
47{
48 return gainSelectionType;
49}
50
51void ImagingCameraData::setGainSelectionType(OptimalExposure::GainSelectionType newGainSelectionType)
52{
53 gainSelectionType = newGainSelectionType;
54}
55
56int OptimalExposure::ImagingCameraData::getGainMin()
57{
58 int gainMin = 0;
59 if(getGainSelectionRange().count() > 0) gainMin = getGainSelectionRange()[0];
60 return gainMin;
61}
62
63int OptimalExposure::ImagingCameraData::getGainMax()
64{
65 int gainMax = 0;
66 if(getGainSelectionRange().count() > 0) gainMax = getGainSelectionRange()[getGainSelectionRange().count() - 1];
67 return gainMax;
68}
69
70void ImagingCameraData::setGainSelectionRange(QVector<int> newGainSelectionRange)
71{
72 gainSelectionRange = newGainSelectionRange;
73}
74
75
76
77QVector<int> ImagingCameraData::getGainSelectionRange()
78{
79 return gainSelectionRange;
80}
81
82void OptimalExposure::ImagingCameraData::setCameraGainReadModeVector(QVector<CameraGainReadMode>
83 newCameraGainReadModeVector)
84{
85 CameraGainReadModeVector = newCameraGainReadModeVector;
86}
87
88QVector<OptimalExposure::CameraGainReadMode> OptimalExposure::ImagingCameraData::getCameraGainReadModeVector()
89{
90 return CameraGainReadModeVector;
91}
92
93ImagingCameraData::ImagingCameraData(const QString &cameraId, SensorType sensorType, GainSelectionType gainSelectionType,
94 const QVector<int> &gainSelectionRange, const QVector<CameraGainReadMode> &CameraGainReadModeVector) : cameraId(cameraId),
95 sensorType(sensorType),
96 gainSelectionType(gainSelectionType),
97 gainSelectionRange(gainSelectionRange),
98 CameraGainReadModeVector(CameraGainReadModeVector)
99{}
100
101}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.