API Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
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);
52 void clearConnection();
53 void setAllowDisconnect(bool allow_disconnect);
54 void setAllowConnect(bool allow_connect);
55 void setShowBluetoothSettingsButton(bool show);
56 void setShowWiFiSettingsButton(bool show);
57 void setAllowClearButton(bool show);
58 void setButtonState(Button::ButtonState button_state);
59 ConnectionInfo connectionInfo() const { return m_connection_info; }
60 signals:
63 protected slots:
64 void updatedSlot();
65 protected:
66 void updateLayout();
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
Definition Button.h:60
ButtonState
Definition Button.h:65
Definition ConnectionSetupWidget.h:12
Definition ConnectionWidget.h:47
ConnectionInfo m_connection_info
Definition ConnectionWidget.h:68
ConnectionInfo connectionInfo() const
Definition ConnectionWidget.h:59
Definition ACIColor.h:37
Definition Connection.h:87