PIGALE 1.3.9 Documentation (original) (raw)
P.I.G.A.L.E.
1.3.9
Public Implementation of a Graph Algorithm
Library and Editor
H. de Fraysseix P. Ossona de Mendez
Client Class Reference
Detailed Description
Creates a Thread to read input data, and a QTcpSocket to dialog with the server.
Usage
The default port used for connection is 4242
In the input:
- lines starting by '#' are treated as comments
- lines starting by ':' are treated by the client
- line starting by ':!' signals the end of file
- line starting by ':D' signals the client to echo the comments
- line starting by ':d' signals the client not to echo the comments
- line starting by ':X' stops the client
- otherwise a line contains commands separated by ':'
- commands may contain arguments separated by ';'
When reading from the server
- lines starting with ! are commands
- lines starting by : are diplayed in the text window otherwise they are output to the terminal
Public Member Functions
- Client (const QString &host, quint16 port)
- ~Client ()
- void sendToServer (QString &str)
- bool debug ()
- void debug (bool b)
- int ChangeActionsToDo (int delta)
- void writeServerEvent (QString str)
- void writeServerEvent (char *buf, uint size)
- void writeClient (QString str)
Public Attributes
- QStack< QString > stack
Protected Member Functions
- void customEvent (QEvent *e)
Private Slots
- void closeConnection ()
- void askCloseConnection ()
- void askConnection ()
- void sendToServer ()
- void socketReadyRead ()
- void socketConnected ()
- void socketConnectionClosed ()
- void socketError (QAbstractSocket::SocketError e)
- void stop ()
- void exit ()
Private Member Functions
- int sendToServerGraph (QString &str)
- uint readBuffer (char *&buff)
- void writeServer (QString str)
- void writeServer (char *buff, quint32 size)
Private Attributes
- QString host
- quint16 port
- QPushButton * send
- QPushButton * close
- QPushButton * quit
- QPushButton * connection
- QTcpSocket * socket
- int ActionsToDo
- bool dbg
- int warning
- QMutex mutex
- QReadWriteLock lock
- QDataStream clo
- QTextEdit * infoText
- QLineEdit * inputText
- threadRead ThreadRead
- int numFiles
Constructor & Destructor Documentation
| Client | ( | const QString & | host, |
|---|---|---|---|
| quint16 | port | ||
| ) |
Member Function Documentation
| void sendToServer | ( | QString & | str | ) |
|---|
| void closeConnection | ( | | ) | [private, slot] | | -------------------- | - | | - | ----------------- |
| void askCloseConnection | ( | | ) | [private, slot] | | ----------------------- | - | | - | ----------------- |
| void askConnection | ( | | ) | [private, slot] | | ------------------ | - | | - | ----------------- |
| void sendToServer | ( | | ) | [private, slot] | | ----------------- | - | | - | ----------------- |
| void socketReadyRead | ( | | ) | [private, slot] | | -------------------- | - | | - | ----------------- |
| void socketConnected | ( | | ) | [private, slot] | | -------------------- | - | | - | ----------------- |
| void socketConnectionClosed | ( | | ) | [private, slot] | | --------------------------- | - | | - | ----------------- |
| void socketError | ( | QAbstractSocket::SocketError | e | ) | [private, slot] |
|---|
| void stop | ( | | ) | [private, slot] | | --------- | - | | - | ----------------- |
| void exit | ( | | ) | [private, slot] | | --------- | - | | - | ----------------- |
| int ChangeActionsToDo | ( | int | delta | ) |
|---|
| void writeServerEvent | ( | QString | str | ) |
|---|
| void writeServerEvent | ( | char * | buf, |
|---|---|---|---|
| uint | size | ||
| ) |
| void writeClient | ( | QString | str | ) |
|---|
| void customEvent | ( | QEvent * | e | ) | [protected] |
|---|
| int sendToServerGraph | ( | QString & | str | ) | [private] |
|---|
| uint readBuffer | ( | char *& | buff | ) | [private] |
|---|
| void writeServer | ( | QString | str | ) | [private] |
|---|
| void writeServer | ( | char * | buff, |
|---|---|---|---|
| quint32 | size | ||
| ) | [private] |
Member Data Documentation
QPushButton* send [private]
QPushButton * close [private]
QPushButton * quit [private]
QReadWriteLock lock [private]
QDataStream clo [private]
