General widget view information class. The WidgetViewBase holds the general information of a WidgetView.
More...
#include "WidgetViewBase.h"
|
enum | ViewFlag {
NoViewFlags = 0x00
, ViewIsCloseable = 0x01
, ViewDefaultCloseHandling = 0x02
, ViewIsPinnable = 0x04
,
ViewIsCentral = 0x10
, ViewIsSide = 0x20
, ViewIsTool = 0x40
} |
| ViewFlags are used to describe the view behaviour in the frontend. More...
|
|
enum | ViewDockLocation {
Default
, Left
, Top
, Right
,
Bottom
} |
| /ref ViewFlag "ViewFlag" More...
|
|
enum | ViewType {
View3D
, View1D
, ViewText
, ViewTable
,
ViewVersion
, ViewGraphics
, ViewGraphicsPicker
, ViewProperties
,
ViewNavigation
, CustomView
} |
|
typedef Flags< ViewFlag > | ViewFlags |
|
|
| WidgetViewBase (ViewType _type, ViewFlags _flags=ViewFlags()) |
|
| WidgetViewBase (const std::string &_entityName, const std::string &_title, ViewType _type, ViewFlags _flags=ViewFlags()) |
|
| WidgetViewBase (const std::string &_entityName, const std::string &_title, ViewDockLocation _dockLocation, ViewType _type, ViewFlags _flags=ViewFlags()) |
|
| WidgetViewBase (const WidgetViewBase &_other) |
|
virtual | ~WidgetViewBase () |
|
WidgetViewBase & | operator= (const WidgetViewBase &_other) |
|
virtual void | addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const override |
| Add the object contents to the provided JSON object.
|
|
virtual void | setFromJsonObject (const ot::ConstJsonObject &_object) override |
| Will set the object contents from the provided JSON object.
|
|
void | setTitle (const std::string &_title) |
|
const std::string & | getTitle (void) const |
|
void | setViewFlag (ViewFlag _flag, bool _active=true) |
| Set the widget view flag.
|
|
void | setViewFlags (ViewFlags _flags) |
| Replace the current flags with the flags provided.
|
|
ViewFlags | getViewFlags (void) const |
| Returns the current flags.
|
|
void | setViewType (ViewType _type) |
|
ViewType | getViewType (void) const |
|
void | setDockLocation (ViewDockLocation _dockLocation) |
| Set the dock location.
|
|
ViewDockLocation | getDockLocation (void) const |
| Returns the dock location.
|
|
void | setEntityInformation (const BasicEntityInformation &_info) |
|
| BasicEntityInformation () |
|
| BasicEntityInformation (const std::string &_entityName) |
|
| BasicEntityInformation (const std::string &_entityName, UID _entityId, UID _entityVersion) |
|
| BasicEntityInformation (const BasicEntityInformation &_other) |
|
virtual | ~BasicEntityInformation () |
|
BasicEntityInformation & | operator= (const BasicEntityInformation &_other) |
|
void | setEntityName (const std::string &_entityName) |
|
const std::string & | getEntityName (void) const |
|
void | setEntityID (UID _entityId) |
|
UID | getEntityID (void) const |
|
void | setEntityVersion (UID _entityVersion) |
|
UID | getEntityVersion (void) const |
|
| Serializable () |
|
virtual | ~Serializable () |
|
|
static std::string | toString (ViewFlag _flag) |
| Returns a string representation of the provided view flag.
|
|
static ViewFlag | stringToViewFlag (const std::string &_flag) |
| Returns The view flag represented by the provided string.
|
|
static std::list< std::string > | toStringList (ViewFlags _flags) |
| Returns a string list contaning a string representation of every set flag in the provided view flags.
|
|
static ViewFlags | stringListToViewFlags (const std::list< std::string > &_flags) |
| Returns the view flags represented by the provided string list.
|
|
static std::string | toString (ViewDockLocation _dockLocation) |
| Returns the string representation of the provided view dock location.
|
|
static ViewDockLocation | stringToDockLocation (const std::string &_dockLocation) |
| Returns the view dock location represented by the provided string.
|
|
static std::string | toString (ViewType _type) |
| Returns the string representation of the provided view type.
|
|
static ViewType | stringToViewType (const std::string &_type) |
| Returns the view type represented by the provided string.
|
|
General widget view information class. The WidgetViewBase holds the general information of a WidgetView.
◆ ViewFlags
◆ ViewDockLocation
/ref ViewFlag "ViewFlag"
The ViewDockLocation is used to determine the dock location when adding the view to the manager.
Enumerator |
---|
Default | |
Left | Default (Central) dock location.
|
Top | Left dock location.
|
Right | Top dock location.
|
Bottom | Right dock location.
Bottom dock location.
|
◆ ViewFlag
ViewFlags are used to describe the view behaviour in the frontend.
Enumerator |
---|
NoViewFlags | |
ViewIsCloseable | Default value (no flags set)
|
ViewDefaultCloseHandling | If set the view may be closed.
|
ViewIsPinnable | If set and 'ViewIsCloseable' is set the view will close with the default close behaviour, otherwise a closeRequested signal is emitted.
|
ViewIsCentral | If set the view may be pinned to the auto hide areas.
|
ViewIsSide | If set the view is assumed to be a main view and therefore rather be located in the middle of the screen (Should not be mixed with ViewIsSide or ViewIsTool).
|
ViewIsTool | If set the view is assumed to be a side view and therefore rather be located on the outer dock areas of the screen (Should not be mixed with ViewIsCentral or ViewIsTool).
|
◆ ViewType
Enumerator |
---|
View3D | |
View1D | 3D view.
|
ViewText | 1D plot view.
|
ViewTable | Text editor view.
|
ViewVersion | Table view.
|
ViewGraphics | Version graph view.
|
ViewGraphicsPicker | Graphics view.
|
ViewProperties | Graphics picker view.
|
ViewNavigation | Properties view.
|
CustomView | Navigation view.
Custom view.
|
◆ WidgetViewBase() [1/4]
◆ WidgetViewBase() [2/4]
ot::WidgetViewBase::WidgetViewBase |
( |
const std::string & | _entityName, |
|
|
const std::string & | _title, |
|
|
ViewType | _type, |
|
|
ViewFlags | _flags = ViewFlags() ) |
◆ WidgetViewBase() [3/4]
◆ WidgetViewBase() [4/4]
◆ ~WidgetViewBase()
ot::WidgetViewBase::~WidgetViewBase |
( |
| ) |
|
|
virtual |
◆ addToJsonObject()
◆ getDockLocation()
Returns the dock location.
◆ getTitle()
const std::string & ot::WidgetViewBase::getTitle |
( |
void | | ) |
const |
|
inline |
◆ getViewFlags()
ViewFlags ot::WidgetViewBase::getViewFlags |
( |
void | | ) |
const |
|
inline |
Returns the current flags.
◆ getViewType()
ViewType ot::WidgetViewBase::getViewType |
( |
void | | ) |
const |
|
inline |
◆ operator=()
◆ setDockLocation()
Set the dock location.
- Parameters
-
_dockLocation | The dock location to set. |
◆ setEntityInformation()
◆ setFromJsonObject()
Will set the object contents from the provided JSON object.
- Parameters
-
_object | The JSON object containing the information |
- Exceptions
-
Will | throw an exception if the provided object is not valid (members missing or invalid types) |
Reimplemented from ot::BasicEntityInformation.
Reimplemented in ot::TableCfg, and ot::TextEditorCfg.
◆ setTitle()
void ot::WidgetViewBase::setTitle |
( |
const std::string & | _title | ) |
|
|
inline |
◆ setViewFlag()
void ot::WidgetViewBase::setViewFlag |
( |
ViewFlag | _flag, |
|
|
bool | _active = true ) |
|
inline |
Set the widget view flag.
- Parameters
-
_flag | Flag to set. |
_active | If false the flag will be unset instead. |
◆ setViewFlags()
void ot::WidgetViewBase::setViewFlags |
( |
ViewFlags | _flags | ) |
|
|
inline |
Replace the current flags with the flags provided.
◆ setViewType()
void ot::WidgetViewBase::setViewType |
( |
ViewType | _type | ) |
|
|
inline |
◆ stringListToViewFlags()
Returns the view flags represented by the provided string list.
- Parameters
-
◆ stringToDockLocation()
Returns the view dock location represented by the provided string.
- Parameters
-
◆ stringToViewFlag()
Returns The view flag represented by the provided string.
- Parameters
-
◆ stringToViewType()
Returns the view type represented by the provided string.
◆ toString() [1/3]
Returns the string representation of the provided view dock location.
- Parameters
-
The | view dock location to be converted to a string. |
◆ toString() [2/3]
std::string ot::WidgetViewBase::toString |
( |
ViewFlag | _flag | ) |
|
|
static |
Returns a string representation of the provided view flag.
- Parameters
-
_flag | The single view flag to be converted to a string. |
◆ toString() [3/3]
std::string ot::WidgetViewBase::toString |
( |
ViewType | _type | ) |
|
|
static |
Returns the string representation of the provided view type.
◆ toStringList()
std::list< std::string > ot::WidgetViewBase::toStringList |
( |
ViewFlags | _flags | ) |
|
|
static |
Returns a string list contaning a string representation of every set flag in the provided view flags.
- Parameters
-
_flags | The flags to be converted to a string list. |
The documentation for this class was generated from the following files: