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;
52 /**--------------------------------------------------------------------------------------------------
53 \brief A ConnectionDialog that allows the user to modify a Bluetooth connection.
54 **/
56 {
57 Q_OBJECT
58 public:
59 explicit BluetoothConnectionDialog(QWidget* parent = nullptr);
61 void setDevice(const ConnectionInfo& device);
62 QBluetoothSocket* getBluetoothPort() const;
64
65 virtual void clear() override;
66 virtual ConnectionInfo connectionInfo() const override;
67 virtual void setConnectionInfo(const ConnectionInfo& connection) override;
68 virtual bool handlesConnection(const ConnectionInfo& connection) override;
69 private slots:
70 void showPortInfo(int idx);
71 void apply();
72 void cancel();
73 private:
74 void fillPortsParameters();
75 void fillPortsInfo();
76
77 private:
80 Ui::BluetoothSetupUI* ui = nullptr;
82 ConnectionInfo m_selected_device;
83 Thread* m_find_device_thread = nullptr;
84 Thread* m_find_service_thread = nullptr;
85 };
86 /**--------------------------------------------------------------------------------------------------
87 \brief A ConnectionDialogFactory which enables the creation of a BluetoothConnectionDialog
88 **/
90 {
91 public:
92 virtual bool handlesType(const String& connection) const override;
93 virtual TranslatedString title() const override;
94 virtual String icon() const override;
95 virtual ConnectionDialog* createConnectionDialog() const override;
96 };
97}
#define NDEVR_BLUETOOTH_API
Definition DLLInfo.h:56
A ConnectionDialogFactory which enables the creation of a BluetoothConnectionDialog.
Definition BluetoothConnectionDialog.h:90
virtual bool handlesType(const String &connection) const override
virtual String icon() const override
virtual ConnectionDialog * createConnectionDialog() const override
virtual TranslatedString title() const override
A ConnectionDialog that allows the user to modify a Bluetooth connection.
Definition BluetoothConnectionDialog.h:56
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
Used to, given a Connection, generate an appropriate ConnectionDialog to allow adjustment of paramete...
Definition ConnectionDialog.h:31
A virtual dialog that provides an interface that allows the user to adjust certain parameters for a C...
Definition ConnectionDialog.h:13
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
The core String class for the NDEVR API.
Definition String.h:69
A thread is a single sequence stream within the software.
Definition Thread.h:67
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
Definition ACIColor.h:37
Definition FontEditor.h:6
A structure designed to store information about a specific Connection.
Definition Connection.h:97
Describes settings for performing a Connection search.
Definition Connection.h:136