src/aboutDialog.cpp

changeset 240
bdc9d429cdc2
parent 229
b9e101b76eb3
child 286
7a562bf3d829
equal deleted inserted replaced
239:ea09eeba1c2b 240:bdc9d429cdc2
45 "to redistribute it under the terms of GPL v3. See the<br />" 45 "to redistribute it under the terms of GPL v3. See the<br />"
46 "LICENSE text file for details. If the license text is not<br />" 46 "LICENSE text file for details. If the license text is not<br />"
47 "available for some reason, see<br />" 47 "available for some reason, see<br />"
48 "<a href=\"http://www.gnu.org/licenses/\">http://www.gnu.org/licenses/</a> for the license terms.</p>" 48 "<a href=\"http://www.gnu.org/licenses/\">http://www.gnu.org/licenses/</a> for the license terms.</p>"
49 49
50 "<p>The application icon is derived from " 50 "<p>The graphical assets of " APPNAME " are licensed under the<br />"
51 "<a href=\"http://en.wikipedia.org/wiki/File:Anvil,_labelled_en.svg\">this image</a>.</p>" 51 "<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\">CC Attribution-ShareAlike 3.0 Unported license</a>. The<br />"
52 "GNU GPL applies to the source code of the program.<br />"
53 "The application icon is derived from <a href=\"http://en.wikipedia.org/wiki/File:Anvil,_labelled_en.svg\">this image</a>. The<br />"
54 "linked image (retrieved 22 May 2013) was released<br />"
55 "into the public domain.</p>"
52 ); 56 );
53 57
54 // Rest in peace, James. 58 // Rest in peace, James.
55 QLabel* memorial = new QLabel ("In living memory of James Jessiman."); 59 QLabel* memorial = new QLabel ("In living memory of James Jessiman.");
56
57 // Align everything to the center.
58 for (QLabel* label : vector<QLabel*> ({icon, title, info, memorial}))
59 label->setAlignment (Qt::AlignCenter);
60 60
61 QDialogButtonBox* buttons = new QDialogButtonBox (QDialogButtonBox::Close); 61 QDialogButtonBox* buttons = new QDialogButtonBox (QDialogButtonBox::Close);
62 QPushButton* helpButton = new QPushButton; 62 QPushButton* helpButton = new QPushButton;
63 63
64 helpButton->setText ("Mail Author"); 64 helpButton->setText ("Mail Author");
66 buttons->addButton (static_cast<QAbstractButton*> (helpButton), QDialogButtonBox::HelpRole); 66 buttons->addButton (static_cast<QAbstractButton*> (helpButton), QDialogButtonBox::HelpRole);
67 connect (buttons, SIGNAL (helpRequested ()), this, SLOT (slot_mail ())); 67 connect (buttons, SIGNAL (helpRequested ()), this, SLOT (slot_mail ()));
68 connect (buttons, SIGNAL (rejected ()), this, SLOT (reject ())); 68 connect (buttons, SIGNAL (rejected ()), this, SLOT (reject ()));
69 69
70 QVBoxLayout* layout = new QVBoxLayout (this); 70 QVBoxLayout* layout = new QVBoxLayout (this);
71 layout->addWidget (icon); 71
72 layout->addWidget (title); 72 // Align everything to the center.
73 layout->addWidget (info); 73 for (QLabel* label : vector<QLabel*> ({icon, title, info, memorial})) {
74 layout->addWidget (memorial); 74 label->setAlignment (Qt::AlignCenter);
75 layout->addWidget (label);
76 }
77
75 layout->addWidget (buttons); 78 layout->addWidget (buttons);
76 79
77 setWindowTitle ("About " APPNAME); 80 setWindowTitle ("About " APPNAME);
78 } 81 }
79 82

mercurial