VCWidget base class defined in ui/src/virtualconsole/vcwidget.h.
Widget Types
QLC+ provides several widget types, each designed for specific control scenarios:Control Widgets
Button
Trigger functions with toggle or flash actions
Slider
Control intensity levels and playback speed
Knob
Rotary control alternative to sliders
Speed Dial
Adjust function speed and fade times
Advanced Controls
XY Pad
Two-dimensional control for moving heads
Cue List
Sequential playback of chaser steps
Matrix
Control RGB matrix animations
Audio Triggers
Trigger functions based on audio analysis
Organization Widgets
Frame
Container for organizing other widgets
Solo Frame
Frame ensuring only one child runs at a time
Label
Display text and images for organization
Clock
Display current time or countdown timers
Special Widgets
Animation
Display animated RGB patterns and effects
Widget Type Enumeration
The widget types are defined in theVCWidget::WidgetType enumeration:
ui/src/virtualconsole/vcwidget.h:123-137
Common Widget Properties
All widgets share common properties inherited fromVCWidget:
Identification
- ID: Unique identifier assigned by Virtual Console
- Caption: Text label displayed on the widget
- Page: Page number for multi-page layouts (0-based)
Appearance
- Background Color: Custom background color or system default
- Background Image: Optional image for widget background
- Foreground Color: Text and icon color
- Font: Custom font for caption text
- Frame Style: Border appearance (None, Sunken, Raised)
Behavior
- Allow Children: Whether widget can contain other widgets (frames only)
- Allow Resize: Whether widget can be resized in design mode
- Disable State: Disabled widgets don’t respond to input in operate mode
External Control
- Input Sources: External control mappings (MIDI, OSC, etc.)
- Key Sequence: Keyboard shortcut for activation
- Feedback: Send status updates to external controllers
Intensity
- Intensity: Master intensity value (0.0 - 1.0)
- Submaster: Control intensity of multiple functions together
Widget Lifecycle
Creation
Widgets are created through the Virtual Console’s add menu:- User selects widget type from toolbar
- Virtual Console calls corresponding
slotAdd*()method - Widget is instantiated with default properties
- Widget receives unique ID from
newWidgetId() - Widget is added to parent frame or contents area
- Widget appears in design mode with resize handles
virtualconsole.h:233-246:
Configuration
Each widget type has a properties dialog:- Accessed by right-clicking and selecting “Edit Properties”
- Implemented as separate dialog class (e.g.,
VCButtonProperties) - Allows configuration of widget-specific settings
- Changes are applied immediately in design mode
Operation
In operate mode, widgets become active:- Widget monitors for user interaction (mouse, keyboard)
- External input sources are processed
- Widget performs its specific action (start function, adjust value, etc.)
- Feedback is sent to external controllers
- Widget state is updated visually
Persistence
Widgets save their configuration to XML:saveXML()writes widget properties to workspace fileloadXML()restores widget from workspace filepostLoad()performs post-loading initialization- Common properties are handled by
saveXMLCommon()/loadXMLCommon()
Widget Selection
In design mode, widgets can be selected for editing:- Single Selection: Click widget to select it
- Multiple Selection: Ctrl+Click to add widgets to selection
- Group Operations: Selected widgets can be moved, copied, or deleted together
- Selection Indicators: Selected widgets show resize handles
m_selectedWidgets and provides methods:
virtualconsole.h:103-115
Widget Clipboard
Widgets support copy/paste operations:- Cut (Ctrl+X): Remove selected widgets to clipboard
- Copy (Ctrl+C): Copy selected widgets to clipboard
- Paste (Ctrl+V): Create copies of clipboard widgets
vcwidget.h:194-199
Input Source Management
Widgets can have multiple input sources:- Each input source has a unique ID (0-255)
- Sources include universe, channel, and value range
- Widgets check incoming input against configured sources
- Matching input triggers widget action
vcwidget.h:391-457
Widget States
Widgets can be in various states:Disable State
- Disabled widgets are grayed out in operate mode
- They don’t respond to input
- Can be controlled by parent frames
- Useful for temporarily deactivating controls
vcwidget.h:154-178
Live Edit State
- Allows limited editing in operate mode
- Widget positions can be adjusted
- Properties cannot be changed
- Functions continue running
vcwidget.h:572-577
Widget Interactions
Widgets can interact with each other:- Solo Frames: Stop sibling functions when new function starts
- Submasters: Control intensity of multiple widgets
- Multipage Frames: Show/hide widgets based on current page
- Function Notifications: Widgets notify parents when starting functions
Next Steps
Button Widgets
Learn how to use buttons to trigger functions
Slider Widgets
Control intensity and playback with sliders
Frame Widgets
Organize widgets with frames
Cue Lists
Create sequential show playback
