예제 #1
0
파일: pydocgui.py 프로젝트: jsantoul/ga
 def initialize(self):
     """Start pydoc server and load home page"""
     QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
     QApplication.processEvents()
     self.start_server()
     self.go_home()
     QApplication.restoreOverrideCursor()
예제 #2
0
파일: pydocgui.py 프로젝트: jsantoul/ga
 def initialize(self):
     """Start pydoc server and load home page"""
     QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
     QApplication.processEvents()
     self.start_server()
     self.go_home()
     QApplication.restoreOverrideCursor()
예제 #3
0
파일: __init__.py 프로젝트: jsantoul/ga
 def ending_long_process(self, message=""):
     """
     Clearing main window's status bar
     and restoring mouse cursor
     """
     QApplication.restoreOverrideCursor()
     self.show_message(message, timeout=2000)
     QApplication.processEvents()
예제 #4
0
파일: mixins.py 프로젝트: Pyke75/ga
 def mouseMoveEvent(self, event):
     """Show Pointing Hand Cursor on error messages"""
     text = self.get_line_at(event.pos())
     if get_error_match(text):
         if not self.__cursor_changed:
             QApplication.setOverrideCursor(QCursor(Qt.PointingHandCursor))
             self.__cursor_changed = True
         event.accept()
         return
     if self.__cursor_changed:
         QApplication.restoreOverrideCursor()
         self.__cursor_changed = False
     self.QT_CLASS.mouseMoveEvent(self, event)
예제 #5
0
파일: mixins.py 프로젝트: Pyke75/ga
 def leaveEvent(self, event):
     """If cursor has not been restored yet, do it now"""
     if self.__cursor_changed:
         QApplication.restoreOverrideCursor()
         self.__cursor_changed = False
     self.QT_CLASS.leaveEvent(self, event)
예제 #6
0
파일: Parameters.py 프로젝트: benjello/ga
            profiles = store_prof['profiles']
            
            self.set_population_prolong()
            self.set_taxes_proj()
            
        except Exception, e:
            self.population_loaded = False
            QMessageBox.warning(self, u"Impossible de lire les données de population", 
                                u"GA n'a pas réussi à lire les données de population. L'erreur suivante a été renvoyée:\n%s\n\nVous pouvez configuer le chemin vers le fichier de données  Fichier>Paramètres>Chemins>Fichier données population"%e)
            return False
        finally:

            
            store_prof.close()
            self.update_population_choices()
            QApplication.restoreOverrideCursor()

        self._input_profiles = profiles.reset_index()
        
        
        
    def set_population(self):
        '''
        Sets population data
        '''
        widget = self.population_combo.box
        if isinstance(widget, QComboBox):
            data = widget.itemData(widget.currentIndex())                
            data_name = unicode(data.toString())
            self.population_name = data_name
            self.emit(SIGNAL('population_changed()'))
예제 #7
0
            self.set_population_prolong()
            self.set_taxes_proj()

        except Exception, e:
            self.population_loaded = False
            QMessageBox.warning(
                self, u"Impossible de lire les données de population",
                u"GA n'a pas réussi à lire les données de population. L'erreur suivante a été renvoyée:\n%s\n\nVous pouvez configuer le chemin vers le fichier de données  Fichier>Paramètres>Chemins>Fichier données population"
                % e)
            return False
        finally:

            store_prof.close()
            self.update_population_choices()
            QApplication.restoreOverrideCursor()

        self._input_profiles = profiles.reset_index()

    def set_population(self):
        '''
        Sets population data
        '''
        widget = self.population_combo.box
        if isinstance(widget, QComboBox):
            data = widget.itemData(widget.currentIndex())
            data_name = unicode(data.toString())
            self.population_name = data_name
            self.emit(SIGNAL('population_changed()'))

    def update_population_choices(self):