Changeset 1656
- Timestamp:
- 09/05/09 05:56:05 (14 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/support/mixer-qt4/ffado/widgets/crossbarrouter.py
r1654 r1656 153 153 self.interface = dbus.Interface(self.dev, dbus_interface="org.ffado.Control.Element.CrossbarRouter") 154 154 155 print self.interface.getDestinations() 156 155 157 destinations = self.interface.getDestinationNames() 156 158 self.outgroups = [] … … 160 162 self.outgroups.append(tmp) 161 163 162 self.layout = QtGui.QGridLayout(self) 163 self.setLayout(self.layout) 164 self.biglayout = QtGui.QVBoxLayout(self) 165 self.setLayout(self.biglayout) 166 167 self.toplayout = QtGui.QHBoxLayout() 168 self.biglayout.addLayout(self.toplayout) 169 170 btn = QtGui.QPushButton("Switch VU", self) 171 btn.setCheckable(True) 172 btn.setChecked(True) 173 self.connect(btn, QtCore.SIGNAL("toggled(bool)"), self.runVu) 174 self.toplayout.addWidget(btn) 175 176 self.layout = QtGui.QGridLayout() 177 self.biglayout.addLayout(self.layout) 164 178 165 179 self.switchers = {} 166 180 for out in destinations: 167 181 btn = OutputSwitcher(self.interface, out, self) 168 self.layout.addWidget(btn, int(out.split(":")[-1]) , self.outgroups.index(out.split(":")[0]))182 self.layout.addWidget(btn, int(out.split(":")[-1]) + 1, self.outgroups.index(out.split(":")[0])) 169 183 self.switchers[self.interface.getDestinationIndex(out)] = btn 170 184 … … 172 186 self.timer.setInterval(200) 173 187 self.connect(self.timer, QtCore.SIGNAL("timeout()"), self.updateLevels) 174 self.timer.start() 188 self.runVu(True) 189 190 def runVu(self, run=True): 191 if run: 192 self.timer.start() 193 else: 194 self.timer.stop() 195 for sw in self.switchers: 196 self.switchers[sw].peakValue(0) 175 197 176 198 def updateLevels(self):