• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • ekos
capture.h
Go to the documentation of this file.
1 /* Ekos Capture tool
2  Copyright (C) 2012 Jasem Mutlaq <mutlaqja@ikarustech.com>
3 
4  This application is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8  */
9 
10 #ifndef CAPTURE_H
11 #define CAPTURE_H
12 
13 #include "capture.h"
14 
15 #include <QTimer>
16 
17 #include <KFileItemList>
18 #include <KDirLister>
19 
20 #include "ui_capture.h"
21 
22 #include "fitsviewer/fitscommon.h"
23 #include "indi/indistd.h"
24 #include "indi/indiccd.h"
25 
26 class QProgressIndicator;
27 class QTableWidgetItem;
28 
29 namespace Ekos
30 {
31 
32 
33 class SequenceJob
34 {
35  public:
36 
37  typedef enum { JOB_IDLE, JOB_BUSY, JOB_ERROR, JOB_DONE } JOBStatus;
38 
39  static QStringList statusStrings;
40 
41  SequenceJob();
42 
43  private:
44 
45  ISD::CCDChip *activeChip;
46  ISD::CCD *activeCCD;
47  ISD::GDInterface *activeFilter;
48 
49  double exposure;
50  int frameType;
51  int filterPos;
52  int imageType;
53  int binX, binY;
54  int x,y,w,h;
55  QString prefix;
56  int count;
57  int delay;
58  bool isoMode;
59  bool preview;
60  bool showFITS;
61  QTableWidgetItem *statusCell;
62 
63  JOBStatus status;
64 
65  friend class Capture;
66 };
67 
68 class Capture : public QWidget, public Ui::Capture
69 {
70 
71  Q_OBJECT
72 
73 public:
74 
75  enum { CALIBRATE_NONE, CALIBRATE_START, CALIBRATE_DONE };
76 
77  Capture();
78  ~Capture();
79  void addCCD(ISD::GDInterface *newCCD);
80  void addFilter(ISD::GDInterface *newFilter);
81  void addGuideHead(ISD::GDInterface *newCCD);
82 
83  void syncFrameType(ISD::GDInterface *ccd);
84 
85  void appendLogText(const QString &);
86  void clearLog();
87  QString getLogText() { return logText.join("\n"); }
88 
89  /* Capture */
90  void updateSequencePrefix( const QString &newPrefix);
91 public slots:
92  /* Capture */
93 
94 
95  void startSequence();
96  void stopSequence();
97  void captureOne();
98  void captureImage();
99  void newFITS(IBLOB *bp);
100  void checkCCD(int CCDNum);
101  void checkFilter(int filterNum);
102 
103  void addJob(bool preview=false);
104  void removeJob();
105 
106  void moveJobUp();
107  void moveJobDown();
108 
109 
110  void updateCaptureProgress(ISD::CCDChip *tChip, double value);
111  void checkSeqBoundary(const KFileItemList & items);
112 
113 signals:
114  void newLog();
115 
116 private:
117 
118  void executeJob(SequenceJob *job);
119 
120  /* Capture */
121  KDirLister *seqLister;
122  double seqExpose;
123  int seqTotalCount;
124  int seqCurrentCount;
125  int seqDelay;
126  int retries;
127  QTimer *seqTimer;
128  QString seqPrefix;
129  int seqCount;
130 
131  int calibrationState;
132  bool useGuideHead;
133 
134  SequenceJob *activeJob;
135 
136  QList<ISD::CCD *> CCDs;
137 
138  ISD::CCDChip *targetChip;
139 
140  // They're generic GDInterface because they could be either ISD::CCD or ISD::Filter
141  QList<ISD::GDInterface *> Filters;
142 
143  QList<SequenceJob *> jobs;
144  int jobCount;
145  int jobIndex;
146 
147  ISD::CCD *currentCCD;
148  ISD::GDInterface *currentFilter;
149 
150  ITextVectorProperty *filterName;
151  INumberVectorProperty *filterSlot;
152 
153  QStringList logText;
154 
155  QProgressIndicator *pi;
156 
157 };
158 
159 }
160 
161 #endif // CAPTURE_H
Ekos::SequenceJob::statusStrings
static QStringList statusStrings
Definition: capture.h:39
Ekos::SequenceJob
Definition: capture.h:33
ISD::CCDChip
Definition: indiccd.h:23
Ekos::Capture::updateSequencePrefix
void updateSequencePrefix(const QString &newPrefix)
Definition: capture.cpp:523
Ekos::SequenceJob::JOB_DONE
Definition: capture.h:37
Ekos::Capture::newFITS
void newFITS(IBLOB *bp)
Definition: capture.cpp:361
Ekos::Capture::CALIBRATE_START
Definition: capture.h:75
capture.h
QWidget
Ekos::Capture::CALIBRATE_NONE
Definition: capture.h:75
Ekos::Capture::checkCCD
void checkCCD(int CCDNum)
Definition: capture.cpp:196
Ekos::Capture::newLog
void newLog()
Ekos::SequenceJob::JOB_ERROR
Definition: capture.h:37
Ekos::Capture::appendLogText
void appendLogText(const QString &)
Definition: capture.cpp:583
Ekos::Capture::updateCaptureProgress
void updateCaptureProgress(ISD::CCDChip *tChip, double value)
Definition: capture.cpp:597
Ekos::Capture::addJob
void addJob(bool preview=false)
Definition: capture.cpp:609
Ekos::Capture::addGuideHead
void addGuideHead(ISD::GDInterface *newCCD)
Definition: capture.cpp:121
QProgressIndicator
The QProgressIndicator class lets an application display a progress indicator to show that a lengthy ...
Definition: QProgressIndicator.h:35
Ekos::Capture::moveJobDown
void moveJobDown()
Definition: capture.cpp:807
Ekos::Capture::startSequence
void startSequence()
Definition: capture.cpp:144
fitscommon.h
Ekos::Capture::~Capture
~Capture()
Definition: capture.cpp:100
Ekos::SequenceJob::JOB_IDLE
Definition: capture.h:37
Ekos::Capture::clearLog
void clearLog()
Definition: capture.cpp:591
Ekos::Capture
Definition: capture.h:68
Ekos::Capture::syncFrameType
void syncFrameType(ISD::GDInterface *ccd)
Definition: capture.cpp:299
indiccd.h
Ekos::Capture::checkFilter
void checkFilter(int filterNum)
Definition: capture.cpp:323
Ekos::Capture::captureImage
void captureImage()
Definition: capture.cpp:455
Ekos::Capture::addFilter
void addFilter(ISD::GDInterface *newFilter)
Definition: capture.cpp:132
Ekos::Capture::removeJob
void removeJob()
Definition: capture.cpp:744
Ekos::Capture::checkSeqBoundary
void checkSeqBoundary(const KFileItemList &items)
Definition: capture.cpp:541
Ekos::Capture::stopSequence
void stopSequence()
Definition: capture.cpp:166
Ekos::SequenceJob::JOB_BUSY
Definition: capture.h:37
Ekos::Capture::moveJobUp
void moveJobUp()
Definition: capture.cpp:775
Ekos::Capture::captureOne
void captureOne()
Definition: capture.cpp:448
Ekos::Capture::getLogText
QString getLogText()
Definition: capture.h:87
Ekos::SequenceJob::JOBStatus
JOBStatus
Definition: capture.h:37
indistd.h
Ekos::Capture::Capture
Capture()
Definition: capture.cpp:40
ISD::CCD
Definition: indiccd.h:73
Ekos::Capture::addCCD
void addCCD(ISD::GDInterface *newCCD)
Definition: capture.cpp:105
ISD::GDInterface
Definition: indistd.h:48
Ekos::SequenceJob::SequenceJob
SequenceJob()
Definition: capture.cpp:29
QList
Ekos::Capture::CALIBRATE_DONE
Definition: capture.h:75
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal