]> Shamusworld >> Repos - virtualjaguar/blob - src/gui/about.cpp
More GUI fill in, new About box
[virtualjaguar] / src / gui / about.cpp
1 //
2 // about.cpp - Credits
3 //
4 // by James L. Hammons
5 // (C) 2010 Underground Software
6 //
7 // JLH = James L. Hammons <jlhamm@acm.org>
8 //
9 // Who  When        What
10 // ---  ----------  -------------------------------------------------------------
11 // JLH  01/21/2010  Created this file
12 //
13
14 #include "about.h"
15
16 AboutWindow::AboutWindow(QWidget * parent/*= 0*/): QWidget()
17 {
18         layout = new QVBoxLayout();
19         layout->setSizeConstraint(QLayout::SetFixedSize);
20 //      layout->setMargin(Style::WindowMargin);
21 //      layout->setSpacing(Style::WidgetSpacing);
22         setLayout(layout);
23
24 //  logo = new Logo;
25 //  logo->setFixedSize(600, 106);
26 //  layout->addWidget(logo);
27
28         text = new QLabel(tr(
29                 "<table>"
30                 "<tr><td align='right'><b>Version: </b></td><td>2.0.0</td></tr>"
31                 "<tr><td align='right'><b>Author: </b></td><td>byuu</td></tr>"
32                 "<tr><td align='right'><b>Homepage: </b></td><td>http://byuu.org/</td></tr>"
33                 "</table>"
34         ));
35         layout->addWidget(text);
36 }
37
38
39 // Byuu's version...
40 #if 0
41 #include "about.moc"
42 AboutWindow *aboutWindow;
43
44 AboutWindow::AboutWindow() : QbWindow(config().geometry.aboutWindow) {
45   setObjectName("about-window");
46   setWindowTitle("About bsnes ...");
47
48   layout = new QVBoxLayout;
49   layout->setSizeConstraint(QLayout::SetFixedSize);
50   layout->setMargin(Style::WindowMargin);
51   layout->setSpacing(Style::WidgetSpacing);
52   setLayout(layout);
53
54   logo = new Logo;
55   logo->setFixedSize(600, 106);
56   layout->addWidget(logo);
57
58   info = new QLabel(string() <<
59     "<table>"
60     "<tr><td align='right'><b>Version: </b></td><td>" << bsnesVersion << "</td></tr>"
61     "<tr><td align='right'><b>Author: </b></td><td>byuu</td></tr>"
62     "<tr><td align='right'><b>Homepage: </b></td><td>http://byuu.org/</td></tr>"
63     "</table>"
64   );
65   layout->addWidget(info);
66 }
67
68 void AboutWindow::Logo::paintEvent(QPaintEvent*) {
69   QPainter painter(this);
70   QPixmap pixmap(":/logo.png");
71   painter.drawPixmap(0, 0, pixmap);
72 }
73 #endif