Computer Assited Medical Intervention Tool Kit  version 5.0
Application.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2021 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef CAMITKAPPLICATION_H
27 #define CAMITKAPPLICATION_H
28 
29 // -- Core stuff
30 #include "CamiTKAPI.h"
31 #include "InterfaceLogger.h"
32 
33 // -- QT stuff
34 #include <QApplication>
35 #include <QSettings>
36 #include <QDir>
37 #include <QFileInfo>
38 #include <QStack>
39 #include <QList>
40 #include <QTranslator>
41 
42 class vtkObject;
43 namespace camitk {
44 class MainWindow;
45 class ActionExtension;
46 class ViewerExtension;
47 class Action;
48 class Viewer;
49 class HistoryItem;
50 class ComponentExtension;
51 class Property;
52 class PropertyObject;
53 
82 class CAMITK_API Application : public QApplication {
83  Q_OBJECT
84 
85 public:
86 
91  SUBFRAME
92  };
93 
94  Q_ENUM(TargetPositionningPolicy)
95 
96 
116  Application(QString name, int& argc, char** argv, bool autoloadExtension = true, bool registerFileExtension = false);
117 
119  ~Application() override;
120 
123 
126  bool notify(QObject*, QEvent*) override;
127 
129  static QString getName();
130 
146  static QSettings& getSettings();
147 
160  static int exec();
161 
164  static const QDir getLastUsedDirectory();
165 
167  static void setLastUsedDirectory(QDir);
168 
172  static void addRecentDocument(QFileInfo);
173 
175  static const QList<QFileInfo> getRecentDocuments();
176 
178  static const int getMaxRecentDocuments();
179 
181 
184 
189  static Component* open(const QString&);
190 
195  static Component* openDirectory(const QString& dirName, const QString& pluginName);
196 
201  static bool close(Component* component);
202 
208  static bool save(Component* component);
209 
211  friend class Component;
212 
217  static const ComponentList& getTopLevelComponents();
218 
223  static const ComponentList& getAllComponents();
224 
226  static bool isAlive(Component*);
227 
229  static bool hasModified();
230 
232 
237 
241  static const ComponentList& getSelectedComponents();
242 
246  static void clearSelectedComponents();
248 
251 
253  static Action* getAction(QString);
254 
256  static const ActionList getActions();
257 
259  static ActionList getActions(Component*);
260 
262  static ActionList getActions(ComponentList);
263 
265  static ActionList getActions(ComponentList, QString);
266 
270  static int registerAllActions(ActionExtension*);
271 
275  static int unregisterAllActions(ActionExtension*);
276 
280  static void setTriggeredAction(Action* action);
281 
283  static Action* getTriggeredAction();
285 
288 
290  static Viewer* getViewer(QString name);
291 
295  static Viewer* getNewViewer(QString name, QString className);
296 
298  static const ViewerList getViewers();
299 
301  static ViewerList getViewers(Component*);
302 
304  static bool registerViewer(Viewer*);
305 
310  static int registerAllViewers(ViewerExtension*);
311 
315  static int unregisterAllViewers(ViewerExtension*);
317 
320 
332  void setMainWindow(MainWindow* mw);
333 
338  static MainWindow* getMainWindow();
339 
341  static void refresh();
342 
349  static void showStatusBarMessage(QString msg, int timeout = 0);
350 
354  static void resetProgressBar();
355 
361  static void setProgressBarValue(int);
362 
375  static void vtkProgressFunction(vtkObject* caller, long unsigned int, void*, void*);
377 
380 
385  static void addHistoryItem(HistoryItem item);
386 
390  static HistoryItem removeLastHistoryItem();
391 
396  static void saveHistoryAsSXML();
397 
399 
402 
405  static QString getSelectedLanguage();
407 
410 
416  static PropertyObject* getPropertyObject();
418 
419 private slots:
420  void quitting();
421 
422 private:
424  static QString name;
425 
428 
430  static int argc;
431 
433  static char** argv;
434 
436 
440  static QList<QFileInfo> recentDocuments;
441 
443  static QDir lastUsedDirectory;
444 
446  static int maxRecentDocuments;
447 
449  static QTranslator* translator;
451 
454 
461  static ComponentList& getTopLevelComponentList();
462 
470  static ComponentList& getAllComponentList();
471 
479  static ComponentList& getSelectedComponentList();
480 
493  static void setSelected(Component* component, bool isSelected);
494 
501  static void addComponent(Component*);
502 
509  static void removeComponent(Component*);
510 
512 
515 
517  static QSettings settings;
518 
520  static void applyPropertyValues();
522 
525 
536  static QStack<HistoryItem>& getHistory();
537 
539 
542 
552  static QMap<QString, Action*>& getActionMap();
553 
555  static ActionList sort(ActionSet);
557 
559  static ViewerList sort(ViewerSet);
561 
564 
576  static QMap<QString, Viewer*>& getViewerMap();
577 
578  static ViewerExtension* getViewerExtension(Viewer* viewer);
579 
581 
584 
587  static void createProperties();
588 
600 
602  static void initResources();
603 
604 protected:
609  bool eventFilter(QObject* object, QEvent* event) override;
610 };
611 
612 
613 
614 }
615 
616 #endif // CAMITKAPPLICATION_H
camitk::Application::resetProgressBar
static void resetProgressBar()
Resets the progress bar if it exists.
Definition: Application.cpp:361
camitk::Application::argv
static char ** argv
argv given from command line
Definition: Application.h:433
camitk::Application::createProperties
static void createProperties()
Create all the application properties and add them to the qApp.
Definition: Application.cpp:1472
camitk::InterfaceLogger::setTimeStampInformation
virtual void setTimeStampInformation(bool showTimeStamp)=0
By default a logger should always show the time-stamp in the form of "yyyy-MM-dd HH:mm:ss....
camitk::InterfaceLogger::setLogLevel
virtual void setLogLevel(LogLevel level)=0
Sets Current verbosity level of the log.
camitk::ComponentExtension::open
virtual Component * open(const QString &)=0
get a new instance from data stored in a file (this is the most important method to redefine in your ...
camitk::Application::getViewers
static const ViewerList getViewers()
get all the viewers registered in the application (note: the returned ViewerList is garanteed to be s...
Definition: Application.cpp:980
camitk::Component::getParentComponent
Component * getParentComponent()
get the parent component
Definition: sdk/libraries/core/component/Component.cpp:209
camitk::Application::quitting
void quitting()
}@
Definition: Application.cpp:208
camitk::InterfaceLogger::setDebugInformation
virtual void setDebugInformation(bool)=0
Allows the logger to add debug information to the log message.
camitk::Application::save
static bool save(Component *component)
save a component to its file (as given by component->getFileName()).
Definition: Application.cpp:667
camitk::InterfaceLogger::setLogToFile
virtual bool setLogToFile(bool writeToFile)=0
Ask the logger to write to the log file.
CAMITK_WARNING_ALT
#define CAMITK_WARNING_ALT(MSG)
Definition: Log.h:267
camitk::Component::isTopLevel
bool isTopLevel() const
return true if this component is a top-level component
Definition: sdk/libraries/core/component/Component.cpp:203
camitk::HistoryItem::getInputHistoryComponents
QList< HistoryComponent > getInputHistoryComponents()
Get the input components of the history item action.
Definition: HistoryItem.cpp:70
camitk::Application::getActions
static const ActionList getActions()
get all the actions registered in the application (note: the returned ActionList is garanteed to be s...
Definition: Application.cpp:737
camitk::Application::initResources
static void initResources()
Init the application resources by loading the language associated .qml file.
Definition: Application.cpp:1451
camitk::MainWindow::redirectToConsole
virtual void redirectToConsole(bool)
use or not the application console (redirect or not standard out/err streams)
Definition: MainWindow.cpp:393
camitk::HistoryItem::getOutputHistoryComponents
QList< HistoryComponent > getOutputHistoryComponents()
Get the output components of the history item action.
Definition: HistoryItem.cpp:80
camitk::Application::getSelectedComponentList
static ComponentList & getSelectedComponentList()
get the currently selected Components.
Definition: Application.cpp:1071
camitk::Application::getTopLevelComponentList
static ComponentList & getTopLevelComponentList()
get the current application wide list of instantiated top-level Components.
Definition: Application.cpp:1057
camitk::Component::getHierarchy
QStringList getHierarchy() const override
Definition: sdk/libraries/core/component/Component.cpp:480
camitk::Application::getAllComponentList
static ComponentList & getAllComponentList()
get the current application wide list of all Components.
Definition: Application.cpp:1064
camitk::Application::getHistory
static QStack< HistoryItem > & getHistory()
get the history of actions stored.
Definition: Application.cpp:1125
CamiTKAPI.h
camitk::Action::SUCCESS
@ SUCCESS
everything went according to plan
Definition: Action.h:248
camitk::Application::getSelectedLanguage
static QString getSelectedLanguage()
Returns for the current CamiTK application, the selected language (stored in its ....
Definition: Application.cpp:1437
InterfaceLogger.h
camitk::Application::getSettings
static QSettings & getSettings()
Get the Core wide settings.
Definition: Application.cpp:309
camitk::Component::getFileName
const QString getFileName() const
get the file name where the data have to be stored/were stored
Definition: sdk/libraries/core/component/Component.cpp:461
camitk::Application::getViewerMap
static QMap< QString, Viewer * > & getViewerMap()
As viewers are mainly sort/compared/process by name, an internal QMap associates all the registered v...
Definition: Application.cpp:875
camitk::ExtensionManager::getFileExtensions
static QStringList getFileExtensions()
get the list of all the suffixes managed by registered component extensions (all possible file suffix...
Definition: ExtensionManager.cpp:480
initIcons
void initIcons()
Definition: Application.cpp:53
camitk::Application::setMainWindow
void setMainWindow(MainWindow *mw)
set the main window.
Definition: Application.cpp:251
camitk::Application::addRecentDocument
static void addRecentDocument(QFileInfo)
Add a document to the list of recent documents (e.g.
Definition: Application.cpp:402
camitk::ExtensionManager::autoload
static void autoload()
Autoload component and action extensions.
Definition: ExtensionManager.cpp:68
camitk::Application::getAllComponents
static const ComponentList & getAllComponents()
get the current application wide list of all Components.
Definition: Application.cpp:1083
camitk::Application::refresh
static void refresh()
refresh the main window (this will call the refresh method of all viewers)
Definition: Application.cpp:333
camitk::Application::clearSelectedComponents
static void clearSelectedComponents()
clear all the selection, i.e call setSelected(false) for all the previously selected components and c...
Definition: Application.cpp:1106
camitk::Application::removeComponent
static void removeComponent(Component *)
unregister a Component.
Definition: Application.cpp:1050
camitk::Application::close
static bool close(Component *component)
Close a Component: if it has been changed, ask the user for more information, then if everything is o...
Definition: Application.cpp:629
camitk::viewerLessThan
bool viewerLessThan(const camitk::Viewer *v1, const camitk::Viewer *v2)
Definition: Application.cpp:784
camitk::PropertyObject::saveToSettings
void saveToSettings(const QString &settingGroupName)
save setting in the given group name using all the property values
Definition: PropertyObject.cpp:239
camitk::Application::propertyObject
static PropertyObject * propertyObject
A simple QObject that holds the CamiTK level properties of the application.
Definition: Application.h:598
CAMITK_INFO
#define CAMITK_INFO(MSG)
Log for info verbosity (the second most verbose one) The msg will appear only if the user asked for I...
Definition: Log.h:261
camitk::Application::setProgressBarValue
static void setProgressBarValue(int)
set the progress bar value, value should be in [0..100].
Definition: Application.cpp:374
camitk::InterfaceLogger::NONE
@ NONE
No message is logged.
Definition: InterfaceLogger.h:61
camitk::ComponentExtension
This class describes what is a generic Component extension. To add a ComponentExtension to CamiTK cor...
Definition: ComponentExtension.h:83
camitk::ViewerExtension::getViewers
const ViewerList & getViewers()
get the list of viewer instances registered by this extension
Definition: ViewerExtension.cpp:190
camitk::PropertyObject::loadFromSettings
void loadFromSettings(const QString &settingGroupName)
initializes all property values from setting values found in the given group name
Definition: PropertyObject.cpp:142
camitk::InterfaceLogger::ERROR
@ ERROR
Only error messages are logged.
Definition: InterfaceLogger.h:62
HistoryComponent.h
PropertyObject.h
camitk::Application::getLastUsedDirectory
static const QDir getLastUsedDirectory()
Get the last used directory (e.g.
Definition: Application.cpp:436
camitk::Application::getMaxRecentDocuments
static const int getMaxRecentDocuments()
get the maximal number of recent documents stored
Definition: Application.cpp:451
camitk::Application::sort
static ActionList sort(ActionSet)
sort an ActionSet by action's name
Definition: Application.cpp:791
camitk::ExtensionManager::unloadAllViewerExtensions
static void unloadAllViewerExtensions()
unload all viewer extensions and delete instantiated actions
Definition: ExtensionManager.cpp:527
camitk::Application::registerAllViewers
static int registerAllViewers(ViewerExtension *)
register all viewers from the given ViewerExtension
Definition: Application.cpp:918
camitk::Application::unregisterAllActions
static int unregisterAllActions(ActionExtension *)
unregister all actions from the given ActionExtension
Definition: Application.cpp:766
camitk::Action::getName
QString getName() const
get the name of the action
Definition: Action.h:338
camitk::HistoryComponent
HistoryComponent class describes the component information (name, type) stored in the history.
Definition: HistoryComponent.h:82
camitk::Application::name
static QString name
name of the CamiTK application (used to differentiate settings between CamiTK applications)
Definition: Application.h:424
Action.h
camitk::Application::addHistoryItem
static void addHistoryItem(HistoryItem item)
Add the history item to the application history.
Definition: Application.cpp:1132
camitk::Application::Application
Application(QString name, int &argc, char **argv, bool autoloadExtension=true, bool registerFileExtension=false)
Initializes the window system and constructs a CamiTK application object with argc command line argum...
Definition: Application.cpp:73
camitk::ActionList
QList< Action * > ActionList
A list of Action.
Definition: CamiTKAPI.h:136
camitk::Application::getSelectedComponents
static const ComponentList & getSelectedComponents()
get the currently selected Components.
Definition: Application.cpp:1088
camitk::Application::lastUsedDirectory
static QDir lastUsedDirectory
last used directory
Definition: Application.h:443
camitk::actionLessThan
bool actionLessThan(const camitk::Action *a1, const camitk::Action *a2)
Definition: Application.cpp:778
camitk::Action::getExtensionName
QString getExtensionName() const
the name of the extension in the family in which this action is associated
Definition: Action.cpp:156
camitk::Application::maxRecentDocuments
static int maxRecentDocuments
max number of recent document (default 10)
Definition: Application.h:446
camitk::Property
This class describes a property that can be used in components and actions or any class that needs to...
Definition: Property.h:303
camitk::ViewerSet
QSet< Viewer * > ViewerSet
A set of Viewer.
Definition: CamiTKAPI.h:133
Log.h
camitk::ExtensionManager::getComponentExtension
static ComponentExtension * getComponentExtension(QString)
get the plugin corresponding to a given extension or name.
Definition: ExtensionManager.cpp:440
camitk::Core::getCurrentWorkingDir
static const QString getCurrentWorkingDir()
get the current working directory (during dev, this should be the build directory,...
Definition: Core.cpp:423
camitk::Core::getTestDataDir
static const QString getTestDataDir()
Get a valid camitk test data directory name.
Definition: Core.cpp:361
camitk::Action::getFamily
QString getFamily() const
the name of the family in which this action is associated
Definition: Action.h:353
camitk::Application::currentAction
static Action * currentAction
Definition: Application.h:435
camitk::Viewer::getName
QString getName() const
get the name of the viewer
Definition: Viewer.h:200
camitk::Action
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:231
camitk::ViewerExtension::getName
virtual QString getName()=0
returns the viewer extension name (to be overriden in the derived class)
camitk::Log::getLogger
static InterfaceLogger * getLogger()
get the current application logger
Definition: Log.cpp:73
camitk::ExtensionManager::getDataDirectoryComponentExtension
static ComponentExtension * getDataDirectoryComponentExtension(QString)
get the plugin corresponding to a given data directory component extension's name.
Definition: ExtensionManager.cpp:428
Property.h
MainWindow
Definition: canvas_typed/mainwindow.h:69
camitk::Application::getViewer
static Viewer * getViewer(QString name)
get the pointer to a registered viewer given its name
Definition: Application.cpp:882
camitk::ExtensionManager::getViewerExtensionsList
static const QList< ViewerExtension * > getViewerExtensionsList()
Get the list of registered ViewerExtension.
Definition: ExtensionManager.cpp:536
camitk::Application::showStatusBarMessage
static void showStatusBarMessage(QString msg, int timeout=0)
Set a message to the status bar.
Definition: Application.cpp:345
camitk::Action::getDescription
QString getDescription() const
the description of the action
Definition: Action.h:343
camitk::Application
The generic/default application. Once this class is intanciated in the main, everything is setup....
Definition: Application.h:82
camitk::ActionSet
QSet< Action * > ActionSet
A set of Action.
Definition: CamiTKAPI.h:130
camitk::HistoryItem
HistoryItem class describes the entry of an action used in a pipeline, in the history.
Definition: HistoryItem.h:84
camitk::Application::openDirectory
static Component * openDirectory(const QString &dirName, const QString &pluginName)
load a directory and returns the corresponding Component (returns nullptr if an error occurs)
Definition: Application.cpp:555
camitk::AbortException
Exception class to handle abortion in component instantiation. Particularly useful to handle construc...
Definition: AbortException.h:66
camitk::Application::setLastUsedDirectory
static void setLastUsedDirectory(QDir)
set (force) the last used directory
Definition: Application.cpp:441
CAMITK_ERROR
#define CAMITK_ERROR(MSG)
Log for error verbosity (the minimum verbosity) Will always appear.
Definition: Log.h:276
camitk::Application::vtkProgressFunction
static void vtkProgressFunction(vtkObject *caller, long unsigned int, void *, void *)
Observer function to be called by vtkFilters and to update progress bar Example of use:
Definition: Application.cpp:387
camitk::MainWindow::show
void show()
inherited from QWidget, just to refresh all viewers
Definition: MainWindow.cpp:425
camitk::Application::open
static Component * open(const QString &)
load the filename and returns the corresponding top level Component (returns nullptr if an error occu...
Definition: Application.cpp:456
camitk::Application::registerViewer
static bool registerViewer(Viewer *)
register a viewer in the viewer list (therefore allowing it to be refreshed by the main window automa...
Definition: Application.cpp:887
camitk::Viewer::getComponents
QStringList getComponents()
get the list of Component class manages by this viewer (default is set to "Component",...
Definition: Viewer.cpp:99
camitk::Component::setSelected
virtual void setSelected(const bool b, const bool recursive=true)
Update the selection flag.
Definition: sdk/libraries/core/component/Component.cpp:445
camitk::ComponentExtension::save
virtual bool save(Component *component) const
save a given Component (does not have to be top-level) into one of the currently managed format (chec...
Definition: ComponentExtension.cpp:63
camitk::InterfaceLogger::INFO
@ INFO
information, warning and error messages are logged
Definition: InterfaceLogger.h:64
camitk::Application::saveHistoryAsSXML
static void saveHistoryAsSXML()
Save the history as an SCXML file, stored using.
Definition: Application.cpp:1142
camitk::Application::~Application
~Application() override
destructor
Definition: Application.cpp:190
camitk::Component::getName
QString getName() const override
get the name to be displayed
Definition: sdk/libraries/core/component/Component.h:907
camitk::Application::setTriggeredAction
static void setTriggeredAction(Action *action)
set the currently triggered action This is used by Action::trigger(..) to refresh all the viewer (the...
Definition: Application.cpp:1115
camitk::InterfaceLogger::LogLevel
LogLevel
Definition: InterfaceLogger.h:60
camitk::Application::getMainWindow
static MainWindow * getMainWindow()
get the main window
Definition: Application.cpp:297
camitk::AbortException::what
const char * what() const noexcept
get the detailed reason from the exception
Definition: AbortException.h:99
camitk::Application::SAME_TRANSFORMATION
@ 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
camitk::Application::getPropertyObject
static PropertyObject * getPropertyObject()
Get the property object of the application.
Definition: Application.cpp:1531
camitk::ComponentList
QList< Component * > ComponentList
A list of Component.
Definition: CamiTKAPI.h:127
camitk::Core::getComponentDirectories
static const QStringList getComponentDirectories()
get all the component directories.
Definition: Core.cpp:351
camitk::Application::mainWindow
static MainWindow * mainWindow
the main window of the CamiTK application
Definition: Application.h:427
camitk::HistoryComponent::IMAGE_COMPONENT
@ IMAGE_COMPONENT
this Component represents a volumic image and its subcomponents can be displayed as slices.
Definition: HistoryComponent.h:120
camitk::Application::applyPropertyValues
static void applyPropertyValues()
Apply all the property values to update the model (e.g., use the logLevel to modify the actual log le...
Definition: Application.cpp:1556
camitk::ViewerExtension::getNewInstance
Viewer * getNewInstance(QString name)
factory: create a new viewer instance and register it
Definition: ViewerExtension.cpp:161
MainWindow.h
camitk::Application::translator
static QTranslator * translator
Provide internationalization support for text output.
Definition: Application.h:449
camitk::MainWindow::getProgressBar
QProgressBar * getProgressBar()
similar as statusBar() from QMainWindow but for the progress bar
Definition: MainWindow.cpp:388
camitk::InterfaceLogger::WARNING
@ WARNING
Only Warning and Error messages are logged.
Definition: InterfaceLogger.h:63
camitk::InterfaceLogger::setMessageBoxLevel
virtual void setMessageBoxLevel(LogLevel level)=0
Set the lowest log level that will open modal message box for messages instead of (silently/undisrupt...
camitk::Application::isAlive
static bool isAlive(Component *)
does this Component still exists?
Definition: Application.cpp:1022
camitk::Application::getAction
static Action * getAction(QString)
get a registered action given its name
Definition: Application.cpp:809
camitk::Application::getName
static QString getName()
get the application name
Definition: Application.cpp:203
camitk::MainWindow
This class is the base class for your application. It sets up the main window and creates a menubar,...
Definition: MainWindow.h:89
camitk::Application::notify
bool notify(QObject *, QEvent *) override
reimplemented from QApplication to catch all exception from external libs used in CEP (e....
Definition: Application.cpp:223
camitk::Action::getTag
QStringList getTag() const
the name of the tag called this action
Definition: Action.h:361
camitk::Application::getActionMap
static QMap< QString, Action * > & getActionMap()
As actions are mainly sort/compared/process by name, an internal QMap associates all the contains all...
Definition: Application.cpp:730
camitk::ActionExtension
This class describes what is a generic Action extension. To add a ActionExtension to CamiTK core,...
Definition: ActionExtension.h:80
camitk::Viewer
Viewer is an abstract class that is the base class for all viewers.
Definition: Viewer.h:180
camitk::Application::registerAllActions
static int registerAllActions(ActionExtension *)
register all actions from the given ActionExtension
Definition: Application.cpp:742
camitk::ViewerList
QList< Viewer * > ViewerList
A list of Viewer.
Definition: CamiTKAPI.h:139
camitk::Application::getNewViewer
static Viewer * getNewViewer(QString name, QString className)
instantiate a new viewer of the given name and given class name (Viewer inheriting class).
Definition: Application.cpp:960
camitk::Application::eventFilter
bool eventFilter(QObject *object, QEvent *event) override
Event filter of this class instance to watch its properties instances.
Definition: Application.cpp:1536
camitk::Application::hasModified
static bool hasModified()
Return true if at least one of the opened components has been modified, false otherwise.
Definition: Application.cpp:1027
camitk::HistoryComponent::MESH_COMPONENT
@ MESH_COMPONENT
this Component represent a 3D mesh, it has a 3D representation which can be displayed in the 3D viewe...
Definition: HistoryComponent.h:121
camitk::Application::getRecentDocuments
static const QList< QFileInfo > getRecentDocuments()
Get the list of recent documents.
Definition: Application.cpp:446
camitk::InterfaceLogger::setLogToStandardOutput
virtual void setLogToStandardOutput(bool writeToStdOut)=0
Allows the logger to write on std::cout.
CAMITK_INFO_ALT
#define CAMITK_INFO_ALT(MSG)
Definition: Log.h:262
camitk::Application::TargetPositionningPolicy
TargetPositionningPolicy
Definition: Application.h:88
camitk::Log::getLevelAsString
static QString getLevelAsString(InterfaceLogger::LogLevel level)
get the enum value as a text
Definition: Log.cpp:82
Viewer.h
camitk::Application::addComponent
static void addComponent(Component *)
register a new component either in the full component list, or in the full list and in the top-level ...
Definition: Application.cpp:1039
CAMITK_ERROR_ALT
#define CAMITK_ERROR_ALT(MSG)
Definition: Log.h:277
camitk::Viewer::getDescription
QString getDescription() const
get the name of the viewer
Definition: Viewer.h:205
camitk::ActionExtension::getActions
const ActionList & getActions()
get the list of actions registered y this extension
Definition: ActionExtension.cpp:122
camitk::Application::getTopLevelComponents
static const ComponentList & getTopLevelComponents()
get the current application wide list of instantiated top-level Components.
Definition: Application.cpp:1078
camitk::InterfaceLogger::TRACE
@ TRACE
all types of messages are logged
Definition: InterfaceLogger.h:65
camitk::Application::exec
static int exec()
Overriden from QApplication: Enters the main event loop and waits until exit() is called,...
Definition: Application.cpp:314
camitk::Application::removeLastHistoryItem
static HistoryItem removeLastHistoryItem()
Remove the last pushed actions in the history of the current pipeline.
Definition: Application.cpp:1137
camitk::refresh
void refresh()
refresh the display
camitk::HistoryItem::getName
QString getName()
Get the name of the corresponding action in the pipeline.
Definition: HistoryItem.cpp:59
camitk::Core::version
static const char * version
Definition: Core.h:208
camitk::ExtensionManager::unloadAllActionExtensions
static void unloadAllActionExtensions()
unload all action extensions and delete instantiated actions
Definition: ExtensionManager.cpp:511
camitk::HistoryComponent::OTHER
@ OTHER
this Component has no defined representation.
Definition: HistoryComponent.h:122
camitk::ViewerExtension
This class describes what is a generic Action extension. To add a ActionExtension to CamiTK core,...
Definition: ViewerExtension.h:108
Core.h
camitk::HistoryComponent::getType
Type getType() const
Get the Type of the Component associated to this item.
Definition: HistoryComponent.cpp:53
camitk::Application::recentDocuments
static QList< QFileInfo > recentDocuments
Definition: Application.h:440
camitk::PropertyObject::addProperty
virtual bool addProperty(Property *)
Tag a new CamiTK property to this object.
Definition: PropertyObject.cpp:76
camitk::Application::settings
static QSettings settings
global settings for CamiTK application
Definition: Application.h:517
ExtensionManager.h
camitk::ExtensionManager::registerFileExtension
static void registerFileExtension(QString fileExtension)
Register the file extension with the current application for opening This function is called by regis...
Definition: ExtensionManager.cpp:567
camitk::MainWindow::aboutToShow
virtual void aboutToShow()
this method is automatically called by Application before the first time show() is called.
Definition: MainWindow.cpp:438
camitk::Application::argc
static int argc
argc given from command line
Definition: Application.h:430
camitk::Application::unregisterAllViewers
static int unregisterAllViewers(ViewerExtension *)
unregister all viewers from the given ViewerExtension
Definition: Application.cpp:985
camitk::Application::getTriggeredAction
static Action * getTriggeredAction()
get the currently triggered action
Definition: Application.cpp:1120
camitk::HistoryComponent::getName
QString getName() const
Get the the name of the Component associated to this item.
Definition: HistoryComponent.cpp:48
camitk::Application::getViewerExtension
static ViewerExtension * getViewerExtension(Viewer *viewer)
Definition: Application.cpp:997
camitk::PropertyObject
This class describes a property object.
Definition: PropertyObject.h:94
camitk::Application::setSelected
static void setSelected(Component *component, bool isSelected)
insert/remove one specific Component to the selection (at the end).
Definition: Application.cpp:1093
ImageComponent.h
camitk::Action::getComponent
QString getComponent() const
the name of the component class that can be used by this action
Definition: Action.h:348
camitk::MainWindow::refresh
virtual void refresh()
Definition: MainWindow.cpp:357
camitk::ComponentExtension::getName
virtual QString getName() const =0
camitk::Component
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:302
camitk::Component::getModified
virtual bool getModified() const
set the modified flag
Definition: sdk/libraries/core/component/Component.h:948
CAMITK_WARNING_IF_ALT
#define CAMITK_WARNING_IF_ALT(COND, MSG)
Definition: Log.h:320
Application.h
camitk::Application::NO_TRANSFORMATION
@ NO_TRANSFORMATION
New component has no parent frame (parent frame is therefore set to nullptr) and transform is Id.
Definition: Application.h:90
CAMITK_API
#define CAMITK_API
Definition: CamiTKAPI.h:49
camitk
Definition: Action.cpp:35