[synthclone] 2 new revisions pushed by surfacep...@gmail.com on 2013-02-07 05:59 GMT

1 view
Skip to first unread message

synth...@googlecode.com

unread,
Feb 7, 2013, 12:59:43 AM2/7/13
to synthclone-...@googlegroups.com
2 new revisions:

Revision: ca679cdb195c
Author: Devin Anderson <surface...@gmail.com>
Date: Wed Feb 6 21:58:01 2013
Log: Add menu items for clearing sampler and effect jobs from their
respect...
http://code.google.com/p/synthclone/source/detail?r=ca679cdb195c

Revision: 9080cebcc3f0
Author: Devin Anderson <surface...@gmail.com>
Date: Wed Feb 6 21:58:34 2013
Log: Merge branch 'master' of https://code.google.com/p/synthclone
http://code.google.com/p/synthclone/source/detail?r=9080cebcc3f0

==============================================================================
Revision: ca679cdb195c
Author: Devin Anderson <surface...@gmail.com>
Date: Wed Feb 6 21:58:01 2013
Log: Add menu items for clearing sampler and effect jobs from their
respective queues. Add button in sampler tab view for clearing sampler
jobs from the sampler queue.

http://code.google.com/p/synthclone/source/detail?r=ca679cdb195c

Modified:
/src/synthclone/controller.cpp
/src/synthclone/controller.h
/src/synthclone/mainview.ui
/src/synthclone/zoneviewlet.cpp
/src/synthclone/zoneviewlet.h

