forked from M-Labs/artiq
1
0
Fork 0

gui: add addItems to populate log level comboboxes

This commit is contained in:
Sebastien Bourdeauducq 2015-10-27 18:10:31 +08:00
parent 967d4eda63
commit 138ba7e2fa
2 changed files with 2 additions and 4 deletions

View File

@ -257,8 +257,7 @@ class ExplorerDock(dockarea.Dock):
grid.addWidget(self.flush, 3, 2)
self.log_level = QtGui.QComboBox()
for item in "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL":
self.log_level.addItem(item)
self.log_level.addItems(["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"])
self.log_level.setCurrentIndex(1)
self.log_level.setToolTip("Minimum level for log entry production")
grid.addWidget(self.log_level, 3, 3)

View File

@ -100,8 +100,7 @@ class LogDock(dockarea.Dock):
grid.layout.setColumnStretch(1, 0)
grid.layout.setColumnStretch(2, 1)
self.filterbox = QtGui.QComboBox()
for item in "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL":
self.filterbox.addItem(item)
self.filterbox.addItems(["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"])
self.filterbox.setToolTip("Display entries at or above this level")
grid.addWidget(self.filterbox, 0, 1)
self.filterbox.currentIndexChanged.connect(self.filter_changed)