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 Class: AutoModelFileDialog
45
46 \brief Dialog that allows user to choose import or export options while simultaniously automatically
47 writing or reading the file in the background such that the user might already have the data when finished.
48 *-----------------------------------------------------------------------------------------------**/
50 {
51 Q_OBJECT
52 public:
53 AutoModelFileDialog(bool is_import, ProgressInfo* log, QWidget *parent = nullptr);
55 virtual void setRequests(const Buffer<FactoryParameters>& file);
56 virtual void updateOptions(FactoryOptions& new_options) override;
57
58 Buffer<UUID> IDs() const;
59 virtual void setUUIDs(Buffer<UUID> models);
60 void selectAllVisible();
61 void selectDefaultToExport();
62 virtual void filterModelsToExport();
63 virtual void reset();
64 virtual void beginProcess();
65 void setIsValid(bool is_valid);
66 void setPositionOnEnd(bool position_on_end);
67 protected:
68 bool loadOrSaveFile();
69 void processWarnings();
70 void onOperationFinished(bool success);
71 void onSuccessfulSave();
72 void onSuccessfulImport();
73 virtual void _cancelled() override;
74 virtual void _accepted() override;
75 ModelFactory* factory() const;
76 signals:
77 void loaded();
78 protected:
79#if NDEVR_SUPPORTS_THREADING
80 CachedFactoryIOThread m_factory_thread;
81#endif
85 private:
86 bool m_is_valid;
87 bool m_share_on_end;
88 bool m_position_on_end;
89 };
90}
#define NDEVR_API
Definition DLLInfo.h:67
Dialog that allows user to choose import or export options while simultaniously automatically.
Definition AutoModelFileDialog.h:50
bool m_show_error_dialog
Definition AutoModelFileDialog.h:84
ModelSelectionTree * m_selection_tree
Definition AutoModelFileDialog.h:83
Buffer< FactoryParameters > m_files
Definition AutoModelFileDialog.h:82
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition FactoryOptions.h:46
Definition ModelFactory.h:39
Definition ModelFileDialog.h:56
Definition ModelSelectionTree.h:48
Definition ProgressInfo.hpp:43
Definition ACIColor.h:37