NDEVR
API Documentation
OWLExportDialog.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: OWLExportDialog
29Included in API: True
30Author(s): tyler.parke
31 *-----------------------------------------------------------------------------------------**/
32
33#pragma once
34#include <QWidget>
35#include <NDEVR/File.h>
36#include <NDEVR/DesignObjectDialogLookup.h>
37#include <NDEVR/ServerPermission.h>
38namespace Ui
39{
40 class OWLExportDialogUI;
41}
42namespace NDEVR
43{
44 class StringView;
45 class File;
50 struct PopupInfo;
57 class OWLExportDialog : public QWidget
58 {
59 Q_OBJECT
60 public:
66 OWLExportDialog(DesignObjectLookup* lookup, OWLClientInterface* download, QWidget* parent = nullptr);
71 bool event(QEvent* event) override;
79 void reset();
89 void exportNewPermission(const ServerPermission& original_permission);
92 signals:
95 private:
97 void encodeData();
101 void exportEncodedData(File file);
103 void init();
105 void uploadFile();
107 void uploadPermission();
109 void checkForNameConflictFinished();
110 private:
111 ServerPermission m_original_permission;
112 File m_file_to_upload;
113 File m_file_to_encode;
114 String m_preview_icon;
115 String m_preview_text;
116 Vector<32, uint01> m_resource_password;
117 UUID m_link_password = Constant<UUID>::Invalid;
118 UUID m_decrypt_password = Constant<UUID>::Invalid;
119 BasicThread* m_owl_save_thread = nullptr;
120 BasicThread* m_owl_encode_thread = nullptr;
121 OWLClientInterface* m_server_actions = nullptr;
122 DesignObjectLookup* m_lookup = nullptr;
123 OWLDuplicateResolver* m_duplicate_resolver = nullptr;
124 ProgressInfo* m_progress_info = nullptr;
125 Ui::OWLExportDialogUI* ui = nullptr;
126 bool m_validated_connection = false;
127 bool m_checking_for_duplicate = false;
128 bool m_upload_resource = true;
129 String m_last_checked_name;
130 sint04 m_upload_version = Constant<sint04>::Invalid;
131 };
132}
A thread that executes a user-provided callback function concurrently.
Definition BasicThread.h:47
A core class where all Design Objects including models, materials, and geometries are stored.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Definition File.h:53
High-level OWL server client that combines WebSocket communication with file transfer,...
Dialog for entering OWL server login credentials.
Dialog for resolving duplicate file conflicts during OWL upload.
void reset()
Resets the dialog to its initial state.
void checkForNameConflict()
Checks whether the chosen name conflicts with an existing server file.
OWLExportDialog(DesignObjectLookup *lookup, OWLClientInterface *download, QWidget *parent=nullptr)
Constructs the export dialog.
void updateGenerateEnabled()
Updates the enabled state of the generate/export button.
void setLookup(DesignObjectLookup *lookup)
Sets the design object lookup for project data.
void finishedSignal()
Emitted when the export workflow has completed.
void exportNewPermission(const ServerPermission &original_permission)
Exports a new permission entry to the server.
bool event(QEvent *event) override
Handles events including show/hide transitions.
void exportCurrentProject()
Exports the currently open project to the server.
void exportFile(File file)
Exports a specific file to the server.
Dialog for managing OWL server connections.
Used with InfoPipe to signal that the system will be using progress.
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
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
Definition Vector.hpp:62
The primary namespace for the NDEVR SDK.
int32_t sint04
-Defines an alias representing a 4 byte, signed integer.
@ file
The source file path associated with this object.
Class which is used to pass arguments and requests for creating a popup dialog or widget.
Definition PopupInfo.h:16
Defines permissions for a user to access a specific resource, including encryption data.