Changeset 1668
- Timestamp:
- 09/18/09 14:00:59 (14 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/support/mixer-qt4/ffado-mixer.in
r1648 r1668 150 150 debug_level = logging.INFO 151 151 152 # main loggers: 152 153 logging.getLogger('main').setLevel(debug_level) 153 154 logging.getLogger('dbus').setLevel(debug_level) … … 156 157 logging.getLogger('configparser').setLevel(logging.INFO) 157 158 158 logging.getLogger('global').setLevel(debug_level) 159 # widgets: 160 logging.getLogger('matrixmixer').setLevel(debug_level) 161 logging.getLogger('crossbarrouter').setLevel(debug_level) 159 162 163 # mixers: 160 164 logging.getLogger('audiofire').setLevel(debug_level) 161 165 logging.getLogger('bridgeco').setLevel(debug_level) … … 170 174 logging.getLogger('saffire').setLevel(debug_level) 171 175 logging.getLogger('saffirepro').setLevel(debug_level) 176 177 logging.getLogger('global').setLevel(debug_level) 172 178 173 179 log = logging.getLogger('main') trunk/libffado/support/mixer-qt4/ffado/widgets/crossbarrouter.py
r1656 r1668 21 21 from PyQt4 import QtGui, QtCore 22 22 import dbus 23 24 import logging 25 log = logging.getLogger("crossbarrouter") 23 26 24 27 class VuMeter(QtGui.QFrame): … … 39 42 40 43 def setInput(self, input): 41 # print "VuMeter.setInput() %i->%i" % (self.output, input)44 #log.debug("VuMeter.setInput() %i->%i" % (self.output, input)) 42 45 self.input = input 43 46 … … 91 94 self.ingroups[tmp] = 0 92 95 self.ingroups[tmp] += 1 93 # print "Detected ingroups: %s" % str(self.ingroups)96 #log.debug("Detected ingroups: %s" % str(self.ingroups)) 94 97 95 98 self.menu = QtGui.QMenu(self) 96 99 self.btn.setMenu(self.menu) 100 101 action = QtGui.QAction("Disconnect", self) 102 action.setCheckable(True) 103 self.connect(action, QtCore.SIGNAL("toggled(bool)"), self.disconnectRoute) 104 self.exclusiveGroup.addAction(action) 105 self.menu.addAction(action) 97 106 98 107 for group in self.ingroups: … … 103 112 self.vu.updateLevel(value) 104 113 114 def disconnectRoute(self, checked): 115 log.debug("disconnectRoute( %s ) sender: %s" % (str(checked),str(self.sender()))) 116 dest = self.interface.getDestinationIndex(self.outname) 117 src = self.interface.getSourceName( self.interface.getSourceForDestination( dest ) ) 118 #log.debug(" source=%s destination=%s possible? %s" % (src, self.outname, self.interface.canConnectNamed(src, self.outname))) 119 if not self.interface.setConnectionStateNamed(src, self.outname, False): 120 log.debug(" Changing the connection table was successfull.") 121 else: 122 log.warning(" Failed to change the connection table!") 123 self.peakValue(0) 105 124 106 125 class InGroupMenu(QtGui.QMenu): … … 121 140 def showMenu(self): 122 141 #print "About to show the menu" 123 if len(self.actions()) < self.insize :142 if len(self.actions()) < self.insize+1: 124 143 # Do a lazy init of the sub-items. 125 144 for i in range(self.insize): … … 140 159 def connectionSwitched(self, checked): 141 160 if self.lock: return 142 print "connectionSwitched( %s ) sender: %s" % (str(checked),str(self.sender()))161 #log.debug("connectionSwitched( %s ) sender: %s" % (str(checked),str(self.sender()))) 143 162 inname = str(self.sender().text()) 144 print " source=%s destination=%s possible? %s" % (inname, self.outname, self.interface.canConnectNamed(inname, self.outname)) 145 print " connectionState is now %s" % self.interface.setConnectionStateNamed(inname, self.outname, checked) 163 #log.debug(" source=%s destination=%s possible? %s" % (inname, self.outname, self.interface.canConnectNamed(inname, self.outname))) 164 if not self.interface.setConnectionStateNamed(inname, self.outname, checked): 165 log.warning(" Failed to change the routing.") 146 166 147 167 … … 153 173 self.interface = dbus.Interface(self.dev, dbus_interface="org.ffado.Control.Element.CrossbarRouter") 154 174 155 print self.interface.getDestinations()175 log.info(self.interface.getDestinations()) 156 176 157 177 destinations = self.interface.getDestinationNames() trunk/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py
r1666 r1668 21 21 from PyQt4 import QtGui, QtCore, Qt 22 22 import dbus 23 24 import logging 25 log = logging.getLogger("matrixmixer") 23 26 24 27 class MixerNode(QtGui.QFrame): … … 181 184 self.setPalette(palette) 182 185 183 rows = self.interface.getRowCount() 184 cols = self.interface.getColCount() 186 rows = self.interface.getColCount() 187 cols = self.interface.getRowCount() 188 log.debug("Mixer has %i rows and %i columns" % (rows, cols)) 185 189 186 190 layout = QtGui.QGridLayout(self) … … 270 274 271 275 def valueChanged(self, n): 272 #print "MatrixNode.valueChanged( %s )" % str(n)276 log.debug("MatrixNode.valueChanged( %s )" % str(n)) 273 277 for tmp in n: 274 278 self.interface.setValue(tmp[1], tmp[0], tmp[2])