Beispiel #1
0
class SermonController(QDialog):
    '''
    classdocs
    '''


    def __init__(self):
        '''
        Constructor
        '''
        QDialog.__init__(self)
        ''' config ui '''
        self.ui = Ui_SermonView()
        self.ui.setupUi(self)
        ''' signals '''
        self.ui.PB_fechar.clicked.connect(self.reject)
        self.ui.PB_limpar.clicked.connect(self.ui_limpar)
        self.ui.PB_salvar.clicked.connect(self.ui_salvar)
        self.ui.PB_pesquisar.clicked.connect(self.ui_pesquisar)
        
        self.dao = SermonDAO()
        
    
    def ui_pesquisar(self):
        _sermon_search = SermonSearchController()
        _sermon_search.exec_() 
    
    def ui_salvar(self):
        s = Sermon(self.ui.LE_Tema.text(),self.ui.TE_texto_base.toPlainText())
        self.dao.save(s)
        
        
    def ui_limpar(self):
        self.ui.LE_Tema.clear()
        self.ui.TE_texto_base.clear()
Beispiel #2
0
 def __init__(self):
     '''
     Constructor
     '''
     QDialog.__init__(self)
     ''' config ui '''
     self.ui = Ui_SermonView()
     self.ui.setupUi(self)
     ''' signals '''
     self.ui.PB_fechar.clicked.connect(self.reject)
     self.ui.PB_limpar.clicked.connect(self.ui_limpar)
     self.ui.PB_salvar.clicked.connect(self.ui_salvar)
     self.ui.PB_pesquisar.clicked.connect(self.ui_pesquisar)
     
     self.dao = SermonDAO()