Example #1
0
 def buildAdminMail(self, layout, row, col):
     admin_mail = QGroupBox(self)
     admin_mail.setTitle(tr("Administrator email address"))
     admin_mail_layout = QGridLayout(admin_mail)
     admin_mail_info = QLabel(tr("Administrator email address (EdenWall will send the system alerts to this address)"))
     admin_mail_info.setWordWrap(True)
     admin_mail_edit = MailEdit()
     admin_mail_edit.setMinimumWidth(admin_mail_edit.fontMetrics().averageCharWidth() * 15)
     admin_mail_edit.setMaximumWidth(admin_mail_edit.fontMetrics().averageCharWidth() * 45)
     admin_mail_layout.addWidget(admin_mail_info, 0, 0)
     admin_mail_layout.addWidget(admin_mail_edit, 1, 0)
     admin_mail_layout.addItem(QSpacerItem(0, 0, QSizePolicy.Expanding, QSizePolicy.Minimum) , 2, 0)
     self.connect(admin_mail_edit, SIGNAL('textEdited(QString)'), self.setAdminMail)
     layout.addWidget(admin_mail, row, col)
     self.mainwindow.writeAccessNeeded(admin_mail_info, admin_mail_edit)
     return admin_mail_edit
Example #2
0
    def buildSenderMail(self, layout, row, col):
        sender_mail = QGroupBox(self)
        sender_mail.setTitle(tr("Sender email address for system messages"))
        sender_mail_layout = QGridLayout(sender_mail)

        sender_mail_info = QLabel(
            tr("Email address that will be used as the sender address in the emails sent to the administrator by EdenWall.")
            )
        sender_mail_info.setWordWrap(True)
        sender_mail_edit = MailEdit()
        sender_mail_edit.setMinimumWidth(sender_mail_edit.fontMetrics().averageCharWidth() * 15)
        sender_mail_edit.setMaximumWidth(sender_mail_edit.fontMetrics().averageCharWidth() * 45)
        sender_mail_layout.addWidget(sender_mail_info, 0, 0)
        sender_mail_layout.addWidget(sender_mail_edit, 1, 0)
        sender_mail_layout.addItem(QSpacerItem(0, 0, QSizePolicy.Expanding, QSizePolicy.Minimum) , 2, 0)
        self.connect(sender_mail_edit, SIGNAL('textEdited(QString)'), self.setSenderMail)
        layout.addWidget(sender_mail, row, col)
        self.mainwindow.writeAccessNeeded(sender_mail_info, sender_mail_edit)
        return sender_mail_edit