| @@ -69,7 +69,7 @@ void CanvasBezierLine::setLineSelected(bool yesno) | |||||
| if (m_locked) | if (m_locked) | ||||
| return; | return; | ||||
| if (options.eyecandy) | |||||
| if (options.eyecandy == EYECANDY_FULL) | |||||
| { | { | ||||
| if (yesno) | if (yesno) | ||||
| setGraphicsEffect(new CanvasPortGlow(item1->getPortType(), toGraphicsObject())); | setGraphicsEffect(new CanvasPortGlow(item1->getPortType(), toGraphicsObject())); | ||||
| @@ -142,7 +142,7 @@ CanvasPort* CanvasBox::addPortFromGroup(int port_id, QString port_name, PortMode | |||||
| { | { | ||||
| if (options.auto_hide_groups) | if (options.auto_hide_groups) | ||||
| { | { | ||||
| if (options.eyecandy) | |||||
| if (options.eyecandy == EYECANDY_FULL) | |||||
| CanvasItemFX(this, true); | CanvasItemFX(this, true); | ||||
| setVisible(true); | setVisible(true); | ||||
| } | } | ||||
| @@ -183,7 +183,7 @@ void CanvasBox::removePortFromGroup(int port_id) | |||||
| { | { | ||||
| if (options.auto_hide_groups) | if (options.auto_hide_groups) | ||||
| { | { | ||||
| if (options.eyecandy) | |||||
| if (options.eyecandy == EYECANDY_FULL) | |||||
| CanvasItemFX(this, false); | CanvasItemFX(this, false); | ||||
| else | else | ||||
| setVisible(false); | setVisible(false); | ||||
| @@ -68,7 +68,7 @@ void CanvasLine::setLineSelected(bool yesno) | |||||
| if (m_locked) | if (m_locked) | ||||
| return; | return; | ||||
| if (options.eyecandy) | |||||
| if (options.eyecandy == EYECANDY_FULL) | |||||
| { | { | ||||
| if (yesno) | if (yesno) | ||||
| setGraphicsEffect(new CanvasPortGlow(item1->getPortType(), toGraphicsObject())); | setGraphicsEffect(new CanvasPortGlow(item1->getPortType(), toGraphicsObject())); | ||||
| @@ -127,7 +127,7 @@ void renamePort(int port_id, QString new_port_name); | |||||
| void connectPorts(int connection_id, int port_out_id, int port_in_id); | void connectPorts(int connection_id, int port_out_id, int port_in_id); | ||||
| void disconnectPorts(int connection_id); | void disconnectPorts(int connection_id); | ||||
| void Arrange(); | |||||
| void arrange(); | |||||
| END_NAMESPACE_PATCHCANVAS | END_NAMESPACE_PATCHCANVAS | ||||
| @@ -340,7 +340,7 @@ void addGroup(int group_id, QString group_name, SplitOption split, Icon icon) | |||||
| canvas.last_z_value += 1; | canvas.last_z_value += 1; | ||||
| group_sbox->setZValue(canvas.last_z_value); | group_sbox->setZValue(canvas.last_z_value); | ||||
| if (options.auto_hide_groups == false && options.eyecandy) | |||||
| if (options.auto_hide_groups == false && options.eyecandy == EYECANDY_FULL) | |||||
| CanvasItemFX(group_sbox, true); | CanvasItemFX(group_sbox, true); | ||||
| } | } | ||||
| else | else | ||||
| @@ -362,7 +362,7 @@ void addGroup(int group_id, QString group_name, SplitOption split, Icon icon) | |||||
| canvas.group_list.append(group_dict); | canvas.group_list.append(group_dict); | ||||
| if (options.auto_hide_groups == false && options.eyecandy) | |||||
| if (options.auto_hide_groups == false && options.eyecandy == EYECANDY_FULL) | |||||
| CanvasItemFX(group_box, true); | CanvasItemFX(group_box, true); | ||||
| QTimer::singleShot(0, canvas.scene, SLOT(update())); | QTimer::singleShot(0, canvas.scene, SLOT(update())); | ||||
| @@ -389,7 +389,7 @@ void removeGroup(int group_id) | |||||
| canvas.settings->setValue(QString("CanvasPositions/%1_SPLIT").arg(group_name), SPLIT_YES); | canvas.settings->setValue(QString("CanvasPositions/%1_SPLIT").arg(group_name), SPLIT_YES); | ||||
| } | } | ||||
| if (options.eyecandy) | |||||
| if (options.eyecandy == EYECANDY_FULL) | |||||
| { | { | ||||
| CanvasItemFX(s_item, false, true); | CanvasItemFX(s_item, false, true); | ||||
| } | } | ||||
| @@ -409,7 +409,7 @@ void removeGroup(int group_id) | |||||
| } | } | ||||
| } | } | ||||
| if (options.eyecandy) | |||||
| if (options.eyecandy == EYECANDY_FULL) | |||||
| { | { | ||||
| CanvasItemFX(item, false, true); | CanvasItemFX(item, false, true); | ||||
| } | } | ||||
| @@ -740,7 +740,7 @@ void addPort(int group_id, int port_id, QString port_name, PortMode port_mode, P | |||||
| return; | return; | ||||
| } | } | ||||
| if (options.eyecandy) | |||||
| if (options.eyecandy == EYECANDY_FULL) | |||||
| CanvasItemFX(port_widget, true); | CanvasItemFX(port_widget, true); | ||||
| port_dict_t port_dict; | port_dict_t port_dict; | ||||
| @@ -852,7 +852,7 @@ void connectPorts(int connection_id, int port_out_id, int port_in_id) | |||||
| canvas.connection_list.append(connection_dict); | canvas.connection_list.append(connection_dict); | ||||
| if (options.eyecandy) | |||||
| if (options.eyecandy == EYECANDY_FULL) | |||||
| { | { | ||||
| QGraphicsItem* item = (options.use_bezier_lines) ? (QGraphicsItem*)(CanvasBezierLine*)connection_dict.widget : (QGraphicsItem*)(CanvasLine*)connection_dict.widget; | QGraphicsItem* item = (options.use_bezier_lines) ? (QGraphicsItem*)(CanvasBezierLine*)connection_dict.widget : (QGraphicsItem*)(CanvasLine*)connection_dict.widget; | ||||
| CanvasItemFX(item, true); | CanvasItemFX(item, true); | ||||
| @@ -921,7 +921,7 @@ void disconnectPorts(int connection_id) | |||||
| ((CanvasBox*)item1->parentItem())->removeLineFromGroup(connection_id); | ((CanvasBox*)item1->parentItem())->removeLineFromGroup(connection_id); | ||||
| ((CanvasBox*)item2->parentItem())->removeLineFromGroup(connection_id); | ((CanvasBox*)item2->parentItem())->removeLineFromGroup(connection_id); | ||||
| if (options.eyecandy) | |||||
| if (options.eyecandy == EYECANDY_FULL) | |||||
| { | { | ||||
| QGraphicsItem* item = (options.use_bezier_lines) ? (QGraphicsItem*)(CanvasBezierLine*)line : (QGraphicsItem*)(CanvasLine*)line; | QGraphicsItem* item = (options.use_bezier_lines) ? (QGraphicsItem*)(CanvasBezierLine*)line : (QGraphicsItem*)(CanvasLine*)line; | ||||
| CanvasItemFX(item, false, true); | CanvasItemFX(item, false, true); | ||||
| @@ -932,7 +932,7 @@ void disconnectPorts(int connection_id) | |||||
| QTimer::singleShot(0, canvas.scene, SLOT(update())); | QTimer::singleShot(0, canvas.scene, SLOT(update())); | ||||
| } | } | ||||
| void Arrange() | |||||
| void arrange() | |||||
| { | { | ||||
| if (canvas.debug) | if (canvas.debug) | ||||
| qDebug("PatchCanvas::Arrange()"); | qDebug("PatchCanvas::Arrange()"); | ||||
| @@ -423,7 +423,7 @@ def addGroup(group_id, group_name, split=SPLIT_UNDEF, icon=ICON_APPLICATION): | |||||
| canvas.last_z_value += 1 | canvas.last_z_value += 1 | ||||
| group_sbox.setZValue(canvas.last_z_value) | group_sbox.setZValue(canvas.last_z_value) | ||||
| if (options.auto_hide_groups == False and options.eyecandy): | |||||
| if (options.auto_hide_groups == False and options.eyecandy == EYECANDY_FULL): | |||||
| CanvasItemFX(group_sbox, True) | CanvasItemFX(group_sbox, True) | ||||
| else: | else: | ||||
| @@ -441,7 +441,7 @@ def addGroup(group_id, group_name, split=SPLIT_UNDEF, icon=ICON_APPLICATION): | |||||
| canvas.group_list.append(group_dict) | canvas.group_list.append(group_dict) | ||||
| if (options.auto_hide_groups == False and options.eyecandy): | |||||
| if (options.auto_hide_groups == False and options.eyecandy == EYECANDY_FULL): | |||||
| CanvasItemFX(group_box, True) | CanvasItemFX(group_box, True) | ||||
| QTimer.singleShot(0, canvas.scene, SLOT("update()")) | QTimer.singleShot(0, canvas.scene, SLOT("update()")) | ||||
| @@ -463,7 +463,7 @@ def removeGroup(group_id): | |||||
| canvas.settings.setValue("CanvasPositions/%s_INPUT" % (group_name), s_item.pos()) | canvas.settings.setValue("CanvasPositions/%s_INPUT" % (group_name), s_item.pos()) | ||||
| canvas.settings.setValue("CanvasPositions/%s_SPLIT" % (group_name), SPLIT_YES) | canvas.settings.setValue("CanvasPositions/%s_SPLIT" % (group_name), SPLIT_YES) | ||||
| if (options.eyecandy): | |||||
| if (options.eyecandy == EYECANDY_FULL): | |||||
| CanvasItemFX(s_item, False, True) | CanvasItemFX(s_item, False, True) | ||||
| else: | else: | ||||
| s_item.removeIconFromScene() | s_item.removeIconFromScene() | ||||
| @@ -475,7 +475,7 @@ def removeGroup(group_id): | |||||
| canvas.settings.setValue("CanvasPositions/%s" % (group_name), item.pos()) | canvas.settings.setValue("CanvasPositions/%s" % (group_name), item.pos()) | ||||
| canvas.settings.setValue("CanvasPositions/%s_SPLIT" % (group_name), SPLIT_NO) | canvas.settings.setValue("CanvasPositions/%s_SPLIT" % (group_name), SPLIT_NO) | ||||
| if (options.eyecandy): | |||||
| if (options.eyecandy == EYECANDY_FULL): | |||||
| CanvasItemFX(item, False, True) | CanvasItemFX(item, False, True) | ||||
| else: | else: | ||||
| item.removeIconFromScene() | item.removeIconFromScene() | ||||
| @@ -725,7 +725,7 @@ def addPort(group_id, port_id, port_name, port_mode, port_type): | |||||
| qCritical("patchcanvas::addPort(%i, %i, %s, %s, %s) - Unable to find parent group" % (group_id, port_id, port_name.encode(), port_mode2str(port_mode), port_type2str(port_type))) | qCritical("patchcanvas::addPort(%i, %i, %s, %s, %s) - Unable to find parent group" % (group_id, port_id, port_name.encode(), port_mode2str(port_mode), port_type2str(port_type))) | ||||
| return | return | ||||
| if (options.eyecandy): | |||||
| if (options.eyecandy == EYECANDY_FULL): | |||||
| CanvasItemFX(port_widget, True) | CanvasItemFX(port_widget, True) | ||||
| port_dict = port_dict_t() | port_dict = port_dict_t() | ||||
| @@ -817,7 +817,7 @@ def connectPorts(connection_id, port_out_id, port_in_id): | |||||
| canvas.connection_list.append(connection_dict) | canvas.connection_list.append(connection_dict) | ||||
| if (options.eyecandy): | |||||
| if (options.eyecandy == EYECANDY_FULL): | |||||
| item = connection_dict.widget | item = connection_dict.widget | ||||
| CanvasItemFX(item, True) | CanvasItemFX(item, True) | ||||
| @@ -865,7 +865,7 @@ def disconnectPorts(connection_id): | |||||
| item1.parentItem().removeLineFromGroup(connection_id) | item1.parentItem().removeLineFromGroup(connection_id) | ||||
| item2.parentItem().removeLineFromGroup(connection_id) | item2.parentItem().removeLineFromGroup(connection_id) | ||||
| if (options.eyecandy): | |||||
| if (options.eyecandy == EYECANDY_FULL): | |||||
| CanvasItemFX(line, False, True) | CanvasItemFX(line, False, True) | ||||
| else: | else: | ||||
| line.deleteFromScene() | line.deleteFromScene() | ||||
| @@ -1310,7 +1310,7 @@ class CanvasLine(QGraphicsLineItem): | |||||
| if (self.m_locked): | if (self.m_locked): | ||||
| return | return | ||||
| if (options.eyecandy): | |||||
| if (options.eyecandy == EYECANDY_FULL): | |||||
| if (yesno): | if (yesno): | ||||
| self.setGraphicsEffect(CanvasPortGlow(self.item1.getPortType(), self.toGraphicsObject())) | self.setGraphicsEffect(CanvasPortGlow(self.item1.getPortType(), self.toGraphicsObject())) | ||||
| else: | else: | ||||
| @@ -1402,7 +1402,7 @@ class CanvasBezierLine(QGraphicsPathItem): | |||||
| if (self.m_locked): | if (self.m_locked): | ||||
| return | return | ||||
| if (options.eyecandy): | |||||
| if (options.eyecandy == EYECANDY_FULL): | |||||
| if (yesno): | if (yesno): | ||||
| self.setGraphicsEffect(CanvasPortGlow(self.item1.getPortType(), self.toGraphicsObject())) | self.setGraphicsEffect(CanvasPortGlow(self.item1.getPortType(), self.toGraphicsObject())) | ||||
| else: | else: | ||||
| @@ -1809,7 +1809,7 @@ class CanvasPort(QGraphicsItem): | |||||
| return QRectF(0, 0, self.m_port_width+12, self.m_port_height) | return QRectF(0, 0, self.m_port_width+12, self.m_port_height) | ||||
| def paint(self, painter, option, widget): | def paint(self, painter, option, widget): | ||||
| painter.setRenderHint(QPainter.Antialiasing, (options.antialiasing == ANTIALIASING_FULL)) | |||||
| painter.setRenderHint(QPainter.Antialiasing, bool(options.antialiasing == ANTIALIASING_FULL)) | |||||
| poly_locx = [0, 0, 0, 0, 0] | poly_locx = [0, 0, 0, 0, 0] | ||||
| @@ -1981,7 +1981,7 @@ class CanvasBox(QGraphicsItem): | |||||
| def addPortFromGroup(self, port_id, port_mode, port_type, port_name): | def addPortFromGroup(self, port_id, port_mode, port_type, port_name): | ||||
| if (len(self.m_port_list_ids) == 0): | if (len(self.m_port_list_ids) == 0): | ||||
| if (options.auto_hide_groups): | if (options.auto_hide_groups): | ||||
| if (options.eyecandy): | |||||
| if (options.eyecandy == EYECANDY_FULL): | |||||
| CanvasItemFX(self, True) | CanvasItemFX(self, True) | ||||
| self.setVisible(True) | self.setVisible(True) | ||||
| @@ -2010,7 +2010,7 @@ class CanvasBox(QGraphicsItem): | |||||
| self.updatePositions() | self.updatePositions() | ||||
| elif (self.isVisible()): | elif (self.isVisible()): | ||||
| if (options.auto_hide_groups): | if (options.auto_hide_groups): | ||||
| if (options.eyecandy): | |||||
| if (options.eyecandy == EYECANDY_FULL): | |||||
| CanvasItemFX(self, False) | CanvasItemFX(self, False) | ||||
| else: | else: | ||||
| self.setVisible(False) | self.setVisible(False) | ||||
| @@ -58,7 +58,7 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW): | |||||
| def loadSettings(self): | def loadSettings(self): | ||||
| self.cb_canvas_hide_groups.setChecked(self.settings.value("Canvas/AutoHideGroups", self.ms_AutoHideGroups, type=bool)) | self.cb_canvas_hide_groups.setChecked(self.settings.value("Canvas/AutoHideGroups", self.ms_AutoHideGroups, type=bool)) | ||||
| self.cb_canvas_bezier_lines.setChecked(self.settings.value("Canvas/UseBezierLines", True, type=bool)) | self.cb_canvas_bezier_lines.setChecked(self.settings.value("Canvas/UseBezierLines", True, type=bool)) | ||||
| self.cb_canvas_eyecandy.setChecked(self.settings.value("Canvas/EyeCandy", CANVAS_EYECANDY_SMALL, type=int)) | |||||
| self.cb_canvas_eyecandy.setCheckState(self.settings.value("Canvas/EyeCandy", CANVAS_EYECANDY_SMALL, type=int)) | |||||
| self.cb_canvas_use_opengl.setChecked(self.settings.value("Canvas/UseOpenGL", False, type=bool)) | self.cb_canvas_use_opengl.setChecked(self.settings.value("Canvas/UseOpenGL", False, type=bool)) | ||||
| self.cb_canvas_render_aa.setCheckState(self.settings.value("Canvas/Antialiasing", CANVAS_ANTIALIASING_SMALL, type=int)) | self.cb_canvas_render_aa.setCheckState(self.settings.value("Canvas/Antialiasing", CANVAS_ANTIALIASING_SMALL, type=int)) | ||||
| self.cb_canvas_render_text_aa.setChecked(self.settings.value("Canvas/TextAntialiasing", True, type=bool)) | self.cb_canvas_render_text_aa.setChecked(self.settings.value("Canvas/TextAntialiasing", True, type=bool)) | ||||