-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvisualizador.h
147 lines (137 loc) · 4.65 KB
/
visualizador.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#ifndef VISUALIZADOR_H
#define VISUALIZADOR_H
#define TAB_SELECT_USING_GEOMETRY_INDEX 0
#define TAB_SELECT_USING_EVALUATION_STRATEGY_INDEX 1
#include <list>
#include <QMainWindow>
#include <QWidget>
#include "rendererconfigpopup.h"
#include "SelectionStrategies/Selection.h"
#include "UI/staticsframe.h"
#include "UI/selectiontableview.h"
#include "UI/mainconfiguration.h"
#include "UI/modelgeneralstaticswidget.h"
#include "UI/aboutcamaron.h"
#include "UI/KeyshortcutConfig/keyshortcutconfiguration.h"
#include "ModelGeneralStatics/modelgeneralstaticscollector.h"
#include "UI/modelloadingprogressdialog.h"
#include "UI/propertyfieldloaddialog.h"
#include "Utils/crosstimer.h"
class CustomGLViewer;
namespace Ui {
class Visualizador;
}
class EvaluationStrategyRegistry;
class ModelExportStrategyRegistry;
class SelectionStrategyRegistry;
class RendererRegistry;
class SelectionStrategy;
class ModelLoadingFactory;
class PropertyFieldLoadingFactory;
class RModel;
class RenderersList;
class Model;
class MouseSelection;
struct SelectionStrategyData;
class Visualizador : public QMainWindow
{
Q_OBJECT
public:
explicit Visualizador(QWidget *parent = 0);
~Visualizador();
bool initGlewAndRendererFactory();
public slots:
void closeModel();
void openFile();
void openFileLowWeight();
void importFilePropertyField();
void loadPropertyFieldsQThread(std::string, std::vector<std::shared_ptr<PropertyFieldDef>>);
void onLoadedPropertyFields();
void exportModel();
void exportSelection();
void selectUsingSelectionStrategy();
void evaluate();
void changeRenderer(int);
void changeSelectionStrategy(int);
void changeEvaluationStrategy(int);
void showEvaluationStrategyDescription();
void configurationUpdated();
void receiveSelectionBox(int,int,int,int);
void showModelGeneralStatics();
void addSecondaryRenderer();
void secondaryRendererRemoved();
void mouseDoubleClickEvent(QMouseEvent *e);
void openRecentFile();
void glVersionPopup();
void clearRecentFiles();
void getLoadedModelFromLoadingStrategy();
void showAxesChanged(bool value);
private:
static const unsigned int MAX_RECENT_FILES = 5;
void fixDockWidgetPositions();
void cleanSelectionStrategyConfigQWidget();
void setBaseSelectionStrategyData(SelectionStrategyData*);
void fillEvaluationStrategiesComboBox();
void fillSelectionStrategiesComboBox();
void fillRendererComboBox();
void connectModelLoadingStrategies(ModelLoadingFactory*);
void connectPropertyFieldLoadingStrategies(PropertyFieldLoadingFactory*);
void loadRecentFiles();
void saveRecentFiles();
void updateRecentFilesQActions();
void addRecentFiles(QString filepath);
void enableAndDisableWidgets();
std::string getModelAcceptedExtensions(ModelLoadingFactory* factory);
std::string getPropertyFieldAcceptedExtensions(PropertyFieldLoadingFactory* factory);
std::string getModelAcceptedExportExtensions();
void setupEvaluationStrategiesStatics();
void openModelFromFilePath(QString, bool addToRecentFiles);
void openModelFromFilePathQThread(QString filename,bool lw);
void openPropertyFieldDialogFromFilePath(QString filename, bool userTriggered);
Ui::Visualizador *ui;
//Model
bool modelGeneralStaticsCollected;
Selection selection;
Model* model;
ModelGeneralStaticsCollector modelGeneralStaticsCollector;
//Model Loading
std::string fileFormats,fileFormatsLW, fileFormatsPropertyField;
std::string fileExportFormats;
//Model Rendering
CustomGLViewer* customGLViewer;
RenderersList* renderersList;
RendererConfigPopUp rendererConfigPopup;
RModel* rmodel;
//SelectionStrategy
SelectionStrategy* selectionStrategy;
MouseSelection* mouseSelection;
//Registries
RendererRegistry* rendererRegistry;
EvaluationStrategyRegistry* evaluationStrategyRegistry;
ModelLoadingFactory* modelLoadingFactory;
ModelLoadingFactory* modelLoadingFactoryLW;
PropertyFieldLoadingFactory* propertyFieldLoadingFactory;
SelectionStrategyRegistry* selectionStrategyRegistry;
ModelExportStrategyRegistry* modelExportStrategyRegistry;
//Statistics
StaticsFrame staticsFrame;
//Selection Table
SelectionTableView selectionTableView;
MainConfiguration mainConfiguration;
KeyShortcutConfiguration shortcutconfig;
ModelGeneralStaticsWidget modelGeneralStaticsWidget;
//State
QByteArray savedState;
//QDockingWidgetOrder
QList<QDockWidget*> dockList;
//Camaron About
AboutCamaron aboutCamaron;
//Evaluation Strategy Config
QWidget* evalStrategyConfigWidget;
std::vector<QAction*> recentFilesQActions;
std::list<std::string> recentFilesnames;
ModelLoadingProgressDialog progressDialog;
PropertyFieldLoadDialog propertyFieldDialog;
CrossTimer timer;
};
#endif // VISUALIZADOR_H