parent
d128ffd133
commit
9fa8ca5520
@ -58,7 +58,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="searchContainer">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
@ -72,9 +72,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="searchbox"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
|
@ -119,6 +119,23 @@ class QubesManagerFileWatcher(ProcessEvent):
|
|||||||
trayIcon.showMessage("Qubes dom0 updates available.", msecs=0)
|
trayIcon.showMessage("Qubes dom0 updates available.", msecs=0)
|
||||||
|
|
||||||
|
|
||||||
|
class SearchBox(QLineEdit):
|
||||||
|
def __init__(self, parent=None):
|
||||||
|
super(SearchBox, self).__init__(parent)
|
||||||
|
self.focusing = False
|
||||||
|
|
||||||
|
def focusInEvent(self, e):
|
||||||
|
super(SearchBox, self).focusInEvent(e)
|
||||||
|
self.selectAll()
|
||||||
|
self.focusing = True
|
||||||
|
|
||||||
|
def mousePressEvent(self, e):
|
||||||
|
super(SearchBox, self).mousePressEvent(e)
|
||||||
|
if self.focusing:
|
||||||
|
self.selectAll()
|
||||||
|
self.focusing = False
|
||||||
|
|
||||||
|
|
||||||
class VmRowInTable(object):
|
class VmRowInTable(object):
|
||||||
cpu_graph_hue = 210
|
cpu_graph_hue = 210
|
||||||
mem_graph_hue = 120
|
mem_graph_hue = 120
|
||||||
@ -333,6 +350,9 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
self.blk_watch_thread.daemon = True
|
self.blk_watch_thread.daemon = True
|
||||||
self.blk_watch_thread.start()
|
self.blk_watch_thread.start()
|
||||||
|
|
||||||
|
self.searchbox = SearchBox()
|
||||||
|
self.searchContainer.addWidget(self.searchbox)
|
||||||
|
|
||||||
self.connect(self.table, SIGNAL("itemSelectionChanged()"),
|
self.connect(self.table, SIGNAL("itemSelectionChanged()"),
|
||||||
self.table_selection_changed)
|
self.table_selection_changed)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user