From c96f98cbf6b3c1947c16dc982af6a862ed4efad2 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquemin Date: Sun, 11 Aug 2013 23:35:35 +0300 Subject: [PATCH] IanniX 0.9.11 RC2 - bug with message removal fixed - icon on current opened file/score - improvements in file saving/closing/opening. Still testing a lot. --- IanniX.pro.user | 2 +- Patches/Max/How to route data.maxpat | 936 ++++++++++++++++++ ...xample.maxpat => Max Sound Example.maxpat} | 0 gui/uiinspector.cpp | 6 +- iannix.cpp | 6 +- icons/IanniX.qrc | 1 + icons/res_item_file_opened.png | Bin 0 -> 3484 bytes items/uifileitem.cpp | 8 +- items/uifileitem.h | 2 +- objects/nxdocument.cpp | 8 + objects/nxtrigger.h | 3 +- 11 files changed, 962 insertions(+), 10 deletions(-) create mode 100644 Patches/Max/How to route data.maxpat rename Patches/Max/{Max Example.maxpat => Max Sound Example.maxpat} (100%) create mode 100644 icons/res_item_file_opened.png diff --git a/IanniX.pro.user b/IanniX.pro.user index fb3ea2a..ea2da93 100644 --- a/IanniX.pro.user +++ b/IanniX.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/Patches/Max/How to route data.maxpat b/Patches/Max/How to route data.maxpat new file mode 100644 index 0000000..a2afcd8 --- /dev/null +++ b/Patches/Max/How to route data.maxpat @@ -0,0 +1,936 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 6, + "minor" : 0, + "revision" : 8 + } +, + "rect" : [ 157.0, 59.0, 972.0, 350.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 0, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 0, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "boxanimatetime" : 200, + "imprint" : 0, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "boxes" : [ { + "box" : { + "bgcolor" : [ 1.0, 1.0, 1.0, 0.81 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-40", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 204.31633, 298.5, 106.0, 33.0 ], + "presentation_rect" : [ 203.31633, 307.0, 0.0, 0.0 ], + "text" : "Trigger with ID=3\nwas trigged", + "textcolor" : [ 0.151806, 0.586629, 0.819895, 1.0 ] + } + + } +, { + "box" : { + "id" : "obj-39", + "maxclass" : "button", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "bang" ], + "patching_rect" : [ 182.534622, 305.0, 20.0, 20.0 ] + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-37", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "int", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 28.0, 251.0, 50.0, 20.0 ] + } + + } +, { + "box" : { + "bgcolor" : [ 1.0, 1.0, 1.0, 0.81 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-35", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 179.31633, 216.0, 145.0, 33.0 ], + "presentation_rect" : [ 47.408173, 218.0, 0.0, 0.0 ], + "text" : "Type here the triggers' ID you want to get", + "textcolor" : [ 0.151806, 0.586629, 0.819895, 1.0 ] + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-33", + "maxclass" : "newobj", + "numinlets" : 6, + "numoutlets" : 6, + "outlettype" : [ "", "", "", "", "", "" ], + "patching_rect" : [ 168.734619, 251.0, 88.0, 20.0 ], + "text" : "route 1 3 5 7 9" + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-31", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 505.520386, 305.0, 267.0, 20.0 ], + "presentation_rect" : [ 509.954071, 304.0, 0.0, 0.0 ], + "text" : " (mapped range) of cursor with ID=1", + "textcolor" : [ 0.969221, 0.371465, 0.033424, 1.0 ] + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-26", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "float", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 451.020416, 305.0, 50.0, 20.0 ], + "presentation_rect" : [ 446.464294, 305.0, 0.0, 0.0 ] + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-25", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "float", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 398.464294, 305.0, 50.0, 20.0 ], + "presentation_rect" : [ 395.050964, 304.0, 0.0, 0.0 ] + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-23", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "float", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 344.050964, 305.0, 50.0, 20.0 ] + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-2", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 461.954071, 279.0, 486.0, 20.0 ], + "presentation_rect" : [ 475.816345, 277.0, 0.0, 0.0 ], + "text" : "Group ID, (mapped range), (absolute range), Curve ID, Curve Group ID", + "textcolor" : [ 0.969221, 0.371465, 0.033424, 1.0 ] + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-30", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 9, + "outlettype" : [ "", "float", "float", "float", "float", "float", "float", "int", "" ], + "patching_rect" : [ 330.550964, 279.0, 127.0, 20.0 ], + "text" : "unpack s f f f f f f i s" + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-28", + "maxclass" : "newobj", + "numinlets" : 5, + "numoutlets" : 5, + "outlettype" : [ "", "", "", "", "" ], + "patching_rect" : [ 330.550964, 251.0, 78.0, 20.0 ], + "text" : "route 2 4 6 8" + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-27", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 346.816345, 216.0, 162.0, 33.0 ], + "text" : "Type here the cursors' ID you want to get", + "textcolor" : [ 0.969221, 0.371465, 0.033424, 1.0 ] + } + + } +, { + "box" : { + "bgcolor" : [ 1.0, 1.0, 1.0, 0.71 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-67", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 461.954071, 85.0, 112.556122, 20.0 ], + "text" : "Transport timecode" + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-63", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 505.520386, 105.0, 92.387787, 18.0 ], + "text" : "000:02:496" + } + + } +, { + "box" : { + "bgcolor" : [ 0.921431, 0.917343, 0.892558, 1.0 ], + "bordercolor" : [ 0.830414, 0.830389, 0.830403, 1.0 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-59", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "float", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 451.020416, 105.0, 50.0, 20.0 ] + } + + } +, { + "box" : { + "color" : [ 0.765957, 0.821347, 0.87245, 1.0 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-62", + "maxclass" : "newobj", + "numinlets" : 3, + "numoutlets" : 11, + "outlettype" : [ "int", "", "float", "float", "float", "float", "float", "float", "int", "", "" ], + "patching_rect" : [ 523.928589, 145.5, 159.734619, 20.0 ], + "text" : "iannix_object", + "textcolor" : [ 0.486275, 0.572549, 0.631373, 1.0 ] + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 9.0, + "frgb" : 0.0, + "id" : "obj-56", + "linecount" : 3, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 521.928589, 163.5, 380.0, 37.0 ], + "text" : "no argument : outputs all objects (no filtering)\n1st argument : only outputs object with desired ID (use 0 to disable ID filtering)\n2nd argument : only outputs object with desired Group ID (use 0 to disable Group ID filtering)", + "textcolor" : [ 0.486275, 0.572549, 0.631373, 1.0 ] + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 9.0, + "frgb" : 0.0, + "id" : "obj-57", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 598.836731, 35.0, 359.0, 17.0 ], + "text" : "arguments : ", + "textcolor" : [ 0.486275, 0.572549, 0.631373, 1.0 ] + } + + } +, { + "box" : { + "bubble" : 1, + "bubblepoint" : 0.15, + "bubbleside" : 2, + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-53", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 7.0, 13.5, 151.0, 39.0 ], + "text" : "Set IanniX score speed" + } + + } +, { + "box" : { + "bgcolor" : [ 1.0, 1.0, 1.0, 0.69 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-20", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 364.908173, 140.0, 117.112244, 20.0 ], + "text" : "Curves intersections", + "textcolor" : [ 0.75, 0.75, 0.75, 1.0 ] + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-18", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 206.31633, 140.0, 94.0, 20.0 ], + "text" : "Cursors coords", + "textcolor" : [ 0.969221, 0.371465, 0.033424, 1.0 ] + } + + } +, { + "box" : { + "bgcolor" : [ 1.0, 1.0, 1.0, 0.81 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-15", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 47.408173, 140.0, 84.183655, 20.0 ], + "text" : "Triggers fired", + "textcolor" : [ 0.151806, 0.586629, 0.819895, 1.0 ] + } + + } +, { + "box" : { + "bordercolor" : [ 0.381386, 0.565705, 0.278877, 1.0 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-34", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "float", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 7.0, 47.5, 50.0, 20.0 ] + } + + } +, { + "box" : { + "bgcolor" : [ 0.427497, 0.707663, 0.768899, 1.0 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-29", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 7.0, 74.0, 98.0, 18.0 ], + "text" : "/iannix/speed $1", + "textcolor" : [ 1.0, 1.0, 1.0, 1.0 ] + } + + } +, { + "box" : { + "bgcolor" : [ 0.936018, 0.93176, 0.911863, 1.0 ], + "bordercolor" : [ 0.0, 0.0, 0.0, 0.0 ], + "id" : "obj-24", + "maxclass" : "panel", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 11.408173, 191.0, 873.0, 4.0 ], + "rounded" : 0 + } + + } +, { + "box" : { + "color" : [ 0.408255, 0.755548, 0.158693, 1.0 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-17", + "maxclass" : "newobj", + "numinlets" : 3, + "numoutlets" : 11, + "outlettype" : [ "int", "", "float", "float", "float", "float", "float", "float", "int", "", "" ], + "patching_rect" : [ 354.408173, 160.0, 159.734619, 20.0 ], + "text" : "iannix_object" + } + + } +, { + "box" : { + "bgcolor" : [ 0.235294, 0.235294, 0.235294, 0.0 ], + "blinkcolor" : [ 0.08602, 0.674216, 0.853086, 1.0 ], + "fgcolor" : [ 0.235772, 0.235765, 0.235769, 1.0 ], + "id" : "obj-22", + "maxclass" : "button", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "bang" ], + "outlinecolor" : [ 0.235294, 0.235294, 0.235294, 0.0 ], + "patching_rect" : [ 418.816315, 85.0, 20.0, 20.0 ] + } + + } +, { + "box" : { + "color" : [ 0.969221, 0.371465, 0.033424, 1.0 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-16", + "maxclass" : "newobj", + "numinlets" : 3, + "numoutlets" : 11, + "outlettype" : [ "int", "", "float", "float", "float", "float", "float", "float", "int", "", "" ], + "patching_rect" : [ 189.81633, 160.0, 159.734619, 20.0 ], + "text" : "iannix_object" + } + + } +, { + "box" : { + "bgcolor" : [ 1.0, 1.0, 1.0, 0.71 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-14", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 259.510193, 105.0, 128.0, 20.0 ], + "text" : "Score played / paused" + } + + } +, { + "box" : { + "bgcolor" : [ 1.0, 1.0, 1.0, 0.71 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-7", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 331.816345, 85.0, 95.612244, 20.0 ], + "text" : "Score rewinded" + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-6", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 609.714294, 60.0, 203.0, 20.0 ], + "text" : "Number of triggers / cursors / curves" + } + + } +, { + "box" : { + "bgcolor" : [ 0.933333, 0.635294, 0.133333, 1.0 ], + "bubble" : 1, + "bubbleside" : 3, + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-4", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 346.816345, 6.0, 92.408142, 24.0 ], + "text" : "Play / pause" + } + + } +, { + "box" : { + "bgcolor" : [ 0.933333, 0.635294, 0.133333, 1.0 ], + "bubble" : 1, + "fontname" : "Arial", + "fontsize" : 12.0, + "frgb" : 0.0, + "id" : "obj-3", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 593.795898, 6.0, 88.0, 24.0 ], + "text" : "Fastrewind" + } + + } +, { + "box" : { + "color" : [ 0.08602, 0.674216, 0.853086, 1.0 ], + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-32", + "maxclass" : "newobj", + "numinlets" : 3, + "numoutlets" : 11, + "outlettype" : [ "int", "", "float", "float", "float", "float", "float", "float", "int", "", "" ], + "patching_rect" : [ 28.0, 160.0, 159.734619, 20.0 ], + "text" : "iannix_object" + } + + } +, { + "box" : { + "bgcolor" : [ 0.235294, 0.235294, 0.235294, 0.0 ], + "blinkcolor" : [ 0.08602, 0.674216, 0.853086, 1.0 ], + "fgcolor" : [ 0.235772, 0.235765, 0.235769, 1.0 ], + "id" : "obj-21", + "maxclass" : "button", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "bang" ], + "outlinecolor" : [ 0.235294, 0.235294, 0.235294, 0.0 ], + "patching_rect" : [ 579.795898, 8.0, 20.0, 20.0 ] + } + + } +, { + "box" : { + "bgcolor" : [ 0.302771, 0.302771, 0.302771, 1.0 ], + "bordercolor" : [ 0.501961, 0.501961, 0.501961, 0.0 ], + "checkedcolor" : [ 0.08602, 0.674216, 0.853086, 1.0 ], + "id" : "obj-19", + "maxclass" : "toggle", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "parameter_enable" : 0, + "patching_rect" : [ 434.714294, 8.0, 20.0, 20.0 ] + } + + } +, { + "box" : { + "bgcolor" : [ 0.936018, 0.93176, 0.911863, 1.0 ], + "bordercolor" : [ 0.862305, 0.862305, 0.862305, 1.0 ], + "cantchange" : 1, + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-13", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "int", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 579.63269, 60.0, 30.081604, 20.0 ], + "triangle" : 0 + } + + } +, { + "box" : { + "bgcolor" : [ 0.936018, 0.93176, 0.911863, 1.0 ], + "bordercolor" : [ 0.862305, 0.862305, 0.862305, 1.0 ], + "cantchange" : 1, + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-12", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "int", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 547.428589, 60.0, 31.0, 20.0 ], + "triangle" : 0 + } + + } +, { + "box" : { + "bgcolor" : [ 0.936018, 0.93176, 0.911863, 1.0 ], + "bordercolor" : [ 0.862305, 0.862305, 0.862305, 1.0 ], + "cantchange" : 1, + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-11", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "int", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 515.020386, 60.0, 31.0, 20.0 ], + "triangle" : 0 + } + + } +, { + "box" : { + "bgcolor" : [ 0.302771, 0.302771, 0.302771, 1.0 ], + "bordercolor" : [ 0.501961, 0.501961, 0.501961, 0.0 ], + "checkedcolor" : [ 0.08602, 0.674216, 0.853086, 1.0 ], + "id" : "obj-5", + "maxclass" : "toggle", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "parameter_enable" : 0, + "patching_rect" : [ 386.612244, 105.0, 20.0, 20.0 ] + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-1", + "maxclass" : "newobj", + "numinlets" : 3, + "numoutlets" : 10, + "outlettype" : [ "", "", "", "int", "bang", "float", "", "int", "int", "int" ], + "patching_rect" : [ 290.0, 35.0, 308.836731, 20.0 ], + "text" : "iannix 127.0.0.1 1234 57120" + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "hidden" : 1, + "id" : "obj-46", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 380.816345, 9.0, 43.0, 18.0 ], + "text" : "set $1" + } + + } + ], + "lines" : [ { + "patchline" : { + "color" : [ 0.936018, 0.93176, 0.911863, 1.0 ], + "destination" : [ "obj-11", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 7 ] + } + + } +, { + "patchline" : { + "color" : [ 0.936018, 0.93176, 0.911863, 1.0 ], + "destination" : [ "obj-12", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 8 ] + } + + } +, { + "patchline" : { + "color" : [ 0.936018, 0.93176, 0.911863, 1.0 ], + "destination" : [ "obj-13", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 9 ] + } + + } +, { + "patchline" : { + "color" : [ 0.969221, 0.371465, 0.033424, 1.0 ], + "destination" : [ "obj-16", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 1 ] + } + + } +, { + "patchline" : { + "color" : [ 0.408255, 0.755548, 0.158693, 1.0 ], + "destination" : [ "obj-17", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 2 ] + } + + } +, { + "patchline" : { + "color" : [ 0.235772, 0.235765, 0.235769, 1.0 ], + "destination" : [ "obj-22", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 4 ] + } + + } +, { + "patchline" : { + "color" : [ 0.151806, 0.586629, 0.819895, 1.0 ], + "destination" : [ "obj-32", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "color" : [ 0.235772, 0.235765, 0.235769, 1.0 ], + "destination" : [ "obj-5", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 3 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-59", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 5 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-63", 1 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 6 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-28", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-16", 10 ] + } + + } +, { + "patchline" : { + "color" : [ 0.235772, 0.235765, 0.235769, 1.0 ], + "destination" : [ "obj-1", 1 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-19", 0 ] + } + + } +, { + "patchline" : { + "color" : [ 0.235772, 0.235765, 0.235769, 1.0 ], + "destination" : [ "obj-1", 2 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-21", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-30", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-28", 0 ] + } + + } +, { + "patchline" : { + "color" : [ 0.427497, 0.707663, 0.768899, 1.0 ], + "destination" : [ "obj-1", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-29", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-23", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-30", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-25", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-30", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-26", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-30", 3 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-33", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-32", 10 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-37", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-32", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-39", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-33", 1 ] + } + + } +, { + "patchline" : { + "color" : [ 0.381386, 0.565705, 0.278877, 1.0 ], + "destination" : [ "obj-29", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-34", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-19", 0 ], + "disabled" : 0, + "hidden" : 1, + "source" : [ "obj-46", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-46", 0 ], + "disabled" : 0, + "hidden" : 1, + "source" : [ "obj-5", 0 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "iannix.maxpat", + "bootpath" : "/Users/Guillaume/Documents/buzzinglight/Projets/Coduys/IanniX/IanniX/Patches/Max", + "patcherrelativepath" : "", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "iannix_object.maxpat", + "bootpath" : "/Users/Guillaume/Documents/buzzinglight/Projets/Coduys/IanniX/IanniX/Patches/Max", + "patcherrelativepath" : "", + "type" : "JSON", + "implicit" : 1 + } + ] + } + +} diff --git a/Patches/Max/Max Example.maxpat b/Patches/Max/Max Sound Example.maxpat similarity index 100% rename from Patches/Max/Max Example.maxpat rename to Patches/Max/Max Sound Example.maxpat diff --git a/gui/uiinspector.cpp b/gui/uiinspector.cpp index 719cd51..bdb37b3 100644 --- a/gui/uiinspector.cpp +++ b/gui/uiinspector.cpp @@ -418,8 +418,10 @@ void UiInspector::actionMessages() { Application::current->pushSnapshot(); ExtOscPatternAsk *ask = new ExtOscPatternAsk(Application::current->getMainWindow(), render->getSelection()); if(!ask->onlyCurves) - if(ask->exec()) - Application::current->execute(QString("%1 selection %2").arg(COMMAND_MESSAGE).arg(ask->getMessagePatterns()), ExecuteSourceGui); + if(ask->exec()) { + if(ask->getMessagePatterns().length()) Application::current->execute(QString("%1 selection %2").arg(COMMAND_MESSAGE).arg(ask->getMessagePatterns()), ExecuteSourceGui); + else Application::current->execute(QString("%1 selection -").arg(COMMAND_MESSAGE), ExecuteSourceGui); + } } } diff --git a/iannix.cpp b/iannix.cpp index 863cda0..97a016a 100644 --- a/iannix.cpp +++ b/iannix.cpp @@ -755,7 +755,8 @@ const QVariant IanniX::execute(const MessageIncomming &command, bool createNewOb return execute(command.command, ExecuteSourceNetwork, createNewObjectIfExists, needOutput); } const QVariant IanniX::execute(const QString &command, ExecuteSource source, bool createNewObjectIfExists, bool needOutput) { - //qDebug(">> %s", qPrintable(command)); + //qDebug("=> (%d) %s", source, qPrintable(command)); + if(((source == ExecuteSourceGui) || (source == ExecuteSourceInformative)) && (view->help)) view->help->messageHelp(command); if(source == ExecuteSourceInformative) @@ -780,7 +781,7 @@ const QVariant IanniX::execute(const QString &command, ExecuteSource source, boo } else { id = parentObject->getId(); - removeObject(parentObject); + //removeObject(parentObject); parentObject = 0; } } @@ -798,6 +799,7 @@ const QVariant IanniX::execute(const QString &command, ExecuteSource source, boo object->setInitialId(id); setObjectGroupId(object, ""); object->dispatchProperty(COMMAND_ID, id); + //qDebug("=> COMMAND_ID %d", id); setObjectActivity(object, ObjectsActivityInactive); object->dispatchProperty(COMMAND_POS, "0 0"); object->setParentObject(parentObject); diff --git a/icons/IanniX.qrc b/icons/IanniX.qrc index 0c28182..43865ea 100644 --- a/icons/IanniX.qrc +++ b/icons/IanniX.qrc @@ -68,5 +68,6 @@ res_tree_open.png res_item_folder.png res_item_reveal.png + res_item_file_opened.png diff --git a/icons/res_item_file_opened.png b/icons/res_item_file_opened.png new file mode 100644 index 0000000000000000000000000000000000000000..d72a2f8f497b367ef73132cbafcb39ca07a17d5d G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X!t(>0AM5*w>1vO+pO81%+S%qG;!5Jp9b^PhE6vr{)$6nZ!-#Z?oM+C*U!tzo zdYg=s@*B0T+H}aNjcOJPxAcv^+SYf!?G40tgWjHQIWBTzdVKSWHA>EL?v2~8cr2d| zXHs%42a!96^WKESbm%f)f`4C2-t?o_6;+*h&q42D@3oa#nL;O~?8=;#9HyI$lT)u5 z=Pte8-2Y)nl*<{AAU4L}5cp>;T5p@Y%03VVGI{vo&xRiv6aQd-tgPi2X10s`aBXVs{zxWzXYc_w z3mX|F`*Yfr_!Jkh>Oq*h&g{SajwN`0*pQsEs@bGTaNcPabtch-q{zw72f~sg%@I zOODrDH+WwVyW6|Zz5fuZq;Pfb(&1)X$aILn_Om%=>!rJ}dlF=ypRe}qK9wD2@@8g| zsVH-Ik35uQh^O-=%)`Xi5`b_~05CBC{3M^^8UVND0a$khKqD6bZvTfaT}A*<^q3mx zBSWXY5!)Cs@(fgM7lOz#1xyF=0ZN=OninjI`FUqNr;GpvfC3o6oEH3pgnVVbnmNZF zW@q%*oH*!Dix5!;OkAYo5CEf~079_e1Pl}g5&;DU3dOMgPldn##J^_#SJ%Ht{HN&O zzxjX5-*F(F9}~nMD*<7FNVlARgKQUI0Q&Fg@$oF}Z~`j80`&e~s{To2zXJfsWJ-|K Wt3GzIv}*YD2uuyF3~J%7_x}S#uy`l{ literal 0 HcmV?d00001 diff --git a/items/uifileitem.cpp b/items/uifileitem.cpp index 72dbcbc..d6f5fb6 100644 --- a/items/uifileitem.cpp +++ b/items/uifileitem.cpp @@ -1,6 +1,7 @@ #include "uifileitem.h" QIcon UiFileItem::iconFile; +QIcon UiFileItem::iconFileOpened; QIcon UiFileItem::iconFolder; bool UiFileItem::showDateTime = true; QStringList UiFileItem::forbiddenDirs; @@ -186,8 +187,8 @@ bool UiFileItem::askForSave(UiSyncItem*, bool as) { QString file = QFileDialog::getSaveFileName(0, "Save score", filename.file.absoluteFilePath(), QString("IanniX score (*.iannix)")); if(!file.isEmpty()) { filename = QFileInfo(file); - fileSave(); setIcon(0, iconFile); + fileSave(); syncWith(QFileInfoList() << filename.file, treeWidget()); return true; } @@ -414,8 +415,9 @@ void UiFileItem::fileShowInOS() { } void UiFileItem::configure(UiTreeView *tree, bool _showDateTime) { - iconFolder = QIcon(":/items/res_item_folder.png"); - iconFile = QIcon(":/items/res_item_file.png"); + iconFolder = QIcon(":/items/res_item_folder.png"); + iconFile = QIcon(":/items/res_item_file.png"); + iconFileOpened = QIcon(":/items/res_item_file_opened.png"); showDateTime = _showDateTime; tree->getTree()->setEditTriggers(QAbstractItemView::SelectedClicked | QAbstractItemView::EditKeyPressed); diff --git a/items/uifileitem.h b/items/uifileitem.h index 1fa95f6..3c174b8 100644 --- a/items/uifileitem.h +++ b/items/uifileitem.h @@ -21,7 +21,7 @@ class UiFileItem : public QObject, public UiSyncItem { UiFile filename; bool isFile; bool isOpened; - static QIcon iconFile, iconFolder; + static QIcon iconFile, iconFileOpened, iconFolder; static bool showDateTime; public: diff --git a/objects/nxdocument.cpp b/objects/nxdocument.cpp index 23ce43e..6548835 100644 --- a/objects/nxdocument.cpp +++ b/objects/nxdocument.cpp @@ -116,6 +116,7 @@ void NxDocument::open() { } void NxDocument::open(bool configure) { isLoaded = false; + if(!skipClose) Application::current->getMainWindow()->setWindowTitle(tr("IanniX") + QString(" / %1").arg(getScriptFile().baseName())); @@ -204,6 +205,9 @@ void NxDocument::open(bool configure) { } } } + + if(fileItem) + fileItem->setIcon(0, UiFileItem::iconFileOpened); updateCode(true); } void NxDocument::updateCode(bool fromFile) { @@ -218,6 +222,8 @@ void NxDocument::save() { scriptFileContent.close(); } Application::current->getMainWindow()->setWindowTitle(tr("IanniX") + QString(" / %1").arg(getScriptFile().baseName())); + if(fileItem) + fileItem->setIcon(0, UiFileItem::iconFileOpened); } const QString NxDocument::getContent(bool fromFile) { QString scoreContent; @@ -301,6 +307,8 @@ void NxDocument::askFileClose() { fileItem->askForSave(fileItem, false); } } + if(fileItem) + fileItem->setIcon(0, UiFileItem::iconFile); clear(); } void NxDocument::restoreDefaults() { diff --git a/objects/nxtrigger.h b/objects/nxtrigger.h index 37b2306..0c4c755 100644 --- a/objects/nxtrigger.h +++ b/objects/nxtrigger.h @@ -97,7 +97,8 @@ class NxTrigger : public NxObject { if(command == COMMAND_ID) { retour += "\trun(\"" + QString("%1 %2 %3").arg(COMMAND_ADD).arg(getTypeStr()).arg(objectId) + "\");\n"; objectId = "current"; } - else retour += "\trun(\"" + QString("%1 %2 %3").arg(command).arg(objectId).arg(getProperty(qPrintable(command)).toString()) + "\");\n"; + else + retour += "\trun(\"" + QString("%1 %2 %3").arg(command).arg(objectId).arg(getProperty(qPrintable(command)).toString()) + "\");\n"; } if(!retour.isEmpty()) retour += "\n";