A bit more refactoring.

This commit is contained in:
Hiro Protagonist 2017-04-04 17:10:12 +12:00
parent 7e07d7b954
commit 6aabd0f1a8
2 changed files with 9 additions and 6 deletions

View file

@ -10,12 +10,13 @@ class ImageGrabber : public QThread {
public:
ImageGrabber( QObject * parent = 0 ) : QThread( parent ) {}
void run() Q_DECL_OVERRIDE;
void setCamera( FlyCapture2::Camera * cam );
private:
bool capture;
FlyCapture2::Camera * cam;
FlyCapture2::Camera * cam;
FlyCapture2::Image tmp;
signals:

View file

@ -9,13 +9,12 @@ class SerialCommunicator : public QObject {
public:
explicit SerialCommunicator( QObject * parent = 0 );
~SerialCommunicator();
const QList<QSerialPortInfo> &getPorts();
bool isConnected() const {
return port.isOpen();
}
signals:
void dataRead( QByteArray data );
const QList<QSerialPortInfo> &getPorts();
public slots:
// returns False if the port is not open
@ -43,12 +42,15 @@ class SerialCommunicator : public QObject {
private:
QSerialPort port;
QList<QSerialPortInfo> ports;
void write( QByteArray data );
int lastBuff;
void write( QByteArray data );
private slots:
void handleRead();
signals:
void dataRead( QByteArray data );
};
bool SerialCommunicator::selectPort( const int index ) {