ImFusion SDK 4.3
SelectionWidget Class Reference

#include <ImFusion/GUI/SelectionWidget.h>

Widget and scrollbar for handling selection and playback of data. More...

+ Inheritance diagram for SelectionWidget:

Detailed Description

Widget and scrollbar for handling selection and playback of data.

If more than one data is selected, the selection of all of them can be handled simultaneously as long as they have the same size as the first selected Data.

Classes

class  PlaybackWrapper
 This class provides an interface for creating wrappers that allow playback functionality to a type. More...
 

Public Types

enum class  InputMode { Manual , VisibleData , DataWidgetSelection }
 Enumeration of modes how to determine which datasets are used as input data to operate on by the SelectionWidget. More...
 
enum class  LockMode { None , Single , First , Last }
 Enumeration of modes how the selection changes with the focus. More...
 

Public Slots

void onSelFocus (int val)
 Sets the focus to val - 1
 
void onSelFirst ()
 
void onSelLast ()
 
void onSelAll ()
 
void onSelNone ()
 
void onSelSkip (int val)
 
void onFirstChanged (int val)
 
void onLastChanged (int val)
 
void onSelLock (int val)
 
void onDisplayWidgetLayoutChanged ()
 
void onSyncFocus ()
 
void onPlay ()
 
void onStop ()
 
void onLoopToggled ()
 
void onPlaySelectedToggled ()
 
bool dataHasNewSelection (ImFusion::Selectable *data)
 
void deleteCachedSelection (ImFusion::Selectable *data)
 
void showFocusLabel (bool show)
 Show/hide focus label showing the current index.
 
- Public Slots inherited from ExpandableGroupBox
void expand ()
 Expands the group box.
 
void collapse ()
 Collapses the group box.
 
void setExpanded (bool expanded)
 Expands or collapses the group box (default: expanded)
 
void setResizable (bool isResizable)
 Makes the group box vertical resizable (default: disabled)
 
void setTitle (const QString &title)
 Sets the title of the group box.
 
void setIcon (const QIcon &icon)
 Sets the icon of the group box.
 
void clearAndDeleteLater ()
 
void setVisible (bool visible) override
 
void addAction (QAction *action)
 Adds a new action to the right side of the expand/collapse button.
 
void removeAction (QAction *action)
 Removes an action that was previously added with addAction.
 
std::vector< QAction * > actions ()
 Lists all actions.
 
void addPage (QWidget *widget)
 Calls setWidget if no containing widget is set, does nothing otherwise (required by the Qt designer plugin)
 

Public Member Functions

 SelectionWidget (MainWindowBase *mw)
 
void initFromGlobalSettings ()
 Initializes the local configuration such as the inputMode() from global settings.
 
void update ()
 Updates widget with data selection and changes GUI accordingly.
 
void setInputData (const std::vector< Selectable * > &input)
 Explicitly define what datasets the SelectionWidget should operate on.
 
const std::vector< Selectable * > & inputData ()
 Returns the datasets the Selection widget is currently operating on.
 
InputMode inputMode () const
 Returns the source which defines which datasets are configured by the SelectionWidget.
 
void setInputMode (InputMode value, bool storeInGlobalSettings=false)
 Sets the source which defines which datasets are configured by the SelectionWidget.
 
LockMode lockMode () const
 Returns the lock mode of the selection with respect to the focus.
 
void setLockMode (LockMode mode)
 Sets the lock mode of the selection with respect to the focus.
 
SelectionScrollBarscrollBar ()
 Return the SelectionScrollBar hosted next to this widget.
 
void setPlaySelected (bool selectedOnly)
 Set whether only selected frames should be played.
 
bool isPlaying ()
 
void stopPlayback (Data *data)
 If data is currently playing through a playback wrapper, attempt to stop it.
 
- Public Member Functions inherited from ExpandableGroupBox
 ExpandableGroupBox (QWidget *parent=0)
 Creates an empty group box.
 
QSize sizeHint () const override
 
void setWidget (QWidget *widget)
 Sets the contained widget.
 
QWidget * widget ()
 Returns the contained widget if any or nullptr otherwise.
 
QString title () const
 
QIcon icon () const
 
bool isExpanded () const
 
bool isResizable () const
 
void setCollapsible (bool collapsible)
 Sets if box is collapsible.
 
bool isCollapsible ()
 Returns if box is collapsible.
 
void setDraggable (bool value)
 Sets the flag whether the box is draggable with the mouse when clicking on the top button.
 
bool isDraggable () const
 Returns the flag whether the box is draggable with the mouse when clicking on the top button.
 
int count () const
 Returns 1 if widget is set, 0 otherwise (required by the Qt designer plugin)
 
int currentIndex () const
 Returns 0 (required by the Qt designer plugin)
 
- Public Member Functions inherited from SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
 
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
 
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.
 

Static Public Member Functions

static void registerPlaybackWrapper (std::unique_ptr< PlaybackWrapper > wrapper)
 Adds a wrapper for figuring out playback on a Data object.
 

Additional Inherited Members

- Signals inherited from ExpandableGroupBox
void expansionChanged (bool expanded)
 
void resizableChanged (bool isResizable)
 
void titleChanged (QString title)
 
void iconChanged (QIcon icon)
 
void actionAdded (QAction *action)
 
void actionRemoved (QAction *action)
 
- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 
- Properties inherited from ExpandableGroupBox
QString title
 
QIcon icon
 
bool expanded
 
bool resizable
 

Member Enumeration Documentation

◆ InputMode

enum class InputMode
strong

Enumeration of modes how to determine which datasets are used as input data to operate on by the SelectionWidget.

Enumerator
Manual 

The datasets are solely defined by the user through calling setInputData().

VisibleData 

Listen to the DisplayWidget of the parent MainWindowBase and use the currently visible datasets.

DataWidgetSelection 

Listen to the DataWidget of the parent MainWindowBase and use its current selection.

◆ LockMode

enum class LockMode
strong

Enumeration of modes how the selection changes with the focus.

Enumerator
None 

Focus has no effect on the rest of the selection.

Single 

Both first and last are locked to the focus.

First 

The first parameter of the selection is locked to the focus.

Last 

The last parameter of the selection is locked to the focus.

Member Function Documentation

◆ setInputData()

void setInputData ( const std::vector< Selectable * > & input)

Explicitly define what datasets the SelectionWidget should operate on.

If input has multiple datasets they must have the same size in order to be manipulated at the same time. If inputMode() is not InputMode::Manual the input data will be changed automatically according to the setting.

◆ inputData()

const std::vector< Selectable * > & inputData ( )
inline

Returns the datasets the Selection widget is currently operating on.

Note
The return value may be a subset of the datasets originally passed to setInputData() because all input datasets must have the same size in order to be manipulated at the same time.

◆ isPlaying()

bool isPlaying ( )
Returns
true iff the playback is currently running.

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close