NDEVR
API Documentation
OWLClientInterface.h
1#pragma once
2#include "DLLInfo.h"
3#include "AdaptiveWebClient.h"
4#include <NDEVR/NDEVRFileServer.h>
5#include <NDEVR/NDEVRFileClient.h>
6#include <NDEVR/NDEVRCommunicationLogic.h>
7#include <NDEVR/ServerActions.h>
8#include <NDEVR/BinaryFile.h>
9#include <NDEVR/LogPtr.h>
10namespace NDEVR
11{
12 class OWLExportDialog;
15 class OWLFileManager;
16 struct PopupInfo;
18 class WindowManager;
19 class DatasetView;
20 class QTModelManager;
27 class OWLClientInterface : public AdaptiveWebClient, public NDEVRFileClient
28 {
29 Q_OBJECT
30 public:
39 virtual void onReceive(NDEVRConnectionData& data) override;
44 void showWarning(PopupInfo info, ServerRequestType request_type);
74 LogPtr& progress() { return m_log; }
78 WindowManager* windowManager() const { return m_window_manager; }
82 virtual ServerCommandReturn pushData() override;
87 virtual void onConnectionChanged(void*, bool is_connected) override;
91 void setAllowBackButton(bool allow);
92 signals:
102 void connectionChangedSignal(bool is_connected);
103 private:
104 OWLCredentialsDialog* m_credentials_dialog = nullptr;
105 OwlServerSettingsDialog* m_server_settings_dialog = nullptr;
106 OWLExportDialog* m_export_dialog = nullptr;
107 OWLFileManager* m_file_manager = nullptr;
108 LogPtr m_log;
109 ProgressInfo* m_progress = nullptr;
110 DesignObjectLookup* m_lookup;
111 QTModelManager* m_read_only_manager = nullptr;
112 DatasetView* m_read_only_dataset_view = nullptr;
113 WindowManager* m_window_manager = nullptr;
114 bool m_allow_back_button = true;
115 };
116}
AdaptiveWebClient(QObject *parent=nullptr)
Constructs the WebSocket client.
A relatively lightweight Widget that can be used for an entire application that allows for easy downl...
Definition DatasetView.h:33
A core class where all Design Objects including models, materials, and geometries are stored.
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
virtual void onReceive(NDEVRConnectionData &data) override
Handles received data from the server connection.
WindowManager * windowManager() const
Returns the window manager.
void openDownloadedData()
Opens the most recently downloaded data in the application.
OWLFileManager * fileManager()
Returns the file manager dialog, creating it if needed.
void setAllowBackButton(bool allow)
Enables or disables the back button on dialogs.
OWLExportDialog * exportDialog()
Returns the export dialog, creating it if needed.
void showDuplicateUserWarning(PopupInfo info)
Shows a warning when a duplicate user is detected.
OWLClientInterface(DesignObjectLookup *lookup, WindowManager *window_manager)
Constructs the OWL client interface.
LogPtr & progress()
Returns the progress log for tracking operations.
void connectionChangedSignal(bool is_connected)
Emitted when the connection state changes.
virtual void onConnectionChanged(void *, bool is_connected) override
Called when the server connection state changes.
void finishedSignal(ServerRequestType)
Emitted when a server request has completed.
void requestShowCredentialsSignal()
Emitted when credentials need to be shown to the user.
void showNoUserWarning(PopupInfo info)
Shows a warning when no user account is found.
void showWarning(PopupInfo info, ServerRequestType request_type)
Shows a warning popup for a failed server request.
OWLCredentialsDialog * credentialsDialog()
Returns the credentials dialog, creating it if needed.
OwlServerSettingsDialog * serverManagerDialog()
Returns the server settings dialog, creating it if needed.
virtual ServerCommandReturn pushData() override
Pushes the current project data to the server.
Dialog for entering OWL server login credentials.
Dialog for exporting projects and files to an OWL server.
File management widget for browsing, opening, and managing files on an OWL server.
Dialog for managing OWL server connections.
Used with InfoPipe to signal that the system will be using progress.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Manages all windows and logic surrounding dialogs and views for displaying and managing any environme...
The primary namespace for the NDEVR SDK.
ServerRequestType
Enumerates the types of requests that can be sent between NDEVR file clients and servers.
Holds the state of a single NDEVR network connection, including transmit and receive packets.
Class which is used to pass arguments and requests for creating a popup dialog or widget.
Definition PopupInfo.h:16
Encapsulates a server command's return status, including a code and optional message.