This reverts commit 2f6d2b55bb
.
pull/362/head
@@ -58,7 +58,7 @@ locale/%.qm: locale/%.ts | |||
# ----------------------------------------------------------------------------------------------------------------------------------------- | |||
# UI code | |||
UI: cadence catarina catia tools | |||
UI: cadence catarina catia claudia tools | |||
cadence: src/ui_cadence.py \ | |||
src/ui_cadence_tb_jack.py src/ui_cadence_tb_alsa.py src/ui_cadence_tb_a2j.py src/ui_cadence_tb_pa.py \ | |||
@@ -71,6 +71,11 @@ catarina: src/ui_catarina.py \ | |||
catia: src/ui_catia.py | |||
claudia: src/ui_claudia.py \ | |||
src/ui_claudia_studioname.py src/ui_claudia_studiolist.py \ | |||
src/ui_claudia_createroom.py src/ui_claudia_projectname.py src/ui_claudia_projectproperties.py \ | |||
src/ui_claudia_runcustom.py src/ui_claudia_launcher.py src/ui_claudia_launcher_app.py | |||
tools: \ | |||
src/ui_logs.py src/ui_render.py \ | |||
src/ui_settings_app.py src/ui_settings_jack.py | |||
@@ -123,6 +128,8 @@ install: | |||
data/cadence-session-start \ | |||
data/catarina \ | |||
data/catia \ | |||
data/claudia \ | |||
data/claudia-launcher \ | |||
c++/jackmeter/cadence-jackmeter \ | |||
c++/xycontroller/cadence-xycontroller \ | |||
$(DESTDIR)$(PREFIX)/bin/ | |||
@@ -135,26 +142,36 @@ install: | |||
install -m 644 resources/16x16/cadence.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/ | |||
install -m 644 resources/16x16/catarina.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/ | |||
install -m 644 resources/16x16/catia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/ | |||
install -m 644 resources/16x16/claudia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/ | |||
install -m 644 resources/16x16/claudia-launcher.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/ | |||
# Install icons, 48x48 | |||
install -m 644 resources/48x48/cadence.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/ | |||
install -m 644 resources/48x48/catarina.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/ | |||
install -m 644 resources/48x48/catia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/ | |||
install -m 644 resources/48x48/claudia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/ | |||
install -m 644 resources/48x48/claudia-launcher.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/ | |||
# Install icons, 128x128 | |||
install -m 644 resources/128x128/cadence.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/ | |||
install -m 644 resources/128x128/catarina.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/ | |||
install -m 644 resources/128x128/catia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/ | |||
install -m 644 resources/128x128/claudia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/ | |||
install -m 644 resources/128x128/claudia-launcher.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/ | |||
# Install icons, 256x256 | |||
install -m 644 resources/256x256/cadence.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/ | |||
install -m 644 resources/256x256/catarina.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/ | |||
install -m 644 resources/256x256/catia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/ | |||
install -m 644 resources/256x256/claudia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/ | |||
install -m 644 resources/256x256/claudia-launcher.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/ | |||
# Install icons, scalable | |||
install -m 644 resources/scalable/cadence.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/ | |||
install -m 644 resources/scalable/catarina.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/ | |||
install -m 644 resources/scalable/catia.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/ | |||
install -m 644 resources/scalable/claudia.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/ | |||
install -m 644 resources/scalable/claudia-launcher.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/ | |||
# Install main code | |||
install -m 755 src/*.py $(DESTDIR)$(PREFIX)/share/cadence/src/ | |||
@@ -170,6 +187,10 @@ install: | |||
install -m 644 data/pulse2loopback/* $(DESTDIR)$(PREFIX)/share/cadence/pulse2loopback/ | |||
install -m 755 data/61cadence-session-inject $(X11_RC_DIR) | |||
# Install addtional stuff for Claudia | |||
cp -r data/icons/* $(DESTDIR)$(PREFIX)/share/cadence/icons/ | |||
cp -r data/templates/* $(DESTDIR)$(PREFIX)/share/cadence/templates/ | |||
# Adjust PREFIX value in script files | |||
sed -i "s?X-PREFIX-X?$(PREFIX)?" \ | |||
$(DESTDIR)$(PREFIX)/bin/cadence \ | |||
@@ -182,6 +203,8 @@ install: | |||
$(DESTDIR)$(PREFIX)/bin/cadence-session-start \ | |||
$(DESTDIR)$(PREFIX)/bin/catarina \ | |||
$(DESTDIR)$(PREFIX)/bin/catia \ | |||
$(DESTDIR)$(PREFIX)/bin/claudia \ | |||
$(DESTDIR)$(PREFIX)/bin/claudia-launcher \ | |||
$(X11_RC_DIR)/61cadence-session-inject | |||
# Delete old files | |||
@@ -0,0 +1,30 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "patchcanvas/patchcanvas.cpp" | |||
#include "patchcanvas/patchcanvas-theme.cpp" | |||
#include "patchcanvas/patchscene.cpp" | |||
#include "patchcanvas/canvasbezierline.cpp" | |||
#include "patchcanvas/canvasbezierlinemov.cpp" | |||
#include "patchcanvas/canvasbox.cpp" | |||
#include "patchcanvas/canvasboxshadow.cpp" | |||
#include "patchcanvas/canvasfadeanimation.cpp" | |||
#include "patchcanvas/canvasicon.cpp" | |||
#include "patchcanvas/canvasline.cpp" | |||
#include "patchcanvas/canvaslinemov.cpp" | |||
#include "patchcanvas/canvasport.cpp" | |||
#include "patchcanvas/canvasportglow.cpp" |
@@ -0,0 +1,138 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef PATCHCANVAS_API_HPP | |||
#define PATCHCANVAS_API_HPP | |||
#define START_NAMESPACE_PATCHCANVAS namespace PatchCanvas { | |||
#define END_NAMESPACE_PATCHCANVAS } | |||
#ifndef PATCHCANVAS_ORGANISATION_NAME | |||
# define PATCHCANVAS_ORGANISATION_NAME "PatchCanvas" | |||
#endif | |||
#include "patchcanvas/patchcanvas-theme.h" | |||
#include "patchcanvas/patchscene.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
enum PortMode { | |||
PORT_MODE_NULL = 0, | |||
PORT_MODE_INPUT = 1, | |||
PORT_MODE_OUTPUT = 2 | |||
}; | |||
enum PortType { | |||
PORT_TYPE_NULL = 0, | |||
PORT_TYPE_AUDIO_JACK = 1, | |||
PORT_TYPE_MIDI_JACK = 2, | |||
PORT_TYPE_MIDI_A2J = 3, | |||
PORT_TYPE_MIDI_ALSA = 4 | |||
}; | |||
enum CallbackAction { | |||
ACTION_GROUP_INFO = 0, // group_id, N, N | |||
ACTION_GROUP_RENAME = 1, // group_id, N, new_name | |||
ACTION_GROUP_SPLIT = 2, // group_id, N, N | |||
ACTION_GROUP_JOIN = 3, // group_id, N, N | |||
ACTION_PORT_INFO = 4, // port_id, N, N | |||
ACTION_PORT_RENAME = 5, // port_id, N, new_name | |||
ACTION_PORTS_CONNECT = 6, // out_id, in_id, N | |||
ACTION_PORTS_DISCONNECT = 7 // conn_id, N, N | |||
}; | |||
enum Icon { | |||
ICON_HARDWARE = 0, | |||
ICON_APPLICATION = 1, | |||
ICON_LADISH_ROOM = 2 | |||
}; | |||
enum SplitOption { | |||
SPLIT_UNDEF = 0, | |||
SPLIT_NO = 1, | |||
SPLIT_YES = 2 | |||
}; | |||
enum AntialiasingOption { | |||
ANTIALIASING_NONE = 0, | |||
ANTIALIASING_SMALL = 1, | |||
ANTIALIASING_FULL = 2 | |||
}; | |||
enum EyeCandyOption { | |||
EYECANDY_NONE = 0, | |||
EYECANDY_SMALL = 1, | |||
EYECANDY_FULL = 2 | |||
}; | |||
// Canvas options | |||
struct options_t { | |||
QString theme_name; | |||
bool auto_hide_groups; | |||
bool use_bezier_lines; | |||
AntialiasingOption antialiasing; | |||
EyeCandyOption eyecandy; | |||
}; | |||
// Canvas features | |||
struct features_t { | |||
bool group_info; | |||
bool group_rename; | |||
bool port_info; | |||
bool port_rename; | |||
bool handle_group_pos; | |||
}; | |||
typedef void (*Callback) (CallbackAction action, int value1, int value2, QString value_str); | |||
// API starts here | |||
void setOptions(options_t* options); | |||
void setFeatures(features_t* features); | |||
void init(PatchScene* scene, Callback callback, bool debug=false); | |||
void clear(); | |||
void setInitialPos(int x, int y); | |||
void setCanvasSize(int x, int y, int width, int height); | |||
void addGroup(int group_id, QString group_name, SplitOption split=SPLIT_UNDEF, Icon icon=ICON_APPLICATION); | |||
void removeGroup(int group_id); | |||
void renameGroup(int group_id, QString new_group_name); | |||
void splitGroup(int group_id); | |||
void joinGroup(int group_id); | |||
QPointF getGroupPos(int group_id, PortMode port_mode=PORT_MODE_OUTPUT); | |||
void setGroupPos(int group_id, int group_pos_x, int group_pos_y); | |||
void setGroupPos(int group_id, int group_pos_x, int group_pos_y, int group_pos_xs, int group_pos_ys); | |||
void setGroupIcon(int group_id, Icon icon); | |||
void addPort(int group_id, int port_id, QString port_name, PortMode port_mode, PortType port_type); | |||
void removePort(int port_id); | |||
void renamePort(int port_id, QString new_port_name); | |||
void connectPorts(int connection_id, int port_out_id, int port_in_id); | |||
void disconnectPorts(int connection_id); | |||
void arrange(); | |||
void updateZValues(); | |||
// Theme | |||
Theme::List getDefaultTheme(); | |||
QString getThemeName(Theme::List id); | |||
QString getDefaultThemeName(); | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // PATCHCANVAS_API_HPP |
@@ -0,0 +1,63 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef ABSTRACTCANVASLINE_H | |||
#define ABSTRACTCANVASLINE_H | |||
#include "patchcanvas.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
class AbstractCanvasLine | |||
{ | |||
public: | |||
AbstractCanvasLine() {} | |||
virtual void deleteFromScene() = 0; | |||
virtual bool isLocked() const = 0; | |||
virtual void setLocked(bool yesno) = 0; | |||
virtual bool isLineSelected() const = 0; | |||
virtual void setLineSelected(bool yesno) = 0; | |||
virtual void updateLinePos() = 0; | |||
virtual int type() const = 0; | |||
// QGraphicsItem generic calls | |||
virtual void setZValue(qreal z) = 0; | |||
}; | |||
class AbstractCanvasLineMov | |||
{ | |||
public: | |||
AbstractCanvasLineMov() {} | |||
virtual void deleteFromScene() = 0; | |||
virtual void updateLinePos(QPointF scenePos) = 0; | |||
virtual int type() const = 0; | |||
// QGraphicsItem generic calls | |||
virtual void setZValue(qreal z) = 0; | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // ABSTRACTCANVASLINE_H |
@@ -0,0 +1,162 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "canvasbezierline.h" | |||
#include <QtGui/QPainter> | |||
#include "canvasport.h" | |||
#include "canvasportglow.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
CanvasBezierLine::CanvasBezierLine(CanvasPort* item1_, CanvasPort* item2_, QGraphicsItem* parent) : | |||
QGraphicsPathItem(parent, canvas.scene) | |||
{ | |||
item1 = item1_; | |||
item2 = item2_; | |||
m_locked = false; | |||
m_lineSelected = false; | |||
setBrush(QColor(0,0,0,0)); | |||
setGraphicsEffect(0); | |||
updateLinePos(); | |||
} | |||
CanvasBezierLine::~CanvasBezierLine() | |||
{ | |||
setGraphicsEffect(0); | |||
} | |||
void CanvasBezierLine::deleteFromScene() | |||
{ | |||
canvas.scene->removeItem(this); | |||
delete this; | |||
} | |||
bool CanvasBezierLine::isLocked() const | |||
{ | |||
return m_locked; | |||
} | |||
void CanvasBezierLine::setLocked(bool yesno) | |||
{ | |||
m_locked = yesno; | |||
} | |||
bool CanvasBezierLine::isLineSelected() const | |||
{ | |||
return m_lineSelected; | |||
} | |||
void CanvasBezierLine::setLineSelected(bool yesno) | |||
{ | |||
if (m_locked) | |||
return; | |||
if (options.eyecandy == EYECANDY_FULL) | |||
{ | |||
if (yesno) | |||
setGraphicsEffect(new CanvasPortGlow(item1->getPortType(), toGraphicsObject())); | |||
else | |||
setGraphicsEffect(0); | |||
} | |||
m_lineSelected = yesno; | |||
updateLineGradient(); | |||
} | |||
void CanvasBezierLine::updateLinePos() | |||
{ | |||
if (item1->getPortMode() == PORT_MODE_OUTPUT) | |||
{ | |||
int item1_x = item1->scenePos().x() + item1->getPortWidth()+12; | |||
int item1_y = item1->scenePos().y() + 7.5; | |||
int item2_x = item2->scenePos().x(); | |||
int item2_y = item2->scenePos().y()+7.5; | |||
int item1_mid_x = abs(item1_x-item2_x)/2; | |||
int item1_new_x = item1_x+item1_mid_x; | |||
int item2_mid_x = abs(item1_x-item2_x)/2; | |||
int item2_new_x = item2_x-item2_mid_x; | |||
QPainterPath path(QPointF(item1_x, item1_y)); | |||
path.cubicTo(item1_new_x, item1_y, item2_new_x, item2_y, item2_x, item2_y); | |||
setPath(path); | |||
m_lineSelected = false; | |||
updateLineGradient(); | |||
} | |||
} | |||
int CanvasBezierLine::type() const | |||
{ | |||
return CanvasBezierLineType; | |||
} | |||
void CanvasBezierLine::updateLineGradient() | |||
{ | |||
short pos1, pos2; | |||
int pos_top = boundingRect().top(); | |||
int pos_bot = boundingRect().bottom(); | |||
if (item2->scenePos().y() >= item1->scenePos().y()) | |||
{ | |||
pos1 = 0; | |||
pos2 = 1; | |||
} | |||
else | |||
{ | |||
pos1 = 1; | |||
pos2 = 0; | |||
} | |||
PortType port_type1 = item1->getPortType(); | |||
PortType port_type2 = item2->getPortType(); | |||
QLinearGradient port_gradient(0, pos_top, 0, pos_bot); | |||
if (port_type1 == PORT_TYPE_AUDIO_JACK) | |||
port_gradient.setColorAt(pos1, m_lineSelected ? canvas.theme->line_audio_jack_sel : canvas.theme->line_audio_jack); | |||
else if (port_type1 == PORT_TYPE_MIDI_JACK) | |||
port_gradient.setColorAt(pos1, m_lineSelected ? canvas.theme->line_midi_jack_sel : canvas.theme->line_midi_jack); | |||
else if (port_type1 == PORT_TYPE_MIDI_A2J) | |||
port_gradient.setColorAt(pos1, m_lineSelected ? canvas.theme->line_midi_a2j_sel : canvas.theme->line_midi_a2j); | |||
else if (port_type1 == PORT_TYPE_MIDI_ALSA) | |||
port_gradient.setColorAt(pos1, m_lineSelected ? canvas.theme->line_midi_alsa_sel : canvas.theme->line_midi_alsa); | |||
if (port_type2 == PORT_TYPE_AUDIO_JACK) | |||
port_gradient.setColorAt(pos2, m_lineSelected ? canvas.theme->line_audio_jack_sel : canvas.theme->line_audio_jack); | |||
else if (port_type2 == PORT_TYPE_MIDI_JACK) | |||
port_gradient.setColorAt(pos2, m_lineSelected ? canvas.theme->line_midi_jack_sel : canvas.theme->line_midi_jack); | |||
else if (port_type2 == PORT_TYPE_MIDI_A2J) | |||
port_gradient.setColorAt(pos2, m_lineSelected ? canvas.theme->line_midi_a2j_sel : canvas.theme->line_midi_a2j); | |||
else if (port_type2 == PORT_TYPE_MIDI_ALSA) | |||
port_gradient.setColorAt(pos2, m_lineSelected ? canvas.theme->line_midi_alsa_sel : canvas.theme->line_midi_alsa); | |||
setPen(QPen(port_gradient, 2)); | |||
} | |||
void CanvasBezierLine::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) | |||
{ | |||
painter->setRenderHint(QPainter::Antialiasing, bool(options.antialiasing)); | |||
QGraphicsPathItem::paint(painter, option, widget); | |||
} | |||
END_NAMESPACE_PATCHCANVAS |
@@ -0,0 +1,72 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef CANVASBEZIERLINE_H | |||
#define CANVASBEZIERLINE_H | |||
#include <QtGui/QGraphicsPathItem> | |||
#include "abstractcanvasline.h" | |||
class QPainter; | |||
START_NAMESPACE_PATCHCANVAS | |||
class CanvasPort; | |||
class CanvasPortGlow; | |||
class CanvasBezierLine : | |||
public AbstractCanvasLine, | |||
public QGraphicsPathItem | |||
{ | |||
public: | |||
CanvasBezierLine(CanvasPort* item1, CanvasPort* item2, QGraphicsItem* parent); | |||
~CanvasBezierLine(); | |||
virtual void deleteFromScene(); | |||
virtual bool isLocked() const; | |||
virtual void setLocked(bool yesno); | |||
virtual bool isLineSelected() const; | |||
virtual void setLineSelected(bool yesno); | |||
virtual void updateLinePos(); | |||
virtual int type() const; | |||
// QGraphicsItem generic calls | |||
virtual void setZValue(qreal z) | |||
{ | |||
QGraphicsPathItem::setZValue(z); | |||
} | |||
private: | |||
CanvasPort* item1; | |||
CanvasPort* item2; | |||
CanvasPortGlow* glow; | |||
bool m_locked; | |||
bool m_lineSelected; | |||
void updateLineGradient(); | |||
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // CANVASBEZIERLINE_H |
@@ -0,0 +1,104 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "canvasbezierlinemov.h" | |||
#include <QtGui/QPainter> | |||
#include "canvasport.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
CanvasBezierLineMov::CanvasBezierLineMov(PortMode port_mode, PortType port_type, QGraphicsItem* parent) : | |||
QGraphicsPathItem(parent, canvas.scene) | |||
{ | |||
m_port_mode = port_mode; | |||
m_port_type = port_type; | |||
// Port position doesn't change while moving around line | |||
p_itemX = scenePos().x(); | |||
p_itemY = scenePos().y(); | |||
p_width = ((CanvasPort*)parentItem())->getPortWidth(); | |||
QPen pen; | |||
if (port_type == PORT_TYPE_AUDIO_JACK) | |||
pen = QPen(canvas.theme->line_audio_jack, 2); | |||
else if (port_type == PORT_TYPE_MIDI_JACK) | |||
pen = QPen(canvas.theme->line_midi_jack, 2); | |||
else if (port_type == PORT_TYPE_MIDI_A2J) | |||
pen = QPen(canvas.theme->line_midi_a2j, 2); | |||
else if (port_type == PORT_TYPE_MIDI_ALSA) | |||
pen = QPen(canvas.theme->line_midi_alsa, 2); | |||
else | |||
{ | |||
qWarning("PatchCanvas::CanvasBezierLineMov(%s, %s, %p) - invalid port type", port_mode2str(port_mode), port_type2str(port_type), parent); | |||
pen = QPen(Qt::black); | |||
} | |||
QColor color(0,0,0,0); | |||
setBrush(color); | |||
setPen(pen); | |||
} | |||
void CanvasBezierLineMov::deleteFromScene() | |||
{ | |||
canvas.scene->removeItem(this); | |||
delete this; | |||
} | |||
void CanvasBezierLineMov::updateLinePos(QPointF scenePos) | |||
{ | |||
int old_x, old_y, mid_x, new_x, final_x, final_y; | |||
if (m_port_mode == PORT_MODE_INPUT) | |||
{ | |||
old_x = 0; | |||
old_y = 7.5; | |||
mid_x = abs(scenePos.x()-p_itemX)/2; | |||
new_x = old_x-mid_x; | |||
} | |||
else if (m_port_mode == PORT_MODE_OUTPUT) | |||
{ | |||
old_x = p_width+12; | |||
old_y = 7.5; | |||
mid_x = abs(scenePos.x()-(p_itemX+old_x))/2; | |||
new_x = old_x+mid_x; | |||
} | |||
else | |||
return; | |||
final_x = scenePos.x()-p_itemX; | |||
final_y = scenePos.y()-p_itemY; | |||
QPainterPath path(QPointF(old_x, old_y)); | |||
path.cubicTo(new_x, old_y, new_x, final_y, final_x, final_y); | |||
setPath(path); | |||
} | |||
int CanvasBezierLineMov::type() const | |||
{ | |||
return CanvasBezierLineMovType; | |||
} | |||
void CanvasBezierLineMov::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) | |||
{ | |||
painter->setRenderHint(QPainter::Antialiasing, bool(options.antialiasing)); | |||
QGraphicsPathItem::paint(painter, option, widget); | |||
} | |||
END_NAMESPACE_PATCHCANVAS |
@@ -0,0 +1,60 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef CANVASBEZIERLINEMOV_H | |||
#define CANVASBEZIERLINEMOV_H | |||
#include <QtGui/QGraphicsPathItem> | |||
#include "abstractcanvasline.h" | |||
class QPainter; | |||
START_NAMESPACE_PATCHCANVAS | |||
class CanvasBezierLineMov : | |||
public AbstractCanvasLineMov, | |||
public QGraphicsPathItem | |||
{ | |||
public: | |||
CanvasBezierLineMov(PortMode port_mode, PortType port_type, QGraphicsItem* parent); | |||
virtual void deleteFromScene(); | |||
virtual void updateLinePos(QPointF scenePos); | |||
virtual int type() const; | |||
// QGraphicsItem generic calls | |||
virtual void setZValue(qreal z) | |||
{ | |||
QGraphicsPathItem::setZValue(z); | |||
} | |||
private: | |||
PortMode m_port_mode; | |||
PortType m_port_type; | |||
int p_itemX; | |||
int p_itemY; | |||
int p_width; | |||
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // CANVASBEZIERLINEMOV_H |
@@ -0,0 +1,695 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "canvasbox.h" | |||
#include <QtCore/QTimer> | |||
#include <QtGui/QCursor> | |||
#include <QtGui/QInputDialog> | |||
#include <QtGui/QMenu> | |||
#include <QtGui/QGraphicsSceneContextMenuEvent> | |||
#include <QtGui/QGraphicsSceneMouseEvent> | |||
#include <QtGui/QPainter> | |||
#include "canvasline.h" | |||
#include "canvasbezierline.h" | |||
#include "canvasport.h" | |||
#include "canvasboxshadow.h" | |||
#include "canvasicon.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
CanvasBox::CanvasBox(int group_id, QString group_name, Icon icon, QGraphicsItem* parent) : | |||
QGraphicsItem(parent, canvas.scene) | |||
{ | |||
// Save Variables, useful for later | |||
m_group_id = group_id; | |||
m_group_name = group_name; | |||
// Base Variables | |||
p_width = 50; | |||
p_height = 25; | |||
m_last_pos = QPointF(); | |||
m_splitted = false; | |||
m_splitted_mode = PORT_MODE_NULL; | |||
m_cursor_moving = false; | |||
m_forced_split = false; | |||
m_mouse_down = false; | |||
m_port_list_ids.clear(); | |||
m_connection_lines.clear(); | |||
// Set Font | |||
m_font_name = QFont(canvas.theme->box_font_name, canvas.theme->box_font_size, canvas.theme->box_font_state); | |||
m_font_port = QFont(canvas.theme->port_font_name, canvas.theme->port_font_size, canvas.theme->port_font_state); | |||
// Icon | |||
icon_svg = new CanvasIcon(icon, group_name, this); | |||
// Shadow | |||
if (options.eyecandy) | |||
{ | |||
shadow = new CanvasBoxShadow(toGraphicsObject()); | |||
shadow->setFakeParent(this); | |||
setGraphicsEffect(shadow); | |||
} | |||
else | |||
shadow = 0; | |||
// Final touches | |||
setFlags(QGraphicsItem::ItemIsMovable|QGraphicsItem::ItemIsSelectable); | |||
// Wait for at least 1 port | |||
if (options.auto_hide_groups) | |||
setVisible(false); | |||
updatePositions(); | |||
} | |||
CanvasBox::~CanvasBox() | |||
{ | |||
if (shadow) | |||
delete shadow; | |||
delete icon_svg; | |||
} | |||
int CanvasBox::getGroupId() | |||
{ | |||
return m_group_id; | |||
} | |||
QString CanvasBox::getGroupName() | |||
{ | |||
return m_group_name; | |||
} | |||
bool CanvasBox::isSplitted() | |||
{ | |||
return m_splitted; | |||
} | |||
PortMode CanvasBox::getSplittedMode() | |||
{ | |||
return m_splitted_mode; | |||
} | |||
int CanvasBox::getPortCount() | |||
{ | |||
return m_port_list_ids.count(); | |||
} | |||
QList<int> CanvasBox::getPortList() | |||
{ | |||
return m_port_list_ids; | |||
} | |||
void CanvasBox::setIcon(Icon icon) | |||
{ | |||
icon_svg->setIcon(icon, m_group_name); | |||
} | |||
void CanvasBox::setSplit(bool split, PortMode mode) | |||
{ | |||
m_splitted = split; | |||
m_splitted_mode = mode; | |||
} | |||
void CanvasBox::setGroupName(QString group_name) | |||
{ | |||
m_group_name = group_name; | |||
updatePositions(); | |||
} | |||
void CanvasBox::setShadowOpacity(float opacity) | |||
{ | |||
if (shadow) | |||
shadow->setOpacity(opacity); | |||
} | |||
CanvasPort* CanvasBox::addPortFromGroup(int port_id, QString port_name, PortMode port_mode, PortType port_type) | |||
{ | |||
if (m_port_list_ids.count() == 0) | |||
{ | |||
if (options.auto_hide_groups) | |||
{ | |||
if (options.eyecandy == EYECANDY_FULL) | |||
CanvasItemFX(this, true); | |||
setVisible(true); | |||
} | |||
} | |||
CanvasPort* new_widget = new CanvasPort(port_id, port_name, port_mode, port_type, this); | |||
port_dict_t port_dict; | |||
port_dict.group_id = m_group_id; | |||
port_dict.port_id = port_id; | |||
port_dict.port_name = port_name; | |||
port_dict.port_mode = port_mode; | |||
port_dict.port_type = port_type; | |||
port_dict.widget = new_widget; | |||
m_port_list_ids.append(port_id); | |||
return new_widget; | |||
} | |||
void CanvasBox::removePortFromGroup(int port_id) | |||
{ | |||
if (m_port_list_ids.contains(port_id)) | |||
{ | |||
m_port_list_ids.removeOne(port_id); | |||
} | |||
else | |||
{ | |||
qCritical("PatchCanvas::CanvasBox->removePort(%i) - unable to find port to remove", port_id); | |||
return; | |||
} | |||
if (m_port_list_ids.count() > 0) | |||
{ | |||
updatePositions(); | |||
} | |||
else if (isVisible()) | |||
{ | |||
if (options.auto_hide_groups) | |||
{ | |||
if (options.eyecandy == EYECANDY_FULL) | |||
CanvasItemFX(this, false); | |||
else | |||
setVisible(false); | |||
} | |||
} | |||
} | |||
void CanvasBox::addLineFromGroup(AbstractCanvasLine* line, int connection_id) | |||
{ | |||
cb_line_t new_cbline; | |||
new_cbline.line = line; | |||
new_cbline.connection_id = connection_id; | |||
m_connection_lines.append(new_cbline); | |||
} | |||
void CanvasBox::removeLineFromGroup(int connection_id) | |||
{ | |||
foreach2 (const cb_line_t& connection, m_connection_lines) | |||
if (connection.connection_id == connection_id) | |||
{ | |||
m_connection_lines.takeAt(i); | |||
return; | |||
} | |||
} | |||
qCritical("PatchCanvas::CanvasBox->removeLineFromGroup(%i) - unable to find line to remove", connection_id); | |||
} | |||
void CanvasBox::checkItemPos() | |||
{ | |||
if (canvas.size_rect.isNull() == false) | |||
{ | |||
QPointF pos = scenePos(); | |||
if (canvas.size_rect.contains(pos) == false || canvas.size_rect.contains(pos+QPointF(p_width, p_height)) == false) | |||
{ | |||
if (pos.x() < canvas.size_rect.x()) | |||
setPos(canvas.size_rect.x(), pos.y()); | |||
else if (pos.x()+p_width > canvas.size_rect.width()) | |||
setPos(canvas.size_rect.width()-p_width, pos.y()); | |||
pos = scenePos(); | |||
if (pos.y() < canvas.size_rect.y()) | |||
setPos(pos.x(), canvas.size_rect.y()); | |||
else if (pos.y()+p_height > canvas.size_rect.height()) | |||
setPos(pos.x(), canvas.size_rect.height()-p_height); | |||
} | |||
} | |||
} | |||
void CanvasBox::removeIconFromScene() | |||
{ | |||
canvas.scene->removeItem(icon_svg); | |||
} | |||
void CanvasBox::updatePositions() | |||
{ | |||
prepareGeometryChange(); | |||
int max_in_width = 0; | |||
int max_in_height = 24; | |||
int max_out_width = 0; | |||
int max_out_height = 24; | |||
bool have_audio_jack_in, have_audio_jack_out, have_midi_jack_in, have_midi_jack_out; | |||
bool have_midi_a2j_in, have_midi_a2j_out, have_midi_alsa_in, have_midi_alsa_out; | |||
have_audio_jack_in = have_midi_jack_in = have_midi_a2j_in = have_midi_alsa_in = false; | |||
have_audio_jack_out = have_midi_jack_out = have_midi_a2j_out = have_midi_alsa_out = false; | |||
// reset box size | |||
p_width = 50; | |||
p_height = 25; | |||
// Check Text Name size | |||
int app_name_size = QFontMetrics(m_font_name).width(m_group_name)+30; | |||
if (app_name_size > p_width) | |||
p_width = app_name_size; | |||
// Get Port List | |||
QList<port_dict_t> port_list; | |||
foreach (const port_dict_t& port, canvas.port_list) | |||
{ | |||
if (m_port_list_ids.contains(port.port_id)) | |||
port_list.append(port); | |||
} | |||
// Get Max Box Width/Height | |||
foreach (const port_dict_t& port, port_list) | |||
{ | |||
if (port.port_mode == PORT_MODE_INPUT) | |||
{ | |||
max_in_height += 18; | |||
int size = QFontMetrics(m_font_port).width(port.port_name); | |||
if (size > max_in_width) | |||
max_in_width = size; | |||
if (port.port_type == PORT_TYPE_AUDIO_JACK && have_audio_jack_in == false) | |||
{ | |||
have_audio_jack_in = true; | |||
max_in_height += 2; | |||
} | |||
else if (port.port_type == PORT_TYPE_MIDI_JACK && have_midi_jack_in == false) | |||
{ | |||
have_midi_jack_in = true; | |||
max_in_height += 2; | |||
} | |||
else if (port.port_type == PORT_TYPE_MIDI_A2J && have_midi_a2j_in == false) | |||
{ | |||
have_midi_a2j_in = true; | |||
max_in_height += 2; | |||
} | |||
else if (port.port_type == PORT_TYPE_MIDI_ALSA && have_midi_alsa_in == false) | |||
{ | |||
have_midi_alsa_in = true; | |||
max_in_height += 2; | |||
} | |||
} | |||
else if (port.port_mode == PORT_MODE_OUTPUT) | |||
{ | |||
max_out_height += 18; | |||
int size = QFontMetrics(m_font_port).width(port.port_name); | |||
if (size > max_out_width) | |||
max_out_width = size; | |||
if (port.port_type == PORT_TYPE_AUDIO_JACK && have_audio_jack_out == false) | |||
{ | |||
have_audio_jack_out = true; | |||
max_out_height += 2; | |||
} | |||
else if (port.port_type == PORT_TYPE_MIDI_JACK && have_midi_jack_out == false) | |||
{ | |||
have_midi_jack_out = true; | |||
max_out_height += 2; | |||
} | |||
else if (port.port_type == PORT_TYPE_MIDI_A2J && have_midi_a2j_out == false) | |||
{ | |||
have_midi_a2j_out = true; | |||
max_out_height += 2; | |||
} | |||
else if (port.port_type == PORT_TYPE_MIDI_ALSA && have_midi_alsa_out == false) | |||
{ | |||
have_midi_alsa_out = true; | |||
max_out_height += 2; | |||
} | |||
} | |||
} | |||
int final_width = 30 + max_in_width + max_out_width; | |||
if (final_width > p_width) | |||
p_width = final_width; | |||
if (max_in_height > p_height) | |||
p_height = max_in_height; | |||
if (max_out_height > p_height) | |||
p_height = max_out_height; | |||
// Remove bottom space | |||
p_height -= 2; | |||
int last_in_pos = 24; | |||
int last_out_pos = 24; | |||
PortType last_in_type = PORT_TYPE_NULL; | |||
PortType last_out_type = PORT_TYPE_NULL; | |||
// Re-position ports, AUDIO_JACK | |||
foreach (const port_dict_t& port, port_list) | |||
{ | |||
if (port.port_type == PORT_TYPE_AUDIO_JACK) | |||
{ | |||
if (port.port_mode == PORT_MODE_INPUT) | |||
{ | |||
port.widget->setPos(QPointF(1, last_in_pos)); | |||
port.widget->setPortWidth(max_in_width); | |||
last_in_pos += 18; | |||
last_in_type = port.port_type; | |||
} | |||
else if (port.port_mode == PORT_MODE_OUTPUT) | |||
{ | |||
port.widget->setPos(QPointF(p_width-max_out_width-13, last_out_pos)); | |||
port.widget->setPortWidth(max_out_width); | |||
last_out_pos += 18; | |||
last_out_type = port.port_type; | |||
} | |||
} | |||
} | |||
// Re-position ports, MIDI_JACK | |||
foreach (const port_dict_t& port, port_list) | |||
{ | |||
if (port.port_type == PORT_TYPE_MIDI_JACK) | |||
{ | |||
if (port.port_mode == PORT_MODE_INPUT) | |||
{ | |||
if (last_in_type != PORT_TYPE_NULL && port.port_type != last_in_type) | |||
last_in_pos += 2; | |||
port.widget->setPos(QPointF(1, last_in_pos)); | |||
port.widget->setPortWidth(max_in_width); | |||
last_in_pos += 18; | |||
last_in_type = port.port_type; | |||
} | |||
else if (port.port_mode == PORT_MODE_OUTPUT) | |||
{ | |||
if (last_out_type != PORT_TYPE_NULL && port.port_type != last_out_type) | |||
last_out_pos += 2; | |||
port.widget->setPos(QPointF(p_width-max_out_width-13, last_out_pos)); | |||
port.widget->setPortWidth(max_out_width); | |||
last_out_pos += 18; | |||
last_out_type = port.port_type; | |||
} | |||
} | |||
} | |||
// Re-position ports, MIDI_A2J | |||
foreach (const port_dict_t& port, port_list) | |||
{ | |||
if (port.port_type == PORT_TYPE_MIDI_A2J) | |||
{ | |||
if (port.port_mode == PORT_MODE_INPUT) | |||
{ | |||
if (last_in_type != PORT_TYPE_NULL && port.port_type != last_in_type) | |||
last_in_pos += 2; | |||
port.widget->setPos(QPointF(1, last_in_pos)); | |||
port.widget->setPortWidth(max_in_width); | |||
last_in_pos += 18; | |||
last_in_type = port.port_type; | |||
} | |||
else if (port.port_mode == PORT_MODE_OUTPUT) | |||
{ | |||
if (last_out_type != PORT_TYPE_NULL && port.port_type != last_out_type) | |||
last_out_pos += 2; | |||
port.widget->setPos(QPointF(p_width-max_out_width-13, last_out_pos)); | |||
port.widget->setPortWidth(max_out_width); | |||
last_out_pos += 18; | |||
last_out_type = port.port_type; | |||
} | |||
} | |||
} | |||
// Re-position ports, MIDI_ALSA | |||
foreach (const port_dict_t& port, port_list) | |||
{ | |||
if (port.port_type == PORT_TYPE_MIDI_ALSA) | |||
{ | |||
if (port.port_mode == PORT_MODE_INPUT) | |||
{ | |||
if (last_in_type != PORT_TYPE_NULL && port.port_type != last_in_type) | |||
last_in_pos += 2; | |||
port.widget->setPos(QPointF(1, last_in_pos)); | |||
port.widget->setPortWidth(max_in_width); | |||
last_in_pos += 18; | |||
last_in_type = port.port_type; | |||
} | |||
else if (port.port_mode == PORT_MODE_OUTPUT) | |||
{ | |||
if (last_out_type != PORT_TYPE_NULL && port.port_type != last_out_type) | |||
last_out_pos += 2; | |||
port.widget->setPos(QPointF(p_width-max_out_width-13, last_out_pos)); | |||
port.widget->setPortWidth(max_out_width); | |||
last_out_pos += 18; | |||
last_out_type = port.port_type; | |||
} | |||
} | |||
} | |||
repaintLines(true); | |||
update(); | |||
} | |||
void CanvasBox::repaintLines(bool forced) | |||
{ | |||
if (pos() != m_last_pos || forced) | |||
{ | |||
foreach (const cb_line_t& connection, m_connection_lines) | |||
connection.line->updateLinePos(); | |||
} | |||
m_last_pos = pos(); | |||
} | |||
void CanvasBox::resetLinesZValue() | |||
{ | |||
foreach (const connection_dict_t& connection, canvas.connection_list) | |||
{ | |||
int z_value; | |||
if (m_port_list_ids.contains(connection.port_out_id) && m_port_list_ids.contains(connection.port_in_id)) | |||
z_value = canvas.last_z_value; | |||
else | |||
z_value = canvas.last_z_value-1; | |||
connection.widget->setZValue(z_value); | |||
} | |||
} | |||
int CanvasBox::type() const | |||
{ | |||
return CanvasBoxType; | |||
} | |||
void CanvasBox::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) | |||
{ | |||
QMenu menu; | |||
QMenu discMenu("Disconnect", &menu); | |||
QList<int> port_con_list; | |||
QList<int> port_con_list_ids; | |||
foreach (const int& port_id, m_port_list_ids) | |||
{ | |||
QList<int> tmp_port_con_list = CanvasGetPortConnectionList(port_id); | |||
foreach (const int& port_con_id, tmp_port_con_list) | |||
{ | |||
if (port_con_list.contains(port_con_id) == false) | |||
{ | |||
port_con_list.append(port_con_id); | |||
port_con_list_ids.append(port_id); | |||
} | |||
} | |||
} | |||
if (port_con_list.count() > 0) | |||
{ | |||
for (int i=0; i < port_con_list.count(); i++) | |||
{ | |||
int port_con_id = CanvasGetConnectedPort(port_con_list[i], port_con_list_ids[i]); | |||
QAction* act_x_disc = discMenu.addAction(CanvasGetFullPortName(port_con_id)); | |||
act_x_disc->setData(port_con_list[i]); | |||
QObject::connect(act_x_disc, SIGNAL(triggered()), canvas.qobject, SLOT(PortContextMenuDisconnect())); | |||
} | |||
} | |||
else | |||
{ | |||
QAction* act_x_disc = discMenu.addAction("No connections"); | |||
act_x_disc->setEnabled(false); | |||
} | |||
menu.addMenu(&discMenu); | |||
QAction* act_x_disc_all = menu.addAction("Disconnect &All"); | |||
QAction* act_x_sep1 = menu.addSeparator(); | |||
QAction* act_x_info = menu.addAction("&Info"); | |||
QAction* act_x_rename = menu.addAction("&Rename"); | |||
QAction* act_x_sep2 = menu.addSeparator(); | |||
QAction* act_x_split_join = menu.addAction(m_splitted ? "Join" : "Split"); | |||
if (features.group_info == false) | |||
act_x_info->setVisible(false); | |||
if (features.group_rename == false) | |||
act_x_rename->setVisible(false); | |||
if (features.group_info == false && features.group_rename == false) | |||
act_x_sep1->setVisible(false); | |||
bool haveIns, haveOuts; | |||
haveIns = haveOuts = false; | |||
foreach (const port_dict_t& port, canvas.port_list) | |||
{ | |||
if (m_port_list_ids.contains(port.port_id)) | |||
{ | |||
if (port.port_mode == PORT_MODE_INPUT) | |||
haveIns = true; | |||
else if (port.port_mode == PORT_MODE_OUTPUT) | |||
haveOuts = true; | |||
} | |||
} | |||
if (m_splitted == false && (haveIns && haveOuts) == false) | |||
{ | |||
act_x_sep2->setVisible(false); | |||
act_x_split_join->setVisible(false); | |||
} | |||
QAction* act_selected = menu.exec(event->screenPos()); | |||
if (act_selected == act_x_disc_all) | |||
{ | |||
foreach (const int& port_id, port_con_list) | |||
canvas.callback(ACTION_PORTS_DISCONNECT, port_id, 0, ""); | |||
} | |||
else if (act_selected == act_x_info) | |||
{ | |||
canvas.callback(ACTION_GROUP_INFO, m_group_id, 0, ""); | |||
} | |||
else if (act_selected == act_x_rename) | |||
{ | |||
bool ok_check; | |||
QString new_name = QInputDialog::getText(0, "Rename Group", "New name:", QLineEdit::Normal, m_group_name, &ok_check); | |||
if (ok_check and !new_name.isEmpty()) | |||
{ | |||
canvas.callback(ACTION_GROUP_RENAME, m_group_id, 0, new_name); | |||
} | |||
} | |||
else if (act_selected == act_x_split_join) | |||
{ | |||
if (m_splitted) | |||
canvas.callback(ACTION_GROUP_JOIN, m_group_id, 0, ""); | |||
else | |||
canvas.callback(ACTION_GROUP_SPLIT, m_group_id, 0, ""); | |||
} | |||
event->accept(); | |||
} | |||
void CanvasBox::mousePressEvent(QGraphicsSceneMouseEvent* event) | |||
{ | |||
canvas.last_z_value += 1; | |||
setZValue(canvas.last_z_value); | |||
resetLinesZValue(); | |||
m_cursor_moving = false; | |||
if (event->button() == Qt::RightButton) | |||
{ | |||
canvas.scene->clearSelection(); | |||
setSelected(true); | |||
m_mouse_down = false; | |||
return event->accept(); | |||
} | |||
else if (event->button() == Qt::LeftButton) | |||
{ | |||
if (sceneBoundingRect().contains(event->scenePos())) | |||
m_mouse_down = true; | |||
else | |||
{ | |||
// Fixes a weird Qt behaviour with right-click mouseMove | |||
m_mouse_down = false; | |||
return event->ignore(); | |||
} | |||
} | |||
else | |||
m_mouse_down = false; | |||
QGraphicsItem::mousePressEvent(event); | |||
} | |||
void CanvasBox::mouseMoveEvent(QGraphicsSceneMouseEvent* event) | |||
{ | |||
if (m_mouse_down) | |||
{ | |||
if (m_cursor_moving == false) | |||
{ | |||
setCursor(QCursor(Qt::SizeAllCursor)); | |||
m_cursor_moving = true; | |||
} | |||
repaintLines(); | |||
} | |||
QGraphicsItem::mouseMoveEvent(event); | |||
} | |||
void CanvasBox::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) | |||
{ | |||
if (m_cursor_moving) | |||
setCursor(QCursor(Qt::ArrowCursor)); | |||
m_mouse_down = false; | |||
m_cursor_moving = false; | |||
QGraphicsItem::mouseReleaseEvent(event); | |||
} | |||
QRectF CanvasBox::boundingRect() const | |||
{ | |||
return QRectF(0, 0, p_width, p_height); | |||
} | |||
void CanvasBox::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget* /*widget*/) | |||
{ | |||
painter->setRenderHint(QPainter::Antialiasing, false); | |||
if (isSelected()) | |||
painter->setPen(canvas.theme->box_pen_sel); | |||
else | |||
painter->setPen(canvas.theme->box_pen); | |||
QLinearGradient box_gradient(0, 0, 0, p_height); | |||
box_gradient.setColorAt(0, canvas.theme->box_bg_1); | |||
box_gradient.setColorAt(1, canvas.theme->box_bg_2); | |||
painter->setBrush(box_gradient); | |||
painter->drawRect(0, 0, p_width, p_height); | |||
QPointF text_pos(25, 16); | |||
painter->setFont(m_font_name); | |||
painter->setPen(canvas.theme->box_text); | |||
painter->drawText(text_pos, m_group_name); | |||
repaintLines(); | |||
} | |||
END_NAMESPACE_PATCHCANVAS |
@@ -0,0 +1,108 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef CANVASBOX_H | |||
#define CANVASBOX_H | |||
#include "patchcanvas.h" | |||
class QGraphicsSceneContextMenuEvent; | |||
class QGraphicsSceneMouseEvent; | |||
class QPainter; | |||
START_NAMESPACE_PATCHCANVAS | |||
class AbstractCanvasLine; | |||
class CanvasBoxShadow; | |||
class CanvasPort; | |||
class CanvasIcon; | |||
struct cb_line_t { | |||
AbstractCanvasLine* line; | |||
int connection_id; | |||
}; | |||
class CanvasBox : public QGraphicsItem | |||
{ | |||
public: | |||
CanvasBox(int group_id, QString group_name, Icon icon, QGraphicsItem* parent=0); | |||
virtual ~CanvasBox(); | |||
int getGroupId(); | |||
QString getGroupName(); | |||
bool isSplitted(); | |||
PortMode getSplittedMode(); | |||
int getPortCount(); | |||
QList<int> getPortList(); | |||
void setIcon(Icon icon); | |||
void setSplit(bool split, PortMode mode=PORT_MODE_NULL); | |||
void setGroupName(QString group_name); | |||
void setShadowOpacity(float opacity); | |||
CanvasPort* addPortFromGroup(int port_id, QString port_name, PortMode port_mode, PortType port_type); | |||
void removePortFromGroup(int port_id); | |||
void addLineFromGroup(AbstractCanvasLine* line, int connection_id); | |||
void removeLineFromGroup(int connection_id); | |||
void checkItemPos(); | |||
void removeIconFromScene(); | |||
void updatePositions(); | |||
void repaintLines(bool forced=false); | |||
void resetLinesZValue(); | |||
virtual int type() const; | |||
private: | |||
int m_group_id; | |||
QString m_group_name; | |||
int p_width; | |||
int p_height; | |||
QList<int> m_port_list_ids; | |||
QList<cb_line_t> m_connection_lines; | |||
QPointF m_last_pos; | |||
bool m_splitted; | |||
PortMode m_splitted_mode; | |||
bool m_forced_split; | |||
bool m_cursor_moving; | |||
bool m_mouse_down; | |||
QFont m_font_name; | |||
QFont m_font_port; | |||
CanvasIcon* icon_svg; | |||
CanvasBoxShadow* shadow; | |||
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); | |||
virtual void mousePressEvent(QGraphicsSceneMouseEvent* event); | |||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event); | |||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); | |||
virtual QRectF boundingRect() const; | |||
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // CANVASBOX_H |
@@ -0,0 +1,53 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "canvasboxshadow.h" | |||
#include "canvasbox.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
CanvasBoxShadow::CanvasBoxShadow(QObject* parent) : | |||
QGraphicsDropShadowEffect(parent) | |||
{ | |||
m_fakeParent = 0; | |||
setBlurRadius(20); | |||
setColor(canvas.theme->box_shadow); | |||
setOffset(0, 0); | |||
} | |||
void CanvasBoxShadow::setFakeParent(CanvasBox* fakeParent) | |||
{ | |||
m_fakeParent = fakeParent; | |||
} | |||
void CanvasBoxShadow::setOpacity(float opacity) | |||
{ | |||
QColor color(canvas.theme->box_shadow); | |||
color.setAlphaF(opacity); | |||
setColor(color); | |||
} | |||
void CanvasBoxShadow::draw(QPainter* painter) | |||
{ | |||
if (m_fakeParent) | |||
m_fakeParent->repaintLines(); | |||
QGraphicsDropShadowEffect::draw(painter); | |||
} | |||
END_NAMESPACE_PATCHCANVAS |
@@ -0,0 +1,45 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef CANVASBOXSHADOW_H | |||
#define CANVASBOXSHADOW_H | |||
#include <QGraphicsDropShadowEffect> | |||
#include "patchcanvas.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
class CanvasBox; | |||
class CanvasBoxShadow : public QGraphicsDropShadowEffect | |||
{ | |||
public: | |||
CanvasBoxShadow(QObject* parent); | |||
void setFakeParent(CanvasBox* fakeParent); | |||
void setOpacity(float opacity); | |||
protected: | |||
virtual void draw(QPainter* painter); | |||
private: | |||
CanvasBox* m_fakeParent; | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // CANVASBOXSHADOW_H |
@@ -0,0 +1,79 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "canvasfadeanimation.h" | |||
#include "canvasbox.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
CanvasFadeAnimation::CanvasFadeAnimation(QGraphicsItem* item, bool show, QObject* parent) : | |||
QAbstractAnimation(parent) | |||
{ | |||
m_show = show; | |||
m_duration = 0; | |||
m_item = item; | |||
} | |||
QGraphicsItem* CanvasFadeAnimation::item() | |||
{ | |||
return m_item; | |||
} | |||
void CanvasFadeAnimation::setDuration(int time) | |||
{ | |||
if (m_show == false && m_item->opacity() == 0.0) | |||
m_duration = 0; | |||
else | |||
{ | |||
m_item->show(); | |||
m_duration = time; | |||
} | |||
} | |||
int CanvasFadeAnimation::duration() const | |||
{ | |||
return m_duration; | |||
} | |||
void CanvasFadeAnimation::updateCurrentTime(int time) | |||
{ | |||
if (m_duration == 0) | |||
return; | |||
float value; | |||
if (m_show) | |||
value = float(time)/m_duration; | |||
else | |||
value = 1.0-(float(time)/m_duration); | |||
m_item->setOpacity(value); | |||
if (m_item->type() == CanvasBoxType) | |||
((CanvasBox*)m_item)->setShadowOpacity(value); | |||
} | |||
void CanvasFadeAnimation::updateState(QAbstractAnimation::State /*newState*/, QAbstractAnimation::State /*oldState*/) | |||
{ | |||
} | |||
void CanvasFadeAnimation::updateDirection(QAbstractAnimation::Direction /*direction*/) | |||
{ | |||
} | |||
END_NAMESPACE_PATCHCANVAS |
@@ -0,0 +1,52 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef CANVASFADEANIMATION_H | |||
#define CANVASFADEANIMATION_H | |||
#include <QtCore/QAbstractAnimation> | |||
#include "patchcanvas.h" | |||
class QGraphicsItem; | |||
START_NAMESPACE_PATCHCANVAS | |||
class CanvasFadeAnimation : public QAbstractAnimation | |||
{ | |||
public: | |||
CanvasFadeAnimation(QGraphicsItem* item, bool show, QObject* parent=0); | |||
QGraphicsItem* item(); | |||
void setDuration(int time); | |||
virtual int duration() const; | |||
protected: | |||
virtual void updateCurrentTime(int time); | |||
virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); | |||
virtual void updateDirection(QAbstractAnimation::Direction direction); | |||
private: | |||
bool m_show; | |||
int m_duration; | |||
QGraphicsItem* m_item; | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // CANVASFADEANIMATION_H |
@@ -0,0 +1,134 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "canvasicon.h" | |||
#include <QtGui/QPainter> | |||
#include <QtGui/QGraphicsColorizeEffect> | |||
#include <QtSvg/QSvgRenderer> | |||
START_NAMESPACE_PATCHCANVAS | |||
CanvasIcon::CanvasIcon(Icon icon, QString name, QGraphicsItem* parent) : | |||
QGraphicsSvgItem(parent) | |||
{ | |||
m_renderer = 0; | |||
p_size = QRectF(0, 0, 0, 0); | |||
m_colorFX = new QGraphicsColorizeEffect(this); | |||
m_colorFX->setColor(canvas.theme->box_text.color()); | |||
setGraphicsEffect(m_colorFX); | |||
setIcon(icon, name); | |||
} | |||
CanvasIcon::~CanvasIcon() | |||
{ | |||
if (m_renderer) | |||
delete m_renderer; | |||
delete m_colorFX; | |||
} | |||
void CanvasIcon::setIcon(Icon icon, QString name) | |||
{ | |||
name = name.toLower(); | |||
QString icon_path; | |||
if (icon == ICON_APPLICATION) | |||
{ | |||
p_size = QRectF(3, 2, 19, 18); | |||
if (name.contains("audacious")) | |||
{ | |||
p_size = QRectF(5, 4, 16, 16); | |||
icon_path = ":/scalable/pb_audacious.svg"; | |||
} | |||
else if (name.contains("clementine")) | |||
{ | |||
p_size = QRectF(5, 4, 16, 16); | |||
icon_path = ":/scalable/pb_clementine.svg"; | |||
} | |||
else if (name.contains("jamin")) | |||
{ | |||
p_size = QRectF(5, 3, 16, 16); | |||
icon_path = ":/scalable/pb_jamin.svg"; | |||
} | |||
else if (name.contains("mplayer")) | |||
{ | |||
p_size = QRectF(5, 4, 16, 16); | |||
icon_path = ":/scalable/pb_mplayer.svg"; | |||
} | |||
else if (name.contains("vlc")) | |||
{ | |||
p_size = QRectF(5, 3, 16, 16); | |||
icon_path = ":/scalable/pb_vlc.svg"; | |||
} | |||
else | |||
{ | |||
p_size = QRectF(5, 3, 16, 16); | |||
icon_path = ":/scalable/pb_generic.svg"; | |||
} | |||
} | |||
else if (icon == ICON_HARDWARE) | |||
{ | |||
p_size = QRectF(5, 2, 16, 16); | |||
icon_path = ":/scalable/pb_hardware.svg"; | |||
} | |||
else if (icon == ICON_LADISH_ROOM) | |||
{ | |||
p_size = QRectF(5, 2, 16, 16); | |||
icon_path = ":/scalable/pb_hardware.svg"; | |||
} | |||
else | |||
{ | |||
p_size = QRectF(0, 0, 0, 0); | |||
qCritical("PatchCanvas::CanvasIcon->setIcon(%s, %s) - unsupported Icon requested", icon2str(icon), name.toUtf8().constData()); | |||
return; | |||
} | |||
if (m_renderer) | |||
delete m_renderer; | |||
m_renderer = new QSvgRenderer(icon_path, canvas.scene); | |||
setSharedRenderer(m_renderer); | |||
update(); | |||
} | |||
int CanvasIcon::type() const | |||
{ | |||
return CanvasIconType; | |||
} | |||
QRectF CanvasIcon::boundingRect() const | |||
{ | |||
return p_size; | |||
} | |||
void CanvasIcon::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) | |||
{ | |||
if (m_renderer) | |||
{ | |||
painter->setRenderHint(QPainter::Antialiasing, false); | |||
painter->setRenderHint(QPainter::TextAntialiasing, false); | |||
m_renderer->render(painter, p_size); | |||
} | |||
else | |||
QGraphicsSvgItem::paint(painter, option, widget); | |||
} | |||
END_NAMESPACE_PATCHCANVAS |
@@ -0,0 +1,52 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef CANVASICON_H | |||
#define CANVASICON_H | |||
#include <QtSvg/QGraphicsSvgItem> | |||
#include "patchcanvas.h" | |||
class QPainter; | |||
class QGraphicsColorizeEffect; | |||
class QSvgRenderer; | |||
START_NAMESPACE_PATCHCANVAS | |||
class CanvasIcon : public QGraphicsSvgItem | |||
{ | |||
public: | |||
CanvasIcon(Icon icon, QString name, QGraphicsItem* parent); | |||
~CanvasIcon(); | |||
void setIcon(Icon icon, QString name); | |||
virtual int type() const; | |||
private: | |||
QGraphicsColorizeEffect* m_colorFX; | |||
QSvgRenderer* m_renderer; | |||
QRectF p_size; | |||
virtual QRectF boundingRect() const; | |||
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // CANVASICON_H |
@@ -0,0 +1,148 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "canvasline.h" | |||
#include <QtGui/QPainter> | |||
#include "canvasport.h" | |||
#include "canvasportglow.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
CanvasLine::CanvasLine(CanvasPort* item1_, CanvasPort* item2_, QGraphicsItem* parent) : | |||
QGraphicsLineItem(parent, canvas.scene) | |||
{ | |||
item1 = item1_; | |||
item2 = item2_; | |||
m_locked = false; | |||
m_lineSelected = false; | |||
setGraphicsEffect(0); | |||
updateLinePos(); | |||
} | |||
CanvasLine::~CanvasLine() | |||
{ | |||
setGraphicsEffect(0); | |||
} | |||
void CanvasLine::deleteFromScene() | |||
{ | |||
canvas.scene->removeItem(this); | |||
delete this; | |||
} | |||
bool CanvasLine::isLocked() const | |||
{ | |||
return m_locked; | |||
} | |||
void CanvasLine::setLocked(bool yesno) | |||
{ | |||
m_locked = yesno; | |||
} | |||
bool CanvasLine::isLineSelected() const | |||
{ | |||
return m_lineSelected; | |||
} | |||
void CanvasLine::setLineSelected(bool yesno) | |||
{ | |||
if (m_locked) | |||
return; | |||
if (options.eyecandy == EYECANDY_FULL) | |||
{ | |||
if (yesno) | |||
setGraphicsEffect(new CanvasPortGlow(item1->getPortType(), toGraphicsObject())); | |||
else | |||
setGraphicsEffect(0); | |||
} | |||
m_lineSelected = yesno; | |||
updateLineGradient(); | |||
} | |||
void CanvasLine::updateLinePos() | |||
{ | |||
if (item1->getPortMode() == PORT_MODE_OUTPUT) | |||
{ | |||
QLineF line(item1->scenePos().x() + item1->getPortWidth()+12, item1->scenePos().y()+7.5, item2->scenePos().x(), item2->scenePos().y()+7.5); | |||
setLine(line); | |||
m_lineSelected = false; | |||
updateLineGradient(); | |||
} | |||
} | |||
int CanvasLine::type() const | |||
{ | |||
return CanvasLineType; | |||
} | |||
void CanvasLine::updateLineGradient() | |||
{ | |||
short pos1, pos2; | |||
int pos_top = boundingRect().top(); | |||
int pos_bot = boundingRect().bottom(); | |||
if (item2->scenePos().y() >= item1->scenePos().y()) | |||
{ | |||
pos1 = 0; | |||
pos2 = 1; | |||
} | |||
else | |||
{ | |||
pos1 = 1; | |||
pos2 = 0; | |||
} | |||
PortType port_type1 = item1->getPortType(); | |||
PortType port_type2 = item2->getPortType(); | |||
QLinearGradient port_gradient(0, pos_top, 0, pos_bot); | |||
if (port_type1 == PORT_TYPE_AUDIO_JACK) | |||
port_gradient.setColorAt(pos1, m_lineSelected ? canvas.theme->line_audio_jack_sel : canvas.theme->line_audio_jack); | |||
else if (port_type1 == PORT_TYPE_MIDI_JACK) | |||
port_gradient.setColorAt(pos1, m_lineSelected ? canvas.theme->line_midi_jack_sel : canvas.theme->line_midi_jack); | |||
else if (port_type1 == PORT_TYPE_MIDI_A2J) | |||
port_gradient.setColorAt(pos1, m_lineSelected ? canvas.theme->line_midi_a2j_sel : canvas.theme->line_midi_a2j); | |||
else if (port_type1 == PORT_TYPE_MIDI_ALSA) | |||
port_gradient.setColorAt(pos1, m_lineSelected ? canvas.theme->line_midi_alsa_sel : canvas.theme->line_midi_alsa); | |||
if (port_type2 == PORT_TYPE_AUDIO_JACK) | |||
port_gradient.setColorAt(pos2, m_lineSelected ? canvas.theme->line_audio_jack_sel : canvas.theme->line_audio_jack); | |||
else if (port_type2 == PORT_TYPE_MIDI_JACK) | |||
port_gradient.setColorAt(pos2, m_lineSelected ? canvas.theme->line_midi_jack_sel : canvas.theme->line_midi_jack); | |||
else if (port_type2 == PORT_TYPE_MIDI_A2J) | |||
port_gradient.setColorAt(pos2, m_lineSelected ? canvas.theme->line_midi_a2j_sel : canvas.theme->line_midi_a2j); | |||
else if (port_type2 == PORT_TYPE_MIDI_ALSA) | |||
port_gradient.setColorAt(pos2, m_lineSelected ? canvas.theme->line_midi_alsa_sel : canvas.theme->line_midi_alsa); | |||
setPen(QPen(port_gradient, 2)); | |||
} | |||
void CanvasLine::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) | |||
{ | |||
painter->setRenderHint(QPainter::Antialiasing, bool(options.antialiasing)); | |||
QGraphicsLineItem::paint(painter, option, widget); | |||
} | |||
END_NAMESPACE_PATCHCANVAS |
@@ -0,0 +1,72 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef CANVASLINE_H | |||
#define CANVASLINE_H | |||
#include <QtGui/QGraphicsLineItem> | |||
#include "abstractcanvasline.h" | |||
class QPainter; | |||
START_NAMESPACE_PATCHCANVAS | |||
class CanvasPort; | |||
class CanvasPortGlow; | |||
class CanvasLine : | |||
public AbstractCanvasLine, | |||
public QGraphicsLineItem | |||
{ | |||
public: | |||
CanvasLine(CanvasPort* item1, CanvasPort* item2, QGraphicsItem* parent); | |||
~CanvasLine(); | |||
virtual void deleteFromScene(); | |||
virtual bool isLocked() const; | |||
virtual void setLocked(bool yesno); | |||
virtual bool isLineSelected() const; | |||
virtual void setLineSelected(bool yesno); | |||
virtual void updateLinePos(); | |||
virtual int type() const; | |||
// QGraphicsItem generic calls | |||
virtual void setZValue(qreal z) | |||
{ | |||
QGraphicsLineItem::setZValue(z); | |||
} | |||
private: | |||
CanvasPort* item1; | |||
CanvasPort* item2; | |||
CanvasPortGlow* glow; | |||
bool m_locked; | |||
bool m_lineSelected; | |||
void updateLineGradient(); | |||
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // CANVASLINE_H |
@@ -0,0 +1,94 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "canvaslinemov.h" | |||
#include <QtGui/QPainter> | |||
#include "canvasport.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
CanvasLineMov::CanvasLineMov(PortMode port_mode, PortType port_type, QGraphicsItem* parent) : | |||
QGraphicsLineItem(parent, canvas.scene) | |||
{ | |||
m_port_mode = port_mode; | |||
m_port_type = port_type; | |||
// Port position doesn't change while moving around line | |||
p_lineX = scenePos().x(); | |||
p_lineY = scenePos().y(); | |||
p_width = ((CanvasPort*)parentItem())->getPortWidth(); | |||
QPen pen; | |||
if (port_type == PORT_TYPE_AUDIO_JACK) | |||
pen = QPen(canvas.theme->line_audio_jack, 2); | |||
else if (port_type == PORT_TYPE_MIDI_JACK) | |||
pen = QPen(canvas.theme->line_midi_jack, 2); | |||
else if (port_type == PORT_TYPE_MIDI_A2J) | |||
pen = QPen(canvas.theme->line_midi_a2j, 2); | |||
else if (port_type == PORT_TYPE_MIDI_ALSA) | |||
pen = QPen(canvas.theme->line_midi_alsa, 2); | |||
else | |||
{ | |||
qWarning("PatchCanvas::CanvasLineMov(%s, %s, %p) - invalid port type", port_mode2str(port_mode), port_type2str(port_type), parent); | |||
pen = QPen(Qt::black); | |||
} | |||
setPen(pen); | |||
} | |||
void CanvasLineMov::deleteFromScene() | |||
{ | |||
canvas.scene->removeItem(this); | |||
delete this; | |||
} | |||
void CanvasLineMov::updateLinePos(QPointF scenePos) | |||
{ | |||
int item_pos[2] = { 0, 0 }; | |||
if (m_port_mode == PORT_MODE_INPUT) | |||
{ | |||
item_pos[0] = 0; | |||
item_pos[1] = 7.5; | |||
} | |||
else if (m_port_mode == PORT_MODE_OUTPUT) | |||
{ | |||
item_pos[0] = p_width+12; | |||
item_pos[1] = 7.5; | |||
} | |||
else | |||
return; | |||
QLineF line(item_pos[0], item_pos[1], scenePos.x()-p_lineX, scenePos.y()-p_lineY); | |||
setLine(line); | |||
} | |||
int CanvasLineMov::type() const | |||
{ | |||
return CanvasLineMovType; | |||
} | |||
void CanvasLineMov::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) | |||
{ | |||
painter->setRenderHint(QPainter::Antialiasing, bool(options.antialiasing)); | |||
QGraphicsLineItem::paint(painter, option, widget); | |||
} | |||
END_NAMESPACE_PATCHCANVAS |
@@ -0,0 +1,60 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef CANVASLINEMOV_H | |||
#define CANVASLINEMOV_H | |||
#include <QGraphicsLineItem> | |||
#include "abstractcanvasline.h" | |||
class QPainter; | |||
START_NAMESPACE_PATCHCANVAS | |||
class CanvasLineMov : | |||
public AbstractCanvasLineMov, | |||
public QGraphicsLineItem | |||
{ | |||
public: | |||
CanvasLineMov(PortMode port_mode, PortType port_type, QGraphicsItem* parent); | |||
virtual void deleteFromScene(); | |||
virtual void updateLinePos(QPointF scenePos); | |||
virtual int type() const; | |||
// QGraphicsItem generic calls | |||
virtual void setZValue(qreal z) | |||
{ | |||
QGraphicsLineItem::setZValue(z); | |||
} | |||
private: | |||
PortMode m_port_mode; | |||
PortType m_port_type; | |||
int p_lineX; | |||
int p_lineY; | |||
int p_width; | |||
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // CANVASLINEMOV_H |
@@ -0,0 +1,447 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "canvasport.h" | |||
#include <QtCore/QTimer> | |||
#include <QtGui/QCursor> | |||
#include <QtGui/QGraphicsSceneContextMenuEvent> | |||
#include <QtGui/QGraphicsSceneMouseEvent> | |||
#include <QtGui/QInputDialog> | |||
#include <QtGui/QMenu> | |||
#include <QtGui/QPainter> | |||
#include "canvaslinemov.h" | |||
#include "canvasbezierlinemov.h" | |||
#include "canvasbox.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
CanvasPort::CanvasPort(int port_id, QString port_name, PortMode port_mode, PortType port_type, QGraphicsItem* parent) : | |||
QGraphicsItem(parent, canvas.scene) | |||
{ | |||
// Save Variables, useful for later | |||
m_port_id = port_id; | |||
m_port_mode = port_mode; | |||
m_port_type = port_type; | |||
m_port_name = port_name; | |||
// Base Variables | |||
m_port_width = 15; | |||
m_port_height = 15; | |||
m_port_font = QFont(canvas.theme->port_font_name, canvas.theme->port_font_size, canvas.theme->port_font_state); | |||
m_line_mov = 0; | |||
m_hover_item = 0; | |||
m_last_selected_state = false; | |||
m_mouse_down = false; | |||
m_cursor_moving = false; | |||
setFlags(QGraphicsItem::ItemIsSelectable); | |||
} | |||
int CanvasPort::getPortId() | |||
{ | |||
return m_port_id; | |||
} | |||
PortMode CanvasPort::getPortMode() | |||
{ | |||
return m_port_mode; | |||
} | |||
PortType CanvasPort::getPortType() | |||
{ | |||
return m_port_type; | |||
} | |||
QString CanvasPort::getPortName() | |||
{ | |||
return m_port_name; | |||
} | |||
QString CanvasPort::getFullPortName() | |||
{ | |||
return ((CanvasBox*)parentItem())->getGroupName()+":"+m_port_name; | |||
} | |||
int CanvasPort::getPortWidth() | |||
{ | |||
return m_port_width; | |||
} | |||
int CanvasPort::getPortHeight() | |||
{ | |||
return m_port_height; | |||
} | |||
void CanvasPort::setPortMode(PortMode port_mode) | |||
{ | |||
m_port_mode = port_mode; | |||
update(); | |||
} | |||
void CanvasPort::setPortType(PortType port_type) | |||
{ | |||
m_port_type = port_type; | |||
update(); | |||
} | |||
void CanvasPort::setPortName(QString port_name) | |||
{ | |||
if (QFontMetrics(m_port_font).width(port_name) < QFontMetrics(m_port_font).width(m_port_name)) | |||
QTimer::singleShot(0, canvas.scene, SLOT(update())); | |||
m_port_name = port_name; | |||
update(); | |||
} | |||
void CanvasPort::setPortWidth(int port_width) | |||
{ | |||
if (port_width < m_port_width) | |||
QTimer::singleShot(0, canvas.scene, SLOT(update())); | |||
m_port_width = port_width; | |||
update(); | |||
} | |||
int CanvasPort::type() const | |||
{ | |||
return CanvasPortType; | |||
} | |||
void CanvasPort::mousePressEvent(QGraphicsSceneMouseEvent* event) | |||
{ | |||
m_hover_item = 0; | |||
m_mouse_down = (event->button() == Qt::LeftButton); | |||
m_cursor_moving = false; | |||
QGraphicsItem::mousePressEvent(event); | |||
} | |||
void CanvasPort::mouseMoveEvent(QGraphicsSceneMouseEvent* event) | |||
{ | |||
if (m_mouse_down) | |||
{ | |||
if (m_cursor_moving == false) | |||
{ | |||
setCursor(QCursor(Qt::CrossCursor)); | |||
m_cursor_moving = true; | |||
foreach (const connection_dict_t& connection, canvas.connection_list) | |||
{ | |||
if (connection.port_out_id == m_port_id || connection.port_in_id == m_port_id) | |||
connection.widget->setLocked(true); | |||
} | |||
} | |||
if (! m_line_mov) | |||
{ | |||
if (options.use_bezier_lines) | |||
m_line_mov = new CanvasBezierLineMov(m_port_mode, m_port_type, this); | |||
else | |||
m_line_mov = new CanvasLineMov(m_port_mode, m_port_type, this); | |||
canvas.last_z_value += 1; | |||
m_line_mov->setZValue(canvas.last_z_value); | |||
canvas.last_z_value += 1; | |||
parentItem()->setZValue(canvas.last_z_value); | |||
} | |||
CanvasPort* item = 0; | |||
QList<QGraphicsItem*> items = canvas.scene->items(event->scenePos(), Qt::ContainsItemShape, Qt::AscendingOrder); | |||
for (int i=0; i < items.count(); i++) | |||
{ | |||
if (items[i]->type() == CanvasPortType) | |||
{ | |||
if (items[i] != this) | |||
{ | |||
if (! item) | |||
item = (CanvasPort*)items[i]; | |||
else if (items[i]->parentItem()->zValue() > item->parentItem()->zValue()) | |||
item = (CanvasPort*)items[i]; | |||
} | |||
} | |||
} | |||
if (m_hover_item and m_hover_item != item) | |||
m_hover_item->setSelected(false); | |||
if (item) | |||
{ | |||
bool a2j_connection = (item->getPortType() == PORT_TYPE_MIDI_JACK && m_port_type == PORT_TYPE_MIDI_A2J) || (item->getPortType() == PORT_TYPE_MIDI_A2J && m_port_type == PORT_TYPE_MIDI_JACK); | |||
if (item->getPortMode() != m_port_mode && (item->getPortType() == m_port_type || a2j_connection)) | |||
{ | |||
item->setSelected(true); | |||
m_hover_item = item; | |||
} | |||
else | |||
m_hover_item = 0; | |||
} | |||
else | |||
m_hover_item = 0; | |||
m_line_mov->updateLinePos(event->scenePos()); | |||
return event->accept(); | |||
} | |||
QGraphicsItem::mouseMoveEvent(event); | |||
} | |||
void CanvasPort::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) | |||
{ | |||
if (m_mouse_down) | |||
{ | |||
if (m_line_mov) | |||
{ | |||
m_line_mov->deleteFromScene(); | |||
m_line_mov = 0; | |||
} | |||
foreach (const connection_dict_t& connection, canvas.connection_list) | |||
{ | |||
if (connection.port_out_id == m_port_id || connection.port_in_id == m_port_id) | |||
connection.widget->setLocked(false); | |||
} | |||
if (m_hover_item) | |||
{ | |||
bool check = false; | |||
foreach (const connection_dict_t& connection, canvas.connection_list) | |||
{ | |||
if ( (connection.port_out_id == m_port_id && connection.port_in_id == m_hover_item->getPortId()) || | |||
(connection.port_out_id == m_hover_item->getPortId() && connection.port_in_id == m_port_id) ) | |||
{ | |||
canvas.callback(ACTION_PORTS_DISCONNECT, connection.connection_id, 0, ""); | |||
check = true; | |||
break; | |||
} | |||
} | |||
if (check == false) | |||
{ | |||
if (m_port_mode == PORT_MODE_OUTPUT) | |||
canvas.callback(ACTION_PORTS_CONNECT, m_port_id, m_hover_item->getPortId(), ""); | |||
else | |||
canvas.callback(ACTION_PORTS_CONNECT, m_hover_item->getPortId(), m_port_id, ""); | |||
} | |||
canvas.scene->clearSelection(); | |||
} | |||
} | |||
if (m_cursor_moving) | |||
setCursor(QCursor(Qt::ArrowCursor)); | |||
m_hover_item = 0; | |||
m_mouse_down = false; | |||
m_cursor_moving = false; | |||
QGraphicsItem::mouseReleaseEvent(event); | |||
} | |||
void CanvasPort::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) | |||
{ | |||
canvas.scene->clearSelection(); | |||
setSelected(true); | |||
QMenu menu; | |||
QMenu discMenu("Disconnect", &menu); | |||
QList<int> port_con_list = CanvasGetPortConnectionList(m_port_id); | |||
if (port_con_list.count() > 0) | |||
{ | |||
foreach (int port_id, port_con_list) | |||
{ | |||
int port_con_id = CanvasGetConnectedPort(port_id, m_port_id); | |||
QAction* act_x_disc = discMenu.addAction(CanvasGetFullPortName(port_con_id)); | |||
act_x_disc->setData(port_id); | |||
QObject::connect(act_x_disc, SIGNAL(triggered()), canvas.qobject, SLOT(PortContextMenuDisconnect())); | |||
} | |||
} | |||
else | |||
{ | |||
QAction* act_x_disc = discMenu.addAction("No connections"); | |||
act_x_disc->setEnabled(false); | |||
} | |||
menu.addMenu(&discMenu); | |||
QAction* act_x_disc_all = menu.addAction("Disconnect &All"); | |||
QAction* act_x_sep_1 = menu.addSeparator(); | |||
QAction* act_x_info = menu.addAction("Get &Info"); | |||
QAction* act_x_rename = menu.addAction("&Rename"); | |||
if (features.port_info == false) | |||
act_x_info->setVisible(false); | |||
if (features.port_rename == false) | |||
act_x_rename->setVisible(false); | |||
if (features.port_info == false && features.port_rename == false) | |||
act_x_sep_1->setVisible(false); | |||
QAction* act_selected = menu.exec(event->screenPos()); | |||
if (act_selected == act_x_disc_all) | |||
{ | |||
foreach (int port_id, port_con_list) | |||
canvas.callback(ACTION_PORTS_DISCONNECT, port_id, 0, ""); | |||
} | |||
else if (act_selected == act_x_info) | |||
{ | |||
canvas.callback(ACTION_PORT_INFO, m_port_id, 0, ""); | |||
} | |||
else if (act_selected == act_x_rename) | |||
{ | |||
bool ok_check; | |||
QString new_name = QInputDialog::getText(0, "Rename Port", "New name:", QLineEdit::Normal, m_port_name, &ok_check); | |||
if (ok_check and new_name.isEmpty() == false) | |||
{ | |||
canvas.callback(ACTION_PORT_RENAME, m_port_id, 0, new_name); | |||
} | |||
} | |||
event->accept(); | |||
} | |||
QRectF CanvasPort::boundingRect() const | |||
{ | |||
return QRectF(0, 0, m_port_width+12, m_port_height); | |||
} | |||
void CanvasPort::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget* /*widget*/) | |||
{ | |||
painter->setRenderHint(QPainter::Antialiasing, (options.antialiasing == ANTIALIASING_FULL)); | |||
QPointF text_pos; | |||
int poly_locx[5] = { 0 }; | |||
if (m_port_mode == PORT_MODE_INPUT) | |||
{ | |||
text_pos = QPointF(3, 12); | |||
if (canvas.theme->port_mode == Theme::THEME_PORT_POLYGON) | |||
{ | |||
poly_locx[0] = 0; | |||
poly_locx[1] = m_port_width+5; | |||
poly_locx[2] = m_port_width+12; | |||
poly_locx[3] = m_port_width+5; | |||
poly_locx[4] = 0; | |||
} | |||
else if (canvas.theme->port_mode == Theme::THEME_PORT_SQUARE) | |||
{ | |||
poly_locx[0] = 0; | |||
poly_locx[1] = m_port_width+5; | |||
poly_locx[2] = m_port_width+5; | |||
poly_locx[3] = m_port_width+5; | |||
poly_locx[4] = 0; | |||
} | |||
else | |||
{ | |||
qCritical("PatchCanvas::CanvasPort->paint() - invalid theme port mode '%i'", canvas.theme->port_mode); | |||
return; | |||
} | |||
} | |||
else if (m_port_mode == PORT_MODE_OUTPUT) | |||
{ | |||
text_pos = QPointF(9, 12); | |||
if (canvas.theme->port_mode == Theme::THEME_PORT_POLYGON) | |||
{ | |||
poly_locx[0] = m_port_width+12; | |||
poly_locx[1] = 7; | |||
poly_locx[2] = 0; | |||
poly_locx[3] = 7; | |||
poly_locx[4] = m_port_width+12; | |||
} | |||
else if (canvas.theme->port_mode == Theme::THEME_PORT_SQUARE) | |||
{ | |||
poly_locx[0] = m_port_width+12; | |||
poly_locx[1] = 5; | |||
poly_locx[2] = 5; | |||
poly_locx[3] = 5; | |||
poly_locx[4] = m_port_width+12; | |||
} | |||
else | |||
{ | |||
qCritical("PatchCanvas::CanvasPort->paint() - invalid theme port mode '%i'", canvas.theme->port_mode); | |||
return; | |||
} | |||
} | |||
else | |||
{ | |||
qCritical("PatchCanvas::CanvasPort->paint() - invalid port mode '%s'", port_mode2str(m_port_mode)); | |||
return; | |||
} | |||
QColor poly_color; | |||
QPen poly_pen; | |||
if (m_port_type == PORT_TYPE_AUDIO_JACK) | |||
{ | |||
poly_color = isSelected() ? canvas.theme->port_audio_jack_bg_sel : canvas.theme->port_audio_jack_bg; | |||
poly_pen = isSelected() ? canvas.theme->port_audio_jack_pen_sel : canvas.theme->port_audio_jack_pen; | |||
} | |||
else if (m_port_type == PORT_TYPE_MIDI_JACK) | |||
{ | |||
poly_color = isSelected() ? canvas.theme->port_midi_jack_bg_sel : canvas.theme->port_midi_jack_bg; | |||
poly_pen = isSelected() ? canvas.theme->port_midi_jack_pen_sel : canvas.theme->port_midi_jack_pen; | |||
} | |||
else if (m_port_type == PORT_TYPE_MIDI_A2J) | |||
{ | |||
poly_color = isSelected() ? canvas.theme->port_midi_a2j_bg_sel : canvas.theme->port_midi_a2j_bg; | |||
poly_pen = isSelected() ? canvas.theme->port_midi_a2j_pen_sel : canvas.theme->port_midi_a2j_pen; | |||
} | |||
else if (m_port_type == PORT_TYPE_MIDI_ALSA) | |||
{ | |||
poly_color = isSelected() ? canvas.theme->port_midi_alsa_bg_sel : canvas.theme->port_midi_alsa_bg; | |||
poly_pen = isSelected() ? canvas.theme->port_midi_alsa_pen_sel : canvas.theme->port_midi_alsa_pen; | |||
} | |||
else | |||
{ | |||
qCritical("PatchCanvas::CanvasPort->paint() - invalid port type '%s'", port_type2str(m_port_type)); | |||
return; | |||
} | |||
QPolygonF polygon; | |||
polygon += QPointF(poly_locx[0], 0); | |||
polygon += QPointF(poly_locx[1], 0); | |||
polygon += QPointF(poly_locx[2], 7.5); | |||
polygon += QPointF(poly_locx[3], 15); | |||
polygon += QPointF(poly_locx[4], 15); | |||
painter->setBrush(poly_color); | |||
painter->setPen(poly_pen); | |||
painter->drawPolygon(polygon); | |||
painter->setPen(canvas.theme->port_text); | |||
painter->setFont(m_port_font); | |||
painter->drawText(text_pos, m_port_name); | |||
if (isSelected() != m_last_selected_state) | |||
{ | |||
foreach (const connection_dict_t& connection, canvas.connection_list) | |||
{ | |||
if (connection.port_out_id == m_port_id || connection.port_in_id == m_port_id) | |||
connection.widget->setLineSelected(isSelected()); | |||
} | |||
} | |||
m_last_selected_state = isSelected(); | |||
} | |||
END_NAMESPACE_PATCHCANVAS |
@@ -0,0 +1,79 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef CANVASPORT_H | |||
#define CANVASPORT_H | |||
#include "patchcanvas.h" | |||
class QGraphicsSceneContextMenuEvent; | |||
class QGraphicsSceneMouseEvent; | |||
class QPainter; | |||
START_NAMESPACE_PATCHCANVAS | |||
class AbstractCanvasLineMov; | |||
class CanvasPort : public QGraphicsItem | |||
{ | |||
public: | |||
CanvasPort(int port_id, QString port_name, PortMode port_mode, PortType port_type, QGraphicsItem* parent); | |||
int getPortId(); | |||
PortMode getPortMode(); | |||
PortType getPortType(); | |||
QString getPortName(); | |||
QString getFullPortName(); | |||
int getPortWidth(); | |||
int getPortHeight(); | |||
void setPortMode(PortMode port_mode); | |||
void setPortType(PortType port_type); | |||
void setPortName(QString port_name); | |||
void setPortWidth(int port_width); | |||
virtual int type() const; | |||
private: | |||
int m_port_id; | |||
PortMode m_port_mode; | |||
PortType m_port_type; | |||
QString m_port_name; | |||
int m_port_width; | |||
int m_port_height; | |||
QFont m_port_font; | |||
AbstractCanvasLineMov* m_line_mov; | |||
CanvasPort* m_hover_item; | |||
bool m_last_selected_state; | |||
bool m_mouse_down; | |||
bool m_cursor_moving; | |||
virtual void mousePressEvent(QGraphicsSceneMouseEvent* event); | |||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event); | |||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); | |||
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); | |||
virtual QRectF boundingRect() const; | |||
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // CANVASPORT_H |
@@ -0,0 +1,38 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "canvasportglow.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
CanvasPortGlow::CanvasPortGlow(PortType port_type, QObject* parent) : | |||
QGraphicsDropShadowEffect(parent) | |||
{ | |||
setBlurRadius(12); | |||
setOffset(0, 0); | |||
if (port_type == PORT_TYPE_AUDIO_JACK) | |||
setColor(canvas.theme->line_audio_jack_glow); | |||
else if (port_type == PORT_TYPE_MIDI_JACK) | |||
setColor(canvas.theme->line_midi_jack_glow); | |||
else if (port_type == PORT_TYPE_MIDI_A2J) | |||
setColor(canvas.theme->line_midi_a2j_glow); | |||
else if (port_type == PORT_TYPE_MIDI_ALSA) | |||
setColor(canvas.theme->line_midi_alsa_glow); | |||
} | |||
END_NAMESPACE_PATCHCANVAS |
@@ -0,0 +1,35 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef CANVASPORTGLOW_H | |||
#define CANVASPORTGLOW_H | |||
#include <QGraphicsDropShadowEffect> | |||
#include "patchcanvas.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
class CanvasPortGlow : public QGraphicsDropShadowEffect | |||
{ | |||
public: | |||
CanvasPortGlow(PortType port_type, QObject* parent); | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // CANVASPORTGLOW_H |
@@ -0,0 +1,178 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "patchcanvas-theme.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
Theme::Theme(List id) | |||
{ | |||
switch (id) | |||
{ | |||
case THEME_MODERN_DARK: | |||
// Name this theme | |||
name = "Modern Dark"; | |||
// Canvas | |||
canvas_bg = QColor(0, 0, 0); | |||
// Boxes | |||
box_pen = QPen(QColor(76,77,78), 1, Qt::SolidLine); | |||
box_pen_sel = QPen(QColor(206,207,208), 1, Qt::DashLine); | |||
box_bg_1 = QColor(32,34,35); | |||
box_bg_2 = QColor(43,47,48); | |||
box_shadow = QColor(89,89,89,180); | |||
box_text = QPen(QColor(240,240,240), 0); | |||
box_font_name = "Deja Vu Sans"; | |||
box_font_size = 8; | |||
box_font_state = QFont::Bold; | |||
// Ports | |||
port_audio_jack_pen = QPen(QColor(63,90,126), 1); | |||
port_audio_jack_pen_sel = QPen(QColor(63+30,90+30,126+30), 1); | |||
port_midi_jack_pen = QPen(QColor(159,44,42), 1); | |||
port_midi_jack_pen_sel = QPen(QColor(159+30,44+30,42+30), 1); | |||
port_midi_a2j_pen = QPen(QColor(137,76,43), 1); | |||
port_midi_a2j_pen_sel = QPen(QColor(137+30,76+30,43+30), 1); | |||
port_midi_alsa_pen = QPen(QColor(93,141,46), 1); | |||
port_midi_alsa_pen_sel = QPen(QColor(93+30,141+30,46+30), 1); | |||
port_audio_jack_bg = QColor(35,61,99); | |||
port_audio_jack_bg_sel = QColor(35+50,61+50,99+50); | |||
port_midi_jack_bg = QColor(120,15,16); | |||
port_midi_jack_bg_sel = QColor(120+50,15+50,16+50); | |||
port_midi_a2j_bg = QColor(101,47,16); | |||
port_midi_a2j_bg_sel = QColor(101+50,47+50,16+50); | |||
port_midi_alsa_bg = QColor(64,112,18); | |||
port_midi_alsa_bg_sel = QColor(64+50,112+50,18+50); | |||
port_text = QPen(QColor(250,250,250), 0); | |||
port_font_name = "Deja Vu Sans"; | |||
port_font_size = 8; | |||
port_font_state = QFont::Normal; | |||
port_mode = THEME_PORT_POLYGON; | |||
// Lines | |||
line_audio_jack = QColor(63,90,126); | |||
line_audio_jack_sel = QColor(63+90,90+90,126+90); | |||
line_audio_jack_glow = QColor(100,100,200); | |||
line_midi_jack = QColor(159,44,42); | |||
line_midi_jack_sel = QColor(159+90,44+90,42+90); | |||
line_midi_jack_glow = QColor(200,100,100); | |||
line_midi_a2j = QColor(137,76,43); | |||
line_midi_a2j_sel = QColor(137+90,76+90,43+90); | |||
line_midi_a2j_glow = QColor(166,133,133); | |||
line_midi_alsa = QColor(93,141,46); | |||
line_midi_alsa_sel = QColor(93+90,141+90,46+90); | |||
line_midi_alsa_glow = QColor(100,200,100); | |||
rubberband_pen = QPen(QColor(206,207,208), 1, Qt::SolidLine); | |||
rubberband_brush = QColor(76,77,78,100); | |||
break; | |||
case THEME_CLASSIC_DARK: | |||
// Name this theme | |||
name = "Classic Dark"; | |||
// Canvas | |||
canvas_bg = QColor(0,0,0); | |||
// Boxes | |||
box_pen = QPen(QColor(147-70,151-70,143-70), 2, Qt::SolidLine); | |||
box_pen_sel = QPen(QColor(147,151,143), 2, Qt::DashLine); | |||
box_bg_1 = QColor(30,34,36); | |||
box_bg_2 = QColor(30,34,36); | |||
box_shadow = QColor(89,89,89,180); | |||
box_text = QPen(QColor(255,255,255), 0); | |||
box_font_name = "Sans"; | |||
box_font_size = 9; | |||
box_font_state = QFont::Normal; | |||
// Ports | |||
port_audio_jack_pen = QPen(QColor(35,61,99), 0); | |||
port_audio_jack_pen_sel = QPen(QColor(255,0,0), 0); | |||
port_midi_jack_pen = QPen(QColor(120,15,16), 0); | |||
port_midi_jack_pen_sel = QPen(QColor(255,0,0), 0); | |||
port_midi_a2j_pen = QPen(QColor(101,47,17), 0); | |||
port_midi_a2j_pen_sel = QPen(QColor(255,0,0), 0); | |||
port_midi_alsa_pen = QPen(QColor(63,112,19), 0); | |||
port_midi_alsa_pen_sel = QPen(QColor(255,0,0), 0); | |||
port_audio_jack_bg = QColor(35,61,99); | |||
port_audio_jack_bg_sel = QColor(255,0,0); | |||
port_midi_jack_bg = QColor(120,15,16); | |||
port_midi_jack_bg_sel = QColor(255,0,0); | |||
port_midi_a2j_bg = QColor(101,47,17); | |||
port_midi_a2j_bg_sel = QColor(255,0,0); | |||
port_midi_alsa_bg = QColor(63,112,19); | |||
port_midi_alsa_bg_sel = QColor(255,0,0); | |||
port_text = QPen(QColor(250,250,250), 0); | |||
port_font_name = "Sans"; | |||
port_font_size = 8; | |||
port_font_state = QFont::Normal; | |||
port_mode = THEME_PORT_SQUARE; | |||
// Lines | |||
line_audio_jack = QColor(53,78,116); | |||
line_audio_jack_sel = QColor(255,0,0); | |||
line_audio_jack_glow = QColor(255,0,0); | |||
line_midi_jack = QColor(139,32,32); | |||
line_midi_jack_sel = QColor(255,0,0); | |||
line_midi_jack_glow = QColor(255,0,0); | |||
line_midi_a2j = QColor(120,65,33); | |||
line_midi_a2j_sel = QColor(255,0,0); | |||
line_midi_a2j_glow = QColor(255,0,0); | |||
line_midi_alsa = QColor(81,130,36); | |||
line_midi_alsa_sel = QColor(255,0,0); | |||
line_midi_alsa_glow = QColor(255,0,0); | |||
rubberband_pen = QPen(QColor(147,151,143), 2, Qt::SolidLine); | |||
rubberband_brush = QColor(35,61,99,100); | |||
break; | |||
default: | |||
break; | |||
} | |||
} | |||
Theme::List getDefaultTheme() | |||
{ | |||
return Theme::THEME_MODERN_DARK; | |||
} | |||
QString getThemeName(Theme::List id) | |||
{ | |||
switch (id) | |||
{ | |||
case Theme::THEME_MODERN_DARK: | |||
return "Modern Dark"; | |||
case Theme::THEME_CLASSIC_DARK: | |||
return "Classic Dark"; | |||
default: | |||
return ""; | |||
} | |||
} | |||
QString getDefaultThemeName() | |||
{ | |||
return "Modern Dark"; | |||
} | |||
END_NAMESPACE_PATCHCANVAS |
@@ -0,0 +1,102 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef PATCHCANVAS_THEME_H | |||
#define PATCHCANVAS_THEME_H | |||
#include <QtGui/QColor> | |||
#include <QtGui/QFont> | |||
#include <QtGui/QPen> | |||
#include "../patchcanvas.h" | |||
START_NAMESPACE_PATCHCANVAS | |||
class Theme | |||
{ | |||
public: | |||
enum PortType { | |||
THEME_PORT_SQUARE = 0, | |||
THEME_PORT_POLYGON = 1 | |||
}; | |||
enum List { | |||
THEME_MODERN_DARK = 0, | |||
THEME_CLASSIC_DARK = 1, | |||
THEME_MAX = 2 | |||
}; | |||
Theme(List id); | |||
// Canvas | |||
QString name; | |||
// Boxes | |||
QColor canvas_bg; | |||
QPen box_pen; | |||
QPen box_pen_sel; | |||
QColor box_bg_1; | |||
QColor box_bg_2; | |||
QColor box_shadow; | |||
QPen box_text; | |||
QString box_font_name; | |||
int box_font_size; | |||
QFont::Weight box_font_state; | |||
// Ports | |||
QPen port_audio_jack_pen; | |||
QPen port_audio_jack_pen_sel; | |||
QPen port_midi_jack_pen; | |||
QPen port_midi_jack_pen_sel; | |||
QPen port_midi_a2j_pen; | |||
QPen port_midi_a2j_pen_sel; | |||
QPen port_midi_alsa_pen; | |||
QPen port_midi_alsa_pen_sel; | |||
QColor port_audio_jack_bg; | |||
QColor port_audio_jack_bg_sel; | |||
QColor port_midi_jack_bg; | |||
QColor port_midi_jack_bg_sel; | |||
QColor port_midi_a2j_bg; | |||
QColor port_midi_a2j_bg_sel; | |||
QColor port_midi_alsa_bg; | |||
QColor port_midi_alsa_bg_sel; | |||
QPen port_text; | |||
QString port_font_name; | |||
int port_font_size; | |||
QFont::Weight port_font_state; | |||
PortType port_mode; | |||
// Lines | |||
QColor line_audio_jack; | |||
QColor line_audio_jack_sel; | |||
QColor line_audio_jack_glow; | |||
QColor line_midi_jack; | |||
QColor line_midi_jack_sel; | |||
QColor line_midi_jack_glow; | |||
QColor line_midi_a2j; | |||
QColor line_midi_a2j_sel; | |||
QColor line_midi_a2j_glow; | |||
QColor line_midi_alsa; | |||
QColor line_midi_alsa_sel; | |||
QColor line_midi_alsa_glow; | |||
QPen rubberband_pen; | |||
QColor rubberband_brush; | |||
}; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // PATCHCANVAS_THEME_H |
@@ -0,0 +1,142 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef PATCHCANVAS_H | |||
#define PATCHCANVAS_H | |||
#include <QtGui/QGraphicsItem> | |||
#include "../patchcanvas.h" | |||
#define foreach2(var, list) \ | |||
for (int i=0; i < list.count(); i++) { var = list[i]; | |||
class QSettings; | |||
class QTimer; | |||
class CanvasObject : public QObject { | |||
Q_OBJECT | |||
public: | |||
CanvasObject(QObject* parent=0); | |||
public slots: | |||
void AnimationIdle(); | |||
void AnimationHide(); | |||
void AnimationDestroy(); | |||
void CanvasPostponedGroups(); | |||
void PortContextMenuDisconnect(); | |||
}; | |||
START_NAMESPACE_PATCHCANVAS | |||
class AbstractCanvasLine; | |||
class CanvasFadeAnimation; | |||
class CanvasBox; | |||
class CanvasPort; | |||
class Theme; | |||
// object types | |||
enum CanvasType { | |||
CanvasBoxType = QGraphicsItem::UserType + 1, | |||
CanvasIconType = QGraphicsItem::UserType + 2, | |||
CanvasPortType = QGraphicsItem::UserType + 3, | |||
CanvasLineType = QGraphicsItem::UserType + 4, | |||
CanvasBezierLineType = QGraphicsItem::UserType + 5, | |||
CanvasLineMovType = QGraphicsItem::UserType + 6, | |||
CanvasBezierLineMovType = QGraphicsItem::UserType + 7 | |||
}; | |||
// object lists | |||
struct group_dict_t { | |||
int group_id; | |||
QString group_name; | |||
bool split; | |||
Icon icon; | |||
CanvasBox* widgets[2]; | |||
}; | |||
struct port_dict_t { | |||
int group_id; | |||
int port_id; | |||
QString port_name; | |||
PortMode port_mode; | |||
PortType port_type; | |||
CanvasPort* widget; | |||
}; | |||
struct connection_dict_t { | |||
int connection_id; | |||
int port_in_id; | |||
int port_out_id; | |||
AbstractCanvasLine* widget; | |||
}; | |||
struct animation_dict_t { | |||
CanvasFadeAnimation* animation; | |||
QGraphicsItem* item; | |||
}; | |||
// Main Canvas object | |||
class Canvas { | |||
public: | |||
Canvas(); | |||
~Canvas(); | |||
PatchScene* scene; | |||
Callback callback; | |||
bool debug; | |||
unsigned long last_z_value; | |||
int last_connection_id; | |||
QPointF initial_pos; | |||
QRectF size_rect; | |||
QList<group_dict_t> group_list; | |||
QList<port_dict_t> port_list; | |||
QList<connection_dict_t> connection_list; | |||
QList<animation_dict_t> animation_list; | |||
CanvasObject* qobject; | |||
QSettings* settings; | |||
Theme* theme; | |||
bool initiated; | |||
}; | |||
const char* bool2str(bool check); | |||
const char* port_mode2str(PortMode port_mode); | |||
const char* port_type2str(PortType port_type); | |||
const char* icon2str(Icon icon); | |||
const char* split2str(SplitOption split); | |||
QString CanvasGetGroupName(int group_id); | |||
int CanvasGetGroupPortCount(int group_id); | |||
QPointF CanvasGetNewGroupPos(bool horizontal=false); | |||
QString CanvasGetFullPortName(int port_id); | |||
QList<int> CanvasGetPortConnectionList(int port_id); | |||
int CanvasGetConnectedPort(int connection_id, int port_id); | |||
void CanvasRemoveAnimation(CanvasFadeAnimation* f_animation); | |||
void CanvasPostponedGroups(); | |||
void CanvasCallback(CallbackAction action, int value1, int value2, QString value_str); | |||
void CanvasItemFX(QGraphicsItem* item, bool show, bool destroy=false); | |||
void CanvasRemoveItemFX(QGraphicsItem* item); | |||
// global objects | |||
extern Canvas canvas; | |||
extern options_t options; | |||
extern features_t features; | |||
END_NAMESPACE_PATCHCANVAS | |||
#endif // PATCHCANVAS_H |
@@ -0,0 +1,290 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#include "patchscene.h" | |||
#include <cmath> | |||
#include <QtGui/QKeyEvent> | |||
#include <QtGui/QGraphicsRectItem> | |||
#include <QtGui/QGraphicsSceneMouseEvent> | |||
#include <QtGui/QGraphicsSceneWheelEvent> | |||
#include <QtGui/QGraphicsView> | |||
#include "patchcanvas/patchcanvas.h" | |||
#include "patchcanvas/canvasbox.h" | |||
using namespace PatchCanvas; | |||
PatchScene::PatchScene(QObject* parent, QGraphicsView* view) : | |||
QGraphicsScene(parent) | |||
{ | |||
m_ctrl_down = false; | |||
m_mouse_down_init = false; | |||
m_mouse_rubberband = false; | |||
m_rubberband = addRect(QRectF(0, 0, 0, 0)); | |||
m_rubberband->setZValue(-1); | |||
m_rubberband->hide(); | |||
m_rubberband_selection = false; | |||
m_rubberband_orig_point = QPointF(0, 0); | |||
m_view = view; | |||
if (! m_view) | |||
qFatal("PatchCanvas::PatchScene() - invalid view"); | |||
} | |||
void PatchScene::fixScaleFactor() | |||
{ | |||
qreal scale = m_view->transform().m11(); | |||
if (scale > 3.0) | |||
{ | |||
m_view->resetTransform(); | |||
m_view->scale(3.0, 3.0); | |||
} | |||
else if (scale < 0.2) | |||
{ | |||
m_view->resetTransform(); | |||
m_view->scale(0.2, 0.2); | |||
} | |||
emit scaleChanged(m_view->transform().m11()); | |||
} | |||
void PatchScene::updateTheme() | |||
{ | |||
setBackgroundBrush(canvas.theme->canvas_bg); | |||
m_rubberband->setPen(canvas.theme->rubberband_pen); | |||
m_rubberband->setBrush(canvas.theme->rubberband_brush); | |||
} | |||
void PatchScene::zoom_fit() | |||
{ | |||
qreal min_x, min_y, max_x, max_y; | |||
bool first_value = true; | |||
QList<QGraphicsItem*> items_list = items(); | |||
if (items_list.count() > 0) | |||
{ | |||
foreach (const QGraphicsItem* item, items_list) | |||
{ | |||
if (item && item->isVisible() and item->type() == CanvasBoxType) | |||
{ | |||
QPointF pos = item->scenePos(); | |||
QRectF rect = item->boundingRect(); | |||
if (first_value) | |||
min_x = pos.x(); | |||
else if (pos.x() < min_x) | |||
min_x = pos.x(); | |||
if (first_value) | |||
min_y = pos.y(); | |||
else if (pos.y() < min_y) | |||
min_y = pos.y(); | |||
if (first_value) | |||
max_x = pos.x()+rect.width(); | |||
else if (pos.x()+rect.width() > max_x) | |||
max_x = pos.x()+rect.width(); | |||
if (first_value) | |||
max_y = pos.y()+rect.height(); | |||
else if (pos.y()+rect.height() > max_y) | |||
max_y = pos.y()+rect.height(); | |||
first_value = false; | |||
} | |||
} | |||
if (first_value == false) | |||
{ | |||
m_view->fitInView(min_x, min_y, abs(max_x-min_x), abs(max_y-min_y), Qt::KeepAspectRatio); | |||
fixScaleFactor(); | |||
} | |||
} | |||
} | |||
void PatchScene::zoom_in() | |||
{ | |||
if (m_view->transform().m11() < 3.0) | |||
m_view->scale(1.2, 1.2); | |||
emit scaleChanged(m_view->transform().m11()); | |||
} | |||
void PatchScene::zoom_out() | |||
{ | |||
if (m_view->transform().m11() > 0.2) | |||
m_view->scale(0.8, 0.8); | |||
emit scaleChanged(m_view->transform().m11()); | |||
} | |||
void PatchScene::zoom_reset() | |||
{ | |||
m_view->resetTransform(); | |||
emit scaleChanged(1.0); | |||
} | |||
void PatchScene::keyPressEvent(QKeyEvent* event) | |||
{ | |||
if (! m_view) | |||
return event->ignore(); | |||
if (event->key() == Qt::Key_Control) | |||
{ | |||
m_ctrl_down = true; | |||
} | |||
else if (event->key() == Qt::Key_Home) | |||
{ | |||
zoom_fit(); | |||
return event->accept(); | |||
} | |||
else if (m_ctrl_down) | |||
{ | |||
if (event->key() == Qt::Key_Plus) | |||
{ | |||
zoom_in(); | |||
return event->accept(); | |||
} | |||
else if (event->key() == Qt::Key_Minus) | |||
{ | |||
zoom_out(); | |||
return event->accept(); | |||
} | |||
else if (event->key() == Qt::Key_1) | |||
{ | |||
zoom_reset(); | |||
return event->accept(); | |||
} | |||
} | |||
QGraphicsScene::keyPressEvent(event); | |||
} | |||
void PatchScene::keyReleaseEvent(QKeyEvent* event) | |||
{ | |||
if (event->key() == Qt::Key_Control) | |||
m_ctrl_down = false; | |||
QGraphicsScene::keyReleaseEvent(event); | |||
} | |||
void PatchScene::mousePressEvent(QGraphicsSceneMouseEvent* event) | |||
{ | |||
m_mouse_down_init = (event->button() == Qt::LeftButton); | |||
m_mouse_rubberband = false; | |||
QGraphicsScene::mousePressEvent(event); | |||
} | |||
void PatchScene::mouseMoveEvent(QGraphicsSceneMouseEvent* event) | |||
{ | |||
if (m_mouse_down_init) | |||
{ | |||
m_mouse_down_init = false; | |||
m_mouse_rubberband = (selectedItems().count() == 0); | |||
} | |||
if (m_mouse_rubberband) | |||
{ | |||
if (m_rubberband_selection == false) | |||
{ | |||
m_rubberband->show(); | |||
m_rubberband_selection = true; | |||
m_rubberband_orig_point = event->scenePos(); | |||
} | |||
int x, y; | |||
QPointF pos = event->scenePos(); | |||
if (pos.x() > m_rubberband_orig_point.x()) | |||
x = m_rubberband_orig_point.x(); | |||
else | |||
x = pos.x(); | |||
if (pos.y() > m_rubberband_orig_point.y()) | |||
y = m_rubberband_orig_point.y(); | |||
else | |||
y = pos.y(); | |||
m_rubberband->setRect(x, y, abs(pos.x()-m_rubberband_orig_point.x()), abs(pos.y()-m_rubberband_orig_point.y())); | |||
return event->accept(); | |||
} | |||
QGraphicsScene::mouseMoveEvent(event); | |||
} | |||
void PatchScene::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) | |||
{ | |||
if (m_rubberband_selection) | |||
{ | |||
QList<QGraphicsItem*> items_list = items(); | |||
if (items_list.count() > 0) | |||
{ | |||
foreach (QGraphicsItem* item, items_list) | |||
{ | |||
if (item && item->isVisible() && item->type() == CanvasBoxType) | |||
{ | |||
QRectF item_rect = item->sceneBoundingRect(); | |||
QPointF item_top_left = QPointF(item_rect.x(), item_rect.y()); | |||
QPointF item_bottom_right = QPointF(item_rect.x()+item_rect.width(), item_rect.y()+item_rect.height()); | |||
if (m_rubberband->contains(item_top_left) && m_rubberband->contains(item_bottom_right)) | |||
item->setSelected(true); | |||
} | |||
} | |||
m_rubberband->hide(); | |||
m_rubberband->setRect(0, 0, 0, 0); | |||
m_rubberband_selection = false; | |||
} | |||
} | |||
else | |||
{ | |||
QList<QGraphicsItem*> items_list = selectedItems(); | |||
foreach (QGraphicsItem* item, items_list) | |||
{ | |||
if (item && item->isVisible() && item->type() == CanvasBoxType) | |||
{ | |||
CanvasBox* citem = (CanvasBox*)item; | |||
citem->checkItemPos(); | |||
emit sceneGroupMoved(citem->getGroupId(), citem->getSplittedMode(), citem->scenePos()); | |||
} | |||
} | |||
if (items_list.count() > 1) | |||
canvas.scene->update(); | |||
} | |||
m_mouse_down_init = false; | |||
m_mouse_rubberband = false; | |||
QGraphicsScene::mouseReleaseEvent(event); | |||
} | |||
void PatchScene::wheelEvent(QGraphicsSceneWheelEvent* event) | |||
{ | |||
if (! m_view) | |||
return event->ignore(); | |||
if (m_ctrl_down) | |||
{ | |||
double factor = std::pow(1.41, (event->delta()/240.0)); | |||
m_view->scale(factor, factor); | |||
fixScaleFactor(); | |||
return event->accept(); | |||
} | |||
QGraphicsScene::wheelEvent(event); | |||
} |
@@ -0,0 +1,67 @@ | |||
/* | |||
* Patchbay Canvas engine using QGraphicsView/Scene | |||
* Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | |||
* any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* For a full copy of the GNU General Public License see the COPYING file | |||
*/ | |||
#ifndef PATCHSCENE_H | |||
#define PATCHSCENE_H | |||
#include <QtGui/QGraphicsScene> | |||
class QKeyEvent; | |||
class QGraphicsRectItem; | |||
class QGraphicsSceneMouseEvent; | |||
class QGraphicsSceneWheelEvent; | |||
class QGraphicsView; | |||
class PatchScene : public QGraphicsScene | |||
{ | |||
Q_OBJECT | |||
public: | |||
PatchScene(QObject* parent, QGraphicsView* view); | |||
void fixScaleFactor(); | |||
void updateTheme(); | |||
void zoom_fit(); | |||
void zoom_in(); | |||
void zoom_out(); | |||
void zoom_reset(); | |||
signals: | |||
void scaleChanged(double); | |||
void sceneGroupMoved(int, int, QPointF); | |||
private: | |||
bool m_ctrl_down; | |||
bool m_mouse_down_init; | |||
bool m_mouse_rubberband; | |||
QGraphicsRectItem* m_rubberband; | |||
bool m_rubberband_selection; | |||
QPointF m_rubberband_orig_point; | |||
QGraphicsView* m_view; | |||
virtual void keyPressEvent(QKeyEvent* event); | |||
virtual void keyReleaseEvent(QKeyEvent* event); | |||
virtual void mousePressEvent(QGraphicsSceneMouseEvent* event); | |||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event); | |||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); | |||
virtual void wheelEvent(QGraphicsSceneWheelEvent* event); | |||
}; | |||
#endif // PATCHSCENE_H |
@@ -0,0 +1,38 @@ | |||
#!/bin/bash | |||
# Check if already running | |||
PROCS=`ps -f -u $USER | grep /share/cadence/src/claudia.py | grep python` | |||
if [ x"$PROCS" != x"" ]; then | |||
# One instance only | |||
PROC=`echo "$PROCS" | head -n 1` | |||
# Get PID | |||
PID=`echo "$PROC" | awk '{printf$2}'` | |||
# Last check, just to make sure | |||
if [ x"$PID" != x"" ]; then | |||
# Tell user about this | |||
echo "Claudia already started, showing GUI now..." | |||
# Send SIGUSR2, shows the GUI | |||
kill -USR2 "$PID" | |||
# Quit now | |||
exit | |||
fi | |||
fi | |||
if [ -f /usr/bin/python3 ]; then | |||
PYTHON=/usr/bin/python3 | |||
else | |||
PYTHON=python | |||
fi | |||
# We only got here if not running yet | |||
INSTALL_PREFIX="X-PREFIX-X" | |||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/claudia.py "$@" |
@@ -0,0 +1,38 @@ | |||
#!/bin/bash | |||
# Check if already running | |||
PROCS=`ps -f -u $USER | grep /share/cadence/src/claudia-launcher.py | grep python` | |||
if [ x"$PROCS" != x"" ]; then | |||
# One instance only | |||
PROC=`echo "$PROCS" | head -n 1` | |||
# Get PID | |||
PID=`echo "$PROC" | awk '{printf$2}'` | |||
# Last check, just to make sure | |||
if [ x"$PID" != x"" ]; then | |||
# Tell user about this | |||
echo "Claudia-Launcher already started, showing GUI now..." | |||
# Send SIGUSR2, shows the GUI | |||
kill -USR2 "$PID" | |||
# Quit now | |||
exit | |||
fi | |||
fi | |||
if [ -f /usr/bin/python3 ]; then | |||
PYTHON=/usr/bin/python3 | |||
else | |||
PYTHON=python | |||
fi | |||
# We only got here if not running yet | |||
INSTALL_PREFIX="X-PREFIX-X" | |||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/claudia_launcher.py "$@" |
@@ -0,0 +1,11 @@ | |||
[Desktop Entry] | |||
Name=Claudia Launcher | |||
GenericName=Claudia Launcher | |||
GenericName[fr]=Lanceur Claudia | |||
Comment=Multimedia Applications Launcher | |||
Comment[fr]=Lanceur d'applications multimédia | |||
Exec=claudia-launcher | |||
Icon=claudia-launcher | |||
Terminal=false | |||
Type=Application | |||
Categories=AudioVideo;AudioEditing;Qt; |
@@ -0,0 +1,10 @@ | |||
[Desktop Entry] | |||
Name=Claudia | |||
GenericName=Claudia | |||
Comment=LADISH Frontend | |||
Comment[fr]=Interface graphique utilisateur pour LADISH | |||
Exec=claudia | |||
Icon=claudia | |||
Terminal=false | |||
Type=Application | |||
Categories=AudioVideo;AudioEditing;Qt; |
@@ -6,8 +6,8 @@ | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>723</width> | |||
<height>682</height> | |||
<width>740</width> | |||
<height>564</height> | |||
</rect> | |||
</property> | |||
<property name="windowTitle"> | |||
@@ -164,7 +164,49 @@ | |||
<string>System Checks</string> | |||
</property> | |||
<layout class="QGridLayout" name="gridLayout_3"> | |||
<item row="0" column="0" colspan="2"> | |||
<item row="0" column="1"> | |||
<widget class="QLabel" name="label_check_helper2"> | |||
<property name="text"> | |||
<string/> | |||
</property> | |||
<property name="pixmap"> | |||
<pixmap resource="../resources.qrc">:/16x16/dialog-information.png</pixmap> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignCenter</set> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="0" column="2"> | |||
<widget class="QLabel" name="label_check_helper3"> | |||
<property name="sizePolicy"> | |||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> | |||
<horstretch>0</horstretch> | |||
<verstretch>0</verstretch> | |||
</sizepolicy> | |||
</property> | |||
<property name="text"> | |||
<string>Result</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="0" column="0"> | |||
<widget class="QLabel" name="label_check_helper1"> | |||
<property name="sizePolicy"> | |||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> | |||
<horstretch>0</horstretch> | |||
<verstretch>0</verstretch> | |||
</sizepolicy> | |||
</property> | |||
<property name="text"> | |||
<string>Test Name:</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="1" column="0" colspan="3"> | |||
<widget class="Line" name="line_4"> | |||
<property name="lineWidth"> | |||
<number>0</number> | |||
@@ -199,18 +241,9 @@ | |||
<layout class="QVBoxLayout" name="verticalLayout_12"> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox_jack"> | |||
<property name="font"> | |||
<font> | |||
<weight>50</weight> | |||
<bold>false</bold> | |||
</font> | |||
</property> | |||
<property name="title"> | |||
<string>JACK Status</string> | |||
</property> | |||
<property name="flat"> | |||
<bool>false</bool> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_9"> | |||
<item> | |||
<widget class="QWidget" name="widget" native="true"> | |||
@@ -429,26 +462,17 @@ | |||
</item> | |||
<item> | |||
<layout class="QGridLayout" name="gridLayout_4"> | |||
<item row="1" column="1"> | |||
<spacer name="horizontalSpacer_4"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeType"> | |||
<enum>QSizePolicy::Preferred</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>38</width> | |||
<height>20</height> | |||
</size> | |||
<item row="0" column="0"> | |||
<widget class="QPushButton" name="b_jack_start"> | |||
<property name="text"> | |||
<string>Start</string> | |||
</property> | |||
</spacer> | |||
</widget> | |||
</item> | |||
<item row="0" column="4" colspan="2"> | |||
<widget class="QPushButton" name="b_jack_configure"> | |||
<item row="0" column="1" colspan="2"> | |||
<widget class="QPushButton" name="b_jack_stop"> | |||
<property name="text"> | |||
<string>Configure</string> | |||
<string>Stop</string> | |||
</property> | |||
</widget> | |||
</item> | |||
@@ -459,17 +483,10 @@ | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="0" column="0"> | |||
<widget class="QPushButton" name="b_jack_start"> | |||
<property name="text"> | |||
<string>Start</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="0" column="1" colspan="2"> | |||
<widget class="QPushButton" name="b_jack_stop"> | |||
<item row="0" column="4" colspan="2"> | |||
<widget class="QPushButton" name="b_jack_configure"> | |||
<property name="text"> | |||
<string>Stop</string> | |||
<string>Configure</string> | |||
</property> | |||
</widget> | |||
</item> | |||
@@ -480,10 +497,33 @@ | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="1" column="2" colspan="4"> | |||
<item row="1" column="1"> | |||
<spacer name="horizontalSpacer_4"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeType"> | |||
<enum>QSizePolicy::Preferred</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>38</width> | |||
<height>20</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item row="1" column="2" colspan="3"> | |||
<widget class="QCheckBox" name="cb_jack_autostart"> | |||
<property name="text"> | |||
<string>Auto-start JACK at login</string> | |||
<string>Auto-start JACK or LADISH at login</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="1" column="5"> | |||
<widget class="QToolButton" name="tb_jack_options"> | |||
<property name="text"> | |||
<string>...</string> | |||
</property> | |||
</widget> | |||
</item> | |||
@@ -504,16 +544,7 @@ | |||
<string>JACK Bridges</string> | |||
</property> | |||
<layout class="QGridLayout" name="gridLayout_5"> | |||
<property name="leftMargin"> | |||
<number>2</number> | |||
</property> | |||
<property name="topMargin"> | |||
<number>2</number> | |||
</property> | |||
<property name="rightMargin"> | |||
<number>2</number> | |||
</property> | |||
<property name="bottomMargin"> | |||
<property name="margin"> | |||
<number>2</number> | |||
</property> | |||
<item row="0" column="0"> | |||
@@ -541,8 +572,8 @@ | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>392</width> | |||
<height>130</height> | |||
<width>360</width> | |||
<height>100</height> | |||
</rect> | |||
</property> | |||
<attribute name="label"> | |||
@@ -689,8 +720,8 @@ | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>392</width> | |||
<height>118</height> | |||
<width>360</width> | |||
<height>97</height> | |||
</rect> | |||
</property> | |||
<attribute name="label"> | |||
@@ -823,8 +854,8 @@ | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>392</width> | |||
<height>118</height> | |||
<width>360</width> | |||
<height>97</height> | |||
</rect> | |||
</property> | |||
<attribute name="label"> | |||
@@ -1062,30 +1093,30 @@ | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox_render"> | |||
<widget class="QGroupBox" name="groupBox_claudia"> | |||
<property name="title"> | |||
<string>Render</string> | |||
<string>Claudia</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_6"> | |||
<layout class="QVBoxLayout" name="verticalLayout_3"> | |||
<item> | |||
<widget class="ClickableLabel" name="pic_render"> | |||
<widget class="ClickableLabel" name="pic_claudia"> | |||
<property name="minimumSize"> | |||
<size> | |||
<width>0</width> | |||
<height>128</height> | |||
<height>117</height> | |||
</size> | |||
</property> | |||
<property name="maximumSize"> | |||
<size> | |||
<width>16777215</width> | |||
<height>128</height> | |||
<height>117</height> | |||
</size> | |||
</property> | |||
<property name="text"> | |||
<string/> | |||
</property> | |||
<property name="pixmap"> | |||
<pixmap resource="../resources.qrc">:/screens/cadence-render.png</pixmap> | |||
<pixmap resource="../resources.qrc">:/screens/claudia.png</pixmap> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignCenter</set> | |||
@@ -1093,9 +1124,73 @@ | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QLabel" name="label_tools_render"> | |||
<widget class="QLabel" name="label_tools_claudia"> | |||
<property name="text"> | |||
<string>Render a JACK project</string> | |||
<string>LADISH frontend; like Catia, but focused at session management</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignCenter</set> | |||
</property> | |||
<property name="wordWrap"> | |||
<bool>true</bool> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox_meter"> | |||
<property name="title"> | |||
<string>Meter In / Out</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_4"> | |||
<item> | |||
<layout class="QHBoxLayout" name="horizontalLayout_5"> | |||
<property name="spacing"> | |||
<number>0</number> | |||
</property> | |||
<item> | |||
<widget class="ClickableLabel" name="pic_meter_in"> | |||
<property name="text"> | |||
<string/> | |||
</property> | |||
<property name="pixmap"> | |||
<pixmap resource="../resources.qrc">:/screens/cadence-jackmeter-in.png</pixmap> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="ClickableLabel" name="pic_meter_out"> | |||
<property name="minimumSize"> | |||
<size> | |||
<width>0</width> | |||
<height>117</height> | |||
</size> | |||
</property> | |||
<property name="maximumSize"> | |||
<size> | |||
<width>16777215</width> | |||
<height>117</height> | |||
</size> | |||
</property> | |||
<property name="text"> | |||
<string/> | |||
</property> | |||
<property name="pixmap"> | |||
<pixmap resource="../resources.qrc">:/screens/cadence-jackmeter-out.png</pixmap> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignCenter</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</item> | |||
<item> | |||
<widget class="QLabel" name="label_tools_meter"> | |||
<property name="text"> | |||
<string>Digital peak meter, auto-connected to all system inputs or outputs</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignCenter</set> | |||
@@ -1206,57 +1301,40 @@ | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox_meter"> | |||
<widget class="QGroupBox" name="groupBox_render"> | |||
<property name="title"> | |||
<string>Meter In / Out</string> | |||
<string>Render</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_4"> | |||
<layout class="QVBoxLayout" name="verticalLayout_6"> | |||
<item> | |||
<layout class="QHBoxLayout" name="horizontalLayout_5"> | |||
<property name="spacing"> | |||
<number>0</number> | |||
<widget class="ClickableLabel" name="pic_render"> | |||
<property name="minimumSize"> | |||
<size> | |||
<width>0</width> | |||
<height>128</height> | |||
</size> | |||
</property> | |||
<item> | |||
<widget class="ClickableLabel" name="pic_meter_in"> | |||
<property name="text"> | |||
<string/> | |||
</property> | |||
<property name="pixmap"> | |||
<pixmap resource="../resources.qrc">:/screens/cadence-jackmeter-in.png</pixmap> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="ClickableLabel" name="pic_meter_out"> | |||
<property name="minimumSize"> | |||
<size> | |||
<width>0</width> | |||
<height>117</height> | |||
</size> | |||
</property> | |||
<property name="maximumSize"> | |||
<size> | |||
<width>16777215</width> | |||
<height>117</height> | |||
</size> | |||
</property> | |||
<property name="text"> | |||
<string/> | |||
</property> | |||
<property name="pixmap"> | |||
<pixmap resource="../resources.qrc">:/screens/cadence-jackmeter-out.png</pixmap> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignCenter</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
<property name="maximumSize"> | |||
<size> | |||
<width>16777215</width> | |||
<height>128</height> | |||
</size> | |||
</property> | |||
<property name="text"> | |||
<string/> | |||
</property> | |||
<property name="pixmap"> | |||
<pixmap resource="../resources.qrc">:/screens/cadence-render.png</pixmap> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignCenter</set> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QLabel" name="label_tools_meter"> | |||
<widget class="QLabel" name="label_tools_render"> | |||
<property name="text"> | |||
<string>Digital peak meter, auto-connected to all system inputs or outputs</string> | |||
<string>Render a JACK project</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignCenter</set> | |||
@@ -1494,7 +1572,7 @@ | |||
<string>Audio Plugins PATH</string> | |||
</property> | |||
<property name="textAlignment"> | |||
<set>AlignCenter</set> | |||
<set>AlignHCenter|AlignVCenter|AlignCenter</set> | |||
</property> | |||
<property name="flags"> | |||
<set>ItemIsSelectable|ItemIsEnabled</set> | |||
@@ -1505,7 +1583,7 @@ | |||
<string>Default Applications</string> | |||
</property> | |||
<property name="textAlignment"> | |||
<set>AlignCenter</set> | |||
<set>AlignHCenter|AlignVCenter|AlignCenter</set> | |||
</property> | |||
<property name="flags"> | |||
<set>ItemIsSelectable|ItemIsEnabled</set> | |||
@@ -1516,7 +1594,7 @@ | |||
<string>WineASIO</string> | |||
</property> | |||
<property name="textAlignment"> | |||
<set>AlignCenter</set> | |||
<set>AlignHCenter|AlignVCenter|AlignCenter</set> | |||
</property> | |||
<property name="flags"> | |||
<set>ItemIsSelectable|ItemIsEnabled</set> | |||
@@ -1535,16 +1613,7 @@ | |||
</property> | |||
<widget class="QWidget" name="page_plugins"> | |||
<layout class="QGridLayout" name="gridLayout_6"> | |||
<property name="leftMargin"> | |||
<number>0</number> | |||
</property> | |||
<property name="topMargin"> | |||
<number>0</number> | |||
</property> | |||
<property name="rightMargin"> | |||
<number>0</number> | |||
</property> | |||
<property name="bottomMargin"> | |||
<property name="margin"> | |||
<number>0</number> | |||
</property> | |||
<item row="3" column="1"> | |||
@@ -1612,8 +1681,8 @@ | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>396</width> | |||
<height>401</height> | |||
<width>416</width> | |||
<height>334</height> | |||
</rect> | |||
</property> | |||
<attribute name="label"> | |||
@@ -1642,8 +1711,8 @@ | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>91</width> | |||
<height>89</height> | |||
<width>94</width> | |||
<height>66</height> | |||
</rect> | |||
</property> | |||
<attribute name="label"> | |||
@@ -1672,8 +1741,8 @@ | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>91</width> | |||
<height>89</height> | |||
<width>94</width> | |||
<height>66</height> | |||
</rect> | |||
</property> | |||
<attribute name="label"> | |||
@@ -1702,8 +1771,8 @@ | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>91</width> | |||
<height>89</height> | |||
<width>94</width> | |||
<height>66</height> | |||
</rect> | |||
</property> | |||
<attribute name="label"> | |||
@@ -1763,21 +1832,12 @@ | |||
</widget> | |||
<widget class="QWidget" name="page_apps"> | |||
<layout class="QGridLayout" name="gridLayout_7"> | |||
<property name="leftMargin"> | |||
<number>0</number> | |||
</property> | |||
<property name="topMargin"> | |||
<number>0</number> | |||
</property> | |||
<property name="rightMargin"> | |||
<number>0</number> | |||
</property> | |||
<property name="bottomMargin"> | |||
<number>0</number> | |||
</property> | |||
<property name="verticalSpacing"> | |||
<number>20</number> | |||
</property> | |||
<property name="margin"> | |||
<number>0</number> | |||
</property> | |||
<item row="1" column="0"> | |||
<widget class="QCheckBox" name="ch_app_image"> | |||
<property name="text"> | |||
@@ -2003,16 +2063,7 @@ | |||
</widget> | |||
<widget class="QWidget" name="page_wineasio"> | |||
<layout class="QVBoxLayout" name="verticalLayout_17"> | |||
<property name="leftMargin"> | |||
<number>0</number> | |||
</property> | |||
<property name="topMargin"> | |||
<number>0</number> | |||
</property> | |||
<property name="rightMargin"> | |||
<number>0</number> | |||
</property> | |||
<property name="bottomMargin"> | |||
<property name="margin"> | |||
<number>0</number> | |||
</property> | |||
<item> | |||
@@ -0,0 +1,88 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<ui version="4.0"> | |||
<class>CreateRoomW</class> | |||
<widget class="QDialog" name="CreateRoomW"> | |||
<property name="geometry"> | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>245</width> | |||
<height>239</height> | |||
</rect> | |||
</property> | |||
<property name="windowTitle"> | |||
<string>Create room</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_3"> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox"> | |||
<property name="title"> | |||
<string>Name</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_2"> | |||
<item> | |||
<widget class="QLineEdit" name="le_name"/> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox_2"> | |||
<property name="title"> | |||
<string>Create from template</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout"> | |||
<item> | |||
<widget class="QListWidget" name="lw_templates"/> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QDialogButtonBox" name="buttonBox"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="standardButtons"> | |||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
<resources/> | |||
<connections> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>accepted()</signal> | |||
<receiver>CreateRoomW</receiver> | |||
<slot>accept()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>248</x> | |||
<y>254</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>157</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>rejected()</signal> | |||
<receiver>CreateRoomW</receiver> | |||
<slot>reject()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>316</x> | |||
<y>260</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>286</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
</connections> | |||
</ui> |
@@ -0,0 +1,284 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<ui version="4.0"> | |||
<class>ClaudiaLauncherApp</class> | |||
<widget class="QMainWindow" name="ClaudiaLauncherApp"> | |||
<property name="geometry"> | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>830</width> | |||
<height>133</height> | |||
</rect> | |||
</property> | |||
<property name="windowTitle"> | |||
<string>Claudia Launcher</string> | |||
</property> | |||
<widget class="QWidget" name="centralwidget"> | |||
<layout class="QVBoxLayout" name="verticalLayout_12"> | |||
<item> | |||
<layout class="QHBoxLayout" name="horizontalLayout_3"> | |||
<item> | |||
<widget class="QPushButton" name="b_start"> | |||
<property name="minimumSize"> | |||
<size> | |||
<width>0</width> | |||
<height>48</height> | |||
</size> | |||
</property> | |||
<property name="text"> | |||
<string>&Start</string> | |||
</property> | |||
<property name="icon"> | |||
<iconset resource="../../resources/resources.qrc"> | |||
<normaloff>:/16x16/arrow-right.png</normaloff>:/16x16/arrow-right.png</iconset> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QPushButton" name="b_add"> | |||
<property name="minimumSize"> | |||
<size> | |||
<width>0</width> | |||
<height>48</height> | |||
</size> | |||
</property> | |||
<property name="text"> | |||
<string>&Add to LADISH</string> | |||
</property> | |||
<property name="icon"> | |||
<iconset resource="../../resources/resources.qrc"> | |||
<normaloff>:/16x16/list-add.png</normaloff>:/16x16/list-add.png</iconset> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QGroupBox" name="groupLADISH"> | |||
<property name="title"> | |||
<string>Enable LADISH</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignCenter</set> | |||
</property> | |||
<property name="checkable"> | |||
<bool>true</bool> | |||
</property> | |||
<property name="checked"> | |||
<bool>false</bool> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_24"> | |||
<item> | |||
<layout class="QHBoxLayout" name="horizontalLayout"> | |||
<item> | |||
<spacer name="horizontalSpacer_2"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>40</width> | |||
<height>20</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item> | |||
<widget class="QLabel" name="label"> | |||
<property name="text"> | |||
<string>Default BPM:</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QDoubleSpinBox" name="sb_bpm"> | |||
<property name="decimals"> | |||
<number>1</number> | |||
</property> | |||
<property name="maximum"> | |||
<double>999.000000000000000</double> | |||
</property> | |||
<property name="value"> | |||
<double>130.000000000000000</double> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<spacer name="horizontalSpacer_3"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>40</width> | |||
<height>20</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item> | |||
<widget class="Line" name="line_3"> | |||
<property name="orientation"> | |||
<enum>Qt::Vertical</enum> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<spacer name="horizontalSpacer_4"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>40</width> | |||
<height>20</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item> | |||
<widget class="QLabel" name="label_25"> | |||
<property name="text"> | |||
<string>Default Sample Rate:</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QComboBox" name="co_sample_rate"/> | |||
</item> | |||
<item> | |||
<spacer name="horizontalSpacer"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>40</width> | |||
<height>20</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item> | |||
<widget class="Line" name="line_12"> | |||
<property name="orientation"> | |||
<enum>Qt::Vertical</enum> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<spacer name="horizontalSpacer_5"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>40</width> | |||
<height>20</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item> | |||
<widget class="QLabel" name="label_4"> | |||
<property name="text"> | |||
<string>LADI Room:</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QComboBox" name="co_ladi_room"/> | |||
</item> | |||
<item> | |||
<widget class="QPushButton" name="b_refresh"> | |||
<property name="maximumSize"> | |||
<size> | |||
<width>22</width> | |||
<height>16777215</height> | |||
</size> | |||
</property> | |||
<property name="text"> | |||
<string/> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<spacer name="horizontalSpacer_6"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>40</width> | |||
<height>20</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
</layout> | |||
</item> | |||
<item> | |||
<layout class="QHBoxLayout" name="horizontalLayout_2"> | |||
<item> | |||
<widget class="QLabel" name="label_10"> | |||
<property name="text"> | |||
<string>Project folder:</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QLineEdit" name="le_url"/> | |||
</item> | |||
<item> | |||
<widget class="QPushButton" name="b_open"> | |||
<property name="maximumSize"> | |||
<size> | |||
<width>22</width> | |||
<height>16777215</height> | |||
</size> | |||
</property> | |||
<property name="text"> | |||
<string/> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
</layout> | |||
</item> | |||
<item> | |||
<widget class="ClaudiaLauncher" name="launcher" native="true"/> | |||
</item> | |||
</layout> | |||
</widget> | |||
<action name="action_Close"> | |||
<property name="text"> | |||
<string>&Close</string> | |||
</property> | |||
</action> | |||
<action name="action_About"> | |||
<property name="text"> | |||
<string>&About</string> | |||
</property> | |||
</action> | |||
</widget> | |||
<customwidgets> | |||
<customwidget> | |||
<class>ClaudiaLauncher</class> | |||
<extends>QWidget</extends> | |||
<header>claudia_launcher.h</header> | |||
<container>1</container> | |||
</customwidget> | |||
</customwidgets> | |||
<resources> | |||
<include location="../../resources/resources.qrc"/> | |||
</resources> | |||
<connections/> | |||
</ui> |
@@ -0,0 +1,109 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<ui version="4.0"> | |||
<class>ProjectNameW</class> | |||
<widget class="QDialog" name="ProjectNameW"> | |||
<property name="geometry"> | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>423</width> | |||
<height>102</height> | |||
</rect> | |||
</property> | |||
<property name="windowTitle"> | |||
<string>Save project</string> | |||
</property> | |||
<layout class="QGridLayout" name="gridLayout"> | |||
<item row="0" column="0"> | |||
<widget class="QLabel" name="label"> | |||
<property name="text"> | |||
<string>Path:</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="0" column="1"> | |||
<widget class="QLineEdit" name="le_path"/> | |||
</item> | |||
<item row="0" column="2"> | |||
<widget class="QPushButton" name="b_open"> | |||
<property name="maximumSize"> | |||
<size> | |||
<width>22</width> | |||
<height>22</height> | |||
</size> | |||
</property> | |||
<property name="text"> | |||
<string/> | |||
</property> | |||
<property name="icon"> | |||
<iconset resource="../../resources/resources.qrc"> | |||
<normaloff>:/16x16/document-open.png</normaloff>:/16x16/document-open.png</iconset> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="1" column="0"> | |||
<widget class="QLabel" name="label_2"> | |||
<property name="text"> | |||
<string>Name:</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="1" column="1" colspan="2"> | |||
<widget class="QLineEdit" name="le_name"/> | |||
</item> | |||
<item row="2" column="0" colspan="3"> | |||
<widget class="QDialogButtonBox" name="buttonBox"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="standardButtons"> | |||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
<resources> | |||
<include location="../../resources/resources.qrc"/> | |||
</resources> | |||
<connections> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>accepted()</signal> | |||
<receiver>ProjectNameW</receiver> | |||
<slot>accept()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>248</x> | |||
<y>254</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>157</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>rejected()</signal> | |||
<receiver>ProjectNameW</receiver> | |||
<slot>reject()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>316</x> | |||
<y>260</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>286</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
</connections> | |||
</ui> |
@@ -0,0 +1,175 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<ui version="4.0"> | |||
<class>ProjectPropertiesW</class> | |||
<widget class="QDialog" name="ProjectPropertiesW"> | |||
<property name="geometry"> | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>373</width> | |||
<height>417</height> | |||
</rect> | |||
</property> | |||
<property name="windowTitle"> | |||
<string>Project Properties</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_4"> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox"> | |||
<property name="title"> | |||
<string>Project name</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout"> | |||
<item> | |||
<widget class="QLineEdit" name="le_name"/> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox_2"> | |||
<property name="title"> | |||
<string>Description</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_2"> | |||
<item> | |||
<widget class="QLineEdit" name="le_description"/> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox_3"> | |||
<property name="title"> | |||
<string>Notes</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_3"> | |||
<item> | |||
<widget class="QPlainTextEdit" name="le_notes"/> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
<item> | |||
<layout class="QHBoxLayout" name="horizontalLayout"> | |||
<item> | |||
<spacer name="horizontalSpacer"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>40</width> | |||
<height>20</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item> | |||
<widget class="QCheckBox" name="cb_save_now"> | |||
<property name="text"> | |||
<string>Save Now</string> | |||
</property> | |||
<property name="checked"> | |||
<bool>true</bool> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<spacer name="horizontalSpacer_2"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeType"> | |||
<enum>QSizePolicy::Preferred</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>40</width> | |||
<height>20</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
</layout> | |||
</item> | |||
<item> | |||
<spacer name="verticalSpacer"> | |||
<property name="orientation"> | |||
<enum>Qt::Vertical</enum> | |||
</property> | |||
<property name="sizeType"> | |||
<enum>QSizePolicy::Fixed</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>20</width> | |||
<height>10</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item> | |||
<widget class="QDialogButtonBox" name="buttonBox"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="standardButtons"> | |||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
<resources/> | |||
<connections> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>accepted()</signal> | |||
<receiver>ProjectPropertiesW</receiver> | |||
<slot>accept()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>226</x> | |||
<y>401</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>157</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>rejected()</signal> | |||
<receiver>ProjectPropertiesW</receiver> | |||
<slot>reject()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>294</x> | |||
<y>406</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>286</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
<connection> | |||
<sender>cb_save_now</sender> | |||
<signal>toggled(bool)</signal> | |||
<receiver>le_name</receiver> | |||
<slot>setEnabled(bool)</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>274</x> | |||
<y>359</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>223</x> | |||
<y>41</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
</connections> | |||
</ui> |
@@ -0,0 +1,135 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<ui version="4.0"> | |||
<class>RunCustomW</class> | |||
<widget class="QDialog" name="RunCustomW"> | |||
<property name="geometry"> | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>400</width> | |||
<height>234</height> | |||
</rect> | |||
</property> | |||
<property name="windowTitle"> | |||
<string>New application</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout"> | |||
<item> | |||
<layout class="QGridLayout" name="gridLayout"> | |||
<item row="0" column="0"> | |||
<widget class="QLabel" name="label"> | |||
<property name="text"> | |||
<string>Command:</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | |||
</property> | |||
<property name="buddy"> | |||
<cstring>le_command</cstring> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="0" column="1"> | |||
<widget class="QLineEdit" name="le_command"/> | |||
</item> | |||
<item row="1" column="0"> | |||
<widget class="QLabel" name="label_2"> | |||
<property name="text"> | |||
<string>Name:</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | |||
</property> | |||
<property name="buddy"> | |||
<cstring>le_name</cstring> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="1" column="1"> | |||
<widget class="QLineEdit" name="le_name"/> | |||
</item> | |||
</layout> | |||
</item> | |||
<item> | |||
<widget class="QCheckBox" name="cb_terminal"> | |||
<property name="text"> | |||
<string>Run in Terminal</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QRadioButton" name="rb_level_0"> | |||
<property name="text"> | |||
<string>Level 0</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QRadioButton" name="rb_level_1"> | |||
<property name="text"> | |||
<string>Level 1</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QRadioButton" name="rb_level_lash"> | |||
<property name="text"> | |||
<string>Level 2 (LASH)</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QRadioButton" name="rb_level_js"> | |||
<property name="text"> | |||
<string>Level 2 (Jack Session)</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QDialogButtonBox" name="buttonBox"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="standardButtons"> | |||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
<resources/> | |||
<connections> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>accepted()</signal> | |||
<receiver>RunCustomW</receiver> | |||
<slot>accept()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>248</x> | |||
<y>254</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>157</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>rejected()</signal> | |||
<receiver>RunCustomW</receiver> | |||
<slot>reject()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>316</x> | |||
<y>260</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>286</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
</connections> | |||
</ui> |
@@ -0,0 +1,111 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<ui version="4.0"> | |||
<class>StudioListW</class> | |||
<widget class="QDialog" name="StudioListW"> | |||
<property name="geometry"> | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>345</width> | |||
<height>362</height> | |||
</rect> | |||
</property> | |||
<property name="windowTitle"> | |||
<string>Load Studio</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_2"> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox"> | |||
<property name="title"> | |||
<string>Studio list</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout"> | |||
<item> | |||
<widget class="QTableWidget" name="tableWidget"> | |||
<property name="editTriggers"> | |||
<set>QAbstractItemView::NoEditTriggers</set> | |||
</property> | |||
<property name="showDropIndicator" stdset="0"> | |||
<bool>false</bool> | |||
</property> | |||
<property name="dragDropOverwriteMode"> | |||
<bool>false</bool> | |||
</property> | |||
<property name="selectionMode"> | |||
<enum>QAbstractItemView::SingleSelection</enum> | |||
</property> | |||
<property name="selectionBehavior"> | |||
<enum>QAbstractItemView::SelectRows</enum> | |||
</property> | |||
<attribute name="horizontalHeaderStretchLastSection"> | |||
<bool>true</bool> | |||
</attribute> | |||
<attribute name="verticalHeaderVisible"> | |||
<bool>false</bool> | |||
</attribute> | |||
<attribute name="verticalHeaderDefaultSectionSize"> | |||
<number>22</number> | |||
</attribute> | |||
<column> | |||
<property name="text"> | |||
<string>Name</string> | |||
</property> | |||
</column> | |||
<column> | |||
<property name="text"> | |||
<string>Date</string> | |||
</property> | |||
</column> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QDialogButtonBox" name="buttonBox"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="standardButtons"> | |||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
<resources/> | |||
<connections> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>accepted()</signal> | |||
<receiver>StudioListW</receiver> | |||
<slot>accept()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>248</x> | |||
<y>254</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>157</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>rejected()</signal> | |||
<receiver>StudioListW</receiver> | |||
<slot>reject()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>316</x> | |||
<y>260</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>286</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
</connections> | |||
</ui> |
@@ -0,0 +1,76 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<ui version="4.0"> | |||
<class>StudioNameW</class> | |||
<widget class="QDialog" name="StudioNameW"> | |||
<property name="geometry"> | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>312</width> | |||
<height>106</height> | |||
</rect> | |||
</property> | |||
<property name="windowTitle"> | |||
<string>Set name</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_2"> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox"> | |||
<property name="title"> | |||
<string>Studio name</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout"> | |||
<item> | |||
<widget class="QLineEdit" name="le_name"/> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QDialogButtonBox" name="buttonBox"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="standardButtons"> | |||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
<resources/> | |||
<connections> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>accepted()</signal> | |||
<receiver>StudioNameW</receiver> | |||
<slot>accept()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>248</x> | |||
<y>254</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>157</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>rejected()</signal> | |||
<receiver>StudioNameW</receiver> | |||
<slot>reject()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>316</x> | |||
<y>260</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>286</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
</connections> | |||
</ui> |
@@ -14,52 +14,10 @@ | |||
<string>Logs</string> | |||
</property> | |||
<layout class="QGridLayout" name="gridLayout"> | |||
<item row="2" column="1"> | |||
<spacer name="horizontalSpacer"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>40</width> | |||
<height>20</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item row="1" column="0" colspan="4"> | |||
<widget class="Line" name="line"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="2" column="2"> | |||
<widget class="QPushButton" name="b_purge"> | |||
<property name="text"> | |||
<string>Purge all logs</string> | |||
</property> | |||
<property name="icon"> | |||
<iconset resource="../resources.qrc"> | |||
<normaloff>:/16x16/edit-delete.png</normaloff>:/16x16/edit-delete.png</iconset> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="2" column="3"> | |||
<widget class="QPushButton" name="b_close"> | |||
<property name="text"> | |||
<string>Close</string> | |||
</property> | |||
<property name="icon"> | |||
<iconset resource="../resources.qrc"> | |||
<normaloff>:/16x16/window-close.png</normaloff>:/16x16/window-close.png</iconset> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="0" column="0" colspan="4"> | |||
<widget class="QTabWidget" name="tabWidget"> | |||
<property name="currentIndex"> | |||
<number>1</number> | |||
<number>0</number> | |||
</property> | |||
<widget class="QWidget" name="tab_jack"> | |||
<attribute name="title"> | |||
@@ -113,12 +71,106 @@ | |||
</item> | |||
</layout> | |||
</widget> | |||
<widget class="QWidget" name="tab_lash"> | |||
<attribute name="title"> | |||
<string>LASH</string> | |||
</attribute> | |||
<layout class="QVBoxLayout" name="verticalLayout_5"> | |||
<item> | |||
<widget class="QPlainTextEdit" name="pte_lash"> | |||
<property name="verticalScrollBarPolicy"> | |||
<enum>Qt::ScrollBarAlwaysOn</enum> | |||
</property> | |||
<property name="horizontalScrollBarPolicy"> | |||
<enum>Qt::ScrollBarAlwaysOn</enum> | |||
</property> | |||
<property name="lineWrapMode"> | |||
<enum>QPlainTextEdit::NoWrap</enum> | |||
</property> | |||
<property name="plainText"> | |||
<string>Loading...</string> | |||
</property> | |||
<property name="textInteractionFlags"> | |||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
<widget class="QWidget" name="tab_ladish"> | |||
<attribute name="title"> | |||
<string>LADISH</string> | |||
</attribute> | |||
<layout class="QVBoxLayout" name="verticalLayout_2"> | |||
<item> | |||
<widget class="QPlainTextEdit" name="pte_ladish"> | |||
<property name="verticalScrollBarPolicy"> | |||
<enum>Qt::ScrollBarAlwaysOn</enum> | |||
</property> | |||
<property name="horizontalScrollBarPolicy"> | |||
<enum>Qt::ScrollBarAlwaysOn</enum> | |||
</property> | |||
<property name="lineWrapMode"> | |||
<enum>QPlainTextEdit::NoWrap</enum> | |||
</property> | |||
<property name="plainText"> | |||
<string>Loading...</string> | |||
</property> | |||
<property name="textInteractionFlags"> | |||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
</widget> | |||
</item> | |||
<item row="1" column="0" colspan="4"> | |||
<widget class="Line" name="line"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="2" column="2"> | |||
<widget class="QPushButton" name="b_purge"> | |||
<property name="text"> | |||
<string>Purge all logs</string> | |||
</property> | |||
<property name="icon"> | |||
<iconset resource="../../resources/resources.qrc"> | |||
<normaloff>:/16x16/edit-delete.png</normaloff>:/16x16/edit-delete.png</iconset> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="2" column="3"> | |||
<widget class="QPushButton" name="b_close"> | |||
<property name="text"> | |||
<string>Close</string> | |||
</property> | |||
<property name="icon"> | |||
<iconset resource="../../resources/resources.qrc"> | |||
<normaloff>:/16x16/window-close.png</normaloff>:/16x16/window-close.png</iconset> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="2" column="1"> | |||
<spacer name="horizontalSpacer"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>40</width> | |||
<height>20</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
</layout> | |||
</widget> | |||
<resources> | |||
<include location="../resources.qrc"/> | |||
<include location="../../resources/resources.qrc"/> | |||
</resources> | |||
<connections> | |||
<connection> | |||
@@ -630,6 +630,61 @@ class ForceWaitDialog(QDialog, ui_cadence_rwait.Ui_Dialog): | |||
QDialog.done(self, r) | |||
self.close() | |||
# Additional JACK options | |||
class ToolBarJackDialog(QDialog, ui_cadence_tb_jack.Ui_Dialog): | |||
def __init__(self, parent): | |||
QDialog.__init__(self, parent) | |||
self.setupUi(self) | |||
self.m_ladishLoaded = False | |||
if haveDBus: | |||
if GlobalSettings.value("JACK/AutoLoadLadishStudio", False, type=bool): | |||
self.rb_ladish.setChecked(True) | |||
self.m_ladishLoaded = True | |||
elif "org.ladish" in gDBus.bus.list_names(): | |||
self.m_ladishLoaded = True | |||
else: | |||
self.rb_ladish.setEnabled(False) | |||
self.rb_jack.setChecked(True) | |||
if self.m_ladishLoaded: | |||
self.fillStudioNames() | |||
self.accepted.connect(self.slot_setOptions) | |||
self.rb_ladish.clicked.connect(self.slot_maybeFillStudioNames) | |||
def fillStudioNames(self): | |||
gDBus.ladish_control = gDBus.bus.get_object("org.ladish", "/org/ladish/Control") | |||
ladishStudioName = dbus.String(GlobalSettings.value("JACK/LadishStudioName", "", type=str)) | |||
ladishStudioListDump = gDBus.ladish_control.GetStudioList() | |||
if len(ladishStudioListDump) == 0: | |||
self.rb_ladish.setEnabled(False) | |||
self.rb_jack.setChecked(True) | |||
else: | |||
i=0 | |||
for thisStudioName, thisStudioDict in ladishStudioListDump: | |||
self.cb_studio_name.addItem(thisStudioName) | |||
if ladishStudioName and thisStudioName == ladishStudioName: | |||
self.cb_studio_name.setCurrentIndex(i) | |||
i += 1 | |||
@pyqtSlot() | |||
def slot_maybeFillStudioNames(self): | |||
if not self.m_ladishLoaded: | |||
self.fillStudioNames() | |||
self.m_ladishLoaded = True | |||
@pyqtSlot() | |||
def slot_setOptions(self): | |||
GlobalSettings.setValue("JACK/AutoLoadLadishStudio", self.rb_ladish.isChecked()) | |||
GlobalSettings.setValue("JACK/LadishStudioName", self.cb_studio_name.currentText()) | |||
def done(self, r): | |||
QDialog.done(self, r) | |||
self.close() | |||
# Additional ALSA Audio options | |||
class ToolBarAlsaAudioDialog(QDialog, ui_cadence_tb_alsa.Ui_Dialog): | |||
@@ -799,6 +854,10 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW): | |||
# ------------------------------------------------------------- | |||
# Set-up GUI (System Checks) | |||
#self.label_check_helper1.setVisible(False) | |||
#self.label_check_helper2.setVisible(False) | |||
#self.label_check_helper3.setVisible(False) | |||
index = 2 | |||
checksLayout = self.groupBox_checks.layout() | |||
@@ -844,6 +903,7 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW): | |||
if sys.argv[0].endswith("/cadence"): | |||
self.groupBox_bridges.setEnabled(False) | |||
self.cb_jack_autostart.setEnabled(False) | |||
self.tb_jack_options.setEnabled(False) | |||
# ------------------------------------------------------------- | |||
# Set-up GUI (Tweaks) | |||
@@ -1054,6 +1114,7 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW): | |||
self.systray.addMenu("tools", self.tr("Tools")) | |||
self.systray.addMenuAction("tools", "app_catarina", "Catarina") | |||
self.systray.addMenuAction("tools", "app_catia", "Catia") | |||
self.systray.addMenuAction("tools", "app_claudia", "Claudia") | |||
self.systray.addMenuSeparator("tools", "tools_sep") | |||
self.systray.addMenuAction("tools", "app_logs", self.tr("Logs")) | |||
self.systray.addMenuAction("tools", "app_meter_in", self.tr("Meter (Inputs)")) | |||
@@ -1064,6 +1125,7 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW): | |||
self.systray.connect("app_catarina", self.func_start_catarina) | |||
self.systray.connect("app_catia", self.func_start_catia) | |||
self.systray.connect("app_claudia", self.func_start_claudia) | |||
self.systray.connect("app_logs", self.func_start_logs) | |||
self.systray.connect("app_meter_in", self.func_start_jackmeter_in) | |||
self.systray.connect("app_meter_out", self.func_start_jackmeter) | |||
@@ -1081,6 +1143,7 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW): | |||
self.b_jack_restart.clicked.connect(self.slot_JackServerForceRestart) | |||
self.b_jack_configure.clicked.connect(self.slot_JackServerConfigure) | |||
self.b_jack_switchmaster.clicked.connect(self.slot_JackServerSwitchMaster) | |||
self.tb_jack_options.clicked.connect(self.slot_JackOptions) | |||
self.b_alsa_start.clicked.connect(self.slot_AlsaBridgeStart) | |||
self.b_alsa_stop.clicked.connect(self.slot_AlsaBridgeStop) | |||
@@ -1094,6 +1157,7 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW): | |||
self.b_pulse_channels.clicked.connect(self.slot_PulseAudioBridgeChannels) | |||
self.pic_catia.clicked.connect(self.func_start_catia) | |||
self.pic_claudia.clicked.connect(self.func_start_claudia) | |||
self.pic_meter_in.clicked.connect(self.func_start_jackmeter_in) | |||
self.pic_meter_out.clicked.connect(self.func_start_jackmeter) | |||
self.pic_logs.clicked.connect(self.func_start_logs) | |||
@@ -1513,6 +1577,10 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW): | |||
def func_start_catia(self): | |||
self.func_start_tool("catia") | |||
@pyqtSlot() | |||
def func_start_claudia(self): | |||
self.func_start_tool("claudia") | |||
@pyqtSlot() | |||
def func_start_logs(self): | |||
self.func_start_tool("cadence-logs") | |||
@@ -1688,6 +1756,10 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW): | |||
self.jackStarted() | |||
@pyqtSlot() | |||
def slot_JackOptions(self): | |||
ToolBarJackDialog(self).exec_() | |||
@pyqtSlot() | |||
def slot_JackClearXruns(self): | |||
if gDBus.jack: | |||
@@ -2,9 +2,11 @@ | |||
# -*- coding: utf-8 -*- | |||
# Imports (Global) | |||
import dbus | |||
import sys | |||
from PyQt5.QtCore import QCoreApplication | |||
import dbus, sys | |||
if True: | |||
from PyQt5.QtCore import QCoreApplication | |||
else: | |||
from PyQt4.QtCore import QCoreApplication | |||
# Imports (Custom Stuff) | |||
from shared_cadence import * | |||
@@ -73,7 +75,48 @@ def startSession(systemStarted, secondSystemStartAttempt): | |||
except: | |||
DBus.a2j = None | |||
startJack() | |||
if GlobalSettings.value("JACK/AutoLoadLadishStudio", False, type=bool): | |||
try: | |||
ladish_control = DBus.bus.get_object("org.ladish", "/org/ladish/Control") | |||
except: | |||
startJack() | |||
return False | |||
try: | |||
ladish_conf = DBus.bus.get_object("org.ladish.conf", "/org/ladish/conf") | |||
except: | |||
ladish_conf = None | |||
ladishStudioName = dbus.String(GlobalSettings.value("JACK/LadishStudioName", "", type=str)) | |||
ladishStudioListDump = ladish_control.GetStudioList() | |||
for thisStudioName, thisStudioDict in ladishStudioListDump: | |||
if ladishStudioName == thisStudioName: | |||
try: | |||
if ladish_conf and ladish_conf.get('/org/ladish/daemon/notify')[0] == "true": | |||
ladish_conf.set('/org/ladish/daemon/notify', "false") | |||
ladishNotifyHack = True | |||
else: | |||
ladishNotifyHack = False | |||
except: | |||
ladishNotifyHack = False | |||
ladish_control.LoadStudio(thisStudioName) | |||
ladish_studio = DBus.bus.get_object("org.ladish", "/org/ladish/Studio") | |||
if not bool(ladish_studio.IsStarted()): | |||
ladish_studio.Start() | |||
if ladishNotifyHack: | |||
ladish_conf.set('/org/ladish/daemon/notify', "true") | |||
break | |||
else: | |||
startJack() | |||
else: | |||
startJack() | |||
if not bool(DBus.jack.IsStarted()): | |||
print("JACK Failed to Start") | |||
@@ -0,0 +1,627 @@ | |||
#!/usr/bin/env python3 | |||
# -*- coding: utf-8 -*- | |||
# Package database | |||
generic_audio_icon = "audio-x-generic" | |||
generic_midi_icon = "audio-midi" | |||
LEVEL_0 = "Lv. 0" | |||
LEVEL_1 = "Lv. 1" | |||
LEVEL_LASH = "LASH" | |||
LEVEL_JS = "JACK-Session" | |||
LEVEL_NSM = "NSM" | |||
TEMPLATE_YES = "Yes" | |||
TEMPLATE_NO = "No" | |||
USING_KXSTUDIO = False | |||
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |||
# DAW | |||
# (L, D, L, V, VST-Mode, T, M, MIDI-Mode) -> (LADSPA, DSSI, LV2, VST, VST-Mode, Transport, MIDI, MIDI-Mode) | |||
list_DAW = [ | |||
# Package AppName Type Binary Icon Template? Level (L, D, L, V, VST-Mode, T, M, MIDI-Mode) (doc-file, website) | |||
[ "ardour", "Ardour 6", "DAW", "ardour", "/usr/share/pixmaps/ardour.svg", TEMPLATE_NO, LEVEL_NSM, (1, 0, 1, 0, "Native", 1, 1, "JACK"), ("", "http://www.ardour.org/") ], | |||
[ "ariamaestosa", "Aria Maestosa", "MIDI Sequencer", "Aria", "/usr/share/Aria/aria64.png", TEMPLATE_NO, LEVEL_0, (0, 0, 0, 0, "", 0, 1, "ALSA | JACK"), ("", "http://ariamaestosa.sf.net/") ], | |||
[ "giada", "Giada", "Audio Looper", "giada", "giada", TEMPLATE_NO, LEVEL_0, (0, 0, 0, 0, "", 0, 0, ""), ("", "http://www.monocasual.com/giada/") ], | |||
[ "hydrogen", "Hydrogen", "Drum Sequencer", "hydrogen -d jack", "/usr/share/icons/hicolor/scalable/apps/org.hydrogenmusic.Hydrogen.svg", TEMPLATE_YES, LEVEL_NSM, (1, 0, 0, 0, "", 1, 1, "ALSA | JACK"), ("file:///usr/share/hydrogen/data/doc/manual_en.html", "http://www.hydrogen-music.org/") ], | |||
[ "jacker", "Jacker", "MIDI Tracker", "jacker", "jacker", TEMPLATE_YES, LEVEL_0, (0, 0, 0, 0, "", 1, 1, "JACK"), ("", "https://bitbucket.org/paniq/jacker/wiki/Home") ], | |||
[ "klystrack", "Klystrack", "Chiptune Tracker", "klystrack", "klystrack", TEMPLATE_NO, LEVEL_0, (0, 0, 0, 0, "", 0, 0, "----"), ("", "http://kometbomb.github.io/klystrack/") ], | |||
[ "lmms", "LMMS", "DAW", "lmms", "lmms", TEMPLATE_YES, LEVEL_0, (1, 0, 0, 1, "Windows", 0, 1, "ALSA"), ("", "http://lmms.sf.net/") ], | |||
[ "milkytracker", "MilkyTracker", "Tracker", "milkytracker", "milkytracker", TEMPLATE_NO, LEVEL_0, (0, 0, 0, 0, "", 0, 1, "ALSA"), ("", "https://milkytracker.org/") ], | |||
[ "muse", "MusE", "DAW", "muse", "muse_icon", TEMPLATE_YES, LEVEL_0, (1, 1, 0, 1, "Native", 1, 1, "ALSA + JACK"), ("", "http://www.muse-sequencer.org/") ], | |||
[ "musescore3", "MuseScore 3", "MIDI Composer", "mscore3", "mscore3", TEMPLATE_NO, LEVEL_0, (0, 0, 0, 0, "", 1, 1, "ALSA | JACK"), ("", "http://www.musescore.org/") ], | |||
[ "non-sequencer", "Non-Sequencer", "MIDI Sequencer", "non-sequencer", "non-sequencer", TEMPLATE_YES, LEVEL_NSM, (0, 0, 0, 0, "", 1, 1, "JACK"), ("file:///usr/share/doc/non-sequencer/MANUAL.html", "http://non.tuxfamily.org/wiki/Non%20Sequencer") ], | |||
[ "non-timeline", "Non-Timeline", "DAW", "non-timeline", "non-timeline", TEMPLATE_YES, LEVEL_NSM, (0, 0, 0, 0, "", 1, 0, "CV + OSC"), ("file:///usr/share/doc/non-timeline/MANUAL.html", "http://non.tuxfamily.org/wiki/Non%20Timeline") ], | |||
[ "protrekkr", "ProTrekkr", "Tracker", "protrekkr", "protrekkr", TEMPLATE_NO, LEVEL_0, (0, 0, 0, 1, "", 0, 1, "ALSA"), ("", "https://code.google.com/p/protrekkr/") ], | |||
[ "qtractor", "Qtractor", "DAW", "qtractor", "qtractor", TEMPLATE_YES, LEVEL_1, (1, 1, 1, 1, "Native", 1, 1, "ALSA"), ("", "http://qtractor.sf.net/") ], | |||
[ "rosegarden", "Rosegarden", "MIDI Sequencer", "rosegarden", "rosegarden", TEMPLATE_YES, LEVEL_1, (1, 1, 0, 0, "", 1, 1, "ALSA"), ("", "http://www.rosegardenmusic.com/") ], | |||
[ "schism", "Schism", "Impulse Tracker clone", "schismtracker", "schism-icon-128", TEMPLATE_YES, LEVEL_0, (0, 0, 0, 0, "", 0, 1, "ALSA"), ("", "http://schismtracker.org/") ], | |||
[ "seq24", "Seq24", "MIDI Sequencer", "seq24", "seq24", TEMPLATE_YES, LEVEL_1, (0, 0, 0, 0, "", 1, 1, "ALSA"), ("", "http://www.filter24.org/seq24/") ], | |||
[ "sooperlooper", "SooperLooper", "Audio Looper", "slgui", "sooperlooper", TEMPLATE_NO, LEVEL_0, (0, 0, 0, 0, "", 0, 1, "JACK"), ("", "http://essej.net/sooperlooper/download.html") ], | |||
[ "tutka", "Tutka", "MIDI Tracker", "tutka", "tutka", TEMPLATE_NO, LEVEL_0, (0, 0, 0, 0, "", 0, 1, "JACK"), ("", "http://www.nongnu.org/tutka/") ], | |||
] | |||
iDAW_Package, iDAW_AppName, iDAW_Type, iDAW_Binary, iDAW_Icon, iDAW_Template, iDAW_Level, iDAW_Features, iDAW_Docs = range(0, len(list_DAW[0])) | |||
if USING_KXSTUDIO: | |||
# Jacker | |||
list_DAW[4][iDAW_Level] = LEVEL_1 | |||
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |||
# Host | |||
# (I, L, D, L, V, VST-Mode, MIDI-Mode) -> (Internal, LADSPA, DSSI, LV2, VST, VST-Mode, MIDI-Mode) | |||
list_Host = [ | |||
# Package AppName Ins? FX? Binary Icon Template? Level (I, L, D, L, V, VST-Mode, MIDI-Mode) (doc-file, website) | |||
[ "ams", "AlsaModularSynth", "Yes", "Yes", "ams", "ams_32", TEMPLATE_NO, LEVEL_0, (1, 1, 0, 0, 0, "", "ALSA"), ("", "http://alsamodular.sourceforge.net/") ], | |||
[ "calf-plugins", "Calf Jack Host", "Yes", "Yes", "calfjackhost", "calf", TEMPLATE_YES, LEVEL_1, (1, 0, 0, 0, 0, "", "JACK"), ("file:///usr/share/doc/calf/index.html", "http://calf.sf.net/") ], | |||
[ "calf-plugins-git", "Calf Jack Host (GIT)", "Yes", "Yes", "calfjackhost", "calf", TEMPLATE_YES, LEVEL_1, (1, 0, 0, 0, 0, "", "JACK"), ("file:///usr/share/doc/calf/index.html", "http://calf.sf.net/") ], | |||
[ "carla", "Carla", "Yes", "Yes", "carla", "carla", TEMPLATE_YES, LEVEL_1, (1, 1, 1, 1, 1, "Both", "ALSA | JACK"), ("", "http://kxstudio.sf.net/Applications:Carla") ], | |||
[ "carla-git", "Carla (GIT)", "Yes", "Yes", "carla", "carla", TEMPLATE_YES, LEVEL_NSM, (1, 1, 1, 1, 1, "Both", "ALSA | JACK"), ("", "http://kxstudio.sf.net/Applications:Carla") ], | |||
[ "festige", "FeSTige", "Yes", "Yes", "festige", "festige", TEMPLATE_NO, LEVEL_1, (0, 0, 0, 0, 1, "Windows", "ALSA | JACK"), ("", "http://festige.sf.net/") ], | |||
[ "ingen", "Ingen", "Yes", "Yes", "ingen -eg", "ingen", TEMPLATE_NO, LEVEL_0, (1, 0, 0, 1, 0, "", "JACK"), ("", "http://drobilla.net/blog/software/ingen/") ], | |||
[ "jack-rack", "Jack Rack", "No", "Yes", "jack-rack", "/usr/share/pixmaps/jack-rack-icon.png", TEMPLATE_YES, LEVEL_0, (0, 1, 0, 0, 0, "", "ALSA"), ("", "http://jack-rack.sf.net/") ], | |||
[ "jalv.select", "Jalv.select", "No", "No", "jalv.select", "/usr/share/pixmaps/lv2.png", TEMPLATE_YES, LEVEL_0, (0, 0, 0, 1, 0, "", "---"), ("", "https://github.com/brummer10/jalv_select") ], | |||
[ "mod-app", "MOD App", "Yes", "Yes", "mod-app", "mod", TEMPLATE_NO, LEVEL_0, (0, 0, 0, 1, 0, "", "JACK"), ("", "http://moddevices.com/") ], | |||
[ "spiralsynthmodular", "SpiralSynthModular", "Yes", "Yes", "spiralsynthmodular", generic_audio_icon, TEMPLATE_NO, LEVEL_0, (1, 0, 0, 0, 0, "", "ALSA"), ("", "http://jack-rack.sf.net/") ], | |||
] | |||
iHost_Package, iHost_AppName, iHost_Ins, iHost_FX, iHost_Binary, iHost_Icon, iHost_Template, iHost_Level, iHost_Features, iDAW_Docs = range(0, len(list_Host[0])) | |||
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |||
# Instrument | |||
# (F, I, MIDI-Mode) -> (Built-in FX, Audio Input, MIDI-Mode) | |||
list_Instrument = [ | |||
# Package AppName Type Binary Icon Template? Level (F, I, MIDI-Mode) (doc-file, website) | |||
[ "6pm", "6 PM", "Synth", "6pm", "6PM-icon", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://sourceforge.net/projects/mv-6pm/") ], | |||
[ "add64", "Add64", "Synth", "Add64", "add64", TEMPLATE_NO, LEVEL_0, (1, 0, "JACK"), ("", "https://sourceforge.net/projects/add64/") ], | |||
[ "aeolus", "Aeolus", "Synth", "aeolus -J", "audio-x-generic", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "http://www.kokkinizita.net/linuxaudio/aeolus/index.html") ], | |||
[ "amsynth", "AmSynth", "Synth", "amsynth", "amsynth", TEMPLATE_NO, LEVEL_0, (0, 0, "ALSA | JACK"), ("", "http://amsynth.github.io/") ], | |||
[ "azr3-jack", "AZR3", "Synth", "azr3", "/usr/share/pixmaps/azr3-jack.xpm", TEMPLATE_NO, LEVEL_0, (1, 0, "JACK"), ("", "http://ll-plugins.nongnu.org/azr3/") ], | |||
[ "borderlands", "Borderlands", "Sampler", "Borderlands", "borderlands", TEMPLATE_NO, LEVEL_0, (0, 1, "JACK"), ("", "https://ccrma.stanford.edu/~carlsonc/256a/Borderlands/") ], | |||
[ "coldgaze", "Coldgaze", "Synth", "microSynth", "coldgaze", TEMPLATE_NO, LEVEL_0, (0, 0, "ALSA"), ("", "https://sourceforge.net/projects/coldgaze/") ], | |||
[ "cursynth", "cursynth", "Synth", "x-terminal-emulator -e cursynth", generic_audio_icon, TEMPLATE_NO, LEVEL_0, (0, 0, "ALSA"), ("", "http://www.gnu.org/software/cursynth/") ], | |||
[ "distrho-lv2", "Dexed", "Yamaha DX7 Emulator", "Dexed", "dexed", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://distrho.sourceforge.io/ports.php") ], | |||
[ "din", "DIN", "Musical Instrument", "din", "din", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://dinisnoise.org/") ], | |||
[ "drumkv1", "Drumk-V1", "Drum Sampler", "drumkv1_jack", "drumkv1", TEMPLATE_NO, LEVEL_JS, (0, 0, "ALSA | JACK"), ("", "https://drumkv1.sourceforge.io/") ], | |||
[ "distrho-lv2", "DrumSynth", "Drum synth", "DrumSynth", "drumsynth", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://distrho.sourceforge.io/ports.php") ], | |||
[ "fabla", "Fabla", "Drum Sampler", "fabla", "fabla", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "http://openavproductions.com/fabla/") ], | |||
[ "fabla2", "Fabla 2", "Sampler", "fabla2", "fabla2", TEMPLATE_NO, LEVEL_0, (0, 1, "JACK"), ("", "http://openavproductions.com/fabla2/") ], | |||
[ "foo-yc20", "Foo YC20", "Organ Synth", "foo-yc20", "/usr/share/foo-yc20/graphics/icon.png", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://foo-yc20.codeforcode.com/") ], | |||
[ "grandorgue", "GrandOrgue", "Grand Organ Sampler", "GrandOrgue", "/usr/share/pixmaps/GrandOrgue.png", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://sourceforge.net/p/ourorgan/wiki/Home/") ], | |||
[ "helm", "Helm", "Synth", "helm", "helm_icon_128_1x", TEMPLATE_NO, LEVEL_0, (1, 1, "JACK"), ("", "https://tytel.org/helm/") ], | |||
[ "hexter", "Hexter", "Synth", "jack-dssi-host hexter.so", "hexter", TEMPLATE_NO, LEVEL_0, (0, 0, "ALSA"), ("", "http://smbolton.com/hexter.html") ], | |||
[ "horgand", "Horgand", "Synth", "horgand", "horgand128", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://sourceforge.net/projects/horgand.berlios/") ], | |||
[ "infamous-plugins", "Infamous Cellular Automaton Synth", "Synth", "infamous-casynth", "infamous-casynth", TEMPLATE_NO, LEVEL_0, (0, 1, "JACK"), ("", "http://ssj71.github.io/infamousPlugins/") ], | |||
[ "jsampler", "JSampler Fantasia", "Sampler", "jsampler-bin", "jsampler", TEMPLATE_NO, LEVEL_0, (0, 0, "ALSA + JACK"), ("file:///usr/share/kxstudio/docs/jsampler/jsampler.html", "http://www.linuxsampler.org/") ], | |||
[ "distrho-lv2", "Juce Demo Plugin", "Synth", "JuceDemoPlugin", "jucedemoplugin", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://distrho.sourceforge.io/ports.php") ], | |||
[ "dpf-plugins", "Kars", "Virtual Instrument", "Kars", "kars", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://distrho.sourceforge.io/plugins.php") ], | |||
[ "dpf-plugins", "Nekobi", "Roland TB-303 Emulator", "Nekobi", "nekobi", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://distrho.sourceforge.io/plugins.php") ], | |||
[ "distrho-lv2", "TAL Noize Mak3r", "Synth", "NoizeMak3r", "noizemak3r", TEMPLATE_NO, LEVEL_0, (1, 0, "JACK"), ("", "https://distrho.sourceforge.io/ports.php") ], | |||
[ "distrho-lv2", "Obxd", "Ob-x, ob-xa & ob8 Emulators", "Obxd", "obxd", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://distrho.sourceforge.io/ports.php") ], | |||
[ "padthv1", "Padth-V1", "Synth", "padthv1_jack", "padthv1", TEMPLATE_NO, LEVEL_NSM, (0, 0, "ALSA | JACK"), ("", "https://padthv1.sourceforge.io/") ], | |||
[ "petri-foo", "Petri-Foo", "Sampler", "petri-foo", "petri-foo", TEMPLATE_NO, LEVEL_NSM, (0, 0, "ALSA + JACK"), ("", "http://petri-foo.sf.net/") ], | |||
[ "phasex", "Phasex", "Synth", "phasex", "phasex", TEMPLATE_NO, LEVEL_0, (1, 1, "ALSA"), ("file:///usr/share/phasex/help/parameters.help", "") ], | |||
[ "polyphone", "Polyphone", "Sampler", "polyphone", "polyphone", TEMPLATE_NO, LEVEL_0, (1, 0, "JACK"), ("", "http://www.polyphone-soundfonts.com/") ], | |||
[ "qsampler", "Qsampler", "Sampler", "qsampler", "qsampler", TEMPLATE_YES, LEVEL_0, (0, 0, "ALSA + JACK"), ("", "http://qsampler.sf.net/") ], | |||
[ "qsynth", "Qsynth", "SoundFont Player", "qsynth -a jack -m jack", "qsynth", TEMPLATE_NO, LEVEL_0, (1, 0, "ALSA | JACK"), ("", "http://qsynth.sf.net/") ], | |||
[ "samplv1", "Sampl-V1", "Sampler", "samplv1_jack", "samplv1", TEMPLATE_NO, LEVEL_NSM, (0, 0, "ALSA | JACK"), ("", "https://samplv1.sourceforge.io/") ], | |||
[ "setbfree", "SetBfree", "Organ Emulator", "setBfreeUI", "setBfree", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "http://setbfree.org/") ], | |||
[ "sorcer", "Sorcer", "Polyphonic Synth", "sorcer", "sorcer", TEMPLATE_NO, LEVEL_NSM, (0, 0, "JACK"), ("", "http://openavproductions.com/sorcer/") ], | |||
[ "spectmorph", "Spectmorph", "Morph Synth", "smjack", "smjack", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "http://www.spectmorph.org/") ], | |||
[ "stegosaurus", "Stegosaurus", "Analog Drum Synth", "stegosaurus", "stegosaurus", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "http://www.thunderox.com/") ], | |||
[ "synthv1", "Synth-V1", "Synth", "synthv1_jack", "synthv1", TEMPLATE_NO, LEVEL_NSM, (0, 0, "ALSA | JACK"), ("", "https://synthv1.sourceforge.io/") ], | |||
[ "tapeutape", "Tapeutape", "Sampler", "tapeutape", "tapeutape", TEMPLATE_NO, LEVEL_0, (0, 1, "ALSA"), ("", "http://hitmuri.net/index.php/Software/Tapeutape") ], | |||
[ "triceratops-lv2", "Triceratops", "Polyphonic Synth", "triceratops", "triceratops", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "http://www.thunderox.com/triceratops.html") ], | |||
[ "vcvrack", "VCV Rack", "Modular Synth", "vcvrack", "vcvrack", TEMPLATE_NO, LEVEL_0, (0, 0, "---"), ("", "https://vcvrack.com/") ], | |||
[ "distrho-lv2", "Vex", "Synth", "Vex", "vex", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://distrho.sourceforge.io/ports.php") ], | |||
[ "whysynth", "Whysynth", "Synth", "whysynth", "whysynth", TEMPLATE_NO, LEVEL_0, (1, 0, "JACK"), ("", "http://smbolton.com/whysynth.html") ], | |||
[ "distrho-lv2", "Wolpertinger", "Synth", "Wolpertinger", "/usr/share/pixmaps/wolpertinger.xpm", TEMPLATE_NO, LEVEL_0, (0, 0, "JACK"), ("", "https://distrho.sourceforge.io/ports.php") ], | |||
[ "wsynth-dssi", "Wsynth", "WaveTable Synth", "jack-dssi-host wsynth-dssi.so", "wsynth-dssi", TEMPLATE_NO, LEVEL_0, (1, 0, "JACK"), ("", "http://www.linuxsynths.com/WsynthBanksDemos/wsynth.html") ], | |||
[ "xsynth-dssi", "Xsynth", "Analog Synth", "jack-dssi-host xsynth-dssi.so", "xsynth-dssi", TEMPLATE_NO, LEVEL_0, (1, 0, "JACK"), ("", "http://dssi.sourceforge.net/download.html#Xsynth-DSSI") ], | |||
[ "yoshimi", "Yoshimi", "Synth", "yoshimi -j -J", "/usr/share/pixmaps/yoshimi.png", TEMPLATE_NO, LEVEL_1, (1, 0, "ALSA | JACK"), ("", "http://yoshimi.sf.net/") ], | |||
[ "zynaddsubfx", "ZynAddSubFX", "Synth", "zynaddsubfx", "zynaddsubfx", TEMPLATE_NO, LEVEL_NSM, (1, 0, "ALSA | JACK"), ("", "http://zynaddsubfx.sf.net/") ], | |||
[ "zynaddsubfx-git", "ZynAddSubFX (GIT)", "Synth", "zynaddsubfx", "zynaddsubfx", TEMPLATE_NO, LEVEL_NSM, (1, 0, "ALSA | JACK"), ("", "http://zynaddsubfx.sf.net/") ], | |||
] | |||
iInstrument_Package, iInstrument_AppName, iInstrument_Type, iInstrument_Binary, iInstrument_Icon, iInstrument_Template, iInstrument_Level, iInstrument_Features, iInstrument_Docs = range(0, len(list_Instrument[0])) | |||
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |||
# Bristol | |||
# Need name: bit99, bit100 | |||
list_Bristol = [ | |||
# Package AppName Type Short-name Icon Template? Level (F, I, MIDI-Mode) (doc-file, website) | |||
[ "bristol", "Moog Voyager", "Synth", "explorer", "bristol_explorer", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/explorer.html") ], | |||
[ "bristol", "Moog Mini", "Synth", "mini", "bristol_mini", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/mini.html") ], | |||
[ "bristol", "Sequential Circuits Prophet-52", "Synth", "prophet52", "bristol_prophet52", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/prophet52.html") ], | |||
[ "bristol", "Moog/Realistic MG-1", "Synth", "realistic", "bristol_realistic", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/realistic.html") ], | |||
[ "bristol", "Memory Moog", "Synth", "memoryMoog", "bristol_memoryMoog", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/memorymoog.html") ], | |||
[ "bristol", "Baumann BME-700", "Synth", "BME700", "bristol_BME700", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/bme700.shtml") ], | |||
#[ "bristol", "Synthi Aks", "Synth", "aks", "bristol_aks", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/aks.html") ], | |||
[ "bristol", "Moog Voyager Blue Ice", "Synth", "voyager", "bristol_voyager", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/voyager.html") ], | |||
[ "bristol", "Moog Sonic-6", "Synth", "sonic6", "bristol_sonic6", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/sonic6.html") ], | |||
[ "bristol", "Hammond B3", "Synth", "hammondB3", "bristol_hammondB3", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/hammond.html") ], | |||
[ "bristol", "Sequential Circuits Prophet-5", "Synth", "prophet", "bristol_prophet", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/prophet5.html") ], | |||
[ "bristol", "Sequential Circuits Prophet-10", "Synth", "prophet10", "bristol_prophet10", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/prophet10.html") ], | |||
[ "bristol", "Sequential Circuits Pro-1", "Synth", "pro1", "bristol_pro1", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/pro1.html") ], | |||
[ "bristol", "Fender Rhodes Stage-73", "Synth", "rhodes", "bristol_rhodes", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/rhodes.html") ], | |||
[ "bristol", "Rhodes Bass Piano", "Synth", "rhodesbass", "bristol_rhodesbass", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/rhodes.html") ], | |||
[ "bristol", "Crumar Roadrunner", "Synth", "roadrunner", "bristol_roadrunner", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/roadrunner.html") ], | |||
[ "bristol", "Crumar Bit-1", "Synth", "bitone", "bristol_bitone", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/bitone.html") ], | |||
[ "bristol", "Crumar Stratus", "Synth", "stratus", "bristol_stratus", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/stratus.html") ], | |||
[ "bristol", "Crumar Trilogy", "Synth", "trilogy", "bristol_trilogy", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/trilogy.html") ], | |||
[ "bristol", "Oberheim OB-X", "Synth", "obx", "bristol_obx", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/obx.html") ], | |||
[ "bristol", "Oberheim OB-Xa", "Synth", "obxa", "bristol_obxa", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/obxa.html") ], | |||
[ "bristol", "ARP Axxe", "Synth", "axxe", "bristol_axxe", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/axxe.html") ], | |||
[ "bristol", "ARP Odyssey", "Synth", "odyssey", "bristol_odyssey", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/odyssey.html") ], | |||
[ "bristol", "ARP 2600", "Synth", "arp2600", "bristol_arp2600", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/arp2600.html") ], | |||
[ "bristol", "ARP Solina Strings", "Synth", "solina", "bristol_solina", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/solina.html") ], | |||
[ "bristol", "Korg Poly-800", "Synth", "poly800", "bristol_poly800", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/poly800.shtml") ], | |||
[ "bristol", "Korg Mono/Poly", "Synth", "monopoly", "bristol_monopoly", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/mono.html") ], | |||
[ "bristol", "Korg Polysix", "Synth", "poly", "bristol_poly", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/poly.html") ], | |||
[ "bristol", "Korg MS-20 (*)", "Synth", "ms20", "bristol_ms20", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/ms20.html") ], | |||
[ "bristol", "VOX Continental", "Synth", "vox", "bristol_vox", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/vox.html") ], | |||
[ "bristol", "VOX Continental 300", "Synth", "voxM2", "bristol_voxM2", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/vox300.html") ], | |||
[ "bristol", "Roland Juno-6", "Synth", "juno", "bristol_juno", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/juno.html") ], | |||
[ "bristol", "Roland Jupiter 8", "Synth", "jupiter8", "bristol_jupiter8", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/jupiter8.html") ], | |||
#[ "bristol", "Bristol BassMaker", "Synth", "bassmaker", "bristol_bassmaker", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "") ], | |||
[ "bristol", "Yamaha DX", "Synth", "dx", "bristol_dx", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/dx.html") ], | |||
#[ "bristol", "Yamaha CS-80", "Synth", "cs80", "bristol_cs80", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/cs80.html") ], | |||
[ "bristol", "Bristol SID Softsynth", "Synth", "sidney", "bristol_sidney", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/sidney.shtml") ], | |||
#[ "bristol", "Commodore-64 SID polysynth", "Synth", "melbourne", "bristol_sidney", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "") ], #FIXME - needs icon | |||
#[ "bristol", "Bristol Granular Synthesiser", "Synth", "granular", "bristol_granular", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "") ], | |||
#[ "bristol", "Bristol Realtime Mixer", "Synth", "mixer", "bristol_mixer", TEMPLATE_NO, LEVEL_1, (1, 1, "ALSA | JACK"), ("", "http://bristol.sf.net/mixer.html") ], | |||
] | |||
iBristol_Package, iBristol_AppName, iBristol_Type, iBristol_ShortName, iBristol_Icon, iBristol_Template, iBristol_Level, iBristol_Features, iBristol_Docs = range(0, len(list_Bristol[0])) | |||
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |||
# Effect | |||
# (S, MIDI-Mode) -> (Stereo, MIDI-Mode) | |||
list_Effect = [ | |||
# Package AppName Type Binary Icon Template? Level (S, MIDI-Mode) (doc, website) | |||
[ "ambdec", "AmbDec", "Ambisonic Decoder", "ambdec", "ambdec", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "guitarix", "Guitarix", "Guitar FX", "guitarix", "gx_head", TEMPLATE_NO, LEVEL_0, (0, "JACK"), ("", "http://guitarix.sf.net/") ], | |||
[ "fogpad-port", "FogPad", "Reverb", "fogpad", generic_audio_icon, TEMPLATE_NO, LEVEL_0, (0, "JACK"), ("", "https://github.com/linuxmao-org/fogpad-port") ], | |||
[ "freqtweak", "Freqtweak", "FFT-based realtime audio spectral manipulation", "freqtweak", "freqtweak_logo32x18", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "https://freqtweak.sourceforge.io/") ], | |||
[ "jamin", "Jamin", "Mastering", "jamin", "jamin", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "http://jamin.sf.net/") ], | |||
[ "lsp-plugins", "LSP comp-delay-mono", "Compressor", "lsp-plugins-comp-delay-mono", generic_audio_icon, TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "https://lsp-plug.in/") ], | |||
[ "lsp-plugins", "LSP comp-delay-stereo", "Compressor", "lsp-plugins-comp-delay-stereo", generic_audio_icon, TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "https://lsp-plug.in/") ], | |||
[ "lsp-plugins", "LSP comp-delay-x2-stereo", "Compressor", "lsp-plugins-comp-delay-x2-stereo", generic_audio_icon, TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "https://lsp-plug.in/") ], | |||
[ "lsp-plugins", "LSP phase-detector", "Phase Detector", "lsp-plugins-phase-detector", generic_audio_icon, TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "https://lsp-plug.in/") ], | |||
[ "dpf-plugins", "MVerb", "Reverb Effect", "MVerb", "mverb", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "https://distrho.sourceforge.io/ports.php") ], | |||
[ "paulstretch", "PaulStretch", "Extreme Stretch", "paulstretch", "paulstretch", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "http://hypermammut.sourceforge.net/paulstretch/") ], | |||
[ "radium-compressor", "Radium Compressor", "Compressor", "radium_compressor", "/usr/share/pixmaps/radium-compressor.xpm", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "http://users.notam02.no/~kjetism/radium/compressor_plugin.php") ], | |||
[ "rakarrack", "Rakarrack", "Guitar FX", "rakarrack", "icono_rakarrack_128x128", TEMPLATE_NO, LEVEL_0, (1, "ALSA + JACK"), ("file:///usr/share/doc/rakarrack/html/help.html", "http://rakarrack.sf.net") ], | |||
[ "tap-reverbed", "Reverbed", "Reverb", "reverbed", "reverbed", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "http://tap-plugins.sourceforge.net/reverbed.html") ], | |||
[ "snokoder", "SnoKoder", "Vocoder", "snokoder", "snokoder", TEMPLATE_NO, LEVEL_0, (0, "ALSA"), ("", "https://www.transformate.de/x/pawfaliki.php?page=DownLoads") ], | |||
[ "x42-plugins", "X42 - Darc", "Compressor", "x42-darc", "x42-darc", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "https://x42-plugins.com/x42/x42-compressor") ], | |||
[ "x42-plugins", "X42 - Fil4 mono", "4 Bands EQ", "x42-fil4", "x42-fil4", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "https://x42-plugins.com/x42/x42-eq") ], | |||
[ "x42-plugins", "X42 - Fil4 stéréo", "4 Bands EQ", "x42-fil4 1", "x42-fil4", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "https://x42-plugins.com/x42/x42-eq") ], | |||
[ "x42-plugins", "X42 - Fat1", "Auto-tuner", "x42-fat1", "x42-fat1", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "https://x42-plugins.com/x42/x42-autotune") ], | |||
[ "setbfree", "X42 - Whirl", "Leslie Emulator", "x42-whirl", "x42-whirl", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "https://x42-plugins.com/x42/x42-whirl") ], | |||
[ "zam-plugins", "ZamAutoSat", "Saturator", "ZamAutoSat", "zam", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamComp", "Mono Compressor", "ZamComp", "zam", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamCompX2", "Stereo Compressor", "ZamCompX2", "zam", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamDelay", "Delay", "ZamDelay", "zam", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamDynamicEQ", "Dynamic Mono EQ", "ZamDynamicEQ", "zam", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamEQ2", "2 Bands EQ", "ZamEQ2", "zam", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamGate", "Mono Gate", "ZamGate", "zam", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamGateX2", "Stereo Gate", "ZamGateX2", "zam", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamGEQ31", "31 Bands EQ", "ZamGEQ31", "zam", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamHeadX2", "Stereo Enhancer", "ZamHeadX2", "zam", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZaMaximX2", "Maximiser", "ZaMaximX2", "zam", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZaMultiComp", "Mo Multi-Compressor", "ZaMultiComp", "zam", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZaMultiCompX2", "St Multi-Compressor", "ZaMultiCompX2", "zam", TEMPLATE_NO, LEVEL_0, (1, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamPhono", "Phono Filters", "ZamPhono", "zam", TEMPLATE_NO, LEVEL_0, (0, "---"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamTube", "Tube Amp Emulator", "ZamTube", "zam", TEMPLATE_NO, LEVEL_0, (0, "JACK"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zam-plugins", "ZamVerb", "Reverb", "ZamVerb", "zam", TEMPLATE_NO, LEVEL_0, (1, "JACK"), ("", "http://www.zamaudio.com/?p=976") ], | |||
[ "zita-at1", "Zita-at1", "Auto-tuner", "zita-at1", "zita-at1", TEMPLATE_NO, LEVEL_0, (0, "JACK"), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "zita-rev1", "Zita-rev1", "Reverb", "zita-rev1", "zita-rev1", TEMPLATE_NO, LEVEL_0, (1, "JACK"), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "zita-rev1", "Zita-rev1", "Reverb - Ambisonic", "zita-rev1 -B", "zita-rev1", TEMPLATE_NO, LEVEL_0, (1, "JACK"), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
] | |||
iEffect_Package, iEffect_AppName, iEffect_Type, iEffect_Binary, iEffect_Icon, iEffect_Template, iEffect_Level, iEffect_Features, iEffect_Docs = range(0, len(list_Effect[0])) | |||
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |||
# Tool | |||
# (MIDI-M, T) -> (MIDI-Mode, Transport) | |||
list_Tool = [ | |||
# Package AppName Type Binary Icon Template? Level (MIDI-M, T) (doc, website) | |||
[ "aliki", "Aliki (ALSA)", "Impulse Response Measurements Tool", "aliki -a", "aliki_32x32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "aliki", "Aliki (JACK)", "Impulse Response Measurements Tool", "aliki -j", "aliki_32x32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "arpage", "Arpage", "MIDI Arpeggiator", "arpage", "arpage", TEMPLATE_NO, LEVEL_0, ("JACK", 1), ("", "") ], | |||
[ "arpage", "Zonage", "MIDI Mapper", "zonage", "zonage", TEMPLATE_NO, LEVEL_0, ("JACK", 0), ("", "") ], | |||
[ "audacity", "Audacity", "Audio Editor", "audacity", "audacity", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://www.audacityteam.org/") ], | |||
[ "bitmeter", "Bitmeter", "JACK Diagnotic Tool", "bitmeter", "bitmeter", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "") ], | |||
[ "cadence", "Cadence", "JACK Toolbox", "cadence", "cadence", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "") ], | |||
[ "cadence-tools", "Cadence XY-Controller", "XY Controller", "cadence-xycontroller", "cadence", TEMPLATE_NO, LEVEL_0, ("JACK", 0), ("", "") ], | |||
[ "catia", "Catia", "Patch Bay", "catia", "catia", TEMPLATE_NO, LEVEL_0, ("JACK", 1), ("", "") ], | |||
[ "carla-control", "Carla OSC Control", "OSC Control", "carla-control", "carla-control", TEMPLATE_NO, LEVEL_0, ("JACK", 1), ("", "") ], | |||
[ "denemo", "Denemo", "Music Notation Editor", "denemo", "denemo", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://denemo.org/") ], | |||
[ "digitalscratch", "Digital-Scratch", "DJ with time-coded vinyls", "digitalscratch", "digitalscratch-icon_2decks", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://www.digital-scratch.org/") ], | |||
[ "drumstick-tools", "Drumstick Virtual Piano", "Virtual Keyboard", "drumstick-vpiano", "drumstick", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "https://drumstick.sourceforge.io/") ], | |||
[ "easytag", "EasyTAG", "Audio File Metadata Management", "easytag", "easytag", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://wiki.gnome.org/Apps/EasyTAG") ], | |||
[ "etktab", "eTktab", "Music Notation Editor", "eTktab", "eTktab", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://etktab.sourceforge.net/") ], | |||
[ "ebumeter", "Ebumeter", "EBU-r128 Loudness Indicator", "ebumeter", "ebumeter32x32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/") ], | |||
[ "alsa-tools-gui", "Echomixer", "Echoaudio Mixer", "echomixer", "alsa-tools", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "") ], | |||
[ "elektroid", "Elektroid", "Soft for Elektron Devices", "elektroid", "elektroid", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://github.com/dagargo/elektroid/") ], | |||
[ "alsa-tools-gui", "Envy24Control", "Ice1712 Mixer", "envy24control", "alsa-tools", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://alsa.opensrc.org/Envy24control") ], | |||
[ "audio-recorder", "Audio-recorder", "Audio Recorder", "audio-recorder", "audio-recorder", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://launchpad.net/audio-recorder") ], | |||
[ "ffado-mixer-qt4", "FFADO-mixer", "FireWire Audio Interfaces Mixer", "ffado-mixer", "hi64-apps-ffado", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://ffado.org/") ], | |||
[ "fmit", "Music Instrument Tuner", "Instrument Tuner", "fmit", "fmit", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://gillesdegottex.github.io/fmit/") ], | |||
[ "frescobaldi", "Frescobaldi", "Music Notation Editor", "frescobaldi", "org.frescobaldi.Frescobaldi", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://www.frescobaldi.org/") ], | |||
[ "gdigi", "Gdigi", "Digitech Pedals Control", "gdigi", "gdigi", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://desowin.org/gdigi/") ], | |||
[ "gigedit", "Gigedit", "Instrument Editor", "gigedit", generic_audio_icon, TEMPLATE_NO, LEVEL_0, ("---", 0), ("file:///usr/share/doc/gigedit/gigedit_quickstart.html", "") ], | |||
[ "gjacktransport", "GJackClock", "Transport Tool", "gjackclock", "gjackclock", TEMPLATE_NO, LEVEL_0, ("---", 1), ("", "http://gjacktransport.sourceforge.net/") ], | |||
[ "gjacktransport", "GJackTransport", "Transport Tool", "gjacktransport", "gjacktransport", TEMPLATE_NO, LEVEL_0, ("---", 1), ("", "http://gjacktransport.sourceforge.net/") ], | |||
[ "gladish", "Gladish", "LADISH Studio Manager", "gladish", "gladish", TEMPLATE_NO, LEVEL_0, ("JACK | ALSA", 0), ("", "http://ladish.org/") ], | |||
[ "dpf-plugins", "glBars", "Audio Visualizer", "glBars", "glbars", TEMPLATE_NO, LEVEL_0, ("JACK", 0), ("", "https://distrho.sourceforge.io/plugins.php") ], | |||
[ "gmidimonitor", "Gmidimonitor (ALSA)", "MIDI-ALSA Monitor", "gmidimonitor --alsa", "gmidimonitor_32x32", TEMPLATE_NO, LEVEL_0, ("JACK | ALSA", 0), ("", "") ], | |||
[ "gmidimonitor", "Gmidimonitor (JACK)", "MIDI-JACK Monitor", "gmidimonitor --jack", "gmidimonitor_32x32", TEMPLATE_NO, LEVEL_0, ("JACK | ALSA", 0), ("", "") ], | |||
[ "gwc", "Gtk Wave Cleaner", "Audio File Cleaner", "gtk-wave-cleaner", "gtk-wave-cleaner", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://sourceforge.net/projects/gwc/") ], | |||
[ "gninjam", "Gtk NINJAM client", "Music Collaboration", "gninjam", "gninjam", TEMPLATE_NO, LEVEL_0, ("---", 1), ("", "") ], | |||
[ "gtklick", "Gtklick", "Metronome", "gtklick", "gtklick", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://das.nasophon.de/gtklick/") ], | |||
[ "gxtuner", "Gxtuner", "Instrument Tuner", "gxtuner", "gxtuner", TEMPLATE_NO, LEVEL_JS, ("---", 0), ("", "") ], | |||
[ "handbrake", "Handbrake", "DVD, Bluray, and other Medias Transcoder", "ghb", "hb-icon", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://handbrake.fr/") ], | |||
[ "alsa-tools-gui", "HdaJackRetask", "Intel HDA Control", "hdajackretask", "alsa-tools", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "") ], | |||
[ "alsa-tools-gui", "HDSPconf", "HDSP Control", "hdspconf", "alsa-tools", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "") ], | |||
[ "alsa-tools-gui", "HDSPmixer", "HDSP Mixer", "hdspmixer", "alsa-tools", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "") ], | |||
[ "jaaa", "Jaaa-ALSA", "Analyzes/Generates an Audio Signal", "jaaa -A", "jaaa", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "jaaa", "Jaaa-JACK", "Analyzes/Generates an Audio Signal", "jaaa -J", "jaaa", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "jack-capture", "Jack-Capture-GUI", "JACK-Audio Capture GUI", "jack_capture_gui", "jack_capture_gui", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://github.com/kmatheussen/jack_capture") ], | |||
[ "jackeq", "JackEQ", "DJ Console GUI", "jackeq", "/usr/share/pixmaps/logo-jackeq-s.png", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://djcj.org/jackeq/") ], | |||
[ "jack-keyboard", "Jack Keyboard", "Virtual Keyboard", "jack-keyboard", "jack-keyboard", TEMPLATE_NO, LEVEL_0, ("JACK", 0), ("file:///usr/share/kxstudio/docs/jack-keyboard/manual.html", "http://jack-keyboard.sf.net/") ], | |||
[ "jack-mixer", "Jack Mixer", "Mixer", "jack_mixer", "jack_mixer", TEMPLATE_NO, LEVEL_NSM, ("JACK", 0), ("", "http://home.gna.org/jackmixer/") ], | |||
[ "jamulus", "Jamulus", "Music Collaboration", "jamulus", "jamulus", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://llcon.sourceforge.net/") ], | |||
[ "japa", "Japa-ALSA", "Audio Signal Analysis", "japa -A", "japa", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "japa", "Japa-JACK", "Audio Signal Analysis", "japa -J", "japa", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "jkmeter", "Jkmeter", "Audio Level Measurement", "jkmeter", "jkmeter32x32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "jmeters", "Jmeters", "Multi Canal Audio Level Measurement", "jmeters", "jmeters_32x32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
# [ "jnoise", "Jnoise", "White & Pink Noise Generation", "jnoise", generic_audio_icon, TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "jnoisemeter", "Jnoisemeter", "Test Audio Signal Meter", "jnoisemeter", "jnoisemeter_32x32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://librazik.tuxfamily.org/doc2/logiciels/jnoisemeter") ], | |||
[ "kmetronome", "KMetronome", "Metronome", "kmetronome", "kmetronome", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "http://kmetronome.sf.net/kmetronome.shtml") ], | |||
[ "kmidimon", "KMidimon", "Monitor", "kmidimon", "kmidimon", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "http://kmidimon.sf.net/") ], | |||
[ "laditools", "LADI Log", "Log Viewer", "ladi-system-log", "ladi-system-log", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "") ], | |||
[ "laditools", "LADI Tray", "Session Handler", "ladi-system-tray", "laditools", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "") ], | |||
[ "lenmus-all", "Lenmus", "Music Theory Studying", "lenmus", "lenmus", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://www.lenmus.org/en/noticias") ], | |||
[ "lingot", "Lingot", "Instrument Tuner", "lingot", "org.nongnu.lingot", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://www.nongnu.org/lingot/") ], | |||
[ "linux-show-player", "Linux Show Player", "Sample player", "linux-show-player", "linuxshowplayer", TEMPLATE_NO, LEVEL_0, ("JACK", 0), ("", "https://www.linux-show-player.org/") ], | |||
[ "lives", "LiVES", "VJ / Video Editor", "lives", "lives", TEMPLATE_NO, LEVEL_0, ("---", 1), ("", "http://lives.sf.net/") ], | |||
[ "luppp", "Luppp", "Audio Looper", "luppp", "luppp", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://openavproductions.com/luppp/") ], | |||
[ "mamba", "Mamba", "Virtual Keyboard", "mamba", "Mamba", TEMPLATE_NO, LEVEL_NSM, ("ALSA", 0), ("", "https://github.com/brummer10/Mamba") ], | |||
[ "mcpdisp", "MCP Disp", "Mackie Display Emulator", "mcpdisp", "mcpdisp", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://github.com/ovenwerks/mcpdisp") ], | |||
[ "meterbridge", "MeterBridge Classic VU", "VU / Peak Analyzer", "meterbridge -t vu :", "meterbridge32x32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://plugin.org.uk/meterbridge/") ], | |||
[ "meterbridge", "MeterBridge PPM Meter", "VU / Peak Analyzer", "meterbridge -t ppm :", "meterbridge32x32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://plugin.org.uk/meterbridge/") ], | |||
[ "meterbridge", "MeterBridge Digital Peak Meter", "VU / Peak Analyzer", "meterbridge -t dpm -c 2 : :", "meterbridge32x32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://plugin.org.uk/meterbridge/") ], | |||
[ "meterbridge", "MeterBridge 'Jellyfish' Phase Meter", "VU / Peak Analyzer", "meterbridge -t jf -c 2 : :", "meterbridge32x32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://plugin.org.uk/meterbridge/") ], | |||
[ "meterbridge", "MeterBridge Oscilloscope Meter", "VU / Peak Analyzer", "meterbridge -t sco :", "meterbridge32x32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://plugin.org.uk/meterbridge/") ], | |||
[ "mhwaveedit", "MhWaveEdit", "Audio Editor", "mhwaveedit", "mhwaveedit", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://gna.org/projects/mhwaveedit/") ], | |||
[ "mixxx", "Mixxx", "DJ", "mixxx", "mixxx_icon", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "http://mixxx.sf.net/") ], | |||
[ "mpk-m2-editor", "MPK M2 Editor", "Editor for MPK M2", "mpk_m2-editor", "mpk-m2-editor", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://github.com/PiOverFour/MPK-M2-editor") ], | |||
[ "mudita24", "Mudita24", "Ice1712 Mixer", "mudita24", "mudita24", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://github.com/NielsMayer/mudita24") ], | |||
[ "nano-basket", "Nano-Basket", "Nano Hardware Management", "nano-basket", "nano-basket", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://github.com/royvegard/Nano-Basket") ], | |||
[ "non-mixer", "Non-Mixer", "Mixer", "non-mixer", "non-mixer", TEMPLATE_NO, LEVEL_0, ("CV", 0), ("file:///usr/share/doc/non-mixer/MANUAL.html", "http://non.tuxfamily.org/wiki/Non%20Mixer") ], | |||
[ "nootka", "Nootka", "Learn music notation on sheet music", "nootka", "nootka", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://nootka.sourceforge.io/") ], | |||
[ "patchage", "Patchage", "Patch Bay", "patchage", "patchage", TEMPLATE_NO, LEVEL_0, ("ALSA + JACK", 0), ("", "http://drobilla.net/blog/software/patchage/") ], | |||
[ "pd-l2ork", "Pd-L2Ork", "Pure-Data Environnement", "pd-l2ork -rt -audiobuf 20 -inchannels 2 -outchannels 2 -alsamidi -mididev 0 %U", "pd-l2ork", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "http://l2ork.music.vt.edu/main/make-your-own-l2ork/software/") ], | |||
[ "pianobooster", "Piano Booster", "Piano Teacher", "pianobooster", "pianobooster", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "http://pianobooster.sourceforge.net/") ], | |||
[ "playitslowly", "Play it Slowly", "Strech-Player", "playitslowly", "ch.x29a.playitslowly", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://29a.ch/playitslowly/") ], | |||
[ "dpf-plugins", "ProM", "Music Visualizer", "ProM", "prom", TEMPLATE_NO, LEVEL_0, ("JACK", 0), ("", "https://distrho.sourceforge.io/plugins.php") ], | |||
[ "qamix", "QAMix", "Mixer", "qamix", "qamix", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "") ], | |||
[ "qarecord", "QARecord", "Recorder", "qarecord --jack", "qarecord_48", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "") ], | |||
[ "qjackctl", "QJackControl", "JACK Control", "qjackctl", "qjackctl", TEMPLATE_NO, LEVEL_0, ("ALSA + JACK", 1), ("", "https://qjackctl.sourceforge.io/") ], | |||
[ "qlcplus", "QLCplus", "Light-Show Controller", "qlcplus", "qlcplus", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "https://www.qlcplus.org/") ], | |||
[ "qlcplus", "Fixture editor for QLC+", "Fixture editor for QLC+", "qlcplus-fixtureeditor", "qlcplus-fixtureeditor", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://www.qlcplus.org/") ], | |||
[ "qloud", "Qloud", "Audio measurement tool for JACK", "qloud", "qloud", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://gaydenko.com/qloud/") ], | |||
[ "qmidiarp", "QMidiArp", "MIDI Arpeggiator", "qmidiarp", "qmidiarp", TEMPLATE_NO, LEVEL_0, ("ALSA + JACK", 0), ("", "http://qmidiarp.sourceforge.net/") ], | |||
[ "qmidiroute", "QMidiRoute", "MIDI router & event processor", "qmidiroute", "/usr/share/pixmaps/qmidiroute_32x32.xpm", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "") ], | |||
[ "qmidictl", "QmidiCtl", "MIDI controller over the network", "qmidictl", "qmidictl", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://qmidictl.sourceforge.io/") ], | |||
[ "qmidinet", "QmidiNet", "MIDI Network Gateway", "qmidinet", "qmidinet", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://qmidinet.sourceforge.io/") ], | |||
[ "qrest", "Qrest", "Calculator for delay, LFO,...", "qrest", "qrest", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "") ], | |||
[ "qxgedit", "QXGedit", "XG HardWare Controler", "qxgedit", "qxgedit", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://qxgedit.sourceforge.io/") ], | |||
[ "raysession", "Ray Session", "NSM Session Manager", "raysession", "raysession", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://github.com/Houston4444/RaySession") ], | |||
[ "recjack", "RecJack", "Recorder", "recjack", "recjack", TEMPLATE_NO, LEVEL_0, ("---", 1), ("", "http://mein-neues-blog.de/2015/02/07/mein-neues-blog-deb-repository/#recjack") ], | |||
[ "rezound", "ReZound", "Audio Editor", "rezound", "rezound32", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://rezound.sourceforge.net/") ], | |||
[ "alsa-tools-gui", "RME Digi Control", "RME Digi Mixer", "rmedigicontrol", "alsa-tools", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "") ], | |||
[ "showq", "ShowQ", "Sampler Player", "showq", "showq_32x32", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "") ], | |||
[ "shuriken", "Shuriken", "Beat Slicer", "shuriken", "shuriken", TEMPLATE_NO, LEVEL_1, ("JACK+ALSA", 1), ("", "https://rock-hopper.github.io/shuriken/") ], | |||
[ "simplescreenrecorder", "Simple Screen Recorder", "ScreenCast Recorder", "simplescreenrecorder", "simplescreenrecorder", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://www.maartenbaert.be/simplescreenrecorder/") ], | |||
[ "smplayer", "Smplayer", "Multimédia Player", "smplayer", "smplayer", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://www.smplayer.info/") ], | |||
[ "solfege", "Solfege", "Ear Training", "solfege", "solfege", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://www.gnu.org/software/solfege/") ], | |||
[ "songwrite", "Songwrite 3", "Guitar tablature reader and editor", "songwrite", "songwrite3", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://www.lesfleursdunormal.fr/static/informatique/songwrite/index_en.html") ], | |||
[ "sonic-visualiser", "Sonic Visualiser", "Signal Visualization and Analysis", "sonic-visualiser", "sv-icon", TEMPLATE_NO, LEVEL_0, ("JACK", 0), ("", "https://sonicvisualiser.org/") ], | |||
[ "spek", "Spek", "Spectrum Analyzer", "spek", "spek", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://spek.cc/") ], | |||
[ "stretchplayer", "Stretch Player", "Stretch Player", "stretchplayer", "stretchplayer", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://www.teuton.org/~gabriel/stretchplayer/") ], | |||
[ "swami", "Swami", "SF2 instruments editor", "swami", "swami", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "http://www.swamiproject.org/") ], | |||
[ "tinyeartrainer", "Tiny Ear Trainer", "Ear Training", "tinyeartrainer", "tinyeartrainer", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://29a.ch/tinyeartrainer/") ], | |||
[ "timemachine", "TimeMachine", "Recorder", "timemachine", "/usr/share/timemachine/pixmaps/timemachine-icon.png", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://plugin.org.uk/timemachine/") ], | |||
[ "tmlauncher", "TM Launcher", "Recorder", "TMLauncher.py", "TMLauncher", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "") ], | |||
[ "tuxguitar", "TuxGuitar", "Guitar Score", "tuxguitar", "tuxguitar", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://www.tuxguitar.com.ar/") ], | |||
[ "vkeybd", "Virtual Keyboard", "Virtual Keyboard", "vkeybd", "vkeybd", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("", "https://github.com/tiwai/vkeybd") ], | |||
[ "vmpk", "Virtual MIDI Piano Keyboard (ALSA)","Virtual Keyboard", "vmpk", "vmpk", TEMPLATE_NO, LEVEL_0, ("ALSA", 0), ("file:///usr/share/doc/vmpk/help.html", "http://vmpk.sf.net/") ], | |||
[ "vmpk-jack", "Virtual MIDI Piano Keyboard (JACK)","Virtual Keyboard", "vmpk-jack", "vmpk", TEMPLATE_NO, LEVEL_0, ("JACK", 0), ("file:///usr/share/doc/vmpk/help.html", "http://vmpk.sf.net/") ], | |||
[ "x42-plugins", "X42 - StepSeq", "Step By Step Sequencer", "x42-stepseq", "x42-stepseq", TEMPLATE_NO, LEVEL_0, ("JACK", 0), ("", "https://x42-plugins.com/x42/x42-stepseq-8x8") ], | |||
[ "x42-plugins", "X42-Meter - EBU R128", "Meter", "x42-meter", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - K20", "Meter", "x42-meter 1", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - K14", "Meter", "x42-meter 2", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - K12", "Meter", "x42-meter 3", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - BBC", "Meter", "x42-meter 4", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - BBC M-6", "Meter", "x42-meter 5", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - DIN", "Meter", "x42-meter 6", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - EBU", "Meter", "x42-meter 7", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - Nordic", "Meter", "x42-meter 8", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - VU", "Meter", "x42-meter 9", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - True Peak et RMS", "Meter", "x42-meter 10", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - Dynamic Range", "Meter", "x42-meter 11", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - Phase Correlation ", "Meter", "x42-meter 12", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - Goniometer", "Meter", "x42-meter 13", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - Phase Frequency Wheel", "Meter", "x42-meter 14", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - 1/3 Octave Spectrum", "Meter", "x42-meter 15", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - Frequency Scope", "Meter", "x42-meter 16", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - Distribution Histogram", "Meter", "x42-meter 17", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - Bitmeter", "Meter", "x42-meter 18", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42-Meter - Surround Analysor", "Meter", "x42-meter 19", "x42-meters", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-meters") ], | |||
[ "x42-plugins", "X42 - Mixtri", "Mixer/Trigger Preprocessor", "x42-mixtri", "x42-mixtri", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-mixtrix") ], | |||
[ "x42-plugins", "X42 - Oscilloscope", "Oscilloscope", "x42-scope", "x42-scope", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-scope") ], | |||
[ "x42-plugins", "X42 - Tuna", "Instrument Tuner", "x42-tuna", "x42-tuna", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-tuner") ], | |||
[ "x42-plugins", "X42 - Tuna - spectral", "Instrument Tuner - spectrum", "x42-tuna 1", "x42-tuna", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "https://x42-plugins.com/x42/x42-tuner") ], | |||
[ "xjadeo", "XJadeo", "Video Player", "qjadeo", "qjadeo", TEMPLATE_NO, LEVEL_0, ("---", 1), ("", "http://xjadeo.sf.net/") ], | |||
[ "zita-bls1", "Zita-bls1", "Binaural -> stereo signal converter", "zita-bls1", "zita-bls1", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
[ "zita-mu1", "Zita-mu1", "Stereo Monitoring Organizer", "zita-mu1", "zita-mu1", TEMPLATE_NO, LEVEL_0, ("---", 0), ("", "http://kokkinizita.linuxaudio.org/linuxaudio/index.html") ], | |||
] | |||
iTool_Package, iTool_AppName, iTool_Type, iTool_Binary, iTool_Icon, iTool_Template, iTool_Level, iTool_Features, iTool_Docs = range(0, len(list_Tool[0])) | |||
if USING_KXSTUDIO: | |||
# Non-Mixer | |||
list_Tool[10][iDAW_Level] = LEVEL_1 |
@@ -139,6 +139,8 @@ class LogsReadThread(QThread): | |||
self.LOG_FILE_JACK = LogsW.LOG_FILE_JACK | |||
self.LOG_FILE_A2J = LogsW.LOG_FILE_A2J | |||
self.LOG_FILE_LASH = LogsW.LOG_FILE_LASH | |||
self.LOG_FILE_LADISH = LogsW.LOG_FILE_LADISH | |||
# ------------------------------------------------------------- | |||
# Init logs | |||
@@ -161,6 +163,24 @@ class LogsReadThread(QThread): | |||
if self.fLogFileA2J.size() > self.MAX_INITIAL_SIZE: | |||
self.fLogStreamA2J.seek(self.fLogFileA2J.size() - self.MAX_INITIAL_SIZE) | |||
if self.LOG_FILE_LASH is not None: | |||
self.fLogFileLASH = QFile(self.LOG_FILE_LASH) | |||
self.fLogFileLASH.open(QIODevice.ReadOnly) | |||
self.fLogStreamLASH = QTextStream(self.fLogFileLASH) | |||
self.fLogStreamLASH.setCodec("UTF-8") | |||
if self.fLogFileLASH.size() > self.MAX_INITIAL_SIZE: | |||
self.fLogStreamLASH.seek(self.fLogFileLASH.size() - self.MAX_INITIAL_SIZE) | |||
if self.LOG_FILE_LADISH is not None: | |||
self.fLogFileLADISH = QFile(self.LOG_FILE_LADISH) | |||
self.fLogFileLADISH.open(QIODevice.ReadOnly) | |||
self.fLogStreamLADISH = QTextStream(self.fLogFileLADISH) | |||
self.fLogStreamLADISH.setCodec("UTF-8") | |||
if self.fLogFileLADISH.size() > self.MAX_INITIAL_SIZE: | |||
self.fLogStreamLADISH.seek(self.fLogFileLADISH.size() - self.MAX_INITIAL_SIZE) | |||
def closeNow(self): | |||
self.fCloseNow = True | |||
@@ -187,6 +207,20 @@ class LogsReadThread(QThread): | |||
self.fLogFileA2J.close() | |||
self.fLogFileA2J.open(QIODevice.ReadOnly) | |||
if self.LOG_FILE_LASH: | |||
self.fLogStreamLASH.flush() | |||
self.fLogFileLASH.close() | |||
self.fLogFileLASH.open(QIODevice.WriteOnly) | |||
self.fLogFileLASH.close() | |||
self.fLogFileLASH.open(QIODevice.ReadOnly) | |||
if self.LOG_FILE_LADISH: | |||
self.fLogStreamLADISH.flush() | |||
self.fLogFileLADISH.close() | |||
self.fLogFileLADISH.open(QIODevice.WriteOnly) | |||
self.fLogFileLADISH.close() | |||
self.fLogFileLADISH.open(QIODevice.ReadOnly) | |||
self.fPurgeLogs = False | |||
else: | |||
@@ -200,7 +234,17 @@ class LogsReadThread(QThread): | |||
else: | |||
textA2J = "" | |||
self.fRealParent.setLogsText(textJACK, textA2J) | |||
if self.LOG_FILE_LASH: | |||
textLASH = fixLogText(self.fLogStreamLASH.readAll()).strip() | |||
else: | |||
textLASH = "" | |||
if self.LOG_FILE_LADISH: | |||
textLADISH = fixLogText(self.fLogStreamLADISH.readAll()).strip() | |||
else: | |||
textLADISH = "" | |||
self.fRealParent.setLogsText(textJACK, textA2J, textLASH, textLADISH) | |||
self.updateLogs.emit() | |||
if not self.fCloseNow: | |||
@@ -215,6 +259,12 @@ class LogsReadThread(QThread): | |||
if self.LOG_FILE_A2J: | |||
self.fLogFileA2J.close() | |||
if self.LOG_FILE_LASH: | |||
self.fLogFileLASH.close() | |||
if self.LOG_FILE_LADISH: | |||
self.fLogFileLADISH.close() | |||
# ------------------------------------------------------------------------------------------------------------ | |||
# Logs Window | |||
@@ -223,6 +273,8 @@ class LogsW(QDialog): | |||
LOG_FILE_JACK = os.path.join(LOG_PATH, "jack", "jackdbus.log") | |||
LOG_FILE_A2J = os.path.join(LOG_PATH, "a2j", "a2j.log") | |||
LOG_FILE_LASH = os.path.join(LOG_PATH, "lash", "lash.log") | |||
LOG_FILE_LADISH = os.path.join(LOG_PATH, "ladish", "ladish.log") | |||
if not os.path.exists(LOG_FILE_JACK): | |||
LOG_FILE_JACK = None | |||
@@ -230,6 +282,12 @@ class LogsW(QDialog): | |||
if not os.path.exists(LOG_FILE_A2J): | |||
LOG_FILE_A2J = None | |||
if not os.path.exists(LOG_FILE_LASH): | |||
LOG_FILE_LASH = None | |||
if not os.path.exists(LOG_FILE_LADISH): | |||
LOG_FILE_LADISH = None | |||
SIGTERM = pyqtSignal() | |||
SIGUSR1 = pyqtSignal() | |||
SIGUSR2 = pyqtSignal() | |||
@@ -246,6 +304,8 @@ class LogsW(QDialog): | |||
self.fTextJACK = "" | |||
self.fTextA2J = "" | |||
self.fTextLASH = "" | |||
self.fTextLADISH = "" | |||
# ------------------------------------------------------------- | |||
# Set-up GUI | |||
@@ -266,6 +326,14 @@ class LogsW(QDialog): | |||
self.ui.tabWidget.removeTab(1 - tabIndex) | |||
tabIndex += 1 | |||
if self.LOG_FILE_LASH is None: | |||
self.ui.tabWidget.removeTab(2 - tabIndex) | |||
tabIndex += 1 | |||
if self.LOG_FILE_LADISH is None: | |||
self.ui.tabWidget.removeTab(3 - tabIndex) | |||
tabIndex += 1 | |||
# ------------------------------------------------------------- | |||
# Init logs viewers | |||
@@ -277,6 +345,14 @@ class LogsW(QDialog): | |||
self.fSyntaxA2J = SyntaxHighlighter_A2J(self.ui.pte_a2j) | |||
self.fSyntaxA2J.setDocument(self.ui.pte_a2j.document()) | |||
if self.LOG_FILE_LASH: | |||
self.fSyntaxLASH = SyntaxHighlighter_LASH(self.ui.pte_lash) | |||
self.fSyntaxLASH.setDocument(self.ui.pte_lash.document()) | |||
if self.LOG_FILE_LADISH: | |||
self.SyntaxLADISH = SyntaxHighlighter_LADISH(self.ui.pte_ladish) | |||
self.SyntaxLADISH.setDocument(self.ui.pte_ladish.document()) | |||
# ------------------------------------------------------------- | |||
# Init file read thread | |||
@@ -291,11 +367,13 @@ class LogsW(QDialog): | |||
# ------------------------------------------------------------- | |||
def setLogsText(self, textJACK, textA2J): | |||
def setLogsText(self, textJACK, textA2J, textLASH, textLADISH): | |||
QMutexLocker(self.fTextLock) | |||
self.fTextJACK = textJACK | |||
self.fTextA2J = textA2J | |||
self.fTextLASH = textLASH | |||
self.fTextLADISH = textLADISH | |||
@pyqtSlot() | |||
def slot_updateLogs(self): | |||
@@ -304,6 +382,8 @@ class LogsW(QDialog): | |||
if self.fFirstRun: | |||
self.ui.pte_jack.clear() | |||
self.ui.pte_a2j.clear() | |||
self.ui.pte_lash.clear() | |||
self.ui.pte_ladish.clear() | |||
if self.LOG_FILE_JACK and self.fTextJACK: | |||
self.ui.pte_jack.appendPlainText(self.fTextJACK) | |||
@@ -311,11 +391,21 @@ class LogsW(QDialog): | |||
if self.LOG_FILE_A2J and self.fTextA2J: | |||
self.ui.pte_a2j.appendPlainText(self.fTextA2J) | |||
if self.LOG_FILE_LASH and self.fTextLASH: | |||
self.ui.pte_lash.appendPlainText(self.fTextLASH) | |||
if self.LOG_FILE_LADISH and self.fTextLADISH: | |||
self.ui.pte_ladish.appendPlainText(self.fTextLADISH) | |||
if self.fFirstRun: | |||
self.ui.pte_jack.horizontalScrollBar().setValue(0) | |||
self.ui.pte_jack.verticalScrollBar().setValue(self.ui.pte_jack.verticalScrollBar().maximum()) | |||
self.ui.pte_a2j.horizontalScrollBar().setValue(0) | |||
self.ui.pte_a2j.verticalScrollBar().setValue(self.ui.pte_a2j.verticalScrollBar().maximum()) | |||
self.ui.pte_lash.horizontalScrollBar().setValue(0) | |||
self.ui.pte_lash.verticalScrollBar().setValue(self.ui.pte_lash.verticalScrollBar().maximum()) | |||
self.ui.pte_ladish.horizontalScrollBar().setValue(0) | |||
self.ui.pte_ladish.verticalScrollBar().setValue(self.ui.pte_ladish.verticalScrollBar().maximum()) | |||
self.fFirstRun = False | |||
@pyqtSlot() | |||
@@ -323,6 +413,8 @@ class LogsW(QDialog): | |||
self.fReadThread.purgeLogs() | |||
self.ui.pte_jack.clear() | |||
self.ui.pte_a2j.clear() | |||
self.ui.pte_lash.clear() | |||
self.ui.pte_ladish.clear() | |||
def loadSettings(self): | |||
settings = QSettings("Cadence", "Cadence-Logs") | |||
@@ -19,8 +19,12 @@ | |||
# ------------------------------------------------------------------------------------------------------------ | |||
# Imports (Global) | |||
from PyQt5.QtCore import pyqtSlot, QSettings | |||
from PyQt5.QtWidgets import QDialog, QDialogButtonBox | |||
if True: | |||
from PyQt5.QtCore import pyqtSlot, QSettings | |||
from PyQt5.QtWidgets import QDialog, QDialogButtonBox | |||
else: | |||
from PyQt4.QtCore import pyqtSlot, QSettings | |||
from PyQt4.QtGui import QDialog, QDialogButtonBox | |||
# ------------------------------------------------------------------------------------------------------------ | |||
# Imports (Custom Stuff) | |||
@@ -102,6 +106,13 @@ class SettingsW(QDialog): | |||
self.ui.lw_page.hideRow(TAB_INDEX_LADISH) | |||
self.ui.lw_page.setCurrentCell(TAB_INDEX_MAIN, 0) | |||
elif appName == "claudia": | |||
self.ui.cb_jack_port_alias.setEnabled(False) | |||
self.ui.cb_jack_port_alias.setVisible(False) | |||
self.ui.label_jack_port_alias.setEnabled(False) | |||
self.ui.label_jack_port_alias.setVisible(False) | |||
self.ui.lw_page.setCurrentCell(TAB_INDEX_MAIN, 0) | |||
else: | |||
self.ui.lw_page.hideRow(TAB_INDEX_MAIN) | |||
self.ui.lw_page.hideRow(TAB_INDEX_CANVAS) | |||
@@ -567,6 +567,41 @@ class GlobalSysTray(object): | |||
print("systray.py - Failed to get menu index for %s" % menu_name_id) | |||
return -1 | |||
#def get_parent_menu_widget(self, parent_menu_id): | |||
#if parent_menu_id != None: | |||
#menu_index = self.get_menu_index(parent_menu_id) | |||
#if menu_index >= 0: | |||
#return self.menu_indexes[menu_index][1] | |||
#else: | |||
#print("systray.py::Failed to get parent Menu widget for", parent_menu_id) | |||
#return None | |||
#else: | |||
#return self.menu | |||
#def remove_actions_by_menu_name_id(self, menu_name_id): | |||
#h = 0 | |||
#for i in range(len(self.act_indexes)): | |||
#act_name_id, act_widget, parent_menu_id, act_func = self.act_indexes[i - h] | |||
#if parent_menu_id == menu_name_id: | |||
#self.act_indexes.pop(i - h) | |||
#h += 1 | |||
#def remove_separators_by_menu_name_id(self, menu_name_id): | |||
#h = 0 | |||
#for i in range(len(self.sep_indexes)): | |||
#sep_name_id, sep_widget, parent_menu_id = self.sep_indexes[i - h] | |||
#if parent_menu_id == menu_name_id: | |||
#self.sep_indexes.pop(i - h) | |||
#h += 1 | |||
#def remove_submenus_by_menu_name_id(self, submenu_name_id): | |||
#h = 0 | |||
#for i in range(len(self.menu_indexes)): | |||
#menu_name_id, menu_widget, parent_menu_id = self.menu_indexes[i - h] | |||
#if parent_menu_id == submenu_name_id: | |||
#self.menu_indexes.pop(i - h) | |||
#h += 1 | |||
# ------------------------------------------------------------------------------------------- | |||
def gtk_call_func(self, gtkmenu, act_name_id): | |||
@@ -615,3 +650,39 @@ class GlobalSysTray(object): | |||
def __raiseWindow(self): | |||
self._parent.activateWindow() | |||
self._parent.raise_() | |||
#--------------- main ------------------ | |||
if __name__ == '__main__': | |||
from PyQt5.QtWidgets import QApplication, QDialog, QMessageBox | |||
class ExampleGUI(QDialog): | |||
def __init__(self, parent=None): | |||
QDialog.__init__(self, parent) | |||
self.setWindowIcon(getIcon("audacity")) | |||
self.systray = GlobalSysTray(self, "Claudia", "claudia") | |||
self.systray.addAction("about", self.tr("About")) | |||
self.systray.setIcon("audacity") | |||
self.systray.setToolTip("Demo systray app") | |||
self.systray.connect("about", self.about) | |||
self.systray.show() | |||
def about(self): | |||
QMessageBox.about(self, self.tr("About"), self.tr("Systray Demo")) | |||
def done(self, r): | |||
QDialog.done(self, r) | |||
self.close() | |||
def closeEvent(self, event): | |||
self.systray.close() | |||
QDialog.closeEvent(self, event) | |||
app = QApplication(sys.argv) | |||
setup_i18n() | |||
gui = ExampleGUI() | |||
gui.show() | |||
sys.exit(gui.systray.exec_(app)) |