Kstars

placeholderpath.h
1 /*
2  SPDX-FileCopyrightText: 2021 Kwon-Young Choi <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 
8 #ifndef PLACEHOLDERPATH
9 #define PLACEHOLDERPATH
10 
11 #include <lilxml.h>
12 #include "indi/indistd.h"
13 
14 #include <QDebug>
15 #include <QFileInfo>
16 
17 class QString;
18 class SchedulerJob;
19 
20 namespace Ekos
21 {
22 
23 class SequenceJob;
24 
25 class PlaceholderPath
26 {
27  public:
28  PlaceholderPath(QString seqFilename);
29  PlaceholderPath();
30  ~PlaceholderPath();
31 
32  void processJobInfo(SequenceJob *job, QString targetName);
33  void addJob(SequenceJob *job, QString targetName);
34  void constructPrefix(SequenceJob *job, QString &imagePrefix);
35  void generateFilenameOld(
36  const QString &format, bool batch_mode, QString *filename,
37  QString fitsDir, QString seqPrefix, int nextSequenceID);
38  void generateFilename(QString format, SequenceJob &job, QString targetName, bool batch_mode, int nextSequenceID,
39  const QString &extension,
40  QString *filename) const;
41  void generateFilename(QString format, bool tsEnabled, bool batch_mode,
42  int nextSequenceID, const QString &extension, QString *filename) const;
43  void generateFilename(QString format, QString rawFilePrefix, bool filterEnabled, bool exposureEnabled,
44  bool tsEnabled, bool isDarkFlat, QString filter, CCDFrameType frameType, double exposure, QString targetName,
45  bool batch_mode, int nextSequenceID, const QString &extension, QString *filename) const;
46 
47  void setGenerateFilenameSettings(const SequenceJob &job);
48  void setSeqFilename(QString name)
49  {
50  m_seqFilename = name;
51  }
52  static QStringList remainingPlaceholders(QString filename);
53 
54  private:
55  QString getFrameType(CCDFrameType frameType) const
56  {
57  if (m_frameTypes.contains(frameType))
58  {
59  return m_frameTypes[frameType];
60  }
61 
62  qWarning() << frameType << " not in " << m_frameTypes.keys();
63  return "";
64  }
65 
66  QMap<CCDFrameType, QString> m_frameTypes;
67  QFileInfo m_seqFilename;
68  QString m_RawPrefix;
69  bool m_filterPrefixEnabled { false };
70  bool m_expPrefixEnabled { false };
71  bool m_DarkFlat {false};
72  QString m_filter;
73  CCDFrameType m_frameType { FRAME_LIGHT };
74  double m_exposure { -1 };
75  QString m_targetName;
76 };
77 
78 }
79 
80 #endif /* ifndef PLACEHOLDERPATH */
Ekos is an advanced Astrophotography tool for Linux. It is based on a modular extensible framework to...
Definition: align.cpp:70
Sequence Job is a container for the details required to capture a series of images.
Definition: sequencejob.h:18
QString name(StandardShortcut id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 15 2022 04:04:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.