move close button to bottom

master3.3
Denis Spiridonov 12 years ago
parent c6bd05f64b
commit 87abad9edb

@ -219,11 +219,14 @@ class ControlButtonWgt(QtGui.QWidget):
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Maximum))
return end_layout
def add_clear_cache_button(self, pid):
def add_clear_cache_button(self, pid = None):
end_layout = self.pre_add_button()
self.pid = pid
self.clear_proc_cache_button = QtGui.QPushButton(_('Close'), self)
if pid:
self.pid = pid
self.clear_proc_cache_button.clicked.connect(self.clear_pid_cache)
else:
self.clear_proc_cache_button.clicked.connect(self._parent.back)
self.clear_proc_cache_button.setMinimumWidth(64)
self.clear_proc_cache_button.setFixedHeight(32)
end_layout.addWidget(self.clear_proc_cache_button)

@ -339,13 +339,13 @@ class MainFrameRes(QtGui.QWidget):
self._parent.control_button.add_clear_cache_button(self.cur_pid)
self.initUI()
def clear_pid_cache(self):
self.clear_proc_cache_button.setDisabled(True)
sid = int(self.ClientObj.sid)
res = self.client.service.clear_pid_cache(sid, self.cur_pid)
if res:
_print (_('Error close process'))
self._parent.back()
# def clear_pid_cache(self):
# self.clear_proc_cache_button.setDisabled(True)
# sid = int(self.ClientObj.sid)
# res = self.client.service.clear_pid_cache(sid, self.cur_pid)
# if res:
# _print (_('Error close process'))
# self._parent.back()
def startGroup(self, item):
pass
@ -611,7 +611,8 @@ class MainFrameRes(QtGui.QWidget):
'get_progress', sid, pid, id, return_except = True, \
through_object = (sid, pid, id, temp_progress, \
progressBar))
self.get_Progress_thread.signal_extended.connect(self.get_Progress_cycle)
self.get_Progress_thread.signal_extended.connect \
(self.get_Progress_cycle)
self.get_Progress_thread.start()
def get_Progress_cycle(self, returnProgr, through_object):

@ -217,14 +217,14 @@ class ShortFrameRes(QtGui.QWidget):
self._parent.control_button.add_clear_cache_button(self.cur_pid)
self.initUI()
def clear_pid_cache(self):
self.clear_proc_cache_button.setDisabled(True)
sid = int(self.ClientObj.sid)
res = self.client.service.clear_pid_cache(sid, self.cur_pid)
if res:
show_msg (_('Error clear process cache on server'))
else:
self._parent.back()
# def clear_pid_cache(self):
# self.clear_proc_cache_button.setDisabled(True)
# sid = int(self.ClientObj.sid)
# res = self.client.service.clear_pid_cache(sid, self.cur_pid)
# if res:
# show_msg (_('Error clear process cache on server'))
# else:
# self._parent.back()
def startGroup(self, item):
pass

@ -188,14 +188,9 @@ class MainFrame(QtGui.QWidget):
# add close button if one field
if len (self.view.groups.GroupField) == 1 \
and len (Group.fields.Field) == 1:
exit_button = QtGui.QPushButton(_('Close'), self)
exit_button.setFixedWidth(100)
exit_button.clicked.connect \
(self.ClientObj.MainWidget.back)
self.grid.addWidget(exit_button, x, y+1)
x += 1
add_button_flag = True
self._parent.control_button.del_button()
self._parent.control_button.add_clear_cache_button()
elif field.element == 'input':
if field.name in ['cl_page_count','cl_page_offset']:

Loading…
Cancel
Save