API Documentation
Loading...
Searching...
No Matches
ConnectionWidget.h
Go to the documentation of this file.
1#pragma once
2/*--------------------------------------------------------------------------------------------
3Copyright (c) 2019, NDEVR LLC
4tyler.parke@ndevr.org
5 __ __ ____ _____ __ __ _______
6 | \ | | | __ \ | ___|\ \ / / | __ \
7 | \ | | | | \ \ | |___ \ \ / / | |__) |
8 | . \| | | |__/ / | |___ \ V / | _ /
9 | |\ |_|_____/__|_____|___\_/____| | \ \
10 |__| \__________________________________| \__\
11
12Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
13Licensee a limited, non-exclusive, non-transferable, royalty-free license
14(without the right to sublicense) to use the API solely for the purpose of
15Licensee's internal development efforts to develop applications for which
16the API was provided.
17
18The above copyright notice and this permission notice shall be included in all
19copies or substantial portions of the Software.
20
21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
22INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
23PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
24FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
25OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26DEALINGS IN THE SOFTWARE.
27
28Library: NDEVR
29File: ConnectionWidget
30Included in API: True
31Author(s): Tyler Parke
32 *-----------------------------------------------------------------------------------------**/
33#pragma once
34#include "DLLInfo.h"
35#include <NDEVR/Connection.h>
36#include <NDEVR/Button.h>
37#include <QWidget>
38class QLabel;
39class QGridLayout;
40namespace NDEVR
41{
42 class Button;
43 class Connection;
44 struct ConnectionInfo;
45 class ConnectionSetupWidget;
47 {
48 Q_OBJECT
49 public:
50 explicit ConnectionWidget(QWidget* parent = nullptr);
51 void setConnection(const ConnectionInfo& sensor);
53 void setAllowDisconnect(bool allow_disconnect);
54 void setAllowConnect(bool allow_connect);
57 void setAllowClearButton(bool show);
59 ConnectionInfo connectionInfo() const { return m_connection_info; }
60 signals:
63 protected slots:
65 protected:
67 protected:
69 Button* m_connection_setup_button = nullptr;
70 Button* m_connection_state_button = nullptr;
71 Button* m_clear_button = nullptr;
72 ConnectionSetupWidget* m_setup_widget = nullptr;
73 bool m_allow_disconnect = false;
74 bool m_allow_connect = false;
75 bool m_allow_clear_button = false;
76 };
77}
#define HARDWARE_WIDGETS_API
Definition DLLInfo.h:74
A core widget that allows the user to click one of many button types.
Definition Button.h:66
ButtonState
Definition Button.h:71
Definition ConnectionSetupWidget.h:12
Definition ConnectionWidget.h:47
void setConnection(const ConnectionInfo &sensor)
void setShowWiFiSettingsButton(bool show)
void setAllowConnect(bool allow_connect)
ConnectionWidget(QWidget *parent=nullptr)
void setShowBluetoothSettingsButton(bool show)
void setButtonState(Button::ButtonState button_state)
ConnectionInfo m_connection_info
Definition ConnectionWidget.h:68
void setAllowClearButton(bool show)
void setAllowDisconnect(bool allow_disconnect)
ConnectionInfo connectionInfo() const
Definition ConnectionWidget.h:59
Definition ACIColor.h:37
Definition Connection.h:87