ACMX 2.139.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
PlaylistDialog Class Reference

Playlist editor dialog with tree nodes and ordered shader entries. More...

#include <playlist.hpp>

Inheritance diagram for PlaylistDialog:

Public Slots

void addNode ()
void addShader ()
void clearAll ()
void concatPlaylist ()
void filterSearchChanged (const QString &text)
void generateRandomPlaylist ()
void loadPlaylist ()
void moveDown ()
void moveUp ()
void removeNode ()
void removeShader ()
void renameNode ()
void savePlaylist ()
void shufflePlaylist ()

Public Member Functions

int getAutopilotFrames () const
 Return frames-per-shader threshold for autopilot mode (minimum 4).
QString getPlaylistFile () const
 Return current playlist file path.
QList< QPair< QString, QStringList > > getPlaylistTree () const
 Return tree representation as node-name and shader-list pairs.
QStringList getSelectedShaderNames () const
 Return flattened selection of shaders in current playlist.
bool isAutopilotRandom () const
 Return true when random autopilot timeout mode is enabled.
bool isPlaylistEnabled () const
 Return whether playlist mode is enabled.
 PlaylistDialog (const QStringList &shaderNames, acmx2::Backend backend, QWidget *parent=nullptr)
void setAutopilotFrames (int frames)
 Set frames-per-shader threshold for autopilot mode.
void setAutopilotRandom (bool enabled)
 Enable or disable random autopilot timeout mode.
void setEnabled (bool enabled)
void setPlaylistFile (const QString &path)
void setPlaylistTree (const QList< QPair< QString, QStringList > > &tree)
void setSelectedShaderNames (const QStringList &names)
void updateShaderList (const QStringList &shaderNames)

Private Member Functions

QTreeWidgetItem * currentNodeItem () const
void loadShaders (const QStringList &shaderNames)
QString resolvePlaylistShaderName (const QString &name) const
QString runtimePlaylistShaderName (const QString &name) const
void setupUI ()

Private Attributes

QPushButton * addButton
QPushButton * addNodeButton
QSpinBox * autopilotFramesSpinBox = nullptr
QCheckBox * autopilotRandomCheckBox = nullptr
acmx2::Backend backend
QPushButton * cancelButton
QPushButton * clearButton
QPushButton * concatButton
QPushButton * downButton
QCheckBox * enableCheckBox
QPushButton * generateRandomButton = nullptr
QPushButton * loadButton
QPushButton * okButton
QString playlistFilePath
QTreeWidget * playlistTree
QSortFilterProxyModel * proxyModel
QPushButton * removeButton
QPushButton * removeNodeButton
QPushButton * renameNodeButton
QPushButton * saveButton
QLineEdit * searchLineEdit
QMap< QString, QString > shaderAliasToName
QComboBox * shaderComboBox
QStandardItemModel * shaderModel
QStringList shaderNamesList
QMap< QString, int > shaderNameToIndex
QPushButton * shuffleButton
QPushButton * upButton

Detailed Description

Playlist editor dialog with tree nodes and ordered shader entries.

Definition at line 29 of file ACMX2/interface/playlist.hpp.

Constructor & Destructor Documentation

◆ PlaylistDialog()

PlaylistDialog::PlaylistDialog ( const QStringList & shaderNames,
acmx2::Backend backend,
QWidget * parent = nullptr )
explicit

Definition at line 18 of file ACMX2/interface/playlist.cpp.

References backend, loadShaders(), and setupUI().

Referenced by MainWindow::menuPlaylistSettings().

Member Function Documentation

◆ addNode

void PlaylistDialog::addNode ( )
slot

Definition at line 268 of file ACMX2/interface/playlist.cpp.

References playlistTree.

Referenced by setupUI().

◆ addShader

void PlaylistDialog::addShader ( )
slot

Definition at line 311 of file ACMX2/interface/playlist.cpp.

References currentNodeItem(), playlistTree, shaderComboBox, and shaderNameToIndex.

Referenced by setupUI().

◆ clearAll

void PlaylistDialog::clearAll ( )
slot

Definition at line 395 of file ACMX2/interface/playlist.cpp.

References playlistTree.

Referenced by setupUI().

◆ concatPlaylist

void PlaylistDialog::concatPlaylist ( )
slot

Definition at line 544 of file ACMX2/interface/playlist.cpp.

References playlistTree, resolvePlaylistShaderName(), and shaderNameToIndex.

Referenced by setupUI().

◆ currentNodeItem()

QTreeWidgetItem * PlaylistDialog::currentNodeItem ( ) const
private

Definition at line 259 of file ACMX2/interface/playlist.cpp.

References playlistTree.

Referenced by addShader(), removeNode(), and renameNode().

◆ filterSearchChanged

void PlaylistDialog::filterSearchChanged ( const QString & text)
slot

