A Morse Code Training Application. https://bits.sigpipe.me/projects/cutecw/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
895 B

#include <QtCore/QIODevice>
#include <QtCore/QTime>
class Generator : public QIODevice
Generator(float secs = .5, int freq=500);
Generator(Generator *copyFrom);
void appendDataFrom(const Generator *copyFrom);
void start();
void stop();
QTime timeLeft();
void clearBuffer();
void restartPauses();
void setupPauses();
char *t;
int len;
int pos;
char *buffer;
bool finished;
int chunk_size;
int m_freq;
int m_zerocount;
qint64 bytes_left;
public slots:
void restartData();
qint64 readData(char *data, qint64 maxlen);
qint64 writeData(const char *data, qint64 len);
int putShort(char *t, unsigned int value);
int fillData(char *start, int frequency, float seconds);
#endif // GENERATOR_H