Beispiel #1
0
    def _selectSource( self ):
        sup_id = self.uSupplierSelector.selectedValue()
        if sup_id == None:
            QMessageBox.warning(self,"Missing supplier","You must select a supplier")
            return
        supplier = Supplier(sup_id)
        setting = '/Suppliers/Supplier_' + str(supplier.id()) + "/SourcePath"
        startDir = Config.get(setting)
        ext = supplier.readerType().fileext()
        name = supplier.readerType().name()
        filterstr = name + " (*." + ext + ");; All files (*.*)"

        s = QSettings()
        filename = QFileDialog.getOpenFileName(self,"Address data file",
                    startDir,filterstr)
        if filename:
            Config.set(setting,QFileInfo(filename).absolutePath())
            self.uSourceFile.setText(filename)
Beispiel #2
0
 def _initDialog( self ):
     for s in Supplier.list():
         self.uSupplierSelector.addNameValue( s['name'], s['id'])
Beispiel #3
0
 def loadList( self ):
     self.uListModel.setList( Supplier.list())