示例#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
示例#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()
#-*- 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_()
示例#5
0
 def setFocus(self):
     if self.acceptFocus():
         CApplication.setFocus(self)
示例#6
0
 def __init__(self, parent=None):
     super().__init__(parent)
     CApplication.registrarTela(self)
     self._visible = True
示例#7
0
 def hasFocus(self):
     return CApplication.getTelaFocada() == self
示例#8
0
 def update(self):
     if self.isVisible():
         CApplication.updateApp()
示例#9
0
 def hide(self):
     CApplication.hideTelaPrincipal()
示例#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_()
 def _atualizar(self):
     tela = CApplication.getScreenshot()
     self._tela.setTela(tela.rstrip('\n')+' ')
     self.update()
    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) 
示例#14
0
 def close(self):
     CApplication.hideTelaPrincipal()
     self._telaPrincipal.setVisible(True)
     self._telaPrincipal.show()
     CApplication.setFocus(self._telaFocada)