API Documentation
Loading...
Searching...
No Matches
AutoModelFileDialog.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, 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: NDEVR
28File: AutoModelFileDialog
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/ModelFileDialog.h>
35#if NDEVR_SUPPORTS_THREADING
36 #include <NDEVR/CachedFactoryIOThread.h>
37#endif
38namespace NDEVR
39{
40 struct PopupInfo;
41 class ModelFactory;
42 class ModelSelectionTree;
43 /**--------------------------------------------------------------------------------------------------
44 \brief Dialog that allows user to choose import or export options while simultaniously automatically
45 writing or reading the file in the background such that the user might already have the data
46 when finished.
47 **/
49 {
50 Q_OBJECT
51 public:
52 AutoModelFileDialog(bool is_import, ProgressInfo* log, QWidget *parent = nullptr);
54 virtual void setRequests(const Buffer<FactoryParameters>& file);
55 virtual void updateOptions(FactoryOptions& new_options) override;
56
58 virtual void setUUIDs(Buffer<UUID> models);
61 virtual void filterModelsToExport();
62 virtual void reset();
63 virtual void beginProcess();
64 void setIsValid(bool is_valid);
65 void setPositionOnEnd(bool position_on_end);
66 private:
67 bool loadOrSaveFile();
68 void processWarnings();
69 void onOperationFinished(bool success);
70 void onSuccessfulSave();
71 void onSuccessfulImport();
72 virtual void onCancelled() override;
73 virtual void onAccepted() override;
74 ModelFactory* factory() const;
75 signals:
76 void loaded();
77 protected:
78#if NDEVR_SUPPORTS_THREADING
80#endif
84 private:
85 bool m_is_valid;
86 bool m_share_on_end;
87 bool m_position_on_end;
88 };
89}
#define NDEVR_API
Definition DLLInfo.h:50
Dialog that allows user to choose import or export options while simultaniously automatically writing...
Definition AutoModelFileDialog.h:49
bool m_show_error_dialog
Definition AutoModelFileDialog.h:83
void setIsValid(bool is_valid)
virtual void filterModelsToExport()
virtual void updateOptions(FactoryOptions &new_options) override
void setPositionOnEnd(bool position_on_end)
ModelSelectionTree * m_selection_tree
Definition AutoModelFileDialog.h:82
CachedFactoryIOThread m_factory_thread
Definition AutoModelFileDialog.h:79
Buffer< FactoryParameters > m_files
Definition AutoModelFileDialog.h:81
Buffer< UUID > IDs() const
virtual void setRequests(const Buffer< FactoryParameters > &file)
virtual void setUUIDs(Buffer< UUID > models)
virtual void beginProcess()
AutoModelFileDialog(bool is_import, ProgressInfo *log, QWidget *parent=nullptr)
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A thread designed to read and write files using the FactoryIO interface. Thread will perform all acti...
Definition CachedFactoryIOThread.h:47
User-defined options that define preferences for importing and exporting using IOFactory objects.
Definition FactoryOptions.h:49
The core logic for importing and exporting files from the model heirarchy. Stores a series of IOFacto...
Definition ModelFactory.h:45
Shows options related to an import or export that utilizes the IOFactory methods to write or read pro...
Definition ModelFileDialog.h:60
Definition ModelSelectionTree.h:48
A light-weight base class for Log that allows processes to update, without the need for additional in...
Definition ProgressInfo.hpp:48
Definition ACIColor.h:37