Changeset 1625

Show
Ignore:
Timestamp:
08/21/09 12:47:15 (12 years ago)
Author:
arnonym
Message:
  • add a small line to make vim use spaces for indentation
  • Don't compile ui-files to python-code at install-time. Load them from the pythondir during runtime.

Now the only reason to run scons (during ffado-mixer development) is when one of the .in-files where changed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/support/mixer-qt4/ffadomixer_config.py.in

    r1435 r1625  
    1818 
    1919DEBUG = $DEBUG 
     20 
     21UIDIR = PYTHONDIR 
     22import os.path 
     23if os.path.exists('support/mixer-qt4/mixer_global.ui'): 
     24    UIDIR = "support/mixer-qt4" 
     25if os.path.exists('mixer_global.ui'): 
     26    UIDIR = "." 
     27 
     28import os.path 
     29from PyQt4 import uic 
     30def uicLoad(file, object): 
     31    if not file.endswith(".ui"): 
     32        file += ".ui" 
     33    uic.loadUi(os.path.join(UIDIR,file), object) 
     34 
     35# vim: et 
  • trunk/libffado/support/mixer-qt4/ffado_configuration.py

    r1583 r1625  
    163163        print devs.devices 
    164164 
     165# vim: et 
  • trunk/libffado/support/mixer-qt4/ffado_dbus_util.py

    r1501 r1625  
    354354    def canChangeValue(self): 
    355355        return self.iface_element.canChangeValue() 
     356 
     357# vim: et 
  • trunk/libffado/support/mixer-qt4/ffado_panelmanager.py

    r1601 r1625  
    2828from PyQt4.QtCore import QTimer 
    2929 
    30 from ffado_panelmanagerstatusui import Ui_PanelManagerStatusUI 
    31  
    3230from ffado_dbus_util import * 
    3331from ffado_registration import * 
    3432 
    35 from ffado_configuration import DeviceList 
     33from ffado_configuration import * 
    3634 
    3735from mixer_phase88 import * 
     
    7573        self.setMinimumHeight( 10 ) 
    7674 
    77 class PanelManagerStatus(QWidget, Ui_PanelManagerStatusUI): 
     75class PanelManagerStatus(QWidget): 
    7876    def __init__(self, parent): 
    7977        QWidget.__init__(self,parent) 
    80         self.setupUi(self) 
     78        uicLoad("ffado_panelmanagerstatus", self) 
    8179 
    8280class OwnTabWidget(QTabWidget): 
     
    9896class PanelManager(QWidget): 
    9997    def __init__(self, parent, devmgr=None): 
    100         QMainWindow.__init__(self, parent) 
     98        QWidget.__init__(self, parent) 
    10199        self.setObjectName("PanelManager") 
    102100 
  • trunk/libffado/support/mixer-qt4/ffado_regdialog.py

    r1435 r1625  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QDialog 
    25 from ffado_regdialogui import Ui_ffadoRegDialogUI 
     25from ffadomixer_config import * 
    2626 
    2727import logging 
     
    4646""" 
    4747 
    48 class ffadoRegDialog(QDialog, Ui_ffadoRegDialogUI): 
     48class ffadoRegDialog(QDialog): 
    4949    def __init__(self, vendor_name, vendor_id, model_name, model_id, 
    5050                 guid, version, email="(optional)", 
    5151                 parent = None): 
    5252        QDialog.__init__(self,parent) 
    53         self.setupUi(self) 
     53        uicLoad("ffado_regdialog", self) 
    5454        self.txtVendorName.setText(vendor_name) 
    5555        self.txtVendorId.setText(vendor_id) 
     
    8181    def getEmail(self): 
    8282        return self.txtEmail.text() 
     83 
     84# vim: et 
  • trunk/libffado/support/mixer-qt4/ffado_registration.py

    r1435 r1625  
    156156        self.parser.write(f) 
    157157        f.close() 
     158 
     159# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_audiofire.py

    r1435 r1625  
    2525                        QGroupBox, QTabWidget, QLabel, \ 
    2626                        QPushButton, QSpacerItem, QSizePolicy 
    27 from mixer_audiofire_stripui import Ui_AfMonitorWidget 
    28 from mixer_audiofire_settingsui import Ui_AfSettingsWidget 
     27from ffadomixer_config import * 
    2928import logging 
    3029log = logging.getLogger('audiofire') 
    3130 
    32 class AfMonitorWidget(QWidget, Ui_AfMonitorWidget): 
     31class AfMonitorWidget(QWidget): 
    3332    def __init__(self,parent = None): 
    3433        QWidget.__init__(self,parent) 
    35         self.setupUi(self) 
    36  
    37 class AfSettingsWidget(QWidget, Ui_AfSettingsWidget): 
     34        uicLoad("mixer_audiofire_strip", self) 
     35 
     36class AfSettingsWidget(QWidget): 
    3837    def __init__(self,parent = None): 
    3938        QWidget.__init__(self,parent) 
    40         self.setupUi(self) 
     39        uicLoad("mixer_audiofire_settings", self) 
    4140 
    4241class AudioFireMixer(QWidget): 
     
    358357            # connect the UI element 
    359358            QObject.connect(ctrl,SIGNAL('toggled(bool)'),self.updateSPDIFmodeControl) 
     359 
     360# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_bcoaudio5.py

    r1435 r1625  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from mixer_bcoaudio5ui import * 
     25from ffadomixer_config import * 
    2626import logging 
    2727log = logging.getLogger('bridgeco') 
    2828 
    29 class BCoAudio5Control(QWidget, Ui_BCoAudio5ControlUI): 
     29class BCoAudio5Control(QWidget): 
    3030    def __init__(self,parent = None): 
    3131        QWidget.__init__(self,parent) 
    32         self.setupUi(self) 
     32        uicLoad("mixer_bcoaudio5", self) 
    3333 
    3434        self.VolumeControls={ 
     
    9696            ctrl[1].setCurrentIndex( state ) 
    9797 
     98# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_dummy.py

    r1435 r1625  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from mixer_dummyui import * 
     25from ffadomixer_config import * 
    2626 
    27 class DummyMixer(QWidget, Ui_DummyMixerUI): 
     27class DummyMixer(QWidget): 
    2828    def __init__(self,parent = None): 
    2929        QWidget.__init__(self,parent) 
    30         self.setupUi(self) 
     30        uicLoad("mixer_dummy", self) 
    3131 
    3232    def initValues(self): 
    3333        pass 
     34 
     35# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_edirolfa101.py

    r1501 r1625  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from mixer_edirolfa101ui import * 
     25from ffadomixer_config import * 
    2626 
    2727import logging 
    2828log = logging.getLogger('edirolfa101') 
    2929 
    30 class EdirolFa101Control(QWidget, Ui_EdirolFa101ControlUI): 
     30class EdirolFa101Control(QWidget): 
    3131    def __init__(self, parent = None): 
    3232        QWidget.__init__(self, parent) 
    33         self.setupUi(self) 
     33        uicLoad("mixer_edirolfa101", self) 
    3434 
    3535    def setVolumeIn1(self, vol): 
     
    172172            log.debug("%s value is %d" % (name , val)) 
    173173            widget.setValue(val) 
     174 
     175# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_edirolfa66.py

    r1501 r1625  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from mixer_edirolfa66ui import * 
     25from ffadomixer_config import * 
    2626 
    2727import logging 
    2828log = logging.getLogger('edirolfa66') 
    2929 
    30 class EdirolFa66Control(QWidget, Ui_EdirolFa66ControlUI): 
     30class EdirolFa66Control(QWidget): 
    3131    def __init__(self, parent = None): 
    3232        QWidget.__init__(self, parent) 
    33         self.setupUi(self) 
     33        uicLoad("mixer_edirolfa66", self) 
    3434 
    3535        self.VolumeControls = { 
     
    107107 
    108108            ctrl[2].setValue(val) 
     109 
     110# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_global.py

    r1501 r1625  
    2323from PyQt4.QtCore import QObject, pyqtSignature 
    2424from PyQt4.QtGui import QWidget, QMessageBox 
    25 from mixer_globalui import Ui_GlobalMixerUi 
     25from ffadomixer_config import * 
    2626 
    2727import logging 
    2828log = logging.getLogger('global') 
    2929 
    30 class GlobalMixer( QWidget, Ui_GlobalMixerUi ): 
    31     def __init__( self, parent, name=None ): 
    32         QWidget.__init__( self, parent
    33         self.setupUi(self) 
     30class GlobalMixer(QWidget): 
     31    def __init__(self, parent, name=None): 
     32        QWidget.__init__(self, parent
     33        uicLoad("mixer_global", self) 
    3434        self.setName(name) 
    3535 
     
    134134            self.chkStreamOut.setChecked(True) 
    135135 
     136# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_mackie_onyxmixer.py

    r1435 r1625  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from mixer_mackie_onyxmixerui import * 
     25from ffadomixer_config import * 
    2626 
    27 class MackieOnyxMixer(QWidget, Ui_MackieOnyxMixerUI): 
     27class MackieOnyxMixer(QWidget): 
    2828    def __init__(self,parent = None): 
    2929        QWidget.__init__(self,parent) 
    30         self.setupUi(self) 
     30        uicLoad("mixer_mackie_onyxmixer", self) 
    3131 
    3232    def initValues(self): 
    3333        pass 
     34 
     35# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_motu.py

    r1531 r1625  
    2424from PyQt4.QtCore import SIGNAL, SLOT, QObject, Qt 
    2525from PyQt4.QtGui import QWidget, QApplication 
    26 from mixer_motuui import * 
     26from ffadomixer_config import * 
    2727 
    2828import logging 
     
    3838MOTU_MODEL_896HD    = 0x0006 
    3939 
    40 class MotuMixer(QWidget, Ui_MotuMixerUI): 
     40class MotuMixer(QWidget): 
    4141    def __init__(self,parent = None): 
    4242        QWidget.__init__(self,parent) 
    43         self.setupUi(self) 
     43        uicLoad("mixer_motu", self) 
    4444 
    4545        self.init() 
     
    821821        # the other hand it may be more convenient to leave all controls 
    822822        # active at all times.  We'll see. 
     823 
     824# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_nodevice.py

    r1298 r1625  
    3030        QWidget.__init__(self,parent) 
    3131        self.setupUi(self) 
     32 
     33# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_phase24.py

    r1435 r1625  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from mixer_phase24ui import * 
     25from ffadomixer_config import * 
    2626 
    2727import logging 
    2828log = logging.getLogger('phase24') 
    2929 
    30 class Phase24Control(QWidget, Ui_Phase24ControlUI): 
     30class Phase24Control(QWidget): 
    3131    def __init__(self,parent = None): 
    3232        QWidget.__init__(self,parent) 
    33         self.setupUi(self) 
     33        uicLoad("mixer_phase24", self) 
    3434 
    3535        self.VolumeControls={ 
     
    157157            else: 
    158158                self.cmbLineLevel.setCurrentIndex(val) 
     159 
     160# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_phase88.py

    r1435 r1625  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from mixer_phase88ui import * 
     25from ffadomixer_config import * 
    2626 
    2727import logging 
    2828log = logging.getLogger('phase88') 
    2929 
    30 class Phase88Control(QWidget, Ui_Phase88ControlUI): 
     30class Phase88Control(QWidget): 
    3131    def __init__(self,parent = None): 
    3232        QWidget.__init__(self,parent) 
    33         self.setupUi(self) 
     33        uicLoad("mixer_phase88", self) 
    3434 
    3535        self.VolumeControls={ 
     
    109109            log.debug("%s state is %d" % (name , state)) 
    110110            ctrl[1].setCurrentIndex(state) 
     111 
     112# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_quatafire.py

    r1435 r1625  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from mixer_quatafireui import * 
     25from ffadomixer_config import * 
    2626 
    2727import logging 
    2828log = logging.getLogger('quatafire') 
    2929 
    30 class QuataFireMixer(QWidget, Ui_QuataFireMixerUI): 
     30class QuataFireMixer(QWidget): 
    3131    def __init__(self,parent = None): 
    3232        QWidget.__init__(self,parent) 
    33         self.setupUi(self) 
     33        uicLoad("mixer_quatafire", self) 
    3434 
    3535        self.VolumeControls={ 
     
    102102            QObject.connect(ctrl,SIGNAL('valueChanged(int)'),self.updatePan) 
    103103 
     104# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_rme.py

    r1622 r1625  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject, Qt 
    2424from PyQt4.QtGui import QWidget, QApplication 
    25 from mixer_rmeui import * 
     25from ffadomixer_config import * 
    2626 
    2727import logging 
     
    3333RME_MODEL_FF400     = 0x0002 
    3434 
    35 class RmeMixer(QWidget, Ui_RmeMixerUI): 
     35class RmeMixer(QWidget): 
    3636    def __init__(self,parent = None): 
    3737        QWidget.__init__(self,parent) 
    38         self.setupUi(self) 
     38        uicLoad("mixer_rme", self) 
    3939 
    4040        self.init() 
     
    207207            ctrl.setValue(val); 
    208208            QObject.connect(ctrl, SIGNAL('valueChanged(int)'), self.updateGain) 
     209 
     210# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_saffire.py

    r1435 r1625  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget, QHBoxLayout 
     25from ffadomixer_config import * 
    2526from mixer_saffire_base import SaffireMixerBase 
    26 from mixer_saffire_stereoui import Ui_SaffireMixerStereoUI 
    27 from mixer_saffire_monoui import Ui_SaffireMixerMonoUI 
    28 from mixer_saffirele_smallui import Ui_SaffireLEMixerSmallUI 
    29 from mixer_saffirele_largeui import Ui_SaffireLEMixerLargeUI 
    3027 
    3128import logging 
     
    161158                self.stereo.polledUpdate() 
    162159 
    163 class SaffireMixerStereo(QWidget, Ui_SaffireMixerStereoUI, SaffireMixerBase): 
     160class SaffireMixerStereo(QWidget, SaffireMixerBase): 
    164161    def __init__(self,parent = None): 
    165162        self.my_parent = parent 
    166163        QWidget.__init__(self,parent) 
    167         self.setupUi(self) 
     164        uicLoad("mixer_saffire_stereo", self) 
    168165        SaffireMixerBase.__init__(self) 
    169166        QObject.connect(self.btnRefresh, SIGNAL('clicked()'), self.updateValues) 
     
    289286        self.my_parent.selectCorrectMode() 
    290287 
    291 class SaffireMixerMono(QWidget, Ui_SaffireMixerMonoUI, SaffireMixerBase): 
     288class SaffireMixerMono(QWidget, SaffireMixerBase): 
    292289    def __init__(self,parent = None): 
    293290        self.my_parent = parent 
    294291        QWidget.__init__(self,parent) 
    295         self.setupUi(self) 
     292        uicLoad("mixer_saffire_stereo", self) 
    296293        SaffireMixerBase.__init__(self) 
    297294        QObject.connect(self.btnRefresh, SIGNAL('clicked()'), self.updateValues) 
     
    434431        self.my_parent.selectCorrectMode() 
    435432 
    436 class SaffireLEMixerLarge(QWidget, Ui_SaffireLEMixerLargeUI, SaffireMixerBase): 
     433class SaffireLEMixerLarge(QWidget, SaffireMixerBase): 
    437434    def __init__(self,parent = None): 
    438435        self.my_parent = parent 
    439436        QWidget.__init__(self,parent) 
    440         self.setupUi(self) 
     437        uicLoad("mixer_saffirele_large", self) 
    441438        SaffireMixerBase.__init__(self) 
    442439 
     
    557554        SaffireMixerBase.updateValues(self) 
    558555 
    559 class SaffireLEMixerSmall(QWidget, Ui_SaffireLEMixerSmallUI, SaffireMixerBase): 
     556class SaffireLEMixerSmall(QWidget, SaffireMixerBase): 
    560557    def __init__(self,parent = None): 
    561558        self.my_parent = parent 
    562559        QWidget.__init__(self,parent) 
    563         self.setupUi(self) 
     560        uicLoad("mixer_saffirele_small", self) 
    564561        SaffireMixerBase.__init__(self) 
    565562 
     
    637634    def updateValues(self): 
    638635        SaffireMixerBase.updateValues(self) 
     636 
     637# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_saffirepro.py

    r1435 r1625  
    2222 
    2323from PyQt4.QtGui import QWidget, QHBoxLayout, QMessageBox 
     24from ffadomixer_config import * 
    2425from mixer_saffire_base import SaffireMixerBase 
    25 from mixer_saffirepro_largeui import Ui_SaffireProMixerLargeUI 
    26 from mixer_saffirepro_smallui import Ui_SaffireProMixerSmallUI 
    2726 
    2827import logging 
     
    108107            self.small.polledUpdate() 
    109108 
    110 class SaffireProMixerLarge(QWidget, Ui_SaffireProMixerLargeUI, SaffireMixerBase): 
     109class SaffireProMixerLarge(QWidget, SaffireMixerBase): 
    111110    def __init__(self,parent = None): 
    112111        self.my_parent = parent 
    113112        QWidget.__init__(self,parent) 
    114113        SaffireMixerBase.__init__(self) 
    115         self.setupUi(self) 
     114        uicLoad("mixer_saffirepro_large", self) 
    116115        self.have_adat = False 
    117116        log.debug("Init large Saffire Pro mixer window") 
     
    367366            volctrl.setEnabled(True) 
    368367 
    369 class SaffireProMixerSmall(QWidget, Ui_SaffireProMixerSmallUI, SaffireMixerBase): 
     368class SaffireProMixerSmall(QWidget, SaffireMixerBase): 
    370369    def __init__(self,parent = None): 
    371370        self.my_parent = parent 
    372371        QWidget.__init__(self,parent) 
    373372        SaffireMixerBase.__init__(self) 
    374         self.setupUi(self) 
     373        uicLoad("mixer_saffirepro_small", self) 
    375374        log.debug("Init small Saffire Pro mixer window") 
    376375 
     
    559558        else: 
    560559            volctrl.setEnabled(True) 
     560 
     561# vim: et 
  • trunk/libffado/support/mixer-qt4/mixer_saffire_base.py

    r1435 r1625  
    155155        for ctrl, info in self.ComboControls.iteritems(): 
    156156            QObject.connect(ctrl, SIGNAL('activated(int)'), self.selectCombo) 
     157 
     158# vim: et 
  • trunk/libffado/support/mixer-qt4/SConscript

    r1601 r1625  
    7777        app = "mixer_" + m 
    7878        if os.path.exists( app+".ui" ): 
    79             e.PyUIC4( source=app+".ui", target=app+"ui.py" ) 
    80             e.Install( "$pythondir", app+"ui.py" ) 
     79            e.Install( "$pythondir", app+".ui" ) 
    8180    for m in e['MIXERAPPS']: 
    8281        app = "mixer_" + m 
     
    8584    for app in e['OTHERGUIS']: 
    8685        if os.path.exists( app+".ui" ): 
    87             e.PyUIC4( source=app+".ui", target=app+"ui.py" ) 
    88             e.Install( "$pythondir", app+"ui.py" ) 
     86            e.Install( "$pythondir", app+".ui" ) 
     87 
    8988    for app in e['OTHERAPPS']: 
    9089        e.Install( "$pythondir", app+".py" ) 
     
    102101 
    103102    e.Install( "$sharedir/icons", "../xdg/hi64-apps-ffado.png" ) 
     103 
     104# vim: et