-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mudanças de layouts e implementação de novas funções nas telas de fea…
…dback. (#185) * Função para mover a Interface Função para mover a interface pelo pressionar do mous. * alteração no import Alteração no import. * correção na função * Update home.py Correção da inicialização da variável * pequenas alterações alterações na tela de cadastro pessoas * Mudanças * Revert "pequenas alterações" This reverts commit 2d45c9f. * mover telas ainda a completar * Revert "mover telas ainda a completar" This reverts commit 26b1921. * Função para movimentação da tela e maximizar e minimizar com dois cliques * função redimensionar. * Redimensionamento da home * . * movimentação da telas de feadback. * correção dos layouts --------- Co-authored-by: Prof-Rayner <[email protected]>
- Loading branch information
1 parent
b504c51
commit 5805e82
Showing
11 changed files
with
117 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
from PyQt5.QtWidgets import QDialog | ||
from PyQt5.uic import loadUi | ||
from PyQt5.QtCore import Qt, QPoint | ||
|
||
class FeadbackConcluido(QDialog): | ||
def __init__(self): | ||
super().__init__() | ||
loadUi('App/view/ui/feadbackConcluido.ui',self) | ||
loadUi('App/view/ui/feadbackConcluido.ui', self) | ||
|
||
#label do aviso do Concluido = #texto | ||
# Variáveis para armazenar o estado da movimentação | ||
self._is_dragging = False | ||
self._start_pos = QPoint() | ||
|
||
def mousePressEvent(self, event): | ||
if event.button() == Qt.LeftButton: | ||
self._is_dragging = True | ||
self._start_pos = event.globalPos() - self.frameGeometry().topLeft() | ||
event.accept() | ||
|
||
def mouseMoveEvent(self, event): | ||
if self._is_dragging and event.buttons() == Qt.LeftButton: | ||
self.move(event.globalPos() - self._start_pos) | ||
event.accept() | ||
|
||
def mouseReleaseEvent(self, event): | ||
if event.button() == Qt.LeftButton: | ||
self._is_dragging = False | ||
event.accept() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,62 @@ | ||
from PyQt5.QtWidgets import QDialog | ||
from PyQt5.uic import loadUi | ||
from PyQt5.QtCore import Qt | ||
from PyQt5.QtCore import Qt, QPoint | ||
|
||
class FeadbackErro(QDialog): | ||
def __init__(self, txt): | ||
super().__init__() | ||
loadUi('App/view/ui/feadbackErro.ui',self) | ||
loadUi('App/view/ui/feadbackErro.ui', self) | ||
|
||
self.texto.setText(txt) | ||
|
||
# Remove a barra de título e as bordas da janela | ||
self.setWindowFlags(Qt.FramelessWindowHint) | ||
|
||
# Variáveis para controle de movimentação | ||
self._is_dragging = False | ||
self._start_pos = QPoint() | ||
|
||
# Botões | ||
self.btnConfirmar.clicked.connect(self.reject) | ||
self.btnFechar.clicked.connect(self.reject) | ||
|
||
def mudarFoto(self, img): | ||
if img == 'Validado': | ||
self.setStyleSheet(""" | ||
#icon { | ||
image: url(App/view/ui/icones/iconConcluido.png) | ||
image: url(App/view/ui/icones/iconConcluido.png); | ||
} | ||
""") | ||
""") | ||
else: | ||
self.setStyleSheet(""" | ||
#icon { | ||
image: url(App/view/ui/icones/iconErro.png) | ||
image: url(App/view/ui/icones/iconErro.png); | ||
} | ||
""") | ||
|
||
|
||
|
||
""") | ||
|
||
# Adiciona movimentação da janela | ||
def mousePressEvent(self, event): | ||
if event.button() == Qt.LeftButton: | ||
self._is_dragging = True | ||
self._start_pos = event.globalPos() - self.frameGeometry().topLeft() | ||
event.accept() | ||
|
||
def mouseMoveEvent(self, event): | ||
if self._is_dragging and event.buttons() == Qt.LeftButton: | ||
self.move(event.globalPos() - self._start_pos) | ||
event.accept() | ||
|
||
def mouseReleaseEvent(self, event): | ||
if event.button() == Qt.LeftButton: | ||
self._is_dragging = False | ||
event.accept() | ||
|
||
|
||
if __name__ == "__main__": | ||
from PyQt5.QtWidgets import QApplication | ||
resp = FeadbackErro('sla') | ||
resp = FeadbackErro('Texto de exemplo') | ||
app = QApplication([]) | ||
if resp.exec_(): | ||
print('ok') | ||
else: | ||
print('negado') | ||
print('negado') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters