37 "the object being turned into an error object. Please do refer to the " |
37 "the object being turned into an error object. Please do refer to the " |
38 "<a href=\"http://www.ldraw.org/article/218.html\">official file format " |
38 "<a href=\"http://www.ldraw.org/article/218.html\">official file format " |
39 "standard</a> for further information."); |
39 "standard</a> for further information."); |
40 qContents->setMinimumWidth (384); |
40 qContents->setMinimumWidth (384); |
41 |
41 |
|
42 if (obj->getType() == OBJ_Gibberish) { |
|
43 qErrorLabel = new QLabel; |
|
44 qErrorLabel->setText (str::mkfmt ("<span style=\"color: #900\">%s</span>", |
|
45 static_cast<LDGibberish*> (obj)->zReason.chars())); |
|
46 } |
|
47 |
42 IMPLEMENT_DIALOG_BUTTONS |
48 IMPLEMENT_DIALOG_BUTTONS |
43 |
49 |
44 QVBoxLayout* layout = new QVBoxLayout; |
50 QVBoxLayout* layout = new QVBoxLayout; |
45 layout->addWidget (qContentsLabel); |
51 layout->addWidget (qContentsLabel); |
46 layout->addWidget (qContents); |
52 layout->addWidget (qContents); |
47 layout->addWidget (qButtons); |
53 |
|
54 QHBoxLayout* layout2 = new QHBoxLayout; |
|
55 |
|
56 if (obj->getType() == OBJ_Gibberish) |
|
57 layout2->addWidget (qErrorLabel); |
|
58 |
|
59 layout2->addWidget (qButtons); |
|
60 layout->addLayout (layout2); |
48 setLayout (layout); |
61 setLayout (layout); |
49 |
62 |
50 setWindowTitle (APPNAME_DISPLAY " - setting contents"); |
63 setWindowTitle (APPNAME_DISPLAY " - setting contents"); |
51 setWindowIcon (QIcon ("icons/set-contents.png")); |
64 setWindowIcon (QIcon ("icons/set-contents.png")); |
52 } |
65 } |