QScintilla/ShellHistoryDialog.py

changeset 3030
4a0a82ddd9d2
parent 3011
18292228c724
child 3034
7ce719013078
child 3058
0a02c433f52d
equal deleted inserted replaced
3029:4055a15ce0f2 3030:4a0a82ddd9d2
29 """ 29 """
30 super().__init__(shell) 30 super().__init__(shell)
31 self.setupUi(self) 31 self.setupUi(self)
32 32
33 self.historyList.addItems(history) 33 self.historyList.addItems(history)
34 self.historyList.setCurrentRow(self.historyList.count() - 1, 34 self.historyList.setCurrentRow(
35 QItemSelectionModel.Clear) 35 self.historyList.count() - 1, QItemSelectionModel.Clear)
36 self.historyList.scrollToItem(self.historyList.currentItem()) 36 self.historyList.scrollToItem(self.historyList.currentItem())
37 37
38 self.vm = vm 38 self.vm = vm
39 self.shell = shell 39 self.shell = shell
40 40
111 Private slot to reload the history. 111 Private slot to reload the history.
112 """ 112 """
113 history = self.shell.getHistory(None) 113 history = self.shell.getHistory(None)
114 self.historyList.clear() 114 self.historyList.clear()
115 self.historyList.addItems(history) 115 self.historyList.addItems(history)
116 self.historyList.setCurrentRow(self.historyList.count() - 1, 116 self.historyList.setCurrentRow(
117 QItemSelectionModel.Clear) 117 self.historyList.count() - 1, QItemSelectionModel.Clear)
118 self.historyList.scrollToItem(self.historyList.currentItem()) 118 self.historyList.scrollToItem(self.historyList.currentItem())
119 119
120 def getHistory(self): 120 def getHistory(self):
121 """ 121 """
122 Public method to retrieve the history from the dialog. 122 Public method to retrieve the history from the dialog.

eric ide

mercurial