Add Group Cue class. Closes #19

This commit is contained in:
2021-07-18 11:40:29 -05:00
parent cd6115bfbc
commit e7f60ba782
5 changed files with 141 additions and 25 deletions
+5 -6
View File
@@ -11,6 +11,7 @@
public const string Cue = "Cue"; public const string Cue = "Cue";
public const string CueList = "Cue List"; public const string CueList = "Cue List";
public const string Cart = "Cart"; public const string Cart = "Cart";
public const string CueCart = "Cue Cart";
public const string Group = "Group"; public const string Group = "Group";
public const string Audio = ""; public const string Audio = "";
public const string Mic = "Mic"; public const string Mic = "Mic";
@@ -52,7 +53,6 @@
public const string AutoLoad = "autoLoad"; //implement on QCue public const string AutoLoad = "autoLoad"; //implement on QCue
public const string CartPosition = "cartPosition"; public const string CartPosition = "cartPosition";
public const string Children = "children";
public const string ColorName = "colorName"; public const string ColorName = "colorName";
public const string Cues = "cues"; public const string Cues = "cues";
public const string CueTargetNumber = "cueTargetNumber"; public const string CueTargetNumber = "cueTargetNumber";
@@ -130,7 +130,10 @@
//Group Cue Keys //Group Cue Keys
public const string CartColumns = "cartColumns"; public const string CartColumns = "cartColumns";
public const string CartRows = "cartRows"; 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 PlaybackPositionId = "playbackPositionId";
public const string PlaybackPosition = "playbackPosition"; //Implement on Group Cue public const string PlaybackPosition = "playbackPosition"; //Implement on Group Cue
public const string PlayheadId = "playheadId"; //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 Duration = "duration";
public const string FullScreen = "fullScreen"; //Implement on Video Cue public const string FullScreen = "fullScreen"; //Implement on Video Cue
} }
public static class QIdentifiers public static class QIdentifiers
+117
View File
@@ -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);
}
}
}
}
+11 -11
View File
@@ -30,60 +30,60 @@ namespace QControlKit.Cue
public void collateAndStart() public void collateAndStart()
{ {
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.CollateAndStart}"); workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.CollateAndStart}");
} }
public void prune() public void prune()
{ {
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.Prune}"); workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.Prune}");
} }
public void pruneCommands() 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) 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) public void replaceLightCommand(string oldCommand, string newCommand)
{ {
if(this.workspace.versionParts[0] == "4" && int.Parse(this.workspace.versionParts[1]) >= 4) 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 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() public void safeSort()
{ {
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.SafeSort}"); workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.SafeSort}");
} }
public void safeSortCommands() 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) 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) public void updateLightCommand(string oldCommand, string newCommand)
{ {
if (int.Parse(this.workspace.versionParts[0]) >= 4 && int.Parse(this.workspace.versionParts[1]) >= 4) 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 else
{ {
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.UpdateLightCommand}", oldCommand, newCommand); workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.UpdateLightCommand}", oldCommand, newCommand);
} }
} }
+7 -7
View File
@@ -18,20 +18,20 @@ namespace QControlKit.Cue
{ {
return (int)propertyForKey(QOSCKey.Channels); return (int)propertyForKey(QOSCKey.Channels);
} }
set set
{ {
setProperty(value, QOSCKey.Channels); 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() public void setSilientLevels()
{ {
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/setSilentLevels"); workspace.sendMessage($"/cue_id/{this.uid}/setSilentLevels");
} }
} }
} }
+1 -1
View File
@@ -14,7 +14,7 @@ namespace QControlKit.Cue
public void compileSource() public void compileSource()
{ {
workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/compileSource"); workspace.sendMessage($"/cue_id/{this.uid}/compileSource");
} }
} }
} }