root/trunk/libffado/support/mixer/ffado_regdialog.py

Revision 1060, 2.1 kB (checked in by ppalmers, 14 years ago)

- implement (basic) user feedback (fixes #77)
- fix some small issues in the mixer code

Line 
1 #
2 # Copyright (C) 2005-2008 by Pieter Palmers
3 #
4 # This file is part of FFADO
5 # FFADO = Free Firewire (pro-)audio drivers for linux
6 #
7 # FFADO is based upon FreeBoB.
8 #
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 2 of the License, or
12 # (at your option) version 3 of the License.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 #
22
23 from qt import *
24 from ffado_regdialogui import *
25
26 class ffadoRegDialog(ffadoRegDialogUI):
27     def __init__(self, devtext, vendormodel,
28                  guid, version, email="(optional)",
29                  parent = None,name = None,modal = 1,fl = 0):
30         ffadoRegDialogUI.__init__(self,parent,name,modal,fl)
31
32         self.txtDevice.setText(devtext)
33         self.txtVendorModel.setText(vendormodel)
34         self.txtGUID.setText("%016X" % guid)
35         self.txtVersion.setText(version)
36         self.txtEmail.setText(email)
37         self.choice = "nosend"
38
39     def buttonPressed(self):
40         sender = self.sender()
41         if sender == self.btnSend:
42             print "user chose to send"
43             self.choice = "send"
44         elif sender ==  self.btnNoSend:
45             print "user chose not to send"
46             self.choice = "nosend"
47         elif sender ==  self.btnNeverSend:
48             print "user chose to never send"
49             self.choice = "neversend"
50         self.close()
51
52     def getEmail(self):
53         return self.txtEmail.text()
54
55     def init(self):
56         print "Init ffado reg window"
57         self.choice = "nosend"
58         QObject.connect(self.btnSend,SIGNAL('clicked()'),self.buttonPressed)
59         QObject.connect(self.btnNoSend,SIGNAL('clicked()'),self.buttonPressed)
60         QObject.connect(self.btnNeverSend,SIGNAL('clicked()'),self.buttonPressed)
Note: See TracBrowser for help on using the browser.