C++ (Qt)class QSERIALDEVICE_EXPORT SerialDevice : public QIODevice{...... explicit SerialDevice(QObject *parent = 0); explicit SerialDevice(const QString &name, QObject *parent = 0); virtual ~SerialDevice(); void setName(const QString &name); QString name() const;...}
C++ (Qt)class SerialDevice;class SerialDeviceInfoPrivate; class SerialDeviceInfo{public: SerialDeviceInfo(); //produces NULL info SerialDeviceInfo(const SerialDeviceInfo &other); //copy constructor explicit SerialDeviceInfo(const SerialDevice &device); SerialDeviceInfo& operator=(const SerialDeviceInfo &other); void swap(SerialDeviceInfo &other); QString name() const; //COM1, ttyS0... QString alias() const; //"\\\\\\\\.\\\\COM24", "/dev/ttyS45" QString description() const; //"Последовательный порт", "Prolific USB-to-Serial Comm Port", "Motorola Phone (E1 iTunes)" QString manufacturer() const; //"(Стандартные порты)", "Prolific Technology Inc." bool isNull() const; bool isBusy() const; QList<int> standardBauds() const; static QList<SerialDeviceInfo> availableDevices();private: Q_DECLARE_PRIVATE(SerialDeviceInfo) SerialDeviceInfoPrivate *d_ptr;};