mirror of
https://github.com/jwetzell/QControlKit.git
synced 2026-08-07 00:13:51 +00:00
Add Group Cue class. Closes #19
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
public const string Cue = "Cue";
|
||||
public const string CueList = "Cue List";
|
||||
public const string Cart = "Cart";
|
||||
public const string CueCart = "Cue Cart";
|
||||
public const string Group = "Group";
|
||||
public const string Audio = "";
|
||||
public const string Mic = "Mic";
|
||||
@@ -52,7 +53,6 @@
|
||||
public const string AutoLoad = "autoLoad"; //implement on QCue
|
||||
|
||||
public const string CartPosition = "cartPosition";
|
||||
public const string Children = "children";
|
||||
public const string ColorName = "colorName";
|
||||
public const string Cues = "cues";
|
||||
public const string CueTargetNumber = "cueTargetNumber";
|
||||
@@ -130,7 +130,10 @@
|
||||
//Group Cue Keys
|
||||
public const string CartColumns = "cartColumns";
|
||||
public const string CartRows = "cartRows";
|
||||
public const string GroupMode = "mode";
|
||||
public const string Children = "children";
|
||||
public const string Go = "go";
|
||||
public const string Mode = "mode";
|
||||
public const string MoveCartCue = "moveCartCue";
|
||||
public const string PlaybackPositionId = "playbackPositionId";
|
||||
public const string PlaybackPosition = "playbackPosition"; //Implement on Group Cue
|
||||
public const string PlayheadId = "playheadId"; //Implement on Group Cue
|
||||
@@ -269,10 +272,6 @@
|
||||
public const string Duration = "duration";
|
||||
public const string FullScreen = "fullScreen"; //Implement on Video Cue
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static class QIdentifiers
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using QControlKit.Constants;
|
||||
|
||||
namespace QControlKit.Cue
|
||||
{
|
||||
public class QGroupCue : QCue
|
||||
{
|
||||
public int cartColumns
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)propertyForKey(QOSCKey.CartColumns);
|
||||
}
|
||||
set
|
||||
{
|
||||
setProperty(value, QOSCKey.CartColumns);
|
||||
}
|
||||
}
|
||||
|
||||
public int cartRows
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)propertyForKey(QOSCKey.CartRows);
|
||||
}
|
||||
set
|
||||
{
|
||||
setProperty(value, QOSCKey.CartRows);
|
||||
}
|
||||
}
|
||||
|
||||
public List<QCue> children
|
||||
{
|
||||
get
|
||||
{
|
||||
return cues;
|
||||
}
|
||||
}
|
||||
|
||||
public void go()
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.Go}");
|
||||
}
|
||||
|
||||
public int mode
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)propertyForKey(QOSCKey.Mode);
|
||||
}
|
||||
set
|
||||
{
|
||||
if(value > 0 && value < 5)
|
||||
{
|
||||
setProperty(value, QOSCKey.Mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void moveCartCue(QCue cart, int row, int column)
|
||||
{
|
||||
if(cart.type.Equals(QCueType.CueCart) || cart.type.Equals(QCueType.Cart))
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.MoveCartCue}/{cart.uid}", row, column);
|
||||
}
|
||||
}
|
||||
|
||||
public string playhead
|
||||
{
|
||||
get
|
||||
{
|
||||
return propertyForKey(QOSCKey.Playhead).ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
setProperty(value, QOSCKey.Playhead);
|
||||
}
|
||||
}
|
||||
|
||||
public string playheadId
|
||||
{
|
||||
get
|
||||
{
|
||||
return propertyForKey(QOSCKey.PlayheadId).ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
setProperty(value, QOSCKey.PlayheadId);
|
||||
}
|
||||
}
|
||||
|
||||
public string playbackPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
return propertyForKey(QOSCKey.PlaybackPosition).ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
setProperty(value, QOSCKey.PlaybackPosition);
|
||||
}
|
||||
}
|
||||
|
||||
public string playbackPositionId
|
||||
{
|
||||
get
|
||||
{
|
||||
return propertyForKey(QOSCKey.PlaybackPositionId).ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
setProperty(value, QOSCKey.PlaybackPositionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,60 +30,60 @@ namespace QControlKit.Cue
|
||||
|
||||
public void collateAndStart()
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.CollateAndStart}");
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.CollateAndStart}");
|
||||
}
|
||||
|
||||
public void prune()
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.Prune}");
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.Prune}");
|
||||
}
|
||||
|
||||
public void pruneCommands()
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.PruneCommands}");
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.PruneCommands}");
|
||||
}
|
||||
|
||||
public void removeLightCommandsMatching(string match)
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.RemoveLightCommandsMatching}", match);
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.RemoveLightCommandsMatching}", match);
|
||||
}
|
||||
|
||||
public void replaceLightCommand(string oldCommand, string newCommand)
|
||||
{
|
||||
if(this.workspace.versionParts[0] == "4" && int.Parse(this.workspace.versionParts[1]) >= 4)
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.ReplaceLightCommand}", oldCommand, newCommand);
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.ReplaceLightCommand}", oldCommand, newCommand);
|
||||
}
|
||||
else
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.UpdateLightCommand}", oldCommand, newCommand);
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.UpdateLightCommand}", oldCommand, newCommand);
|
||||
}
|
||||
}
|
||||
|
||||
public void safeSort()
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.SafeSort}");
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.SafeSort}");
|
||||
}
|
||||
|
||||
public void safeSortCommands()
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.SafeSortCommands}");
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.SafeSortCommands}");
|
||||
}
|
||||
|
||||
public void setLight(string light, object setting)
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.SetLight}", light, setting);
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.SetLight}", light, setting);
|
||||
}
|
||||
|
||||
public void updateLightCommand(string oldCommand, string newCommand)
|
||||
{
|
||||
if (int.Parse(this.workspace.versionParts[0]) >= 4 && int.Parse(this.workspace.versionParts[1]) >= 4)
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.ReplaceLightCommand}", oldCommand, newCommand);
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.ReplaceLightCommand}", oldCommand, newCommand);
|
||||
}
|
||||
else
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.UpdateLightCommand}", oldCommand, newCommand);
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.UpdateLightCommand}", oldCommand, newCommand);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,20 +18,20 @@ namespace QControlKit.Cue
|
||||
{
|
||||
return (int)propertyForKey(QOSCKey.Channels);
|
||||
}
|
||||
set
|
||||
{
|
||||
setProperty(value, QOSCKey.Channels);
|
||||
}
|
||||
set
|
||||
{
|
||||
setProperty(value, QOSCKey.Channels);
|
||||
}
|
||||
}
|
||||
|
||||
public void setDefaultLevels()
|
||||
public void setDefaultLevels()
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/setDefaultLevels");
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/setDefaultLevels");
|
||||
}
|
||||
|
||||
public void setSilientLevels()
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/setSilentLevels");
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/setSilentLevels");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace QControlKit.Cue
|
||||
|
||||
public void compileSource()
|
||||
{
|
||||
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/compileSource");
|
||||
workspace.sendMessage($"/cue_id/{this.uid}/compileSource");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user