| 28 | extern Global global; |
| 29 | |
| 30 | EmailDialog::EmailDialog(QWidget *parent) : |
| 31 | QDialog(parent) |
| 32 | { |
| 33 | setWindowIcon(global.getIconResource(":emailIcon")); |
| 34 | sendPressed = false; |
| 35 | cancelPressed = true; |
| 36 | setWindowTitle(tr("Send Email")); |
| 37 | |
| 38 | sendButton = new QPushButton(tr("Send")); |
| 39 | cancelButton = new QPushButton(tr("Cancel")); |
| 40 | |
| 41 | QGridLayout *grid = new QGridLayout(this); |
| 42 | setLayout(grid); |
| 43 | QGridLayout *addressGrid = new QGridLayout(); |
| 44 | QGridLayout *noteGrid = new QGridLayout(); |
| 45 | QGridLayout *buttonGrid = new QGridLayout(); |
| 46 | grid->addLayout(addressGrid, 0,0); |
| 47 | grid->addLayout(noteGrid, 1,0); |
| 48 | grid->addLayout(buttonGrid,2,0); |
| 49 | |
| 50 | toLabel = new QLabel(this); |
| 51 | toLabel->setText(tr("To:")); |
| 52 | bccLabel = new QLabel(this); |
| 53 | bccLabel->setText(tr("BCC:")); |
| 54 | ccLabel = new QLabel(this); |
| 55 | ccLabel->setText(tr("CC:")); |
| 56 | subjectLabel = new QLabel(this); |
| 57 | subjectLabel->setText(tr("Subject:")); |
| 58 | noteLabel = new QLabel(this); |
| 59 | noteLabel->setText(tr("Note:")); |
| 60 | |
| 61 | ccSelf = new QCheckBox(this); |
| 62 | |
| 63 | toAddress = new QLineEdit(this); |
| 64 | ccAddress = new QLineEdit(this); |
| 65 | bccAddress = new QLineEdit(this); |
| 66 | subject = new QLineEdit(this); |
| 67 | note = new QPlainTextEdit(this); |
| 68 | |
| 69 | int row = 0; |
| 70 | addressGrid->addWidget(toLabel, row, 0); |
| 71 | addressGrid->addWidget(toAddress, row++, 1); |
| 72 | addressGrid->addWidget(ccLabel, row, 0); |
| 73 | addressGrid->addWidget(ccAddress, row++, 1); |
| 74 | addressGrid->addWidget(bccLabel, row, 0); |
| 75 | addressGrid->addWidget(bccAddress, row++, 1); |
| 76 | |
| 77 | ccSelf->setText(tr("CC me on this email")); |
| 78 | noteGrid->addWidget(ccSelf, 0,0); |
| 79 | |
| 80 | addressGrid->addWidget(subjectLabel, row, 0); |
| 81 | addressGrid->addWidget(subject, row++,1); |
| 82 | |
| 83 | noteGrid->addWidget(noteLabel, 1, 0); |
| 84 | noteGrid->addWidget(note, 2,0); |
| 85 | |
| 86 | buttonGrid->addWidget(cancelButton, 0,0); |
| 87 | buttonGrid->addWidget(sendButton, 0,1); |
nothing calls this directly
no test coverage detected