示例#1
0
class MainWindow(QtGui.QMainWindow):

    def __init__(self, managers = None):
        QtGui.QMainWindow.__init__(self)
        loadUI(self, '/GUI/mainwindow.ui')
        centerOnScreen(self)
        self.setWindowTitle("Gestor de movimientos")
        QtGui.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Escape), self, self.close)

        self.managers = managers

    def __centerOnScreen (self):
        resolution = QtGui.QDesktopWidget().screenGeometry()
        self.move((resolution.width() / 2) - (self.frameSize().width() / 2),
                  (resolution.height() / 2) - (self.frameSize().height() / 2))

    @QtCore.pyqtSlot()
    def on_btLibroDiario_clicked(self):
        self.libro = LibroDiarioGUI(self.managers.movimientos, managers = [CuentasGUI(self.managers.cuentas)])
        self.libro.setWindowIcon( self.btLibroDiario.icon() )
        self.libro.show()

    @QtCore.pyqtSlot()
    def on_btCuentas_clicked(self):
        self.secciones = SeccionesCategoriasGUI(
                    self.managers.secciones,
                    managers = [
                                SeccionesGUI(self.managers.secciones, managers = [self.managers.cuentas]),
                                CuentasGUI(self.managers.cuentas)])
        self.secciones.setWindowIcon( self.btCuentas.icon() )
        self.secciones.show()
示例#2
0
 def on_btCuentas_clicked(self):
     self.secciones = SeccionesCategoriasGUI(
                 self.managers.secciones,
                 managers = [
                             SeccionesGUI(self.managers.secciones, managers = [self.managers.cuentas]),
                             CuentasGUI(self.managers.cuentas)])
     self.secciones.setWindowIcon( self.btCuentas.icon() )
     self.secciones.show()
示例#3
0
class AllModules(QtGui.QMainWindow):
    
    def __init__(self, managers = None):
        FILENAME = 'all_modules.ui'
        QtGui.QMainWindow.__init__(self)
        uifile = os.path.join(os.path.abspath(os.path.dirname(__file__)),FILENAME)
        ICONFILE = join(abspath(dirname(__file__)),'images_rc/logo.png')              
        uic.loadUi(uifile, self)
        self.__centerOnScreen()
        self.setWindowTitle("Mi sistema")
        QtGui.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Escape), self, self.close)
        
        self.managers = managers
       
        
    def __centerOnScreen (self):
        '''Centers the window on the screen.'''
        resolution = QtGui.QDesktopWidget().screenGeometry()
        self.move((resolution.width() / 2) - (self.frameSize().width() / 2),
                  (resolution.height() / 2) - (self.frameSize().height() / 2))            
                
    @QtCore.pyqtSlot()
    def on_btLibroDiario_clicked(self):
        self.libro = LibroDiarioGUI(self.managers.movimientos, managers = [CuentasGUI(self.managers.cuentas)])
        self.libro.setWindowIcon( self.btLibroDiario.icon() )
        self.libro.show() 
           
    @QtCore.pyqtSlot()
    def on_btSecciones_clicked(self):
        self.secciones = SeccionesCategoriasGUI(
                    self.managers.secciones, 
                    managers = [
                                SeccionesGUI(self.managers.secciones, managers = [self.managers.cuentas]),
                                CuentasGUI(self.managers.cuentas)])
        self.secciones.setWindowIcon( self.btSecciones.icon() )
        self.secciones.show()