Definition at line 252 of file ACMX2/interface/playlist.cpp.

References proxyModel, and shaderComboBox.

Referenced by setupUI().

◆ generateRandomPlaylist

void PlaylistDialog::generateRandomPlaylist ( )
slot

◆ getAutopilotFrames()

int PlaylistDialog::getAutopilotFrames ( ) const

Return frames-per-shader threshold for autopilot mode (minimum 4).

Definition at line 739 of file ACMX2/interface/playlist.cpp.

References autopilotFramesSpinBox.

Referenced by MainWindow::menuPlaylistSettings().

◆ getPlaylistFile()

QString PlaylistDialog::getPlaylistFile ( ) const

Return current playlist file path.

Definition at line 737 of file ACMX2/interface/playlist.cpp.

References playlistFilePath.

Referenced by MainWindow::menuPlaylistSettings().

◆ getPlaylistTree()

QList< QPair< QString, QStringList > > PlaylistDialog::getPlaylistTree ( ) const

Return tree representation as node-name and shader-list pairs.

Definition at line 724 of file ACMX2/interface/playlist.cpp.

References playlistTree.

Referenced by MainWindow::menuPlaylistSettings().

◆ getSelectedShaderNames()

QStringList PlaylistDialog::getSelectedShaderNames ( ) const

Return flattened selection of shaders in current playlist.

Definition at line 713 of file ACMX2/interface/playlist.cpp.

References playlistTree.

Referenced by loadShaders(), and MainWindow::menuPlaylistSettings().

◆ isAutopilotRandom()

bool PlaylistDialog::isAutopilotRandom ( ) const

Return true when random autopilot timeout mode is enabled.

Definition at line 741 of file ACMX2/interface/playlist.cpp.

References autopilotRandomCheckBox.

Referenced by MainWindow::menuPlaylistSettings().

◆ isPlaylistEnabled()

bool PlaylistDialog::isPlaylistEnabled ( ) const

Return whether playlist mode is enabled.

Definition at line 703 of file ACMX2/interface/playlist.cpp.

References enableCheckBox, and playlistTree.

Referenced by MainWindow::menuPlaylistSettings().

◆ loadPlaylist

void PlaylistDialog::loadPlaylist ( )
slot

◆ loadShaders()

void PlaylistDialog::loadShaders ( const QStringList & shaderNames)
private

◆ moveDown

void PlaylistDialog::moveDown ( )
slot

Definition at line 372 of file ACMX2/interface/playlist.cpp.

References playlistTree.

Referenced by setupUI().

◆ moveUp

void PlaylistDialog::moveUp ( )
slot

Definition at line 349 of file ACMX2/interface/playlist.cpp.

References playlistTree.

Referenced by setupUI().

◆ removeNode

void PlaylistDialog::removeNode ( )
slot

Definition at line 295 of file ACMX2/interface/playlist.cpp.

References currentNodeItem().

Referenced by removeShader(), and setupUI().

◆ removeShader

void PlaylistDialog::removeShader ( )
slot

Definition at line 338 of file ACMX2/interface/playlist.cpp.

References playlistTree, and removeNode().

Referenced by setupUI().

◆ renameNode

void PlaylistDialog::renameNode ( )
slot

Definition at line 281 of file ACMX2/interface/playlist.cpp.

References currentNodeItem().

Referenced by setupUI().

◆ resolvePlaylistShaderName()

QString PlaylistDialog::resolvePlaylistShaderName ( const QString & name) const
private

◆ runtimePlaylistShaderName()

QString PlaylistDialog::runtimePlaylistShaderName ( const QString & name) const
private

Definition at line 245 of file ACMX2/interface/playlist.cpp.

References acmx2::Acmxvk, and backend.

Referenced by savePlaylist().

◆ savePlaylist

void PlaylistDialog::savePlaylist ( )
slot

Definition at line 607 of file ACMX2/interface/playlist.cpp.

References playlistFilePath, playlistTree, and runtimePlaylistShaderName().

Referenced by setupUI().

◆ setAutopilotFrames()

void PlaylistDialog::setAutopilotFrames ( int frames)

Set frames-per-shader threshold for autopilot mode.

Definition at line 743 of file ACMX2/interface/playlist.cpp.

References autopilotFramesSpinBox.

◆ setAutopilotRandom()

void PlaylistDialog::setAutopilotRandom ( bool enabled)

Enable or disable random autopilot timeout mode.

Definition at line 751 of file ACMX2/interface/playlist.cpp.

References autopilotRandomCheckBox.

◆ setEnabled()

void PlaylistDialog::setEnabled ( bool enabled)

Definition at line 757 of file ACMX2/interface/playlist.cpp.

References enableCheckBox.

◆ setPlaylistFile()

void PlaylistDialog::setPlaylistFile ( const QString & path)

