libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
TuiStatusBar Class Reference

Bottom-of-screen status line. More...

#include <statusbar.h>

Inheritance diagram for TuiStatusBar:
Collaboration diagram for TuiStatusBar:

Public Member Functions

 TuiStatusBar (ObjectBase *parent=nullptr)
 
void showMessage (const String &message, int timeoutMs=0)
 
void clearMessage ()
 
const Stringmessage () const
 
void setPermanentMessage (const String &message)
 
const StringpermanentMessage () const
 
Size2Di32 sizeHint () const override
 Returns the preferred size. Override in subclasses.
 
- Public Member Functions inherited from TuiWidget
 TuiWidget (ObjectBase *parent=nullptr)
 Constructs a TuiWidget.
 
virtual ~TuiWidget ()
 Destructor.
 
const Rect2Di32geometry () const
 Returns the geometry relative to parent.
 
void setGeometry (const Rect2Di32 &rect)
 Sets the geometry.
 
int x () const
 Returns the X coordinate relative to parent.
 
int y () const
 Returns the Y coordinate relative to parent.
 
int width () const
 Returns the width.
 
int height () const
 Returns the height.
 
Size2Di32 size () const
 Returns the size.
 
const Size2Di32minimumSize () const
 Returns the minimum size constraint.
 
void setMinimumSize (const Size2Di32 &size)
 Sets the minimum size constraint.
 
const Size2Di32maximumSize () const
 Returns the maximum size constraint.
 
void setMaximumSize (const Size2Di32 &size)
 Sets the maximum size constraint.
 
TuiSizePolicy sizePolicy () const
 Returns the size policy.
 
void setSizePolicy (TuiSizePolicy policy)
 Sets the size policy.
 
bool isVisible () const
 Returns true if the widget's own visibility flag is set.
 
bool isEffectivelyVisible () const
 Returns true if the widget and all its ancestors are visible.
 
void show ()
 Shows the widget.
 
void hide ()
 Hides the widget.
 
void setVisible (bool visible)
 Sets visibility.
 
bool isEnabled () const
 Returns true if the widget is enabled.
 
void setEnabled (bool enabled)
 Sets enabled state.
 
TuiFocusPolicy focusPolicy () const
 Returns the focus policy.
 
void setFocusPolicy (TuiFocusPolicy policy)
 Sets the focus policy.
 
bool hasFocus () const
 Returns true if this widget has focus.
 
void setFocus ()
 Requests focus for this widget.
 
void update ()
 Marks the widget as needing a repaint.
 
bool isDirty () const
 Returns true if the widget needs repainting.
 
void clearDirty ()
 Clears the dirty flag.
 
TuiLayoutlayout () const
 Returns the layout, if one is set.
 
void setLayout (TuiLayout *layout)
 Sets the layout for this widget.
 
Point2Di32 mapToParent (const Point2Di32 &p) const
 Maps a local point to the parent's coordinate system.
 
Point2Di32 mapFromParent (const Point2Di32 &p) const
 Maps a parent point to local coordinates.
 
Point2Di32 mapToGlobal (const Point2Di32 &p) const
 Maps a local point to global (screen) coordinates.
 
Point2Di32 mapFromGlobal (const Point2Di32 &p) const
 Maps a global (screen) point to local coordinates.
 
virtual Size2Di32 minimumSizeHint () const
 Returns the minimum size hint. Override in subclasses.
 
- Public Member Functions inherited from ObjectBase
 ObjectBase (ObjectBase *p=nullptr)
 Default ObjectBase constructor.
 
virtual ~ObjectBase ()
 Destructor. Emits aboutToDestroy, detaches from parent, and destroys children.
 
ObjectBaseparent () const
 Returns the parent object, if one. nullptr if none.
 
void setParent (ObjectBase *p)
 Sets the parent of this object. If the object already has a parent, it will be removed as a child from the old parent and added as a child to the new one.
 
const ObjectBaseListchildList () const
 Returns a list of children of this object.
 
template<typename... Args>
int registerSlot (Slot< Args... > *slot)
 Registers a slot with this object and assigns it an ID.
 
EventLoopeventLoop () const
 Returns the EventLoop this object is affiliated with.
 
void moveToThread (EventLoop *loop)
 Changes the EventLoop affinity of this object.
 
int startTimer (unsigned int intervalMs, bool singleShot=false)
 Starts a timer on this object's EventLoop.
 
void stopTimer (int timerId)
 Stops a timer previously started with startTimer().
 
template<typename... Args>
PROMEKI_NAMESPACE_BEGIN void connect (Signal< Args... > *signal, Slot< Args... > *slot)
 

Protected Member Functions

void paintEvent (TuiPaintEvent *e) override
 Called to paint the widget. Override in subclasses.
 
void timerEvent (TimerEvent *e) override
 Called when a timer fires for this object.
 
- Protected Member Functions inherited from TuiWidget
virtual void keyEvent (KeyEvent *e)
 Called on keyboard input. Override in subclasses.
 
virtual void mouseEvent (MouseEvent *e)
 Called on mouse input. Override in subclasses.
 
virtual void resizeEvent (TuiResizeEvent *e)
 Called when the widget is resized. Override in subclasses.
 
virtual void focusInEvent (Event *e)
 Called when the widget gains focus.
 
virtual void focusOutEvent (Event *e)
 Called when the widget loses focus.
 
void event (Event *e) override
 Event dispatch override.
 
- Protected Member Functions inherited from ObjectBase
ObjectBasesignalSender ()
 Returns the ObjectBase that emitted the signal currently being handled.
 

Additional Inherited Members

- Public Types inherited from ObjectBase
using SlotVariantFunc = std::function< void(const VariantList &)>
 Function type for invoking a slot with a list of Variants.
 
- Static Public Member Functions inherited from ObjectBase
static const MetaInfometaInfo ()
 Returns the MetaInfo for the ObjectBase class.
 
template<typename... Args>
static void connect (Signal< Args... > *signal, Slot< Args... > *slot)
 connects a signal and slot together. This function assumes both the signal and slot exist in a ObjectBase or derived object
 
- Public Attributes inherited from ObjectBase
Signal< ObjectBase * > aboutToDestroySignal = Signal< ObjectBase * >(this, aboutToDestroySignalName)
 
- Static Public Attributes inherited from ObjectBase
static constexpr const charaboutToDestroySignalName = PROMEKI_STRINGIFY( aboutToDestroy ) "(" PROMEKI_STRINGIFY_ARGS( ObjectBase * ) ")"
 
static SignalMeta aboutToDestroySignalMeta = SignalMeta(metaInfo(), aboutToDestroySignalName)
 

Detailed Description

Bottom-of-screen status line.

Member Function Documentation

◆ paintEvent()

void TuiStatusBar::paintEvent ( TuiPaintEvent e)
overrideprotectedvirtual

Called to paint the widget. Override in subclasses.

Reimplemented from TuiWidget.

◆ sizeHint()

Size2Di32 TuiStatusBar::sizeHint ( ) const
overridevirtual

Returns the preferred size. Override in subclasses.

Reimplemented from TuiWidget.

◆ timerEvent()

void TuiStatusBar::timerEvent ( TimerEvent e)
overrideprotectedvirtual

Called when a timer fires for this object.

Override this in derived classes to handle timer events. The default implementation does nothing.

Parameters
eThe timer event.

Reimplemented from ObjectBase.


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