]> Shamusworld >> Repos - architektonas/blobdiff - src/about.cpp
Added line-to-circle intersection code.
[architektonas] / src / about.cpp
index acf06163b87fe87b6dbdb967e716a4dee63a7a65..7a8a210158736c5a5290be3fcf668d969253b107 100644 (file)
@@ -7,7 +7,7 @@
 // JLH = James Hammons <jlhamm@acm.org>
 //
 // Who  When        What
-// ---  ----------  -------------------------------------------------------------
+// ---  ----------  ------------------------------------------------------------
 // JLH  01/21/2010  Created this file
 // JLH  01/22/2010  Fleshed out the credits a bit more
 // JLH  01/22/2010  Fixed centering and decorating of window
 //
 
 #include "about.h"
+//testing... #include "structs.h"
+
 
 AboutWindow::AboutWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
 {
        setWindowTitle(tr("About Architektonas..."));
 
        layout = new QVBoxLayout();
-       layout->setSizeConstraint(QLayout::SetFixedSize);
+//     layout->setSizeConstraint(QLayout::SetFixedSize);
        setLayout(layout);
 
-//     image = new QLabel();
-//     image->setAlignment(Qt::AlignRight);
-//     image->setPixmap(QPixmap(":/res/atns-icon.png"));
-//     layout->addWidget(image);
-
-#if 0
-//     QString s = QString(tr("(Last full build was on %1 %2)<br>")).arg(__DATE__).arg(__TIME__);
-       QString s = QString(tr(""//<img src=':/res/atns-icon.png'>"//));
-//     s.append(tr(
-//"This is some random text. I wonder if it will be rendered correctly or not???</p>"
-               "<table><tr><td valign='middle'>"
-               "<table>"
-               "<tr><td align='right'><b>Architektonas: </b></td><td>Free, <i>Industrial Strength</i> 2D Computer Aided Design</td></tr>"
-               "<tr><td align='right'><b>Version: </b></td><td>1.0.0</td></tr>"
-               "<tr><td align='right'><b>License: </b></td><td>GPL v3 or later</td></tr>"
-               "<tr><td align='right'><b>Chief Architect: </b></td><td>James L. Hammons (shamus)</td></tr>"
-               "<tr><td align='right'><b>Coders: </b></td><td>James L. Hammons (shamus)</td></tr>"
-//             "<tr><td align='right'><b>Testers: </b></td><td>shamus</td></tr>"
-               "<tr><td align='right'><b>Homepage: </b></td><td>http://shamusworld.gotdns.org/architektonas/</td></tr>"
-               "</table>"
-               "</td>"
-               "<td><img src=':/res/atns-icon.png'></td></tr></table>"
-               "<br><br>"
-               "<i>The authors of Architektonas would like to express their heartfelt gratitude to:</i>"
-//             "<br>"
-               "<ul>"
-               "<li>The authors of <b>Inkscape</b>, whose incredible GUI was a huge inspiration for us</li>"
-               "<li><b>QCad</b> for sucking so bad that we just <i>had</i> to write something better</li>"
-               "<li>Every other 2D CAD package out there that's mired in a legacy of the bad old days of pencil and paper, and all the attendant horrors that came along with that. We couldn't have done it without you!</li>"
-               "</ul>"
-       ));
-#else
        QString s = QString(tr(
                "<table>"
                "<tr>"
-               "<td  style='padding-right:15px'><img src=':/res/about-logo.png'></td>"
+               "<td style='padding-right:15px; float:left'><img src=':/res/about-logo.png'></td>"
                "<td>"
+//             "<img src=':/res/about-logo.png' style='padding-right:15px; float:left'>"
+
                "<table>"
-//             "<tr><td align='right'><b>Architektonas: </b></td><td width='100'>Free, <i>Industrial Strength</i> 2D Computer Aided Design</td></tr>"
-               "<tr><td align='right' width='100'><b>Architektonas: </b></td><td>Free, <i>Industrial Strength</i> 2D Computer Aided Design</td></tr>"
+               "<tr><td align='right' width='130'><b>Architektonas: </b></td><td>Free, <i>Industrial Strength</i> 2D Computer Aided Design</td></tr>"
                "<tr><td align='right'><b>Version: </b></td><td>1.0.0</td></tr>"
                "<tr><td align='right'><b>License: </b></td><td>GPL v3 or later</td></tr>"
                "<tr><td align='right'><b>Chief Architect: </b></td><td>James Hammons (shamus)</td></tr>"
@@ -73,18 +44,18 @@ AboutWindow::AboutWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
 //             "<tr><td align='right'><b>Testers: </b></td><td>shamus</td></tr>"
                "<tr><td align='right'><b>Homepage: </b></td><td>http://shamusworld.gotdns.org/architektonas/</td></tr>"
                "</table>"
+
                "<br><br>"
                "<i>The authors of Architektonas would like to express their heartfelt gratitude to:</i>"
                "<ul>"
                "<li>The authors of <b>Inkscape</b>, whose incredible GUI was a huge inspiration for us</li>"
                "<li><b>QCad</b> for sucking so bad that we just <i>had</i> to write something better</li>"
-               "<li>Every other 2D CAD package out there that's mired in a legacy of the bad old days of pencil and paper, and all the attendant horrors that came along with that. We couldn't have done it without you!</li>"
+               "<li>Every other 2D CAD package out there that's mired in a legacy of the bad old days of pencil and paper, and all the attendant horrors that come along with that. We couldn't have done it without you!</li>"
                "</ul>"
                "</td>"
                "</tr>"
                "</table>"
        ));
-#endif
 
        text = new QLabel(s);
        text->setWordWrap(true);
@@ -92,3 +63,11 @@ AboutWindow::AboutWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
 //     text->setMaximumWidth(800);
        layout->addWidget(text);
 }
+
+
+void AboutWindow::keyPressEvent(QKeyEvent * e)
+{
+       if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Return)
+               hide();
+}
+