MCPcopy Create free account
hub / github.com/SaschaWillems/VulkanCapsViewer / SubmitDialog

Method SubmitDialog

submitDialog.cpp:34–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#include <QCoreApplication>
33
34SubmitDialog::SubmitDialog(QWidget *parent, QString submitter, QString caption) : QDialog(parent)
35{
36 QFormLayout *formLayout = new QFormLayout;
37
38 // QDialogBox doesn't appear modal on Android which makes it hard to see
39 #ifdef ANDROID
40 QLabel *labelCaption = new QLabel();
41 labelCaption->setText(caption);
42 formLayout->addRow(labelCaption);
43 setStyleSheet("QDialog{ border: 2px solid black; border-style: solid; border-radius: 4px; }");
44 #endif
45
46 editSubmitter = new QLineEdit();
47 editSubmitter->setObjectName("submitter");
48 editSubmitter->setPlaceholderText("Can be left empty");
49 editSubmitter->setText(submitter);
50 editSubmitter->setMinimumWidth(200);
51 formLayout->addRow("Submitter:", editSubmitter);
52
53 editComment = new QLineEdit();
54 editComment->setObjectName("comment");
55 editComment->setPlaceholderText("Can be left empty");
56 editComment->setMinimumWidth(200);
57 editComment->setMaxLength(32);
58 formLayout->addRow("Comment:", editComment);
59
60 QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
61 connect(buttonBox, SIGNAL(accepted()), this, SLOT(slotAccept()), Qt::QueuedConnection);
62 connect(buttonBox, SIGNAL(rejected()), this, SLOT(slotCancel()), Qt::QueuedConnection);
63
64 formLayout->addWidget(buttonBox);
65
66 setLayout(formLayout);
67 setWindowTitle(caption);
68}
69
70
71SubmitDialog::~SubmitDialog()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected