18 #include <QGridLayout> 20 #include <QDialogButtonBox> 25 #include <QPushButton> 28 QColor colour, QString defaultName,
33 setWindowTitle(title);
35 QGridLayout *layout =
new QGridLayout(
this);
37 QLabel *label =
new QLabel(message,
this);
38 layout->addWidget(label, 0, 0, 1, 2);
52 (colour.red() + colour.green() + colour.blue() > 384);
58 QDialogButtonBox *bb =
new QDialogButtonBox(QDialogButtonBox::Ok |
59 QDialogButtonBox::Cancel);
60 layout->addWidget(bb, 3, 0, 1, 2);
61 connect(bb, SIGNAL(accepted()),
this, SLOT(accept()));
62 connect(bb, SIGNAL(rejected()),
this, SLOT(reject()));
97 QPainter paint(&pmap);
100 paint.drawRect(2, 2, 15, 15);