Exemplo n.º 1
0
 def customEvent(self, event):
     if event.type() == EventoTecladoConsole.KeyType:
         self.onKey(event.tecla())
     elif event.type() == EventoTecladoConsole.EscapeType:
         self.onEscape()
     elif event.type() == EventoTecladoConsole.EnterType:
         self.onEnter()
     elif event.type() == EventoTecladoConsole.DirecionalType:
         self.onDirecional(event.tecla())
     elif event.type() == EventoTecladoConsole.FuncionalType:
         self.onFuncional(event.tecla())
     elif event.type() == EventoTecladoConsole.EspecialType:
         self.onEspecial(event.tecla())
     elif event.type() == EventoTecladoConsole.TabType:
         tela = self
         while tela:
             if tela.focusNextChild():
                 break
             tela = tela.parent()
         else:
             CApplication.setFocusTelaPrincipal()
         
     elif event.type() == EventoFocusConsole.FocusIn:
         self.onFocusIn(event)
     elif event.type() == EventoFocusConsole.FocusOut:
         self.onFocusOut(event)
 def update(self):
     painter = QPainter(self)#CApplication.getTelaPrincipal())
     painter.translate(self.getPos())
     self.paint(painter)
     painter.end()
     
     if not CApplication.updateRequested():
         CApplication.setUpdateRequested(True)
         QCoreApplication.postEvent(CApplication.getInstance(), EventoUpdateConsole(EventoUpdateConsole.UpdateRequest))
         return
Exemplo n.º 3
0
    def show(self):
        self._telaFocada = CApplication.getTelaFocada()
        self._telaPrincipal = CApplication.getTelaPrincipal()
        self._telaPrincipal.setVisible(False)

        CApplication.hideTelaPrincipal()
        self._telaPopup.show()
        CApplication.setFocus(None)
        self.focusNextChild()
Exemplo n.º 4
0
#-*- coding: utf-8 -*-
import sys
sys.path.append("C:/Users/infox/My Documents/Aptana Studio 3 Workspace/mensageiroConsole/src")

from engineConsole.base.baseApplication import CApplication
from servicos.servicoMensageiro import ServicoServidorMensageiro, ServicoClienteMensageiro
from telasMensageiro.telaUsuarios import TelaUsuarios

cApp = CApplication()

s = ServicoServidorMensageiro()
sc = ServicoClienteMensageiro()
t = TelaUsuarios(sc)
t.show()

cApp.exec_()
Exemplo n.º 5
0
 def setFocus(self):
     if self.acceptFocus():
         CApplication.setFocus(self)
Exemplo n.º 6
0
 def __init__(self, parent=None):
     super().__init__(parent)
     CApplication.registrarTela(self)
     self._visible = True
Exemplo n.º 7
0
 def hasFocus(self):
     return CApplication.getTelaFocada() == self
Exemplo n.º 8
0
 def update(self):
     if self.isVisible():
         CApplication.updateApp()
Exemplo n.º 9
0
 def hide(self):
     CApplication.hideTelaPrincipal()
Exemplo n.º 10
0
 def show(self):
     CApplication.setTelaPrincipal(self)
#-*- coding: utf-8 -*-
import sys
sys.path.append("C:/Users/infox/My Documents/Aptana Studio 3 Workspace/mensageiroConsole/src")
sys.path.append("C:/Users/infox/My Documents/Aptana Studio 3 Workspace/base mensageiro/src")

from engineConsole.base.baseApplication import CApplication
from engineConsole.telas import LabelEditConsole 
from remoto.eventoTecladoRemoto import EventoTecladoRemotoReceber


cApp = CApplication()
e = EventoTecladoRemotoReceber()
cApp.setEventoTeclado(e)

l = LabelEditConsole("Teste")
l.show()


cApp.exec_()
Exemplo n.º 12
0
 def _atualizar(self):
     tela = CApplication.getScreenshot()
     self._tela.setTela(tela.rstrip('\n')+' ')
     self.update()
Exemplo n.º 13
0
    def __init__(self, parent=None):
        super().__init__("",parent)
        self._tela = TelaDeviceConsole()
        self.resize(80*8+5, 24*11+10)

        CApplication.getInstance().telaAtualizada.connect(self._atualizar) 
Exemplo n.º 14
0
 def close(self):
     CApplication.hideTelaPrincipal()
     self._telaPrincipal.setVisible(True)
     self._telaPrincipal.show()
     CApplication.setFocus(self._telaFocada)