diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-20 13:18:03 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-20 13:18:03 +0100 |
commit | 2caa6e1ca0094b2e2a4cd6005836d46a7ddfdf6a (patch) | |
tree | e2653c5aeda85ef44a174a467319b8142aa958bf /examples/serialbus/can | |
parent | 0f33c698229ebb418b71a19dd409e2b5a417182e (diff) | |
parent | 50e4edb4b23947f9fcdb99ea0101660f0752cc1f (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Change-Id: Ia04f54eee1264b659d8928b7f08d7221f587bc54
Diffstat (limited to 'examples/serialbus/can')
-rw-r--r-- | examples/serialbus/can/bitratebox.cpp | 14 | ||||
-rw-r--r-- | examples/serialbus/can/bitratebox.h | 16 | ||||
-rw-r--r-- | examples/serialbus/can/connectdialog.cpp | 14 | ||||
-rw-r--r-- | examples/serialbus/can/connectdialog.h | 14 | ||||
-rw-r--r-- | examples/serialbus/can/main.cpp | 14 | ||||
-rw-r--r-- | examples/serialbus/can/mainwindow.cpp | 14 | ||||
-rw-r--r-- | examples/serialbus/can/mainwindow.h | 14 | ||||
-rw-r--r-- | examples/serialbus/can/sendframebox.cpp | 23 | ||||
-rw-r--r-- | examples/serialbus/can/sendframebox.h | 14 |
9 files changed, 118 insertions, 19 deletions
diff --git a/examples/serialbus/can/bitratebox.cpp b/examples/serialbus/can/bitratebox.cpp index 07aad9c..fab2da5 100644 --- a/examples/serialbus/can/bitratebox.cpp +++ b/examples/serialbus/can/bitratebox.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** ** Copyright (C) 2017 Andre Hartmann <aha_1980@gmx.de> -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the QtSerialBus module. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/serialbus/can/bitratebox.h b/examples/serialbus/can/bitratebox.h index 42bbb2d..9156104 100644 --- a/examples/serialbus/can/bitratebox.h +++ b/examples/serialbus/can/bitratebox.h @@ -1,12 +1,22 @@ /**************************************************************************** ** ** Copyright (C) 2017 Andre Hartmann <aha_1980@gmx.de> -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the QtSerialBus module. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are @@ -50,7 +60,7 @@ QT_END_NAMESPACE class BitRateBox : public QComboBox { public: - BitRateBox(QWidget *parent = nullptr); + explicit BitRateBox(QWidget *parent = nullptr); ~BitRateBox(); int bitRate() const; diff --git a/examples/serialbus/can/connectdialog.cpp b/examples/serialbus/can/connectdialog.cpp index 326dcac..5a12592 100644 --- a/examples/serialbus/can/connectdialog.cpp +++ b/examples/serialbus/can/connectdialog.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** ** Copyright (C) 2017 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the QtSerialBus module. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/serialbus/can/connectdialog.h b/examples/serialbus/can/connectdialog.h index 4e3e2c6..d7a0a55 100644 --- a/examples/serialbus/can/connectdialog.h +++ b/examples/serialbus/can/connectdialog.h @@ -1,12 +1,22 @@ /**************************************************************************** ** ** Copyright (C) 2017 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the QtSerialBus module. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/serialbus/can/main.cpp b/examples/serialbus/can/main.cpp index b4b4675..757f3aa 100644 --- a/examples/serialbus/can/main.cpp +++ b/examples/serialbus/can/main.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** ** Copyright (C) 2017 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the QtSerialBus module. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/serialbus/can/mainwindow.cpp b/examples/serialbus/can/mainwindow.cpp index dd03da8..fd5861f 100644 --- a/examples/serialbus/can/mainwindow.cpp +++ b/examples/serialbus/can/mainwindow.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** ** Copyright (C) 2017 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the QtSerialBus module. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/serialbus/can/mainwindow.h b/examples/serialbus/can/mainwindow.h index 4351787..40b2e4a 100644 --- a/examples/serialbus/can/mainwindow.h +++ b/examples/serialbus/can/mainwindow.h @@ -1,12 +1,22 @@ /**************************************************************************** ** ** Copyright (C) 2017 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the QtSerialBus module. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/serialbus/can/sendframebox.cpp b/examples/serialbus/can/sendframebox.cpp index a84222d..117ff10 100644 --- a/examples/serialbus/can/sendframebox.cpp +++ b/examples/serialbus/can/sendframebox.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** ** Copyright (C) 2017 Andre Hartmann <aha_1980@gmx.de> -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the QtSerialBus module. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are @@ -157,6 +167,15 @@ SendFrameBox::SendFrameBox(QWidget *parent) : m_ui->bitrateSwitchBox->setChecked(false); }); + auto frameIdTextChanged = [this]() { + const bool hasFrameId = !m_ui->frameIdEdit->text().isEmpty(); + m_ui->sendButton->setEnabled(hasFrameId); + m_ui->sendButton->setToolTip(hasFrameId + ? QString() : tr("Cannot send because no Frame ID was given.")); + }; + connect(m_ui->frameIdEdit, &QLineEdit::textChanged, frameIdTextChanged); + frameIdTextChanged(); + connect(m_ui->sendButton, &QPushButton::clicked, [this]() { const uint frameId = m_ui->frameIdEdit->text().toUInt(nullptr, 16); QString data = m_ui->payloadEdit->text(); diff --git a/examples/serialbus/can/sendframebox.h b/examples/serialbus/can/sendframebox.h index 465ba02..e8459c5 100644 --- a/examples/serialbus/can/sendframebox.h +++ b/examples/serialbus/can/sendframebox.h @@ -1,12 +1,22 @@ /**************************************************************************** ** ** Copyright (C) 2017 Andre Hartmann <aha_1980@gmx.de> -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the QtSerialBus module. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are |