This repository has been archived by the owner. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9b6c99
commit 037e8a9
Showing
7 changed files
with
215 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "microtome.h" | ||
|
||
Microtome::Microtome(QObject *parent) : QObject(parent) | ||
{ | ||
|
||
} | ||
|
||
|
||
void Microtome::on_uirequest_cuttingMotor(bool state) | ||
{ | ||
QString textState = (state) ? "on" : "off"; | ||
emit log(EventLogType::Notify, "Microtome :: cutting motor is " + textState); | ||
} | ||
|
||
|
||
void Microtome::on_uirequest_cuttingSpeed(int cuttingSpeed) | ||
{ | ||
emit log(EventLogType::Notify, "Microtome :: cutting speed is " + QString::number(cuttingSpeed)); | ||
} | ||
|
||
|
||
void Microtome::on_uirequest_returnSpeed(int returnSpeed) | ||
{ | ||
emit log(EventLogType::Notify, "Microtome :: return speed is " + QString::number(returnSpeed)); | ||
} | ||
|
||
|
||
void Microtome::on_uirequest_feedStep(int feedStep) | ||
{ | ||
emit log(EventLogType::Notify, "Microtome :: feed step is " + QString::number(feedStep)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef MICROTOME_H | ||
#define MICROTOME_H | ||
|
||
#include <QObject> | ||
|
||
#include "eventlog.h" | ||
|
||
class Microtome : public QObject | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit Microtome(QObject *parent = nullptr); | ||
|
||
public slots: | ||
void on_uirequest_cuttingMotor(bool state); | ||
void on_uirequest_cuttingSpeed(int cuttingSpeed); | ||
void on_uirequest_returnSpeed(int returnSpeed); | ||
void on_uirequest_feedStep(int feedStep); | ||
|
||
signals: | ||
void log(EventLogType type, const QString &message); | ||
|
||
}; | ||
|
||
#endif // MICROTOME_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "syringe.h" | ||
|
||
Syringe::Syringe(QObject *parent) : QObject(parent), | ||
m_auto(false) | ||
{ | ||
|
||
} | ||
|
||
|
||
void Syringe::on_uirequest_pump() | ||
{ | ||
emit log(EventLogType::Notify, "Syringe :: pump"); | ||
} | ||
|
||
|
||
void Syringe::on_uirequest_auto(bool state) | ||
{ | ||
QString textState = (state) ? "on" : "off"; | ||
emit log(EventLogType::Notify, "Syringe :: auto pumping is " + textState); | ||
m_auto = state; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef SYRINGE_H | ||
#define SYRINGE_H | ||
|
||
#include <QObject> | ||
|
||
#include "eventlog.h" | ||
|
||
class Syringe : public QObject | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit Syringe(QObject *parent = nullptr); | ||
|
||
private: | ||
bool m_auto; | ||
|
||
signals: | ||
void log(EventLogType type, const QString &message); | ||
|
||
public slots: | ||
void on_uirequest_pump(); | ||
void on_uirequest_auto(bool state); | ||
}; | ||
|
||
#endif // SYRINGE_H |