13 okButton->setAutoDefault(
false);
14 cancelButton->setAutoDefault(
false);
17 colorDepthCombo->addItem(tr(
"2 colors (1 bit per pixel)"));
18 colorDepthCombo->addItem(tr(
"4 colors (2 bits per pixel)"));
19 colorDepthCombo->addItem(tr(
"16 colors (4 bits per pixel)"));
20 colorDepthCombo->addItem(tr(
"256 colors (8 bits per pixel)"));
21 colorDepthCombo->addItem(tr(
"65536 colors (16 bits per pixel)"));
22 colorDepthCombo->addItem(tr(
"16 million colors (24 bits per pixel)"));
24 connect(cancelButton, &QAbstractButton::clicked,
this, &QDialog::reject);
26 connect(okButton, &QAbstractButton::clicked,
this, &ImageDialog::checkValues);
33 if (nameLineEdit->text().isEmpty()) {
34 QMessageBox::information(
this, tr(
"No Image Name"),
35 tr(
"Please supply a name for the image."), QMessageBox::Cancel);