|
|
#ifndef PYTHONQTWRAPPER_QIODEVICE_H
|
|
|
#define PYTHONQTWRAPPER_QIODEVICE_H
|
|
|
|
|
|
#include <qiodevice.h>
|
|
|
#include <QObject>
|
|
|
|
|
|
#include <QVariant>
|
|
|
#include <qbytearray.h>
|
|
|
#include <qcoreevent.h>
|
|
|
#include <qiodevice.h>
|
|
|
#include <qlist.h>
|
|
|
#include <qobject.h>
|
|
|
|
|
|
class PythonQtWrapper_QIODevice : public QObject
|
|
|
{ Q_OBJECT
|
|
|
public:
|
|
|
Q_ENUMS(OpenModeFlag )
|
|
|
enum OpenModeFlag{
|
|
|
NotOpen = QIODevice::NotOpen, ReadOnly = QIODevice::ReadOnly, WriteOnly = QIODevice::WriteOnly, ReadWrite = QIODevice::ReadWrite, Append = QIODevice::Append, Truncate = QIODevice::Truncate, Text = QIODevice::Text, Unbuffered = QIODevice::Unbuffered};
|
|
|
public slots:
|
|
|
void delete_QIODevice(QIODevice* obj) { delete obj; }
|
|
|
bool atEnd(QIODevice* theWrappedObject) const;
|
|
|
qint64 bytesAvailable(QIODevice* theWrappedObject) const;
|
|
|
qint64 bytesToWrite(QIODevice* theWrappedObject) const;
|
|
|
bool canReadLine(QIODevice* theWrappedObject) const;
|
|
|
void close(QIODevice* theWrappedObject);
|
|
|
QString errorString(QIODevice* theWrappedObject) const;
|
|
|
bool getChar(QIODevice* theWrappedObject, char* c);
|
|
|
bool isOpen(QIODevice* theWrappedObject) const;
|
|
|
bool isReadable(QIODevice* theWrappedObject) const;
|
|
|
bool isSequential(QIODevice* theWrappedObject) const;
|
|
|
bool isTextModeEnabled(QIODevice* theWrappedObject) const;
|
|
|
bool isWritable(QIODevice* theWrappedObject) const;
|
|
|
bool open(QIODevice* theWrappedObject, QIODevice::OpenMode mode);
|
|
|
QIODevice::OpenMode openMode(QIODevice* theWrappedObject) const;
|
|
|
QByteArray peek(QIODevice* theWrappedObject, qint64 maxlen);
|
|
|
qint64 pos(QIODevice* theWrappedObject) const;
|
|
|
bool putChar(QIODevice* theWrappedObject, char c);
|
|
|
QByteArray read(QIODevice* theWrappedObject, qint64 maxlen);
|
|
|
QByteArray readAll(QIODevice* theWrappedObject);
|
|
|
QByteArray readLine(QIODevice* theWrappedObject, qint64 maxlen = 0);
|
|
|
bool reset(QIODevice* theWrappedObject);
|
|
|
bool seek(QIODevice* theWrappedObject, qint64 pos);
|
|
|
void setTextModeEnabled(QIODevice* theWrappedObject, bool enabled);
|
|
|
qint64 size(QIODevice* theWrappedObject) const;
|
|
|
void ungetChar(QIODevice* theWrappedObject, char c);
|
|
|
bool waitForBytesWritten(QIODevice* theWrappedObject, int msecs);
|
|
|
bool waitForReadyRead(QIODevice* theWrappedObject, int msecs);
|
|
|
qint64 write(QIODevice* theWrappedObject, const QByteArray& data);
|
|
|
};
|
|
|
|
|
|
#endif // PYTHONQTWRAPPER_QIODEVICE_H
|
|
|
|