584 |
584 |
585 if path: |
585 if path: |
586 self._setEditorText(path) |
586 self._setEditorText(path) |
587 self.pathSelected.emit(path) |
587 self.pathSelected.emit(path) |
588 |
588 |
|
589 def setReadOnly(self, readOnly): |
|
590 """ |
|
591 Public method to set the path picker to read only mode. |
|
592 |
|
593 @param readOnly flag indicating read only mode |
|
594 @type bool |
|
595 """ |
|
596 try: |
|
597 self._editor.setReadOnly(readOnly) |
|
598 except AttributeError: |
|
599 self._editor.setEditable(not readOnly) |
|
600 self.setPickerEnabled(not readOnly) |
|
601 |
|
602 def isReadOnly(self): |
|
603 """ |
|
604 Public method to check the path picker for read only mode. |
|
605 |
|
606 @return flg indicating read only mode |
|
607 @rtype bool |
|
608 """ |
|
609 try: |
|
610 return self._editor.isReadOnly() |
|
611 except AttributeError: |
|
612 return not self._editor.isEditable() |
|
613 |
589 ################################################################## |
614 ################################################################## |
590 ## Methods below emulate some of the QComboBox API |
615 ## Methods below emulate some of the QComboBox API |
591 ################################################################## |
616 ################################################################## |
592 |
617 |
593 def addItems(self, pathsList): |
618 def addItems(self, pathsList): |