예제 #1
0
class ControlPanel(QtGui.QListView):
    phrase_selected = QtCore.pyqtSignal(object)
    def __init__(self, parent=None):
        QtGui.QListView.__init__(self, parent)
        self.list_model = PhrasesListModel()

    def set_xml(self, xml):
        self.list_model.set_xml(xml)
        self.setModel(self.list_model)
        self.selectionModel().currentRowChanged.connect(self._phrase_selected)

    def _phrase_selected(self, new_index, old_index):
        self.phrase_selected.emit(new_index)
예제 #2
0
class ControlPanel(QtGui.QListView):
    phrase_selected = QtCore.pyqtSignal(object)

    def __init__(self, parent=None):
        QtGui.QListView.__init__(self, parent)
        self.list_model = PhrasesListModel()

    def set_xml(self, xml):
        self.list_model.set_xml(xml)
        self.setModel(self.list_model)
        self.selectionModel().currentRowChanged.connect(self._phrase_selected)

    def _phrase_selected(self, new_index, old_index):
        self.phrase_selected.emit(new_index)
예제 #3
0
 def __init__(self, parent=None):
     QtGui.QListView.__init__(self, parent)
     self.list_model = PhrasesListModel()
예제 #4
0
 def __init__(self, parent=None):
     QtGui.QListView.__init__(self, parent)
     self.list_model = PhrasesListModel()