mirror of
https://github.com/vale981/Taevitas
synced 2025-03-05 17:41:42 -05:00
A bit more refactoring.
This commit is contained in:
parent
7e07d7b954
commit
6aabd0f1a8
2 changed files with 9 additions and 6 deletions
|
@ -10,12 +10,13 @@ class ImageGrabber : public QThread {
|
||||||
public:
|
public:
|
||||||
ImageGrabber( QObject * parent = 0 ) : QThread( parent ) {}
|
ImageGrabber( QObject * parent = 0 ) : QThread( parent ) {}
|
||||||
void run() Q_DECL_OVERRIDE;
|
void run() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
void setCamera( FlyCapture2::Camera * cam );
|
void setCamera( FlyCapture2::Camera * cam );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool capture;
|
bool capture;
|
||||||
FlyCapture2::Camera * cam;
|
|
||||||
|
|
||||||
|
FlyCapture2::Camera * cam;
|
||||||
FlyCapture2::Image tmp;
|
FlyCapture2::Image tmp;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
|
@ -9,13 +9,12 @@ class SerialCommunicator : public QObject {
|
||||||
public:
|
public:
|
||||||
explicit SerialCommunicator( QObject * parent = 0 );
|
explicit SerialCommunicator( QObject * parent = 0 );
|
||||||
~SerialCommunicator();
|
~SerialCommunicator();
|
||||||
const QList<QSerialPortInfo> &getPorts();
|
|
||||||
bool isConnected() const {
|
bool isConnected() const {
|
||||||
return port.isOpen();
|
return port.isOpen();
|
||||||
}
|
}
|
||||||
|
|
||||||
signals:
|
const QList<QSerialPortInfo> &getPorts();
|
||||||
void dataRead( QByteArray data );
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
// returns False if the port is not open
|
// returns False if the port is not open
|
||||||
|
@ -43,12 +42,15 @@ class SerialCommunicator : public QObject {
|
||||||
private:
|
private:
|
||||||
QSerialPort port;
|
QSerialPort port;
|
||||||
QList<QSerialPortInfo> ports;
|
QList<QSerialPortInfo> ports;
|
||||||
void write( QByteArray data );
|
|
||||||
|
|
||||||
int lastBuff;
|
int lastBuff;
|
||||||
|
|
||||||
|
void write( QByteArray data );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleRead();
|
void handleRead();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void dataRead( QByteArray data );
|
||||||
};
|
};
|
||||||
|
|
||||||
bool SerialCommunicator::selectPort( const int index ) {
|
bool SerialCommunicator::selectPort( const int index ) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue