Warning, file /education/kstars/kstars/ekos/capture/exposurecalculator/imagingcameradata.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     SPDX-FileCopyrightText: 2023 Joseph McGee <joseph.mcgee@sbcglobal.net>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 
0008 #include "cameragainreadmode.h"
0009 #include "imagingcameradata.h"
0010 #include <QAbstractItemModel>
0011 #include <QVector>
0012 
0013 namespace OptimalExposure
0014 {
0015 
0016 int OptimalExposure::ImagingCameraData::getDataClassVersion()
0017 {
0018     return dataClassVersion;
0019 }
0020 
0021 void OptimalExposure::ImagingCameraData::setDataClassVersion(int newClassVersion)
0022 {
0023     dataClassVersion = newClassVersion;
0024 }
0025 
0026 QString OptimalExposure::ImagingCameraData::getCameraId()
0027 {
0028     return cameraId;
0029 }
0030 
0031 void OptimalExposure::ImagingCameraData::setCameraId(QString newCameraId)
0032 {
0033     cameraId = newCameraId;
0034 }
0035 
0036 OptimalExposure::SensorType OptimalExposure::ImagingCameraData::getSensorType() const
0037 {
0038     return sensorType;
0039 }
0040 
0041 void OptimalExposure::ImagingCameraData::setSensorType(SensorType newSensorType)
0042 {
0043     sensorType = newSensorType;
0044 }
0045 
0046 OptimalExposure::GainSelectionType ImagingCameraData::getGainSelectionType() const
0047 {
0048     return gainSelectionType;
0049 }
0050 
0051 void ImagingCameraData::setGainSelectionType(OptimalExposure::GainSelectionType newGainSelectionType)
0052 {
0053     gainSelectionType = newGainSelectionType;
0054 }
0055 
0056 int OptimalExposure::ImagingCameraData::getGainMin()
0057 {
0058     int gainMin = 0;
0059     if(getGainSelectionRange().count() > 0) gainMin = getGainSelectionRange()[0];
0060     return gainMin;
0061 }
0062 
0063 int OptimalExposure::ImagingCameraData::getGainMax()
0064 {
0065     int gainMax = 0;
0066     if(getGainSelectionRange().count() > 0) gainMax = getGainSelectionRange()[getGainSelectionRange().count() - 1];
0067     return gainMax;
0068 }
0069 
0070 void ImagingCameraData::setGainSelectionRange(QVector<int> newGainSelectionRange)
0071 {
0072     gainSelectionRange = newGainSelectionRange;
0073 }
0074 
0075 
0076 
0077 QVector<int> ImagingCameraData::getGainSelectionRange()
0078 {
0079     return gainSelectionRange;
0080 }
0081 
0082 void OptimalExposure::ImagingCameraData::setCameraGainReadModeVector(QVector<CameraGainReadMode>
0083         newCameraGainReadModeVector)
0084 {
0085     CameraGainReadModeVector = newCameraGainReadModeVector;
0086 }
0087 
0088 QVector<OptimalExposure::CameraGainReadMode> OptimalExposure::ImagingCameraData::getCameraGainReadModeVector()
0089 {
0090     return CameraGainReadModeVector;
0091 }
0092 
0093 ImagingCameraData::ImagingCameraData(const QString &cameraId, SensorType sensorType, GainSelectionType gainSelectionType,
0094                                      const QVector<int> &gainSelectionRange, const QVector<CameraGainReadMode> &CameraGainReadModeVector) : cameraId(cameraId),
0095     sensorType(sensorType),
0096     gainSelectionType(gainSelectionType),
0097     gainSelectionRange(gainSelectionRange),
0098     CameraGainReadModeVector(CameraGainReadModeVector)
0099 {}
0100 
0101 }