itom  4.1.0
dialogSnapshot.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2020, Institut fuer Technische Optik (ITO),
5  Universitaet Stuttgart, Germany
6 
7  This file is part of itom.
8 
9  itom is free software; you can redistribute it and/or modify it
10  under the terms of the GNU Library General Public Licence as published by
11  the Free Software Foundation; either version 2 of the Licence, or (at
12  your option) any later version.
13 
14  itom is distributed in the hope that it will be useful, but
15  WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17  General Public Licence for more details.
18 
19  You should have received a copy of the GNU Library General Public License
20  along with itom. If not, see <http://www.gnu.org/licenses/>.
21 *********************************************************************** */
22 
23 #ifndef DIALOGSNAPSHOT_H
24 #define DIALOGSNAPSHOT_H
25 
26 #include "../global.h"
27 #include <qdialog.h>
28 #include <qpointer.h>
29 #include "../common/addInInterface.h"
30 #include "../DataObject/dataobj.h"
31 #include "../../AddInManager/addInManager.h"
32 
33 #include "ui_dialogSnapshot.h"
34 
35 class QTimerEvent; //forward declaration
36 class QCloseEvent; //forward declaration
37 
38 namespace ito {
39 
40 class DataIOThreadCtrl; //forward declaration
41 
42 class DialogSnapshot : public QMainWindow
43 {
44  Q_OBJECT
45 
46 public:
47  DialogSnapshot(QWidget *parent, QPointer<AddInDataIO> cam, ito::RetVal &retval);
48  ~DialogSnapshot();
49 
50 protected:
51  void init();
52 
53  void checkRetval(const ito::RetVal retval);
54  void setBtnOptions(const bool checking);
55  void acquisitionStart();
56  void acquisitionEnd();
57 
58  void timerEvent(QTimerEvent *event);
59  void closeEvent(QCloseEvent *event);
60  void setGroupTimestampEnabled();
61 
62  QString m_path;
63  QList<ito::AddInAlgo::FilterDef*> m_filterPlugins;
64 
65  bool addComboItem;
66  Ui::DialogSnapshot ui;
67  ito::DataIOThreadCtrl *m_pCamera;
68  QVector<ito::ParamBase> m_paramsOpt;
69  QVector<ito::ParamBase> m_paramsMand;
70  QVector<ito::ParamBase> m_autoOut;
71  QList<int64> m_stamp;
72  int m_totalSnaps;
73  int m_numSnapsDone;
74  int m_timerID;
75  bool m_wasAutoGrabbing;
76  QList<ito::DataObject> m_acquiredImages;
77 
78 private slots:
79  void on_btnSnap_clicked();
80  void on_btnClose_clicked();
81  void on_btnFolder_clicked();
82  void on_btnOptions_clicked();
83  void on_comboType_currentIndexChanged(int index);
84  void on_checkMulti_stateChanged(int state);
85  void on_checkTimer_stateChanged(int state);
86  void on_checkAutograbbing_stateChanged(int state);
87  void on_checkSaveAfterSnap_stateChanged(int state);
88 };
89 
90 } //end namespace ito
91 
92 #endif
Definition: dialogSnapshot.h:42
Class for managing status values (like errors or warning)
Definition: retVal.h:54
Definition: apiFunctionsGraph.cpp:39
Helper class to give plugin developers an easy access to cameras in other threads.
Definition: pluginThreadCtrl.h:149