NDEVR
API Documentation
OWLLinkDisplay.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2020, 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: NDEVRServerInterface
28File: OWLLinkDisplay
29Included in API: True
30Author(s): tyler.parke
31 *-----------------------------------------------------------------------------------------**/
32
33#pragma once
34#include <NDEVR/String.h>
35#include <QWidget>
36namespace Ui
37{
38 class OWLLinkDisplayUI;
39}
40namespace NDEVR
41{
44 class StringView;
45 class NDEVRFileClient;
46 struct PopupInfo;
52 class OWLLinkDisplay : public QWidget
53 {
54 public:
58 OWLLinkDisplay(QWidget* parent = nullptr);
62 void setLink(const StringView& link);
66 void setClient(NDEVRFileClient* server_actions);
70 void setPreview(const StringView& preview_id);
75 private:
77 void init();
78 private:
79 Ui::OWLLinkDisplayUI* ui = nullptr;
80 FileChooserDialog* m_file_chooser_dialog = nullptr;
81 NDEVRFileClient* m_server_actions = nullptr;
82 String m_preview_id;
83 };
84}
A dialog designed to allow the user to navigate a filesytem and select or create one or more files or...
High-level OWL server client that combines WebSocket communication with file transfer,...
void saveOWLFile(PopupInfo info)
Saves the linked OWL file to the local filesystem.
void setLink(const StringView &link)
Sets the OWL share link URL to display.
void setPreview(const StringView &preview_id)
Sets the preview image or text for the linked content.
OWLLinkDisplay(QWidget *parent=nullptr)
Constructs the link display widget.
void setClient(NDEVRFileClient *server_actions)
Sets the file client for downloading the linked content.
The core String View class for the NDEVR API.
Definition StringView.h:58
The core String class for the NDEVR API.
Definition String.h:95
The primary namespace for the NDEVR SDK.
Class which is used to pass arguments and requests for creating a popup dialog or widget.
Definition PopupInfo.h:16