Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
core.h 895 B
#pragma once

#include "VmbCPP/VmbCPPCommon.h"
#include "cam.h"
#include "camobserver.h"
#include "iprinter.h"

#include <QObject>

#include <VmbCPP/Interface.h>
#include <chrono>

namespace VmbCPP { class VmbSystem; }
using VmbCPP::VmbSystem;
using VmbCPP::CamObserver;
using VmbCPP::UpdateTriggerType;
using std::chrono::seconds;

class Core : public IPrinter
{

Q_OBJECT

public:
	Core();
	~Core();

public slots:
	void listCams();
	void detectCams();
	void onCameraChanged(CameraPtr,UpdateTriggerType);
	void openCam();
	void closeCam();
	// XXX add new func

	CamPtr cam(const unsigned long &idx=-1);

	void startRecording();
	void stopRecording(); //XXX also stop singleshot-timer or it will try to close an already closed cam
	void setDuration(int);

private slots:
	void init();

private:

	VmbSystem& _sys;
	CamPtrVector _cameras;
	seconds _recDuration;
	CamObserver* _camObserver;

};