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
|
#ifndef DEFAULTBEHAVIORSETTINGS_H
#define DEFAULTBEHAVIORSETTINGS_H
#include "AbstractPropertyContainerModel.h"
#include "DisplayLayoutModel.h"
/**
* A set of default behaviors for SNAP. These are read at startup and used
* to initialize the SNAP state.
*/
class DefaultBehaviorSettings : public AbstractPropertyContainerModel
{
public:
irisITKObjectMacro(DefaultBehaviorSettings, AbstractPropertyContainerModel)
// Default behaviors
irisSimplePropertyAccessMacro(LinkedZoom, bool)
irisSimplePropertyAccessMacro(ContinuousMeshUpdate, bool)
irisSimplePropertyAccessMacro(Synchronization, bool)
irisSimplePropertyAccessMacro(SyncCursor, bool)
irisSimplePropertyAccessMacro(SyncZoom, bool)
irisSimplePropertyAccessMacro(SyncPan, bool)
irisSimplePropertyAccessMacro(AutoContrast, bool)
// Permissions
enum UpdateCheckingPermission {
UPDATE_YES, UPDATE_NO, UPDATE_UNKNOWN
};
/** Whether we are allowed to check for updates automatically */
irisSimplePropertyAccessMacro(CheckForUpdates, UpdateCheckingPermission)
// Default colormap for overlays. Since this can be a user preset, the
// value is specified as a string. This value may point to a preset that
// has been deleted, so we have to be careful to check and reset to default
// if that is the case
irisSimplePropertyAccessMacro(OverlayColorMapPreset, std::string)
// Default layout
irisSimplePropertyAccessMacro(OverlayLayout, LayerLayout)
protected:
// Default behaviors
SmartPtr<ConcreteSimpleBooleanProperty> m_LinkedZoomModel;
SmartPtr<ConcreteSimpleBooleanProperty> m_ContinuousMeshUpdateModel;
SmartPtr<ConcreteSimpleBooleanProperty> m_SynchronizationModel;
SmartPtr<ConcreteSimpleBooleanProperty> m_SyncCursorModel;
SmartPtr<ConcreteSimpleBooleanProperty> m_SyncZoomModel;
SmartPtr<ConcreteSimpleBooleanProperty> m_SyncPanModel;
SmartPtr<ConcreteSimpleBooleanProperty> m_AutoContrastModel;
// Permissions
SmartPtr<ConcretePropertyModel<UpdateCheckingPermission> > m_CheckForUpdatesModel;
// Overlay behaviors
SmartPtr<ConcreteSimpleStringProperty> m_OverlayColorMapPresetModel;
typedef ConcretePropertyModel<LayerLayout, TrivialDomain> ConcreteLayerLayoutModel;
SmartPtr<ConcreteLayerLayoutModel> m_OverlayLayoutModel;
// Constructor
DefaultBehaviorSettings();
};
#endif // DEFAULTBEHAVIORSETTINGS_H
|