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. |