◆ setPlaylistTree()

void PlaylistDialog::setPlaylistTree ( const QList< QPair< QString, QStringList > > & tree)

◆ setSelectedShaderNames()

void PlaylistDialog::setSelectedShaderNames ( const QStringList & names)

Definition at line 759 of file ACMX2/interface/playlist.cpp.

References playlistTree, resolvePlaylistShaderName(), and shaderNameToIndex.

Referenced by loadShaders().

◆ setupUI()

◆ shufflePlaylist

void PlaylistDialog::shufflePlaylist ( )
slot

Definition at line 397 of file ACMX2/interface/playlist.cpp.

References playlistTree.

Referenced by setupUI().

◆ updateShaderList()

void PlaylistDialog::updateShaderList ( const QStringList & shaderNames)

Definition at line 842 of file ACMX2/interface/playlist.cpp.

References loadShaders().

Member Data Documentation

◆ addButton

QPushButton* PlaylistDialog::addButton
private

Definition at line 87 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ addNodeButton

QPushButton* PlaylistDialog::addNodeButton
private

Definition at line 84 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ autopilotFramesSpinBox

QSpinBox* PlaylistDialog::autopilotFramesSpinBox = nullptr
private

Definition at line 100 of file ACMX2/interface/playlist.hpp.

Referenced by getAutopilotFrames(), setAutopilotFrames(), and setupUI().

◆ autopilotRandomCheckBox

QCheckBox* PlaylistDialog::autopilotRandomCheckBox = nullptr
private

Definition at line 101 of file ACMX2/interface/playlist.hpp.

Referenced by isAutopilotRandom(), setAutopilotRandom(), and setupUI().

◆ backend

acmx2::Backend PlaylistDialog::backend
private

◆ cancelButton

QPushButton* PlaylistDialog::cancelButton
private

Definition at line 98 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ clearButton

QPushButton* PlaylistDialog::clearButton
private

Definition at line 91 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ concatButton

QPushButton* PlaylistDialog::concatButton
private

Definition at line 94 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ downButton

QPushButton* PlaylistDialog::downButton
private

Definition at line 90 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ enableCheckBox

QCheckBox* PlaylistDialog::enableCheckBox
private

Definition at line 80 of file ACMX2/interface/playlist.hpp.

Referenced by isPlaylistEnabled(), setEnabled(), and setupUI().

◆ generateRandomButton

QPushButton* PlaylistDialog::generateRandomButton = nullptr
private

Definition at line 93 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ loadButton

QPushButton* PlaylistDialog::loadButton
private

Definition at line 96 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ okButton

QPushButton* PlaylistDialog::okButton
private

Definition at line 97 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ playlistFilePath

QString PlaylistDialog::playlistFilePath
private

◆ playlistTree

◆ proxyModel

QSortFilterProxyModel* PlaylistDialog::proxyModel
private

Definition at line 104 of file ACMX2/interface/playlist.hpp.

Referenced by filterSearchChanged(), and setupUI().

◆ removeButton

QPushButton* PlaylistDialog::removeButton
private

Definition at line 88 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ removeNodeButton

QPushButton* PlaylistDialog::removeNodeButton
private

Definition at line 86 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ renameNodeButton

QPushButton* PlaylistDialog::renameNodeButton
private

Definition at line 85 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ saveButton

QPushButton* PlaylistDialog::saveButton
private

Definition at line 95 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ searchLineEdit

QLineEdit* PlaylistDialog::searchLineEdit
private

Definition at line 82 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ shaderAliasToName

QMap<QString, QString> PlaylistDialog::shaderAliasToName
private

Definition at line 107 of file ACMX2/interface/playlist.hpp.

Referenced by loadShaders(), and resolvePlaylistShaderName().

◆ shaderComboBox

QComboBox* PlaylistDialog::shaderComboBox
private

Definition at line 81 of file ACMX2/interface/playlist.hpp.

Referenced by addShader(), filterSearchChanged(), and setupUI().

◆ shaderModel

QStandardItemModel* PlaylistDialog::shaderModel
private

Definition at line 103 of file ACMX2/interface/playlist.hpp.

Referenced by loadShaders(), and setupUI().

◆ shaderNamesList

QStringList PlaylistDialog::shaderNamesList
private

Definition at line 108 of file ACMX2/interface/playlist.hpp.

Referenced by generateRandomPlaylist(), and loadShaders().

◆ shaderNameToIndex

QMap<QString, int> PlaylistDialog::shaderNameToIndex
private

◆ shuffleButton

QPushButton* PlaylistDialog::shuffleButton
private

Definition at line 92 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().

◆ upButton

QPushButton* PlaylistDialog::upButton
private

Definition at line 89 of file ACMX2/interface/playlist.hpp.

Referenced by setupUI().


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