diff --git a/consolegui/application/MainFrameResult.py b/consolegui/application/MainFrameResult.py
index 9916127..4a24b51 100755
--- a/consolegui/application/MainFrameResult.py
+++ b/consolegui/application/MainFrameResult.py
@@ -324,6 +324,7 @@ class MainFrameRes(QtGui.QWidget):
self._parent.main_frame.setWidgetResizable(True)
self._parent.control_button.show()
self._parent.control_button.add_clear_cache_button(self.cur_pid)
+ self.initUI()
return 0
if hasattr (self, "mytable"):
@@ -398,18 +399,17 @@ class MainFrameRes(QtGui.QWidget):
self.show_warning(self, mess)
except:
pass
-
+
def get_message(self, item, sid, pid):
try:
if self.cur_pid != pid:
return 1
except:
return 1
- print 'item.type =', item.type
""" get one message by its type """
for case in switch(item.type):
if case('normal'):
-
+
self.show_normal(item)
return 1
if case('progress'):
@@ -451,6 +451,7 @@ class MainFrameRes(QtGui.QWidget):
return 1
if case('endFrame'):
self.endFrame(item)
+ self.resize(self.sizeHint())
return 0
if case('startGroup'):
self.startGroup(item)
diff --git a/consolegui/application/more.py b/consolegui/application/more.py
index ebd5f6e..edab779 100755
--- a/consolegui/application/more.py
+++ b/consolegui/application/more.py
@@ -2136,22 +2136,50 @@ class ResultLayout(QtGui.QVBoxLayout):
self.removeWidget(self.kill_process_button)
self.kill_process_button.close()
+class LabelTaskWgt(QtGui.QLabel):
+ def __init__(self, name, parent = None):
+ QtGui.QLabel.__init__(self, name, parent)
+ self.setStyleSheet("color: #B3ABA7;")
+
+ def sizeHint(self):
+ self.br_ = QtGui.QFontMetrics(self.font()).boundingRect('')
+ return self.br_.size()
+
+ def paintEvent(self, e):
+ p = QtGui.QPainter(self)
+ fm = p.fontMetrics()
+ y = (self.sizeHint().height() - self.br_.height()) / 2 + fm.ascent()
+
+ dot_w = fm.width('. ')
+ for x in xrange (0, self.width(), dot_w):
+ p.drawText(x, y, '. ')
+
class TaskWidget(QtGui.QWidget):
def __init__(self, text = '', parent = None):
QtGui.QWidget.__init__(self)
layout = QtGui.QHBoxLayout(self)
-# lbl_text = text + ' …'
- lbl_text = text + ' …'
- self.text = LabelWordWrap(lbl_text, self)
+
+ self.text = QtGui.QLabel(text, self)
+ fm = QtGui.QFontMetrics(self.text.font())
+ d_w = fm.width(text)
+ pref = QtGui.QSizePolicy.Policy.Preferred
+ self.text.setSizePolicy(pref, pref)
+ self.text.setMinimumHeight(self.text.sizeHint().height())
+ self.text.setMinimumWidth(d_w)
layout.addWidget(self.text)
layout.setContentsMargins(0,0,0,0)
- layout.setSpacing(0)
-
+ layout.setSpacing(8)
+
+ point_lbl = LabelTaskWgt('', self)
+ layout.addWidget(point_lbl)
+
self.image_lbl = QtGui.QLabel(self)
self.image_lbl.setFixedSize(16,16)
layout.addWidget(self.image_lbl)
-
+
+ layout.setStretch(0,0)
+ layout.setStretch(1,5)
self.set_status = False
def set_ok(self):