API Documentation
Loading...
Searching...
No Matches
WebSocketConnectionDialog.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: SerialConnectionDialog
30Included in API: True
31Author(s): Tyler Parke
32 *-----------------------------------------------------------------------------------------**/
33#pragma once
34#include "DLLInfo.h"
36#include "DLLInfo.h"
37#include <NDEVR/Connection.h>
39#include <QWidget>
40namespace Ui
41{
42 class WebNetworkConnectionUI;
43}
44namespace NDEVR
45{
46 class Connection;
47 class ProgressInfo;
48 class Thread;
49 /**--------------------------------------------------------------------------------------------------
50 \brief A ConnectionDialog that allows the user to modify a WebSocketConnection
51 **/
53 {
54 Q_OBJECT
55 public:
56 explicit WebSocketConnectionDialog(QWidget* parent = nullptr);
58 void setFixedProtocol(const String& mode);
60 virtual void clear() override;
61 virtual ConnectionInfo connectionInfo() const override;
62 virtual void setConnectionInfo(const ConnectionInfo& connection) override;
63 virtual bool handlesConnection(const ConnectionInfo& connection) override;
64 void setAllowPingLogic(bool allow_ping);
65 void setAllowLocalButton(bool allow_local);
66 bool checkIfValid() const;
68 protected slots:
70 protected:
72 protected:
74 Ui::WebNetworkConnectionUI* ui;
75 bool m_allow_ping_logic = true;
76 bool m_allow_local_button = true;
77 };
78 /**--------------------------------------------------------------------------------------------------
79 \brief A ConnectionDialogFactory which allows for the creation of a WebSocketConnectionDialog
80 **/
82 {
83 public:
84 virtual bool handlesType(const String& connection) const override;
85 virtual TranslatedString title() const override;
86 virtual String icon() const override;
87 virtual ConnectionDialog* createConnectionDialog() const override;
88 };
89}
#define NDEVR_WEB_SOCKET_API
Definition DLLInfo.h:55
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
The core String class for the NDEVR API.
Definition String.h:69
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
A ConnectionDialogFactory which allows for the creation of a WebSocketConnectionDialog.
Definition WebSocketConnectionDialog.h:82
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 WebSocketConnection.
Definition WebSocketConnectionDialog.h:53
Ui::WebNetworkConnectionUI * ui
Definition WebSocketConnectionDialog.h:74
virtual ConnectionInfo connectionInfo() const override
void setAllowLocalButton(bool allow_local)
void setAllowPingLogic(bool allow_ping)
String m_fixed_protocol
Definition WebSocketConnectionDialog.h:73
void setFixedProtocol(const String &mode)
virtual void clear() override
WebSocketConnectionDialog(QWidget *parent=nullptr)
virtual void setConnectionInfo(const ConnectionInfo &connection) override
virtual bool handlesConnection(const ConnectionInfo &connection) override
Definition ACIColor.h:37
Definition FontEditor.h:6
A structure designed to store information about a specific Connection.
Definition Connection.h:97