Home | Trees | Indices | Help |
|
---|
|
1 # ============================================================================ 2 # 3 # Copyright (C) 2007-2008 Conceptive Engineering bvba. All rights reserved. 4 # www.conceptive.be / project-camelot@conceptive.be 5 # 6 # This file is part of the Camelot Library. 7 # 8 # This file may be used under the terms of the GNU General Public 9 # License version 2.0 as published by the Free Software Foundation 10 # and appearing in the file LICENSE.GPL included in the packaging of 11 # this file. Please review the following information to ensure GNU 12 # General Public Licensing requirements will be met: 13 # http://www.trolltech.com/products/qt/opensource.html 14 # 15 # If you are unsure which license is appropriate for your use, please 16 # review the following information: 17 # http://www.trolltech.com/products/qt/licensing.html or contact 18 # project-camelot@conceptive.be. 19 # 20 # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 21 # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 22 # 23 # For use of this library in commercial applications, please contact 24 # project-camelot@conceptive.be 25 # 26 # ============================================================================ 27 28 """Functions and classes to use a progress dialog in combination with 29 a model thread""" 30 31 from camelot.core.utils import ugettext as _ 32 from camelot.view.art import Icon 33 34 from PyQt4 import QtGui, QtCore 3537 """A Progress Dialog to be used in combination with a post to the model thread:: 38 39 to display a progress dialog until my_function has finished : 40 41 d = ProgressDialog() 42 post(my_function, p.finished, p.exception) 43 d.exec_() 44 45 """ 466148 QtGui.QProgressDialog.__init__( self, QtCore.QString(), QtCore.QString(), 0, 0 ) 49 label = QtGui.QLabel(unicode(name)) 50 #label.setPixmap(icon.getQPixmap()) 51 self.setLabel(label) 52 self.setWindowTitle( _('Please wait') )53 5658 from camelot.view.controls.exception import model_thread_exception_message_box 59 model_thread_exception_message_box(exception_info) 60 self.finished(False)
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Jun 12 15:42:10 2010 | http://epydoc.sourceforge.net |