=======================================
--- /src/synthclone/controller.cpp Sun Dec 23 11:40:33 2012
+++ /src/synthclone/controller.cpp Wed Feb 6 21:58:01 2013
@@ -1,6 +1,6 @@
/*
* synthclone - Synthesizer-cloning software
- * Copyright (C) 2011-2012 Devin Anderson
+ * Copyright (C) 2011-2013 Devin Anderson
*
* 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
@@ -249,6 +249,10 @@

connect(zoneViewlet, SIGNAL(applyEffectsRequest()),
SLOT(handleZoneViewletApplyEffectsRequest()));
+ connect(zoneViewlet, SIGNAL(clearEffectJobsRequest()),
+ SLOT(handleZoneViewletClearEffectJobsRequest()));
+ connect(zoneViewlet, SIGNAL(clearSamplerJobsRequest()),
+ SLOT(handleZoneViewletClearSamplerJobsRequest()));
connect(zoneViewlet, SIGNAL(clearSelectionRequest()),
SLOT(handleZoneViewletClearSelectionRequest()));
connect(zoneViewlet, SIGNAL(copyRequest()),
@@ -283,6 +287,8 @@

zoneViewlet->setApplyEffectsEnabled(false);
zoneViewlet->setBuildTargetsEnabled(false);
+ zoneViewlet->setClearEffectJobsEnabled(false);
+ zoneViewlet->setClearSamplerJobsEnabled(false);
zoneViewlet->setClearSelectionEnabled(false);
zoneViewlet->setCopyEnabled(false);
zoneViewlet->setCutEnabled(false);
@@ -670,6 +676,8 @@
ZoneViewlet *zoneViewlet = mainView.getZoneViewlet();
if (! selectCount) {
zoneViewlet->setApplyEffectsEnabled(false);
+ zoneViewlet->setClearEffectJobsEnabled(false);
+ zoneViewlet->setClearSamplerJobsEnabled(false);
zoneViewlet->setClearSelectionEnabled(false);
zoneViewlet->setCopyEnabled(false);
zoneViewlet->setCutEnabled(false);
@@ -724,6 +732,8 @@
applyFlags:
zoneViewlet->
setApplyEffectsEnabled(dryEnabled && session.getEffectCount());
+
zoneViewlet->setClearEffectJobsEnabled(session.getEffectJobCount());
+
zoneViewlet->setClearSamplerJobsEnabled(session.getSamplerJobCount());
zoneViewlet->setCutEnabled(modifyEnabled);
zoneViewlet->setDeleteEnabled(modifyEnabled);
bool samplerSet = static_cast<bool>(session.getSampler());
@@ -2187,6 +2197,22 @@
ZoneComparer comparer(ZoneComparer::PROPERTY_CHANNEL);
session.sortZones(comparer, ascending);
}
+
+void
+Controller::handleZoneViewletClearEffectJobsRequest()
+{
+ for (int i = session.getEffectJobCount() - 1; i >= 0; i--) {
+ session.removeEffectJob(i);
+ }
+}
+
+void
+Controller::handleZoneViewletClearSamplerJobsRequest()
+{
+ for (int i = session.getSamplerJobCount() - 1; i >= 0; i--) {
+ session.removeSamplerJob(i);
+ }
+}

void
Controller::handleZoneViewletClearSelectionRequest()
=======================================
--- /src/synthclone/controller.h Sun Aug 26 22:59:01 2012
+++ /src/synthclone/controller.h Wed Feb 6 21:58:01 2013
@@ -1,6 +1,6 @@
/*
* synthclone - Synthesizer-cloning software
- * Copyright (C) 2011-2012 Devin Anderson
+ * Copyright (C) 2011-2013 Devin Anderson
*
* 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
@@ -371,6 +371,12 @@
void
handleZoneViewletChannelPropertySortRequest(bool ascending);

+ void
+ handleZoneViewletClearEffectJobsRequest();
+
+ void
+ handleZoneViewletClearSamplerJobsRequest();
+
void
handleZoneViewletClearSelectionRequest();

=======================================
--- /src/synthclone/mainview.ui Sat Oct 8 14:25:18 2011
+++ /src/synthclone/mainview.ui Wed Feb 6 21:58:01 2013
@@ -90,11 +90,29 @@
</layout>
</item>
<item>
- <widget class="QLabel" name="samplerStatus">
- <property name="text">
- <string>Idle.</string>
- </property>
- </widget>
+ <layout class="QHBoxLayout" stretch="1,0">
+ <item>
+ <widget class="QLabel" name="samplerStatus">
+ <property name="text">
+ <string>Idle.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="clearSamplerJobsButton">
+ <property name="statusTip">
+ <string>Clear the sampler job queue.</string>
+ </property>
+ <property name="text">
+ <string>Clear Queue</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../lib/lib.qrc">
+
<normaloff>:/synthclone/images/16x16/clear.png</normaloff>:/synthclone/images/16x16/clear.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
<spacer>
@@ -344,7 +362,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
- <height>25</height>
+ <height>23</height>
</rect>
</property>
<widget class="QMenu" name="sessionMenu">
@@ -438,6 +456,8 @@
<addaction name="separator"/>
<addaction name="applyEffectsZonesAction"/>
<addaction name="separator"/>
+ <addaction name="clearEffectJobsAction"/>
+ <addaction name="clearSamplerJobsAction"/>
<addaction name="removeEffectJobZonesAction"/>
<addaction name="removeSamplerJobZonesAction"/>
<addaction name="separator"/>
@@ -838,6 +858,30 @@
<string>Ctrl+B</string>
</property>
</action>
+ <action name="clearSamplerJobsAction">
+ <property name="icon">
+ <iconset resource="../lib/lib.qrc">
+
<normaloff>:/synthclone/images/16x16/clear.png</normaloff>:/synthclone/images/16x16/clear.png</iconset>
+ </property>
+ <property name="text">
+ <string>Clear Sampler Jobs</string>
+ </property>
+ <property name="toolTip">
+ <string>Clear the sampler job queue.</string>
+ </property>
+ </action>
+ <action name="clearEffectJobsAction">
+ <property name="icon">
+ <iconset resource="../lib/lib.qrc">
+
<normaloff>:/synthclone/images/16x16/clear.png</normaloff>:/synthclone/images/16x16/clear.png</iconset>
+ </property>
+ <property name="text">
+ <string>Clear Effect Jobs</string>
+ </property>
+ <property name="toolTip">
+ <string>Clear the effect job queue.</string>
+ </property>
+ </action>
</widget>
<resources>
<include location="../lib/lib.qrc"/>
=======================================
--- /src/synthclone/zoneviewlet.cpp Sun Oct 9 12:02:52 2011
+++ /src/synthclone/zoneviewlet.cpp Wed Feb 6 21:58:01 2013
@@ -1,6 +1,6 @@
/*
* synthclone - Synthesizer-cloning software
- * Copyright (C) 2011 Devin Anderson
+ * Copyright (C) 2011-2013 Devin Anderson
*
* 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
@@ -42,6 +42,21 @@
connect(buildTargetsAction, SIGNAL(triggered()),
SIGNAL(buildTargetsRequest()));

+ clearEffectJobsAction = synthclone::getChild<QAction>
+ (mainWindow, "clearEffectJobsAction");
+ connect(clearEffectJobsAction, SIGNAL(triggered()),
+ SIGNAL(clearEffectJobsRequest()));
+
+ clearSamplerJobsAction = synthclone::getChild<QAction>
+ (mainWindow, "clearSamplerJobsAction");
+ connect(clearSamplerJobsAction, SIGNAL(triggered()),
+ SIGNAL(clearSamplerJobsRequest()));
+
+ clearSamplerJobsButton = synthclone::getChild<QPushButton>
+ (mainWindow, "clearSamplerJobsButton");
+ connect(clearSamplerJobsButton, SIGNAL(clicked()),
+ SIGNAL(clearSamplerJobsRequest()));
+
clearSelectionAction = synthclone::getChild<QAction>
(mainWindow, "clearZonesSelectionAction");
connect(clearSelectionAction, SIGNAL(triggered()),
@@ -550,6 +565,19 @@
{
setColumnVisible(ZONETABLECOLUMN_CHANNEL, visible);
}
+
+void
+ZoneViewlet::setClearEffectJobsEnabled(bool enabled)
+{
+ clearEffectJobsAction->setEnabled(enabled);
+}
+
+void
+ZoneViewlet::setClearSamplerJobsEnabled(bool enabled)
+{
+ clearSamplerJobsAction->setEnabled(enabled);
+ clearSamplerJobsButton->setEnabled(enabled);
+}

void
ZoneViewlet::setClearSelectionEnabled(bool enabled)
=======================================
--- /src/synthclone/zoneviewlet.h Sun Mar 11 21:19:53 2012
+++ /src/synthclone/zoneviewlet.h Wed Feb 6 21:58:01 2013
@@ -1,6 +1,6 @@
/*
* synthclone - Synthesizer-cloning software
- * Copyright (C) 2011-2012 Devin Anderson
+ * Copyright (C) 2011-2013 Devin Anderson
*
* 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
@@ -21,6 +21,7 @@
#define __ZONEVIEWLET_H__

#include <QtGui/QMainWindow>
+#include <QtGui/QPushButton>
#include <QtGui/QStandardItemModel>
#include <QtGui/QTableView>

@@ -84,6 +85,12 @@
void
setChannelPropertyVisible(bool visible);

+ void
+ setClearEffectJobsEnabled(bool enabled);
+
+ void
+ setClearSamplerJobsEnabled(bool enabled);
+
void
setClearSelectionEnabled(bool enabled);

@@ -216,6 +223,12 @@
void
channelPropertySortRequest(bool ascending);

+ void
+ clearEffectJobsRequest();
+
+ void
+ clearSamplerJobsRequest();
+
void
clearSelectionRequest();

@@ -373,6 +386,9 @@

QAction *applyEffectsAction;
QAction *buildTargetsAction;
+ QAction *clearEffectJobsAction;
+ QAction *clearSamplerJobsAction;
+ QPushButton *clearSamplerJobsButton;
QAction *clearSelectionAction;
ContextMenuEventFilter contextMenuEventFilter;
QAction *coreColumnShowActions[ZONETABLECOLUMN_BASE_TOTAL];

==============================================================================
Revision: 9080cebcc3f0
Author: Devin Anderson <surface...@gmail.com>
Date: Wed Feb 6 21:58:34 2013
Log: Merge branch 'master' of https://code.google.com/p/synthclone

http://code.google.com/p/synthclone/source/detail?r=9080cebcc3f0


Reply all
Reply to author
Forward
0 new messages