-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwiniolptportinterface.h
61 lines (47 loc) · 1.13 KB
/
winiolptportinterface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef WINIOLPTPORTINTERFACE_H
#define WINIOLPTPORTINTERFACE_H
#include <QString>
#include <QStringList>
#include "lptportinterface.h"
#include "winioprovider.h"
class WinIOLptPortInterface : public LptPortInterface
{
WinIOProvider prov;
int basePort;
unsigned char ctrlstate;
QString reasonText;
QString currPortName;
public:
WinIOLptPortInterface();
bool open ();
void setDataPins(unsigned char data);
unsigned char getDataPins();
void setCtrlPins(unsigned char data);
unsigned char getStatPins();
void setDataModeIn(bool in);
void close ();
virtual bool isAvable()
{
#ifdef Q_OS_LINUX
return false;
#else
return true;
#endif
}
virtual QString name() {return "WIOLPT";}
virtual QString description() {return QObject::tr("LPT Port over WinIO");}
virtual QString reason()
{
#ifdef Q_OS_LINUX
return QObject::tr("Only for Win32");
#else
return reasonText;
#endif
}
bool load();
void unload();
void setPortName(QString n);
QString getPortName();
QStringList getPortList();
};
#endif // WINIOLPTPORTINTERFACE_H