summaryrefslogtreecommitdiff
path: root/examples/serialport/blockingmaster/dialog.h
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2017-09-27 19:56:10 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2017-10-06 20:17:47 +0000
commit07e1fc7bb93dc4c306d8e64f4cb88d42177cba2e (patch)
tree7ffe338ff5428cd5e596ac3ed069820b4a01bc41 /examples/serialport/blockingmaster/dialog.h
parentc513cbaee4d8819a2ebb27396be6c056b1f5856f (diff)
downloadqtserialport-07e1fc7bb93dc4c306d8e64f4cb88d42177cba2e.tar.gz
Revamp the Blocking Master Example
* Use the 'const' keywords more. * Split very long lines. * Use the 'm_' prefixes for all class members. * Use the QOverload in signal/slot casting. * Use more member class initializations. * Remove QT_USE_NAMESPACE macro. * Use from(to)Utf8 instead of from(to)Local8Bit. Task-number: QTBUG-60652 Change-Id: I5ef9916cc1e6371dde97154f5f5683f85bc02e96 Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'examples/serialport/blockingmaster/dialog.h')
-rw-r--r--examples/serialport/blockingmaster/dialog.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/serialport/blockingmaster/dialog.h b/examples/serialport/blockingmaster/dialog.h
index aff8177..8d997fa 100644
--- a/examples/serialport/blockingmaster/dialog.h
+++ b/examples/serialport/blockingmaster/dialog.h
@@ -51,10 +51,10 @@
#ifndef DIALOG_H
#define DIALOG_H
-#include <QDialog>
-
#include "masterthread.h"
+#include <QDialog>
+
QT_BEGIN_NAMESPACE
class QLabel;
@@ -82,18 +82,18 @@ private:
void setControlsEnabled(bool enable);
private:
- int transactionCount;
- QLabel *serialPortLabel;
- QComboBox *serialPortComboBox;
- QLabel *waitResponseLabel;
- QSpinBox *waitResponseSpinBox;
- QLabel *requestLabel;
- QLineEdit *requestLineEdit;
- QLabel *trafficLabel;
- QLabel *statusLabel;
- QPushButton *runButton;
+ int m_transactionCount = 0;
+ QLabel *m_serialPortLabel = nullptr;
+ QComboBox *m_serialPortComboBox = nullptr;
+ QLabel *m_waitResponseLabel = nullptr;
+ QSpinBox *m_waitResponseSpinBox = nullptr;
+ QLabel *m_requestLabel = nullptr;
+ QLineEdit *m_requestLineEdit = nullptr;
+ QLabel *m_trafficLabel = nullptr;
+ QLabel *m_statusLabel = nullptr;
+ QPushButton *m_runButton = nullptr;
- MasterThread thread;
+ MasterThread m_thread;
};
#endif // DIALOG_H