OSDN Git Service

[UI][Qt] Improve About dialog.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Thu, 29 Oct 2015 06:55:23 +0000 (15:55 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Thu, 29 Oct 2015 06:55:23 +0000 (15:55 +0900)
source/src/qt/gui/display_about.cpp
source/src/qt/gui/display_about.h

index 0584b7e..7cfa87c 100644 (file)
@@ -1,14 +1,15 @@
 /*
+ * Common Source Project/ Qt
+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
+ *  Qt: Menu->Help->About Dialog
+ *  History: Oct 28, 2015 : Initial
  */
 
 
 #include <QFile>
 #include <QString>
 #include <QByteArray>
-#include <QTextBrowser>
-#include <QLabel>
 #include <QIODevice>
-#include <QUrl>
 #include <QStringList>
 
 #include "menuclasses.h"
@@ -48,10 +49,27 @@ Dlg_AboutCSP::Dlg_AboutCSP(QWidget *parent) : QWidget(parent)
 
        iconarea = new QLabel(parent);
        iconarea->setPixmap(QPixmap::fromImage(image));
+       iconarea->setFixedSize(image.width() + 5, image.height() + 5);
+
+       QString name;
+       titlearea = new QLabel(parent);
+       name = QString::fromUtf8("<div align=left><B><FONT SIZE=+1>Common Source Code Project</B></div>");
+       name.append(QString::fromUtf8("<div align=center>for&nbsp;&nbsp;<FONT SIZE=+1><B>"));
+       name.append(QString::fromUtf8(DEVICE_NAME));
+       name.append(QString::fromUtf8("</B></FONT></div>"));
+       titlearea->setText(name);
+       titlearea->setAlignment(Qt::AlignRight);
+   
+       HBox1 = new QHBoxLayout;
+       HBox1->addWidget(iconarea);
+       HBox1->addWidget(titlearea);
+
+       //BoxTitle = new QGroupBox();
+       BoxTitle = new QWidget(this);
+       BoxTitle->setLayout(HBox1);
 
-       
        VBox = new QVBoxLayout;
-       VBox->addWidget(iconarea);
+       VBox->addWidget(BoxTitle);
        VBox->addWidget(TextBox);
        this->setLayout(VBox);
 
index 98424e4..efeb4db 100644 (file)
@@ -1,22 +1,24 @@
 /*
- * Common Source code project
+ * Common Source Project/ Qt
+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
+ *  Qt: Menu->Help->About Dialog
+ *  History: Oct 28, 2015 : Initial
  */
-
 #ifndef _CSP_QT_DISPLAY_ABOUT_H
 #define _CSP_QT_DISPLAY_ABOUT_H
 
-#include <QFile>
-#include <QString>
-#include <QByteArray>
 #include <QTextBrowser>
 #include <QLabel>
 #include <QGroupBox>
 #include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QGroupBox>
 
-#include "emu.h"
+//#include "emu.h"
 
 QT_BEGIN_NAMESPACE
 
+class EMU;
 class Dlg_AboutCSP : public QWidget
 {
        Q_OBJECT
@@ -26,7 +28,10 @@ protected:
 
        QTextBrowser *TextBox;
        QLabel *iconarea;
-       QGroupBox *gBox;
+       QLabel *titlearea;
+       QHBoxLayout *HBox1;
+       //QGroupBox *BoxTitle;
+       QWidget *BoxTitle;
        QVBoxLayout *VBox;
 public:
        Dlg_AboutCSP(QWidget *parent = 0);