API Documentation
Loading...
Searching...
No Matches
ModelFileDialog.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: ModelFileDialog
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/IOFactory.h>
35#include <NDEVR/File.h>
36#include <NDEVR/Buffer.h>
37
38#include <QWidget>
39class QPushButton;
40class QComboBox;
41class QLabel;
42namespace Ui
43{
44 class ImportSettings;
45}
46namespace NDEVR
47{
48 class Button;
49 class QTModelManager;
50 class BasicResourceListener;
51 class INIFactory;
52 class Scene;
53 class GenericOptionsGroup;
54 class FactoryFeatures;
55 class NDEVR_API ModelFileDialog : public QWidget
56 {
57 Q_OBJECT
58 public:
59 ModelFileDialog(bool is_import, ProgressInfo* log, QWidget *parent = 0);
60 void setWindingCalculation(WindingMode winding);
61 virtual void updateUINow();
62 void postUpdateUIRequest();
63 bool shouldShow() const
64 {
65 return m_show_on_each_import;
66 }
67 void closeEvent(QCloseEvent*) override
68 {
69 if (!m_accepted && !m_canceled)
70 _cancelled();
71 };
72 virtual void isOptionMode(bool is_options_mode);
73 void setFormat(const FactoryParameters& format);
74 virtual void updateGeometriesAndFeatures();
75 virtual void setGeometriesAndFeatures(const FactoryFeatures& features);
76
77 protected:
78 const FactoryOptions& defaultOptions();
79 virtual void _cancelled();
80 virtual void _accepted();
81 signals:
82 void dialogEnded(bool accepted);
83 void ModelLoaded(const Scene* object);
84 protected slots:
85 //void setToDefaultUnits();
86 void saveOptionsAsDefault();
87 void setShowOnEachImport();
88 void setOptionsToDefault();
89 void revertOptionsToFactoryDefault();
90 public:
91 bool canRevertOptions() const;
92 bool canResetOptions() const;
93 static void ResetAllImportOptionsToDefaults();
94 static void ResetAllExportOptionsToDefaults();
95 static File INISettingsFolder(bool is_import);
96 File iniFile() const;
97 FactoryOptions::IncludeProperties getReadPrecision() const;
98 FactoryOptions::IncludeProperties getGenerationPrecision() const;
99 FactoryOptions options() const { return m_params.options; }
100
101 protected:
102 virtual void updateOptions(FactoryOptions& new_options);
105 Ui::ImportSettings* ui;
110 const bool m_is_import;
112 bool m_ui_dirty = false;
117 };
118}
#define NDEVR_API
Definition DLLInfo.h:67
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition FactoryFeatures.h:40
Definition FactoryOptions.h:46
IncludeProperties
Definition FactoryOptions.h:57
Definition File.h:47
Definition ModelFileDialog.h:56
bool m_original_show_on_each_import
Definition ModelFileDialog.h:107
File m_ini_file
Definition ModelFileDialog.h:103
FactoryParameters m_params
Definition ModelFileDialog.h:113
bool m_show_on_each_import
Definition ModelFileDialog.h:106
void closeEvent(QCloseEvent *) override
Definition ModelFileDialog.h:67
bool shouldShow() const
Definition ModelFileDialog.h:63
FactoryOptions options() const
Definition ModelFileDialog.h:99
void ModelLoaded(const Scene *object)
void dialogEnded(bool accepted)
Ui::ImportSettings * ui
Definition ModelFileDialog.h:105
bool m_canceled
Definition ModelFileDialog.h:109
UnitManager m_file_units
Definition ModelFileDialog.h:104
ProgressInfo * m_log
Definition ModelFileDialog.h:115
bool m_accepted
Definition ModelFileDialog.h:108
bool m_has_settings_change
Definition ModelFileDialog.h:111
FactoryOptions m_default_options
Definition ModelFileDialog.h:114
const bool m_is_import
Definition ModelFileDialog.h:110
Buffer< GenericOptionsGroup * > m_generic_options_widgets
Definition ModelFileDialog.h:116
Definition ProgressInfo.hpp:43
Definition Model.h:491
Definition UnitManager.h:126
Definition ACIColor.h:37
WindingMode
Definition DesignObjectBase.h:97
Definition FontEditor.h:6
Definition IOFactory.h:56