API Documentation
Loading...
Searching...
No Matches
BluetoothConnectionDialog.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVR
28File: SerialConnectionDialog
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
36#include <NDEVR/Connection.h>
38#include <QWidget>
39namespace Ui
40{
41 class BluetoothSetupUI;
42}
43
44class QIntValidator;
45class QBluetoothSocket;
46class QBluetoothDeviceInfo;
47namespace NDEVR
48{
49 class Connection;
50 class ProgressInfo;
51 class Thread;
53 {
54 Q_OBJECT
55 public:
56 explicit BluetoothConnectionDialog(QWidget* parent = nullptr);
58 void setDevice(const ConnectionInfo& device);
59 QBluetoothSocket* getBluetoothPort() const;
61
62 virtual void clear() override;
63 virtual ConnectionInfo connectionInfo() const override;
64 virtual void setConnectionInfo(const ConnectionInfo& connection) override;
65 virtual bool handlesConnection(const ConnectionInfo& connection) override;
66 private slots:
67 void showPortInfo(int idx);
68 void apply();
69 void cancel();
70 private:
71 void fillPortsParameters();
72 void fillPortsInfo();
73
74 private:
77 Ui::BluetoothSetupUI* ui = nullptr;
79 ConnectionInfo m_selected_device;
80 Thread* m_find_device_thread = nullptr;
81 Thread* m_find_service_thread = nullptr;
82
83 };
85 {
86 public:
87 virtual bool handlesType(const String& connection) const override;
88 virtual TranslatedString title() const override;
89 virtual String icon() const override;
90 virtual ConnectionDialog* createConnectionDialog() const override;
91 };
92}
#define NDEVR_BLUETOOTH_API
Definition DLLInfo.h:74
Definition BluetoothConnectionDialog.h:85
virtual bool handlesType(const String &connection) const override
virtual String icon() const override
virtual ConnectionDialog * createConnectionDialog() const override
virtual TranslatedString title() const override
Definition BluetoothConnectionDialog.h:53
virtual ConnectionInfo connectionInfo() const override
ConnectionInfo device() const
QBluetoothSocket * getBluetoothPort() const
void setDevice(const ConnectionInfo &device)
virtual void clear() override
virtual void setConnectionInfo(const ConnectionInfo &connection) override
BluetoothConnectionDialog(QWidget *parent=nullptr)
virtual bool handlesConnection(const ConnectionInfo &connection) override
Definition ConnectionDialog.h:23
Definition ConnectionDialog.h:8
Definition Dictionary.h:48
Definition String.h:40
Definition TranslatedString.h:9
Definition ACIColor.h:37
Definition FontEditor.h:6
Definition Connection.h:87
Definition Connection.h:120