summaryrefslogtreecommitdiff
path: root/examples/serialport
diff options
context:
space:
mode:
Diffstat (limited to 'examples/serialport')
-rw-r--r--examples/serialport/doc/terminal.qdoc35
1 files changed, 16 insertions, 19 deletions
diff --git a/examples/serialport/doc/terminal.qdoc b/examples/serialport/doc/terminal.qdoc
index 6c6aa92..65cabb9 100644
--- a/examples/serialport/doc/terminal.qdoc
+++ b/examples/serialport/doc/terminal.qdoc
@@ -46,13 +46,13 @@
\list
- \li \e{The asynchronous (non-blocking) approach.} Operations are scheduled
+ \li \b{The asynchronous (non-blocking) approach.} Operations are scheduled
and performed when the control returns to Qt's event loop. QSerialPort emits
a signal when the operation is finished. For example, QSerialPort::write()
- returns immediately. When the data is sent to the serial port, QSerialPort
- emits \l{QIODevice::bytesWritten()}{bytesWritten()}.
+ returns immediately. When the data is sent to the serial port,
+ QSerialPort emits \l{QIODevice::bytesWritten()}{bytesWritten()}.
- \li \e{The synchronous (blocking) approach.} In non-GUI and multithreaded
+ \li \b{The synchronous (blocking) approach.} In non-GUI and multithreaded
applications, the \c waitFor...() functions can be called (i.e.
QSerialPort::waitForReadyRead()) to suspend the calling thread until the
operation has completed.
@@ -67,22 +67,22 @@
\list
- \li \l{terminal/mainwindow.cpp}{MainWindow} - is the main application
+ \li \c{MainWindow} (\c{terminal/mainwindow.cpp}) - is the main application
window that contains all the working logic for the serial port programming,
including configuration, I/O processing and so forth, while inheriting the
QMainWindow.
- \li \l{terminal/console.cpp}{Console} - is the central widget of the
+ \li \c{Console} (\c{terminal/console.cpp}) - is the central widget of the
main window, displaying the transmitted or received data. The widget is
derived from the QPlainTextEdit class.
- \li \l{terminal/settingsdialog.cpp}{SettingsDialog} - is a dialog for
+ \li \c{SettingsDialog} (\c{terminal/settingsdialog.cpp}) - is a dialog for
configuring the serial port, as well as for displaying the available serial
ports and information about them.
\endlist
- The serial port is instantiated in the \l{terminal/mainwindow.cpp}{MainWindow}
+ The serial port is instantiated in the \c MainWindow
constructor. The main widget is passed as the parent, so the object deletion
happens automatically according to the parent and child mechanism in Qt:
@@ -103,14 +103,12 @@
\snippet terminal/mainwindow.cpp 4
- In this slot, the settings are read from \l{terminal/settingsdialog.cpp}
- {SettingsDialog} and an attempt is made to open and initialize the serial
+ In this slot, the settings are read from \c{SettingsDialog} and an attempt is made to open and initialize the serial
port accordingly. If successful, the status bar displays a message that the
opening was successful with the given configuration; otherwise, a messagebox
is displayed with the appropriate error code and message. If the serial port
- settings have never been called
- \l{terminal/settingsdialog.cpp}{SettingsDialog}, then the terminal
- attempts to open the port with the default settings: 9600 8N1.
+ settings have never been called then the terminal attempts to open
+ the port with the default settings: 9600 8N1.
Clicking on the \b{Disconnect} button invokes the \c closeSerialPort()
slot:
@@ -128,18 +126,17 @@
When the serial port receives new data, the signal
\l{QIODevice::}{readyRead()} is emitted, and that signal is
- connected to the \c MainWindow::readData() slot:
+ connected to the \c{MainWindow::readData()} slot:
\snippet terminal/mainwindow.cpp 7
This slot reads the data from the serial port and displays that in the
- \l{terminal/console.cpp}{Console} widget.
+ Console widget.
- Clicking on the \b{Configure} button invokes the \c show() slot which
- belongs to the \l{terminal/settingsdialog.cpp}{SettingsDialog}
- widget.
+ Clicking on the \b{Configure} button invokes the \c{show()} slot which
+ belongs to the \c{SettingsDialog} widget.
- This method displays the \l{terminal/settingsdialog.cpp}{SettingsDialog}
+ This method (\c{terminal/settingsdialog.cpp}) displays the \c{SettingsDialog},
in which the user can choose the desired serial port, see the information
about the selected port, and set the desired parameters of the given serial
port.