def __init__(self, title, action, address, host, userName): super(EditMailbox, self).__init__() self.action = action self.layout.addLayout(commonView.horizontal(QtWidgets.QLabel(title))) self.layout.insertStretch(-1) self.addressEdit = QtWidgets.QLineEdit(address) self.hostEdit = QtWidgets.QLineEdit(host) self.userNameEdit = QtWidgets.QLineEdit(userName) valuesBox = QtWidgets.QGridLayout() valuesBox.addWidget(QtWidgets.QLabel("Email Address"), 0, 0) valuesBox.addWidget(self.addressEdit, 0, 1) valuesBox.addWidget(QtWidgets.QLabel("Host"), 1, 0) valuesBox.addWidget(self.hostEdit, 1, 1) valuesBox.addWidget(QtWidgets.QLabel("User Name"), 2, 0) valuesBox.addWidget(self.userNameEdit, 2, 1) self.layout.addLayout(valuesBox) self.layout.insertStretch(-1) commonView.buttons(self, self.layout, self.save) self.messages = QtWidgets.QLabel(" ") self.layout.addWidget(self.messages) self.layout.insertStretch(-1)
def __init__(self, controller): super(MailboxesView, self).__init__() self.controller = controller commonView.button(self.layout, "Add Mailbox", self.addMailbox) commonView.button(self.layout, "Edit Mailbox", self.editMailbox) commonView.button(self.layout, "Delete Mailbox", self.deleteMailbox) commonView.button(self.layout, "Close", self.exit) self.messages = commonView.PlainLabel(" ") self.layout.addLayout(commonView.horizontal(self.messages)) self.layout.insertStretch(-1)
def __init__(self, app, controller): """app is included so that we can call the eventloop and put messages in a loop""" super().__init__() self.app = app self.controller = controller commonView.button(self.layout, "Edit Mailboxes", self.editMailboxes) commonView.button(self.layout, "Edit Sites", self.editSites) self.pickSite = QtWidgets.QComboBox() self.layout.addLayout(commonView.horizontal(self.pickSite)) self.pickSite.addItems(self.controller.getSiteList()) self.layout.insertStretch(-1) commonView.button(self.layout, "Login", self.login) commonView.button(self.layout, "Exit", self.exit) self.messages = commonView.PlainLabel() self.layout.addLayout(commonView.horizontal(self.messages)) self.messages.setText(" ") self.layout.insertStretch(-1)
def __init__(self): super(RenameSiteBase, self).__init__() self.newName = QtWidgets.QLineEdit() label = commonView.PlainLabel("New Name") self.layout.addLayout(commonView.horizontalPair(label, self.newName)) self.layout.insertStretch(-1) commonView.buttons(self, self.layout, self.save) self.messages = commonView.PlainLabel(" ") self.layout.addLayout(commonView.horizontal(self.messages)) self.layout.insertStretch(-1)
def __init__(self, controller, picker): super(SitesView, self).__init__() self.controller = controller self.picker = picker commonView.button(self.layout, "Add Site", self.addSite) commonView.button(self.layout, "Rename Site", self.renameSite) commonView.button(self.layout, "Delete Site", self.deleteSite) commonView.button(self.layout, "Display Site", self.displaySite) commonView.button(self.layout, "Close", self.close) self.messages = commonView.PlainLabel(" ") self.layout.addLayout(commonView.horizontal(self.messages)) self.layout.insertStretch(-1)
def __init__(self, address): super(Password, self).__init__() self.password = "" self.layout.addLayout( commonView.horizontal(commonView.PlainLabel(address))) passwordLabel = commonView.PlainLabel("Password") self.passwordEdit = QtWidgets.QLineEdit() self.passwordEdit.setEchoMode(QtWidgets.QLineEdit.Password) self.layout.addLayout( commonView.horizontalPair(passwordLabel, self.passwordEdit)) self.layout.insertStretch(-1) commonView.buttons(self, self.layout, self.save)
def __init__(self, controller, picker): super(AddSite, self).__init__() self.controller = controller self.picker = picker dataLabel = commonView.PlainLabel("Data link") self.linkText = QtWidgets.QLineEdit() self.layout.addLayout(commonView.horizontalPair(dataLabel, self.linkText)) self.layout.insertStretch(-1) commonView.buttons(self, self.layout, self.save) self.messages = commonView.PlainLabel(" ") self.layout.addLayout(commonView.horizontal(self.messages)) self.layout.insertStretch(-1)