### Install QLC+ System-Wide Source: https://github.com/mcallegari/qlcplus/wiki/Linux-Build-Qt4-(outdated) Use 'make install' to install QLC+ after compilation. For systems without sudo, use 'su -c "make install"'. ```bash sudo make install ``` ```bash su -c "make install" ``` -------------------------------- ### Install QLC+ Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt6-&-cmake) Install QLC+ to the system after compilation. ```shell sudo make install ``` -------------------------------- ### Install Sample Files with CMake Source: https://github.com/mcallegari/qlcplus/blob/master/resources/samples/CMakeLists.txt Installs all found sample files to a specified destination directory. This makes the samples available in the installed project. ```cmake install(FILES ${SAMPLE_FILES} DESTINATION ${SAMPLESDIR}) ``` -------------------------------- ### Install Target Source: https://github.com/mcallegari/qlcplus/blob/master/ui/src/CMakeLists.txt Installs the target library and runtime components to the specified installation directories. ```cmake install(TARGETS ${module_name} LIBRARY DESTINATION ${INSTALLROOT}/${LIBSDIR} RUNTIME DESTINATION ${INSTALLROOT}/${LIBSDIR} ) ``` -------------------------------- ### Install FixturesMap.xml Source: https://github.com/mcallegari/qlcplus/blob/master/resources/fixtures/CMakeLists.txt This command installs the FixturesMap.xml file to the specified installation root directory, making it accessible in the build output. ```cmake install(FILES FixturesMap.xml DESTINATION ${INSTALLROOT}/${FIXTUREDIR}) ``` -------------------------------- ### Install Ubuntu/Debian/Mint Prerequisites Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt5-&-cmake) Installs essential development packages for building QLC+ on Debian-based systems using apt. ```shell sudo apt update sudo apt install g++ make cmake git build-essential qtchooser qt5-qmake qtbase5-dev qtbase5-dev-tools qtscript5-dev qtmultimedia5-dev libqt5multimedia5-plugins qttools5-dev-tools qtdeclarative5-dev libqt5svg5-dev qttools5-dev libqt5serialport5-dev libqt5websockets5-dev fakeroot debhelper devscripts pkg-config libxml2-utils libglib2.0-dev libpulse-dev libxkbcommon-dev sudo apt install libasound2-dev libusb-1.0-0-dev libftdi1-dev libudev-dev libmad0-dev libsndfile1-dev libfftw3-dev ``` -------------------------------- ### Configure, Make, and Install OLA Source: https://github.com/mcallegari/qlcplus/wiki/Linux-Build-Qt4-(outdated) Builds and installs the Open Lighting Architecture (OLA) library from source. ```bash ./configure --prefix=/usr make sudo make install ``` -------------------------------- ### Compile and Install QLC+ Source: https://github.com/mcallegari/qlcplus/wiki/Windows-Build-(Qt5-&-qmake) Compiles the QLC+ project using qmake and make, then installs it to the default directory. ```bash cd /c/Qt/qlcplus qmake make make install ``` -------------------------------- ### Install All RPM Packages Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt6-&-cmake) Install all generated QLC+ RPM packages using a wildcard. ```shell su -c "rpm -Uvh qlcplus*.rpm" ``` -------------------------------- ### Install Ubuntu/Debian Prerequisites Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt6-&-cmake) Installs necessary packages for building QLC+ on Ubuntu-based systems, including development tools, Qt6 libraries, and audio/USB/input dependencies. Includes optional packages for specific versions or features. ```shell sudo add-apt-repository universe sudo apt update sudo apt install git build-essential g++ make cmake sudo apt install debhelper devscripts fakeroot pkg-config sudo apt install libglx-dev libgl1-mesa-dev sudo apt install qt6-base-dev qt6-declarative-dev qt6-multimedia-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools sudo apt install qt6-serialport-dev qt6-svg-dev qt6-websockets-dev sudo apt install libasound2-dev libftdi-dev libftdi1-dev libfftw3-dev libsndfile1-dev libudev-dev libusb-dev libusb-1.0-0-dev libxkbcommon-dev sudo apt install libmad0-dev # (only < Ubuntu 23.04 Lunar, < Debian 12 Bookworm) sudo apt install libxml2-utils python-is-python3 python3-lxml # to run "make check" sudo apt install gstreamer1.0-libav # h264 video playback # might be needed to make "lupdate" run on dual Qt5/Qt6 systems # sudo rm -f /usr/bin/lrelease # sudo ln -s /usr/lib/qt6/bin/lrelease /usr/bin/lrelease ``` -------------------------------- ### Install Fixture Directories Source: https://github.com/mcallegari/qlcplus/blob/master/resources/fixtures/CMakeLists.txt This loop installs identified fixture directories to a specified installation root directory, ensuring they are available in the final build. ```cmake foreach(FIXTURE_FILE_AND_DIRECTORY ${FIXTURES_FILES_AND_DIRECTORIES}) if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${FIXTURE_FILE_AND_DIRECTORY}") install(DIRECTORY ${FIXTURE_FILE_AND_DIRECTORY} DESTINATION ${INSTALLROOT}/${FIXTUREDIR}) endif() endforeach() ``` -------------------------------- ### Install QLC+ Application Source: https://github.com/mcallegari/qlcplus/wiki/OSX-Build-HOWTO Installs the compiled QLC+ application to the user's home directory as QLC+.app. This command should be run after a successful compilation. ```bash make install ``` -------------------------------- ### Configure NullSoft Installer Files Source: https://github.com/mcallegari/qlcplus/blob/master/platforms/windows/CMakeLists.txt Sets the NSIS installer script name based on whether QML UI is enabled, then installs the selected script to the data directory. ```cmake set(nsis_path "${INSTALLROOT}/${DATADIR}") if(qmlui) set(nsis_files qlcplus5Qt6.nsi) else() set(nsis_files qlcplus4Qt6.nsi) endif() install(FILES ${nsis_files} DESTINATION ${nsis_path}) ``` -------------------------------- ### Install QLC+ (Non-Sudo) Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt6-&-cmake) Install QLC+ on systems that do not require sudo privileges. ```shell su -c "make install" ``` -------------------------------- ### Install Fedora/RedHat Prerequisites Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt5-&-cmake) Installs required development packages for building QLC+ on Fedora or Red Hat systems using yum. ```shell su - yum update yum install gcc-c++ qtbase5-common-devel qtmultimedia5-devel libftdi-devel libusb-devel alsa-lib-devel rpm-build git libudev-devel libsndfile-devel libmad-devel yum install systemd-devel fftw-devel qt5-qtscript-devel qt5-qtmultimedia-devel qt5-qtbase-devel # Fedora 21 ``` -------------------------------- ### Minimal Output-Only QLCIOPlugin Example Source: https://context7.com/mcallegari/qlcplus/llms.txt A basic C++ example demonstrating the structure of a custom QLCIOPlugin for output-only DMX devices. It includes essential methods like init, name, capabilities, and output management. ```cpp #include "qlcioplugin.h" class MyDMXPlugin : public QLCIOPlugin { Q_OBJECT Q_INTERFACES(QLCIOPlugin) Q_PLUGIN_METADATA(IID QLCIOPlugin_iid) public: // Called once after plugin is loaded void init() override { /* open USB device, enumerate ports, etc. */ } QString name() const override { return "My DMX Plugin"; } // Bitmask: Output=1, Input=2, Feedback=4, RDM=16, Beats=32 int capabilities() const override { return QLCIOPlugin::Output; } QString pluginInfo() const override { return "My custom DMX USB driver"; } // Output line management QStringList outputs() override { return { "My DMX Output Port 1" }; } QString outputInfo(quint32 output) override { return "USB DMX adapter"; } bool openOutput(quint32 output, quint32 universe) override { addToMap(universe, output, Output); return true; // open the device } void closeOutput(quint32 output, quint32 universe) override { removeFromMap(universe, output, Output); // close device } // Called ~50 times/second with 512-byte DMX universe data void writeUniverse(quint32 universe, quint32 output, const QByteArray &data, bool dataChanged) override { if (!dataChanged) return; // optimization: skip unchanged universes // Send data to hardware: // data[0] = DMX channel 1 value (0-255) // data[1] = DMX channel 2 value, etc. sendToDevice(data.constData(), data.size()); } }; ``` -------------------------------- ### Build QLC+ 4 (QtWidgets UI) Source: https://context7.com/mcallegari/qlcplus/llms.txt Clone the repository, create a build directory, and use CMake to configure the build. Specify Release build type for production. Install using 'make install'. ```bash git clone https://github.com/mcallegari/qlcplus.git cd qlcplus mkdir build && cd build # Qt5 build cmake .. -DCMAKE_BUILD_TYPE=Release make -j$(nproc) sudo make install ``` -------------------------------- ### Install Fedora/RedHat RPM Package Source: https://github.com/mcallegari/qlcplus/wiki/Linux-Build-Qt4-(outdated) Use 'su -c "rpm -Uvh .rpm"' to install a specific RPM package or 'su -c "rpm -Uvh qlcplus*.rpm"' to install all QLC+ packages. ```bash su -c "rpm -Uvh .rpm" ``` ```bash su -c "rpm -Uvh qlcplus*.rpm" ``` -------------------------------- ### Universe Management (C++) Source: https://context7.com/mcallegari/qlcplus/llms.txt C++ examples demonstrating how to manage QLC+ universes, including setting names, enabling pass-through, and reading DMX values. ```APIDOC ## Universe Management (C++) ### Description C++ examples demonstrating how to manage QLC+ universes, including setting names, enabling pass-through, and reading DMX values. ### Usage ```cpp #include "inputoutputmap.h" #include "universe.h" InputOutputMap *ioMap = doc->inputOutputMap(); // Get a universe by index Universe *u = ioMap->universes().at(0); // Set universe name u->setName("Stage"); // Enable pass-through (input data passed directly to output) u->setPassthrough(true); // Read current DMX output values (post-modifier, post-grandmaster) QByteArray postGM = u->postGMValues(); uchar ch1 = (uchar)postGM.at(0); // DMX channel 1, 0-based // Get pre-Grand-Master values QByteArray preGM = u->preGMValues(); ``` ``` -------------------------------- ### Install Translations using Custom Script Source: https://github.com/mcallegari/qlcplus/blob/master/CMakeLists.txt Installs translation files (.qm) to a specified destination path. This uses a CMake script to find all QM files and install them. ```cmake install( CODE " file(GLOB qm_files \"${translations_qm_pattern}\") foreach(file IN LISTS qm_files) file(INSTALL DESTINATION \"${translations_install_path}\" TYPE FILE FILES \"\${file}\") endforeach() " COMPONENT translations) ``` -------------------------------- ### Install Fedora/RedHat Packages for Qt4 Source: https://github.com/mcallegari/qlcplus/wiki/Linux-Build-Qt4-(outdated) Installs required development packages for compiling QLC+ with Qt4 on Fedora/RedHat systems. ```bash su - yum update yum install gcc-c++ qt4-devel libftdi-devel libusb-devel alsa-lib-devel rpm-build subversion libudev-devel ``` -------------------------------- ### Install Debian Package Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt6-&-cmake) Install the generated Debian package using dpkg. ```shell su -c "dpkg -i .deb" ``` -------------------------------- ### Start QLC+ in Kiosk Mode Source: https://github.com/mcallegari/qlcplus/blob/master/resources/docs/html_en_EN/kioskmode.html Use this command to launch QLC+ in kiosk mode. Optional parameters allow for fullscreen, opening a specific workspace, starting in operate mode, and adding a close button with custom positioning and size. ```bash qlcplus -k -f -o workspace.qxw -p -c 500,10,32,32 ``` -------------------------------- ### Install Executable Source: https://github.com/mcallegari/qlcplus/blob/master/main/CMakeLists.txt Installs the built executable to a specified destination directory. This is part of the deployment process, making the application available for users. ```cmake install(TARGETS ${module_name} DESTINATION ${INSTALLROOT}/${BINDIR} ) ``` -------------------------------- ### Install Development Packages on Ubuntu/Debian Source: https://github.com/mcallegari/qlcplus/wiki/QLC-Plus-5-build-HOWTO Installs necessary Qt 6 development packages for QLC+ 5 on Ubuntu/Debian systems. Ensure these are installed if not using official Qt packages. ```bash sudo apt install qt6-3d-dev qt6-3d-defaultgeometryloader-plugin qt6-3d-assimpsceneimport-plugin qml6-module-qt3d-core qml6-module-qtquick-scene3d qml6-module-qt3d-render qml6-module-qt3d-extras qml6-module-qt3d-input qml6-module-qt3d-logic qml6-module-qtmultimedia ``` -------------------------------- ### Launch QLC+ Application Source: https://github.com/mcallegari/qlcplus/wiki/Linux-Build-Qt4-(outdated) Type 'qlcplus' in the terminal to start the main QLC+ application. ```bash qlcplus ``` -------------------------------- ### Install Debian Package Source: https://github.com/mcallegari/qlcplus/wiki/Linux-Build-Qt4-(outdated) Use 'su -c "dpkg -i .deb"' to install the generated Debian package. ```bash su -c "dpkg -i .deb" ``` -------------------------------- ### View and Install Red Hat Packages Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt5-&-cmake) Navigate to the RPMs directory to view created packages and install them using 'rpm -Uvh'. You can install a specific package or all packages matching a pattern. ```shell cd ~/rpmbuild/RPMS ``` ```shell ls ``` ```shell su -c "rpm -Uvh .rpm" ``` ```shell su -c "rpm -Uvh qlcplus*.rpm" ``` -------------------------------- ### Install QLC+ Dependencies with Homebrew Source: https://github.com/mcallegari/qlcplus/wiki/macOS-build-(Qt6-and-cmake) Installs essential libraries required by QLC+ and its plugins using Homebrew. ```shell brew install fftw libftdi mad libsndfile ola ``` -------------------------------- ### Install MSYS2 Packages Source: https://github.com/mcallegari/qlcplus/wiki/Windows-Build-(Qt5-&-qmake) Installs essential packages for building QLC+ using pacman. Ensure MSYS2 is updated before running. ```bash pacman -Su ``` ```bash pacman -S make automake autoconf libtool mingw32/mingw-w64-i686-gcc mingw32/mingw-w64-i686-pkg-config mingw32/mingw-w64-i686-tools git ``` ```bash pacman -S mingw32/mingw-w64-i686-qt5 mingw32/mingw-w64-i686-libmad mingw32/mingw-w64-i686-libsndfile mingw32/mingw-w64-i686-flac mingw32/mingw-w64-i686-fftw ``` -------------------------------- ### Configure and Build QLC+ with CMake and Ninja Source: https://github.com/mcallegari/qlcplus/wiki/Windows-Build-(Qt6-&-cmake) Configures the QLC+ build using CMake, specifying the Qt installation path, and then builds the project using Ninja. Finally, it installs the compiled application. ```shell cd /c/projects/qlcplus mkdir build && cd build cmake -DCMAKE_PREFIX_PATH="$QTDIR/lib/cmake" .. ninja ninja install ``` -------------------------------- ### Start in Operate Mode Source: https://github.com/mcallegari/qlcplus/blob/master/resources/docs/html_en_EN/commandlineparameters.html Initiates QLC+ directly in operate mode, bypassing other startup configurations. ```bash qlcplus -p ``` ```bash qlcplus --operate ``` -------------------------------- ### Install libmad.0.dylib on macOS Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt6-&-cmake) This snippet from `platforms/macos/CMakeLists.txt` shows the installation command for `libmad.0.dylib` on macOS. This ensures that the `libmad` library is correctly placed for QLC+ to use on macOS systems. ```cmake install(FILES ${MAD_LIBDIR}/libmad.0.dylib DESTINATION ${INSTALLROOT}/${LIBSDIR}) ``` -------------------------------- ### Script Structure Example Source: https://github.com/mcallegari/qlcplus/blob/master/resources/docs/html_en_EN/rgbscriptapi.html A basic example of how an RGB script should be structured, including API version, name, author, and the rgbMap function. ```APIDOC ```javascript ( function() { var algo = new Object; algo.apiVersion = 1; algo.name = "My cool RGB script"; algo.author = "Your name"; algo.rgbMapStepCount = function(width, height) { // Implementation to return the number of steps return number_of_steps_when_width_is_oranges_and_height_is_jabberwock; } algo.rgbMap = function(width, height, rgb, step) { // Implementation to return a 2D array of RGB values return a_2d_array_of_arrays; } return algo; } )() ``` ``` -------------------------------- ### Build QLC+ Source: https://github.com/mcallegari/qlcplus/wiki/Windows-build-HOWTO These commands are used to compile and install QLC+ after all dependencies are set up. It's recommended to use Windows PowerShell for this process. ```bash qmake make make install ``` -------------------------------- ### Install Audio Libraries Source: https://github.com/mcallegari/qlcplus/blob/master/platforms/windows/CMakeLists.txt Copies various audio-related DLLs, including libogg, libopus, and libmp3lame, to the specified installation path. ```cmake set(mmedia_path "${INSTALLROOT}/${LIBSDIR}") copy_system_library(mmedia_files "libogg-0.dll") copy_system_library(mmedia_files "libopus-0.dll") copy_system_library(mmedia_files "libmp3lame-0.dll") copy_system_library(mmedia_files "libmpg123-0.dll") copy_system_library(mmedia_files "libvorbis-0.dll") copy_system_library(mmedia_files "libvorbisenc-2.dll") copy_system_library(mmedia_files "libFLAC.dll") copy_system_library(mmedia_files "libsndfile-1.dll") copy_system_library(mmedia_files "libfftw3-3.dll") install(FILES ${mmedia_files} DESTINATION ${mmedia_path}) ``` -------------------------------- ### Install Ubuntu/Debian Packages for Qt4 Source: https://github.com/mcallegari/qlcplus/wiki/Linux-Build-Qt4-(outdated) Installs necessary development packages for compiling QLC+ with Qt4 on Ubuntu/Debian systems. ```bash sudo apt-get update sudo apt-get install g++ make git build-essential libqt4-dev qt4-dev-tools fakeroot debhelper devscripts pkg-config sudo apt-get install libasound2-dev libusb-dev libftdi-dev libudev-dev libmad0-dev libsndfile1-dev libfftw3-dev ``` -------------------------------- ### Configure Build with System Qt Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt5-&-cmake) Configure the build using CMake, pointing to the system's Qt5 installation path. ```shell cmake -DCMAKE_PREFIX_PATH="/usr/lib/x86_64-linux-gnu/cmake/Qt5" .. ``` -------------------------------- ### Install QLC+ Dependencies on Fedora/RedHat Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt5--&-qmake) Installs necessary packages for compiling QLC+ on Fedora or RedHat systems. Ensure you are logged in as root or use 'su -' to execute these commands. ```bash su - ``` ```bash yum update ``` ```bash yum install gcc-c++ qtbase5-common-devel qtmultimedia5-devel libftdi-devel libusb-devel alsa-lib-devel rpm-build git libudev-devel libsndfile-devel libmad-devel ``` ```bash yum install systemd-devel fftw-devel qt5-qtscript-devel qt5-qtmultimedia-devel qt5-qtbase-devel # Fedora 21 ``` ```bash exit ``` -------------------------------- ### QLC+ Dark Blue Style Example Source: https://github.com/mcallegari/qlcplus/blob/master/resources/docs/html_en_EN/guicustomstyles.html This example demonstrates a dark blue theme for QLC+. Copy these lines into your `qlcplusStyle.qss` file to apply the style. ```css QMainWindow, QDialog { background-color: #404B57; color: #E6E6E6; } QTreeWidget { background-color: #3A444F; alternate-background-color: #404B57; color: #E6E6E6; } QTextBrowser { background-color: #3A444F; color: #E6E6E6; } ``` -------------------------------- ### Install QLC+ Dependencies on Ubuntu/Debian/Mint Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt5--&-qmake) Installs essential packages required for compiling QLC+ on Debian-based systems. Run these commands in the terminal. ```bash sudo apt-get update ``` ```bash sudo apt-get install g++ make git build-essential qtchooser qt5-qmake qtbase5-dev qtbase5-dev-tools qtscript5-dev qtmultimedia5-dev qtmultimedia5-plugins qttools5-dev-tools fakeroot debhelper devscripts pkg-config libxml2-utils libglib2.0-dev libpulse-dev ``` ```bash sudo apt-get install libasound2-dev libusb-1.0-0-dev libftdi1-dev libudev-dev libmad0-dev libsndfile1-dev libfftw3-dev ``` -------------------------------- ### Run QLC+ Applications Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt5-&-cmake) Launch the QLC+ application or its fixture editor from the terminal after installation. ```shell qlcplus ``` ```shell qlcplus-fixtureeditor ``` -------------------------------- ### Enable Kiosk Mode Source: https://github.com/mcallegari/qlcplus/blob/master/resources/docs/html_en_EN/commandlineparameters.html Starts QLC+ in kiosk mode, making only the virtual console visible and locking the application in operate mode. ```bash qlcplus -k ``` ```bash qlcplus --kiosk ``` -------------------------------- ### Configure Build with Official Qt Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt6-&-cmake) Configure the build using CMake, specifying the path to an official Qt 6 installation. ```shell cmake -DCMAKE_PREFIX_PATH="/home//Qt/6.9.3/gcc_64/lib/cmake" .. ``` -------------------------------- ### Start with Hidden GUI Source: https://github.com/mcallegari/qlcplus/blob/master/resources/docs/html_en_EN/commandlineparameters.html Launches QLC+ with its graphical user interface hidden. This option is specific to Raspberry Pi. ```bash qlcplus -n ``` ```bash qlcplus --nogui ``` -------------------------------- ### Scene Function Source: https://context7.com/mcallegari/qlcplus/llms.txt Stores target DMX values for a set of fixture channels. When started, all channels fade from their current values to the target values over `fadeInSpeed` milliseconds. This example shows how to create, configure, and manage Scene functions in C++. ```APIDOC ## Scene Function `Scene` stores target DMX values for a set of fixture channels. When started, all channels fade from their current values to the target values over `fadeInSpeed` milliseconds. ```cpp #include "scene.h" #include "scenevalue.h" Scene *s = new Scene(doc); s->setName("Purple Wash"); s->setFadeInSpeed(500); s->setFadeOutSpeed(1000); s->setRunOrder(Function::SingleShot); // play once and stop // Assign values: SceneValue(fixtureID, channelIndex, dmxValue 0-255) s->setValue(SceneValue(0, 1, 180)); // fixture 0, Red ch, 180 s->setValue(SceneValue(0, 2, 0)); // fixture 0, Green ch, 0 s->setValue(SceneValue(0, 3, 200)); // fixture 0, Blue ch, 200 doc->addFunction(s); // Remove a channel value from the scene s->unsetValue(0, 2); // Retrieve values QList vals = s->values(); for (const SceneValue &sv : vals) qDebug() << "Fixture" << sv.fxi << "Ch" << sv.channel << "=" << sv.value; // Save to XML (used internally by Doc::saveWorkspace) QFile file("my_scene.xml"); file.open(QIODevice::WriteOnly); QXmlStreamWriter writer(&file); s->saveXML(&writer); ``` ``` -------------------------------- ### Create and Manage QLC+ Project Programmatically Source: https://context7.com/mcallegari/qlcplus/llms.txt Instantiate the `Doc` object to load or build a QLC+ project. This example demonstrates creating a `Doc` instance, loading a workspace, defining fixtures and scenes programmatically, saving the project, and connecting to signals for changes. ```cpp #include "doc.h" #include "fixture.h" #include "scene.h" // Create a Doc with 4 DMX universes Doc *doc = new Doc(nullptr, 4); // Load an existing workspace file doc->loadWorkspace("/home/user/myshow.qxw"); // Or build programmatically: // 1. Load fixture definitions doc->fixtureDefCache()->load("/usr/share/qlcplus/fixtures"); // 2. Add a fixture QLCFixtureDef *def = doc->fixtureDefCache()->fixtureDef("Chauvet", "4Bar Tri"); QLCFixtureMode *mode = def->modes().first(); Fixture *fxi = new Fixture(doc); fxi->setFixtureDefinition(def, mode); fxi->setName("Stage Left Bar"); fxi->setUniverse(0); fxi->setAddress(0); doc->addFixture(fxi); // 3. Create and add a Scene Scene *scene = new Scene(doc); scene->setName("Red All"); scene->setValue(SceneValue(fxi->id(), 3, 255)); // Red ch = 255 doc->addFunction(scene); // Access functions by ID Function *f = doc->function(scene->id()); // Iterate all functions foreach (Function *fn, doc->functions()) qDebug() << fn->id() << fn->name() << fn->typeString(); // Save the project doc->saveWorkspace("/home/user/myshow.qxw"); // Listen for fixture/function changes QObject::connect(doc, &Doc::fixtureAdded, [](quint32 id) { qDebug() << "Fixture added:" << id; }); QObject::connect(doc, &Doc::functionAdded, [](quint32 id) { qDebug() << "Function added:" << id; }); ``` -------------------------------- ### Check Qt5 qmake Version Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt5--&-qmake) Verify that the correct Qt5 qmake version is accessible. This is crucial if Qt5 is not the default Qt installation. ```bash qmake -v ``` -------------------------------- ### Install Modifier Templates Source: https://github.com/mcallegari/qlcplus/blob/master/resources/modifierstemplates/CMakeLists.txt This command installs all discovered .qxmt files to a specified destination directory relative to the installation root. This ensures templates are available in the final installed application. ```cmake install(FILES ${MODTEMPLATE_FILES} DESTINATION ${INSTALLROOT}/${MODIFIERSTEMPLATEDIR}) ``` -------------------------------- ### Glob Sample Files with CMake Source: https://github.com/mcallegari/qlcplus/blob/master/resources/samples/CMakeLists.txt Finds all .qxw files in the current source directory. This is typically used to gather all sample files for processing or installation. ```cmake file(GLOB SAMPLE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.qxw") ``` -------------------------------- ### Configure QLC+ Build Environment Source: https://github.com/mcallegari/qlcplus/wiki/macOS-build-Qt5 Sets the QTDIR environment variable to the Qt5 installation path and navigates to the qlcplus source directory. This is a prerequisite for compiling QLC+. ```bash export QTDIR=/Users/myuser/Qt5.15.2/5.15.2/clang_64 cd qlcplus ``` -------------------------------- ### Install Homebrew Package Manager Source: https://github.com/mcallegari/qlcplus/wiki/macOS-build-(Qt6-and-cmake) Installs the Homebrew package manager on macOS. This is a prerequisite for installing other development dependencies. ```shell /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### DMX Patching and Grand Master (C++) Source: https://context7.com/mcallegari/qlcplus/llms.txt C++ examples for setting up DMX output patches and configuring the Grand Master settings. ```APIDOC ## DMX Patching and Grand Master (C++) ### Description C++ examples for setting up DMX output patches and configuring the Grand Master settings. ### Usage ```cpp #include "inputoutputmap.h" #include "universe.h" InputOutputMap *ioMap = doc->inputOutputMap(); // Add an output patch ioMap->setOutputPatch(0 /*universe*/, "Art-Net" /*plugin name*/, 0 /*plugin line*/); // Set Grand Master value (0-255, affects all HTP channels) ioMap->setGrandMasterValue(200); ioMap->setGrandMasterValueMode(GrandMaster::Reduce); // or Limit // Set Grand Master to affect only intensity channels, not colour ioMap->setGrandMasterChannelMode(GrandMaster::Intensity); ``` ``` -------------------------------- ### Install MSYS2 Build Dependencies Source: https://github.com/mcallegari/qlcplus/wiki/Windows-Build-(Qt6-&-cmake) Installs essential packages for building QLC+ using pacman in the MSYS2 MINGW64 shell. Ensure your system is up-to-date before installing. ```shell pacman -Su pacman -S make automake autoconf libtool mingw64/mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-gcc-libs mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-ninja mingw-w64-x86_64-tools-git pacman -S mingw64/mingw-w64-x86_64-libmad mingw64/mingw-w64-x86_64-libsndfile mingw64/mingw-w64-x86_64-flac mingw64/mingw-w64-x86_64-fftw mingw64/mingw-w64-x86_64-libusb mingw64/mingw-w64-x86_64-python-lxml mingw64/mingw-w64-x86_64-nsis ``` -------------------------------- ### Install QLC+ Dependencies with MacPorts Source: https://github.com/mcallegari/qlcplus/wiki/macOS-build-Qt5 Installs essential libraries for QLC+ and its plugins using the macports package manager. Ensure macports is installed and updated before running. ```bash sudo port selfupdate sudo port install libftdi0 pkgconfig libmad libsndfile fftw-3 ola ``` -------------------------------- ### Compile OLA from Sources Source: https://github.com/mcallegari/qlcplus/wiki/OSX-Build-HOWTO Compiles and installs the OLA library from its source code if it fails to install via MacPorts. This involves configuring, building, and installing the library. ```bash ./configure --prefix=/opt/local make sudo make install ``` -------------------------------- ### Install Dependencies with MacPorts Source: https://github.com/mcallegari/qlcplus/wiki/OSX-Build-HOWTO Installs essential libraries required by QLC+ and its plugins using the MacPorts package manager. Ensure MacPorts is installed and updated before running. ```bash sudo port selfupdate sudo port install libftdi0 pkgconfig libmad libsndfile portaudio liblo fftw-3 ola ``` -------------------------------- ### Starting QLC+ with WebAccess Server Source: https://context7.com/mcallegari/qlcplus/llms.txt Commands to launch QLC+ with the embedded HTTP and WebSocket server enabled. Options include specifying the port and enabling authentication. ```bash qlcplus -w -wp 9999 # Start with authentication enabled, using a password file qlcplus -w -wp 9999 -wa -waf /home/user/.qlcplus/passwd ``` -------------------------------- ### Run QLC+ Unit Tests Source: https://context7.com/mcallegari/qlcplus/llms.txt Configure the build with 'Debug' type and then run the provided unit test script. This helps verify the application's core components. ```bash cmake .. -DCMAKE_BUILD_TYPE=Debug make -j$(nproc) ./unittest.sh ``` -------------------------------- ### QLC+ Script Example: Color Sequence and Blackout Source: https://context7.com/mcallegari/qlcplus/llms.txt This script demonstrates sequencing functions, waiting for specific durations or events, and directly setting fixture DMX values. It includes a loop for a strobe effect using labels and jumps. ```qlcplus stoponexit:true // Fade in scene 3 (red wash) startfunction:3 wait:3000 // While red wash is on, start a moving head EFX startfunction:7 wait:5000 // Stop both and crossfade to blue stopfunction:7 stopfunction:3 startfunction:4 wait:random(2000,5000) // Set fixture 0 channel 0 (dimmer) to half intensity directly setfixture:0 ch:0 val:127 // Blink a strobe effect 3 times using a label+jump loop label:strobe_loop startfunction:9 wait:200 stopfunction:9 wait:200 jump:strobe_loop ``` -------------------------------- ### Install Fixture Mesh Files Source: https://github.com/mcallegari/qlcplus/blob/master/resources/meshes/fixtures/CMakeLists.txt This snippet installs the found fixture mesh .dae files to a specified destination relative to the installation root. This ensures the mesh files are packaged with the application for deployment. ```cmake install(FILES ${FIXTURE_MESH_FILES} DESTINATION ${INSTALLROOT}/${MESHESDIR}/fixtures) ``` -------------------------------- ### Navigate to Build Directory Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt5-&-cmake) Change directory into the qlcplus source and create a build directory for out-of-tree compilation. ```shell cd qlcplus mkdir build && cd build ``` -------------------------------- ### Install MSYS2 Libraries Source: https://github.com/mcallegari/qlcplus/blob/master/platforms/windows/CMakeLists.txt Copies essential MSYS2 libraries, such as libusb-1.0.dll, to the installation destination. ```cmake set(msys_path "${INSTALLROOT}/${LIBSDIR}") copy_system_library(msys_files "libusb-1.0.dll") install(FILES ${msys_files} DESTINATION ${msys_path}) ``` -------------------------------- ### Install RPM Package Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt6-&-cmake) Install a specific RPM package using rpm -Uvh. ```shell su -c "rpm -Uvh .rpm" ``` -------------------------------- ### Install colordiff and less Source: https://github.com/mcallegari/qlcplus/wiki/OSX-Build-HOWTO Installs colordiff for colored diff output and less for improved text viewing in the terminal. ```bash sudo port install colordiff less ``` -------------------------------- ### Start in Fullscreen Mode Source: https://github.com/mcallegari/qlcplus/blob/master/resources/docs/html_en_EN/commandlineparameters.html Launches QLC+ in fullscreen. 'normal' uses the window manager's fullscreen, while 'resize' forces the application to fill the screen, useful without a window manager. ```bash qlcplus -f ``` ```bash qlcplus --fullscreen ``` ```bash qlcplus -f normal ``` ```bash qlcplus --fullscreen normal ``` ```bash qlcplus -f resize ``` ```bash qlcplus --fullscreen resize ``` -------------------------------- ### Create and Configure an EFX Function Source: https://context7.com/mcallegari/qlcplus/llms.txt Shows how to initialize an EFX function, select an algorithm (e.g., Circle), set movement parameters like width, height, and offset, and attach a fixture. This is used for generating automated Pan/Tilt movement patterns. ```cpp #include "efx.h" #include "efxfixture.h" EFX *efx = new EFX(doc); efx->setName("Pan Sweep"); efx->setAlgorithm(EFX::Circle); efx->setWidth(128); // 0-255 efx->setHeight(128); efx->setXOffset(127); // centre of pan range efx->setYOffset(127); // centre of tilt range efx->setRotation(0); // degrees 0-359 efx->setSpeed(3000); // full cycle duration ms // Attach a moving-head fixture (must have Pan and Tilt channels) EFXFixture *ef = new EFXFixture(efx); ef->setFixture(doc, movingHeadFixtureID); ef->setMode(EFXFixture::PanTilt); ef->setStartOffset(0); efx->addFixture(ef); efx->setRunOrder(Function::Loop); efx->setPropagationMode(EFX::Parallel); doc->addFunction(efx); efx->start(doc->masterTimer(), FunctionParent::master()); ``` -------------------------------- ### Create Debian/Ubuntu Package Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt5--&-qmake) Execute the create-deb.sh script from the main QLC+ directory to build .deb packages for Debian-based systems. ```bash ./create-deb.sh ``` -------------------------------- ### Compile QLC+ with Qt5 Source: https://github.com/mcallegari/qlcplus/wiki/macOS-build-Qt5 Generates the build configuration using qmake and then compiles the QLC+ project. This process can take several minutes depending on system performance. ```bash /Users/myuser/Qt5.15.2/5.15.2/clang_64/bin/qmake make ``` -------------------------------- ### Install ccache for Faster Compilations Source: https://github.com/mcallegari/qlcplus/wiki/Linux-Build-Qt4-(outdated) Installs and configures ccache to significantly speed up subsequent compilations by caching previous build artifacts. ```bash sudo apt-get install ccache sudo ln -s /usr/bin/ccache /usr/local/bin/gcc sudo ln -s /usr/bin/ccache /usr/local/bin/g++ sudo ln -s /usr/bin/ccache /usr/local/bin/cc sudo ln -s /usr/bin/ccache /usr/local/bin/c++ ``` -------------------------------- ### getChannelsValues Source: https://github.com/mcallegari/qlcplus/blob/master/webaccess/res/Test_Web_API.html Retrieve the specified number of DMX values for the given universe, starting at the given address. Note that indices start from 1 and not from 0. ```APIDOC ## getChannelsValues ### Description Retrieve the specified number of DMX values for the given universe, starting at the given address. Note that indices start from 1 and not from 0. ### Method GET (assumed, based on typical web API patterns for retrieval) ### Endpoint /api/getChannelsValues ### Parameters #### Query Parameters - **universe** (integer) - Required - The universe index (starts from 1). - **address** (integer) - Required - The DMX starting address (starts from 1). - **count** (integer) - Required - The number of channels to retrieve. ### Response #### Success Response (200) - **values** (array of objects) - An array containing channel data. Each object may include: - **index** (integer) - The channel index. - **value** (integer) - The DMX value of the channel. - **type** (string) - The type of the channel. - **override** (integer, optional) - The override value if applicable. ``` -------------------------------- ### Build QLC+ 5 on Windows with create-exe.sh Source: https://github.com/mcallegari/qlcplus/wiki/QLC-Plus-5-build-HOWTO Creates a QLC+ 5 executable on Windows using the create-exe.sh script. Set the QTDIR environment variable to your Qt installation path. ```bash export QTDIR=/path/to/qt/Qt/6.8.1/mingw_64 ./create-exe.sh qmlui ``` -------------------------------- ### Install Target Executable Source: https://github.com/mcallegari/qlcplus/blob/master/qmlui/CMakeLists.txt Installs the compiled target executable to the specified destination directory. This is the final step in making the built module available for deployment. ```cmake install(TARGETS ${module_name} DESTINATION ${INSTALLROOT}/${BINDIR}) ``` -------------------------------- ### Conditional QML Module Installation Source: https://github.com/mcallegari/qlcplus/blob/master/platforms/macos/CMakeLists.txt Conditionally installs QML modules if the 'qmlui' option is enabled. This ensures that QML-related directories are copied to the appropriate location. ```cmake if(qmlui) set(qmldeps_files ${QT_QML_DIR}/Qt ${QT_QML_DIR}/QtQml ${QT_QML_DIR}/QtQuick ${QT_QML_DIR}/Qt3D ${QT_QML_DIR}/QtMultimedia ) install(DIRECTORY ${qmldeps_files} DESTINATION ${INSTALLROOT}/${DATADIR}/qml) endif() ``` -------------------------------- ### Install Gobo Directories in CMake Source: https://github.com/mcallegari/qlcplus/blob/master/resources/gobos/CMakeLists.txt Installs the specified gobo directories to the destination path defined by INSTALLROOT and GOBODIR. This command is executed regardless of the build target. ```cmake install(DIRECTORY ${GOBO_FILES} DESTINATION ${INSTALLROOT}/${GOBODIR}) ``` -------------------------------- ### Configure Build with System Qt Source: https://github.com/mcallegari/qlcplus/wiki/Linux-build-(Qt6-&-cmake) Configure the build using CMake, specifying the path to a system-installed Qt 6 package. ```shell cmake -DCMAKE_PREFIX_PATH="/usr/lib/x86_64-linux-gnu/cmake/Qt6" .. ``` -------------------------------- ### Set QTDIR Environment Variable Source: https://github.com/mcallegari/qlcplus/wiki/Windows-Build-(Qt6-&-cmake) Exports the QTDIR environment variable to point to the installation directory of your Qt libraries. This is crucial for CMake to locate the Qt installation. ```shell # adapt the path to where your Qt libraries are installed export QTDIR=/c/projects/Qt/6.9.3/mingw_64 ``` -------------------------------- ### Uploading a Project via WebAccess HTTP POST Source: https://context7.com/mcallegari/qlcplus/llms.txt Example using curl to upload and load a QLC+ project file (.qxw) remotely via the WebAccess HTTP server. Ensure the Content-Type is set to application/xml. ```bash curl -X POST http://192.168.1.100:9999/ \ -H "Content-Type: application/xml" \ --data-binary @myshow.qxw ```