From 0cfed606380bdf83bb56ba9592abca7c4675a06a Mon Sep 17 00:00:00 2001 From: Kevin Vertucio Date: Thu, 24 Jan 2013 07:09:36 -0500 Subject: [PATCH] added OP Icon to About GCS Version tab Signed-off-by: Kevin Vertucio --- .../src/plugins/coreplugin/authorsdialog.cpp | 6 +- .../plugins/coreplugin/qml/AboutDialog.qml | 136 +++++++++--------- 2 files changed, 75 insertions(+), 67 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp index dcdb6970a..67b3c28f6 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp @@ -58,9 +58,9 @@ AuthorsDialog::AuthorsDialog(QWidget *parent) // We need to set the window icon explicitly here since for some reason the // application icon isn't used when the size of the dialog is fixed (at least not on X11/GNOME) - // setWindowIcon(QIcon(":/core/images/openpilot_logo_32.png")); - // setWindowTitle(tr("About OpenPilot")); - setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog); + setWindowIcon(QIcon(":/core/images/openpilot_logo_32.png")); + setWindowTitle(tr("About OpenPilot")); + setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); //This loads a QML doc containing a Tabbed view QDeclarativeView *view = new QDeclarativeView(this); view->setSource(QUrl("qrc:/core/qml/AboutDialog.qml")); diff --git a/ground/openpilotgcs/src/plugins/coreplugin/qml/AboutDialog.qml b/ground/openpilotgcs/src/plugins/coreplugin/qml/AboutDialog.qml index a848fd9b7..a6200ba73 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/qml/AboutDialog.qml +++ b/ground/openpilotgcs/src/plugins/coreplugin/qml/AboutDialog.qml @@ -41,68 +41,76 @@ import QtQuick 1.1 import QtWebKit 1.0 - // This is a tabbed pane element. Add a nested Rectangle to add a tab. - - TabWidget { - id: tabs - width: 640; height: 480 - // This tab is for the GCS version information - Rectangle { - property string title: "OpenPilot GCS" - anchors.fill: parent - color: "#e3e3e3" - - Rectangle { - anchors.fill: parent; anchors.margins: 20 - color: "#e3e3e3" - Flickable { - anchors.fill: parent - anchors.centerIn: parent - Text { - id: versionLabel - width: parent.width - 20 - anchors.centerIn: parent; horizontalAlignment: Qt.AlignLeft - font.pixelSize: 12 - wrapMode: Text.WordWrap - text: version - } - } - } - } -// This is a stub for the Plugins if I can ever figure that out. - // Rectangle { - // property string title: "Plugins" - // anchors.fill: parent - // color: "#e3e3e3" - // - // Rectangle { - // anchors.fill: parent; anchors.margins: 20 - // color: "#7fff7f" - // Text { - // width: parent.width - 20 - // anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter - // text: "Flower stems are green" - // font.pixelSize: 20 - // wrapMode: Text.WordWrap - // } - // } - // } -// This tab is for the authors/contributors/credits - Rectangle { - property string title: "Authors" - anchors.fill: parent; color: "#e3e3e3" - - Rectangle { - anchors.fill: parent; anchors.margins: 20 - color: "#e3e3e3" - - FlickableWebView { - id: webView - url: "../CREDITS.html" - // onProgressChanged: header.urlChanged = false - anchors { top: parent.top; left: parent.left; right: parent.right; bottom: parent.bottom } + // This is a tabbed pane element. Add a nested Rectangle to add a tab. + + TabWidget { + id: tabs + width: 640; height: 480 + // This tab is for the GCS version information + Rectangle { + property string title: "OpenPilot GCS" + anchors.fill: parent + color: "#e3e3e3" + + Rectangle { + anchors.fill: parent; anchors.margins: 20 + color: "#e3e3e3" + Image { + source: "../images/openpilot_logo_128.png" + x: 0; y: 0 + z: 100 + fillMode: Image.PreserveAspectFit + } + Flickable { + anchors.fill: parent + anchors.centerIn: parent + Text { + id: versionLabel + x: 156; y: 0 + width: 430; height: 379 + horizontalAlignment: Qt.AlignLeft + font.pixelSize: 12 + wrapMode: Text.WordWrap + text: version + } } - } - } - } - \ No newline at end of file + } + } + // This is a stub for the Plugins. + // Rectangle { + // property string title: "Plugins" + // anchors.fill: parent + // color: "#e3e3e3" + // + // Rectangle { + // anchors.fill: parent; anchors.margins: 20 + // color: "#7fff7f" + // Text { + // width: parent.width - 20 + // anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter + // text: "Flower stems are green" + // font.pixelSize: 20 + // wrapMode: Text.WordWrap + // } + // } + // } + // This tab is for the authors/contributors/credits + Rectangle { + property string title: "Authors" + anchors.fill: parent; color: "#e3e3e3" + + Rectangle { + anchors.fill: parent; anchors.margins: 20 + color: "#e3e3e3" + + FlickableWebView { + id: webView + z: 0 + url: "../CREDITS.html" + // onProgressChanged: header.urlChanged = false + anchors { top: parent.top; left: parent.left; right: parent.right; bottom: parent.bottom } + } + } + } + } +