26 #ifndef CAMITKAPPLICATION_H
27 #define CAMITKAPPLICATION_H
34 #include <QApplication>
40 #include <QTranslator>
45 class ActionExtension;
46 class ViewerExtension;
50 class ComponentExtension;
94 Q_ENUM(TargetPositionningPolicy)
116 Application(QString name,
int& argc,
char** argv,
bool autoloadExtension =
true,
bool registerFileExtension =
false);
126 bool notify(QObject*, QEvent*)
override;
129 static QString getName();
146 static QSettings& getSettings();
164 static const QDir getLastUsedDirectory();
167 static void setLastUsedDirectory(QDir);
172 static void addRecentDocument(QFileInfo);
178 static const int getMaxRecentDocuments();
195 static Component* openDirectory(
const QString& dirName,
const QString& pluginName);
199 static bool loadWorkspace(
const QString& filepath);
218 static bool saveWorkspace(
const QString& filepath);
236 static bool hasModified();
253 static void clearSelectedComponents();
260 static Action* getAction(QString);
287 static void setTriggeredAction(
Action* action);
290 static Action* getTriggeredAction();
297 static Viewer* getViewer(QString name);
302 static Viewer* getNewViewer(QString name, QString className);
311 static bool registerViewer(
Viewer*);
356 static void showStatusBarMessage(QString msg,
int timeout = 0);
361 static void resetProgressBar();
368 static void setProgressBarValue(
int);
382 static void vtkProgressFunction(vtkObject* caller,
long unsigned int,
void*,
void*);
403 static void saveHistoryAsSXML();
412 static QString getSelectedLanguage();
449 static Action* currentAction;
457 static QDir lastUsedDirectory;
460 static int maxRecentDocuments;
463 static QTranslator* translator;
507 static void setSelected(
Component* component,
bool isSelected);
531 static QSettings settings;
534 static void applyPropertyValues();
537 static void applyMainWindowPropertyValues();
554 static QStack<HistoryItem>& getHistory();
570 static QMap<QString, Action*>& getActionMap();
590 static QMap<QString, Viewer*>& getViewerMap();
604 static void createProperties();
619 static void initResources();
626 bool eventFilter(QObject*
object, QEvent* event)
override;
#define CAMITK_API
Definition: CamiTKAPI.h:49
Definition: canvas_typed/mainwindow.h:69
This class describes what is a generic Action extension.
Definition: ActionExtension.h:57
Action class is an abstract class that enables you to build a action (generally on a component).
Definition: Action.h:209
The generic/default application.
Definition: Application.h:82
TargetPositionningPolicy
: Policy to determine how a newly instantiated component's frame should be initialized regarding of i...
Definition: Application.h:88
@ SAME_TRANSFORMATION
New component has no parent frame (parent frame is set to nullptr), and its frame is copied from its ...
Definition: Application.h:89
@ NO_TRANSFORMATION
New component has no parent frame (parent frame is therefore set to nullptr) and transform is Id.
Definition: Application.h:90
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:303
HistoryItem class describes the entry of an action used in a pipeline, in the history.
Definition: HistoryItem.h:61
This class is the base class for your application.
Definition: MainWindow.h:66
Definition: PersistenceManager.h:43
This class describes a property object.
Definition: PropertyObject.h:72
This class describes what is a generic Action extension.
Definition: ViewerExtension.h:85
Viewer is an abstract class that is the base class for all viewers.
Definition: Viewer.h:181
Definition: Action.cpp:36
QSet< Action * > ActionSet
A set of Action.
Definition: CamiTKAPI.h:130
QSet< Viewer * > ViewerSet
A set of Viewer.
Definition: CamiTKAPI.h:133
void refresh()
refresh the display