ManiVault 1.0.0
A Flexible and Extensible Visual Analytics Framework for High-Dimensional Data
Loading...
Searching...
No Matches
hdps::gui::WidgetActionLabel Class Reference

#include <WidgetActionLabel.h>

Inheritance diagram for hdps::gui::WidgetActionLabel:
hdps::gui::WidgetActionViewWidget

Public Types

enum  WidgetFlag { ColonAfterName = 0x00001 }
 

Public Member Functions

 WidgetActionLabel (WidgetAction *action, QWidget *parent=nullptr, const std::uint32_t &flags=ColonAfterName)
 
bool eventFilter (QObject *target, QEvent *event) override
 
void resizeEvent (QResizeEvent *resizeEvent) override
 
bool geElide () const
 
void setElide (bool elide)
 
- Public Member Functions inherited from hdps::gui::WidgetActionViewWidget
 WidgetActionViewWidget (QWidget *parent, WidgetAction *action)
 
virtual WidgetActiongetAction () final
 
virtual void setAction (WidgetAction *widgetAction)
 

Protected Attributes

std::uint32_t _flags
 
QLabel _nameLabel
 
bool _elide
 
QDrag * _drag
 
QPoint _lastMousePressPosition
 

Additional Inherited Members

- Protected Member Functions inherited from hdps::gui::WidgetActionViewWidget
void dragEnterEvent (QDragEnterEvent *dragEnterEvent) override
 
void dragLeaveEvent (QDragLeaveEvent *dragLeaveEvent) override
 
void dropEvent (QDropEvent *dropEvent) override
 

Detailed Description

Widget action label class

Provides a label view on the action

Features:

  • Label of which the text, visibility and tooltip is synchronized with the action
  • Provide linking commands
    • Publish an action (create a public shared action)
    • Connect to a shared action
    • Disconnect from a shared action
Author
Thomas Kroes

Member Enumeration Documentation

◆ WidgetFlag

Describes the widget flags

Enumerator
ColonAfterName 

Constructor & Destructor Documentation

◆ WidgetActionLabel()

hdps::gui::WidgetActionLabel::WidgetActionLabel ( WidgetAction action,
QWidget *  parent = nullptr,
const std::uint32_t &  flags = ColonAfterName 
)
explicit

Constructor

Parameters
actionPointer to widget action
parentPointer to parent widget
windowFlagsWindow flags

Member Function Documentation

◆ eventFilter()

bool hdps::gui::WidgetActionLabel::eventFilter ( QObject *  target,
QEvent *  event 
)
override

Respond to target object events

Parameters
targetObject of which an event occurred
eventThe event that took place

◆ geElide()

bool hdps::gui::WidgetActionLabel::geElide ( ) const

Gets whether label elide is enabled or not

◆ resizeEvent()

void hdps::gui::WidgetActionLabel::resizeEvent ( QResizeEvent *  resizeEvent)
override

Invoked when the widget is resized

Parameters
resizeEventPointer to the resize event

◆ setElide()

void hdps::gui::WidgetActionLabel::setElide ( bool  elide)

Set whether label elide is enabled or not

Parameters
labelElideWhether label elide is enabled or not

Member Data Documentation

◆ _drag

QDrag* hdps::gui::WidgetActionLabel::_drag
protected

Whether to enable label elide (e.g. whether to truncate text and show an ellipsis when there is insufficient space for the text)

◆ _elide

bool hdps::gui::WidgetActionLabel::_elide
protected

Action name label

◆ _flags

std::uint32_t hdps::gui::WidgetActionLabel::_flags
protected

◆ _lastMousePressPosition

QPoint hdps::gui::WidgetActionLabel::_lastMousePressPosition
protected

Pointer is set during drag and drop action connection

◆ _nameLabel

QLabel hdps::gui::WidgetActionLabel::_nameLabel
protected

Configuration flags


The documentation for this class was generated from the following files: