diff --git a/ground/openpilotgcs/src/plugins/welcome/communitywelcomepage.cpp b/ground/openpilotgcs/src/plugins/welcome/communitywelcomepage.cpp deleted file mode 100644 index 04bf4167c..000000000 --- a/ground/openpilotgcs/src/plugins/welcome/communitywelcomepage.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/** - ****************************************************************************** - * - * @file communitywelcomepage.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup WelcomePlugin Welcome Plugin - * @{ - * @brief The GCS Welcome plugin - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "communitywelcomepage.h" -#include "communitywelcomepagewidget.h" - - -namespace Welcome { -namespace Internal { - -CommunityWelcomePage::CommunityWelcomePage() - : m_page(new CommunityWelcomePageWidget) -{ -} - -QWidget* CommunityWelcomePage::page() -{ - return m_page; -} - -} // namespace Internal -} // namespace Welcome diff --git a/ground/openpilotgcs/src/plugins/welcome/communitywelcomepage.h b/ground/openpilotgcs/src/plugins/welcome/communitywelcomepage.h deleted file mode 100644 index 772501989..000000000 --- a/ground/openpilotgcs/src/plugins/welcome/communitywelcomepage.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - ****************************************************************************** - * - * @file communitywelcomepage.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup WelcomePlugin Welcome Plugin - * @{ - * @brief The GCS Welcome plugin - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef COMMUNITYWELCOMEPAGE_H -#define COMMUNITYWELCOMEPAGE_H - -#include "welcome_global.h" - -#include - -namespace Welcome { -namespace Internal { - -class CommunityWelcomePageWidget; - -class CommunityWelcomePage : public Utils::IWelcomePage -{ - Q_OBJECT -public: - CommunityWelcomePage(); - - QWidget *page(); - QString title() const { return tr("Community"); } - int priority() const { return 30; } - -private: - CommunityWelcomePageWidget *m_page; - -}; - -} // namespace Internal -} // namespace Welcome - -#endif // COMMUNITYWELCOMEPAGE_H diff --git a/ground/openpilotgcs/src/plugins/welcome/communitywelcomepagewidget.cpp b/ground/openpilotgcs/src/plugins/welcome/communitywelcomepagewidget.cpp deleted file mode 100644 index f8819e83f..000000000 --- a/ground/openpilotgcs/src/plugins/welcome/communitywelcomepagewidget.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/** - ****************************************************************************** - * - * @file communitywelcomepagewidget.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup WelcomePlugin Welcome Plugin - * @{ - * @brief The GCS Welcome plugin - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "communitywelcomepagewidget.h" -#include "ui_communitywelcomepagewidget.h" - -#include "rssfetcher.h" - -#include -#include -#include - -namespace Welcome { -namespace Internal { -CommunityWelcomePageWidget::CommunityWelcomePageWidget(QWidget *parent) : - QWidget(parent), - m_rssFetcher(new RSSFetcher(7)), - ui(new Ui::CommunityWelcomePageWidget) -{ - ui->setupUi(this); - ui->labsTitleLabel->setStyledText(tr("News From the OpenPilot Project")); - ui->sitesTitleLabel->setStyledText(tr("OpenPilot Websites")); - - connect(ui->newsTreeWidget, SIGNAL(activated(QString)), SLOT(slotUrlClicked(QString))); - connect(ui->sitesTreeWidget, SIGNAL(activated(QString)), SLOT(slotUrlClicked(QString))); - - connect(m_rssFetcher, SIGNAL(newsItemReady(QString, QString, QString)), - ui->newsTreeWidget, SLOT(slotAddNewsItem(QString, QString, QString))); - //: Add localized feed here only if one exists - m_rssFetcher->fetch(QUrl(tr("http://www.openpilot.org/feed/"))); - - QList > sites; - sites << qMakePair(tr("OpenPilot Home"), QString(QLatin1String("http://www.openpilot.org"))); - sites << qMakePair(tr("OpenPilot Wiki"), QString(QLatin1String("http://wiki.openpilot.org"))); - sites << qMakePair(tr("OpenPilot Store"), QString(QLatin1String("http://www.openpilot.org/hardware/get-hardware/"))); - sites << qMakePair(tr("OpenPilot Forums"), QString(QLatin1String("http://forums.openpilot.org"))); - sites << qMakePair(tr("OpenPilot Code Reviews"), QString(QLatin1String("http://git.openpilot.org"))); - sites << qMakePair(tr("OpenPilot Progress Tracker"), QString(QLatin1String("http://progress.openpilot.org"))); - - QListIterator > it(sites); - while (it.hasNext()) { - QPair pair = it.next(); - ui->sitesTreeWidget->addItem(pair.first, pair.second, pair.second); - } - -} - - -CommunityWelcomePageWidget::~CommunityWelcomePageWidget() -{ - delete m_rssFetcher; - delete ui; -} - -void CommunityWelcomePageWidget::slotUrlClicked(const QString &data) -{ - QDesktopServices::openUrl(QUrl(data)); -} - -} // namespace Internal -} // namespace Welcome diff --git a/ground/openpilotgcs/src/plugins/welcome/communitywelcomepagewidget.h b/ground/openpilotgcs/src/plugins/welcome/communitywelcomepagewidget.h deleted file mode 100644 index 895278420..000000000 --- a/ground/openpilotgcs/src/plugins/welcome/communitywelcomepagewidget.h +++ /dev/null @@ -1,63 +0,0 @@ -/** - ****************************************************************************** - * - * @file communitywelcomepagewidget.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup WelcomePlugin Welcome Plugin - * @{ - * @brief The GCS Welcome plugin - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef COMMUNITYWELCOMEPAGEWIDGET_H -#define COMMUNITYWELCOMEPAGEWIDGET_H - -#include - -namespace Welcome { -namespace Internal { - -class RSSFetcher; - -namespace Ui { - class CommunityWelcomePageWidget; -} - -class CommunityWelcomePageWidget : public QWidget -{ - Q_OBJECT - -public: - CommunityWelcomePageWidget(QWidget *parent = 0); - ~CommunityWelcomePageWidget(); - -private slots: - void slotUrlClicked(const QString &data); - - -private: - RSSFetcher *m_rssFetcher; - Ui::CommunityWelcomePageWidget *ui; -}; - - -} // namespace Internal -} // namespace Welcome -#endif // COMMUNITYWELCOMEPAGEWIDGET_H diff --git a/ground/openpilotgcs/src/plugins/welcome/communitywelcomepagewidget.ui b/ground/openpilotgcs/src/plugins/welcome/communitywelcomepagewidget.ui deleted file mode 100644 index 8bba317f7..000000000 --- a/ground/openpilotgcs/src/plugins/welcome/communitywelcomepagewidget.ui +++ /dev/null @@ -1,195 +0,0 @@ - - - Welcome::Internal::CommunityWelcomePageWidget - - - - 0 - 0 - 667 - 352 - - - - Form - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - 0 - 0 - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 0 - 0 - - - - - 340 - 0 - - - - Qt::NoFocus - - - QFrame::NoFrame - - - QAbstractItemView::NoSelection - - - QAbstractItemView::ScrollPerPixel - - - false - - - true - - - true - - - 2 - - - false - - - 24 - - - 0 - - - - 1 - - - - - 2 - - - - - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - 0 - 0 - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - QFrame::NoFrame - - - QAbstractItemView::NoSelection - - - QAbstractItemView::ScrollPerPixel - - - false - - - true - - - true - - - 2 - - - false - - - 24 - - - 0 - - - - 1 - - - - - 2 - - - - - - - - - - - - Utils::WelcomeModeTreeWidget - QTreeWidget -
utils/welcomemodetreewidget.h
-
- - Utils::WelcomeModeLabel - QLabel -
utils/welcomemodetreewidget.h
-
-
- - -
diff --git a/ground/openpilotgcs/src/plugins/welcome/images/arrow-left.png b/ground/openpilotgcs/src/plugins/welcome/images/arrow-left.png deleted file mode 100644 index 6a29679ae..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/arrow-left.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/arrow-right.png b/ground/openpilotgcs/src/plugins/welcome/images/arrow-right.png deleted file mode 100644 index 207f7fcf2..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/arrow-right.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/background_center_frame.png b/ground/openpilotgcs/src/plugins/welcome/images/background_center_frame.png deleted file mode 100644 index d1628e22c..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/background_center_frame.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/btn_26.png b/ground/openpilotgcs/src/plugins/welcome/images/btn_26.png deleted file mode 100644 index 51de8bc89..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/btn_26.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/btn_26_hover.png b/ground/openpilotgcs/src/plugins/welcome/images/btn_26_hover.png deleted file mode 100644 index 391690431..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/btn_26_hover.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/btn_26_pressed.png b/ground/openpilotgcs/src/plugins/welcome/images/btn_26_pressed.png deleted file mode 100644 index 0aa53120d..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/btn_26_pressed.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/btn_27.png b/ground/openpilotgcs/src/plugins/welcome/images/btn_27.png deleted file mode 100644 index bcdf90ded..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/btn_27.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/btn_27_hover.png b/ground/openpilotgcs/src/plugins/welcome/images/btn_27_hover.png deleted file mode 100644 index 2bc8680d7..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/btn_27_hover.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/center_frame_header.png b/ground/openpilotgcs/src/plugins/welcome/images/center_frame_header.png deleted file mode 100644 index 00bb2fc2d..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/center_frame_header.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/combobox_arrow.png b/ground/openpilotgcs/src/plugins/welcome/images/combobox_arrow.png deleted file mode 100644 index fa180a27e..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/combobox_arrow.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/feedback-bar-background.png b/ground/openpilotgcs/src/plugins/welcome/images/feedback-bar-background.png deleted file mode 100644 index 18b3a561f..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/feedback-bar-background.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/feedback_arrow.png b/ground/openpilotgcs/src/plugins/welcome/images/feedback_arrow.png deleted file mode 100644 index 8766098a5..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/feedback_arrow.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/feedback_arrow_hover.png b/ground/openpilotgcs/src/plugins/welcome/images/feedback_arrow_hover.png deleted file mode 100644 index 43d990714..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/feedback_arrow_hover.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/list_bullet_arrow.png b/ground/openpilotgcs/src/plugins/welcome/images/list_bullet_arrow.png deleted file mode 100644 index acf9f5da5..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/list_bullet_arrow.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/mode_project.png b/ground/openpilotgcs/src/plugins/welcome/images/mode_project.png deleted file mode 100644 index 05d7759cf..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/mode_project.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/nokia_logo.png b/ground/openpilotgcs/src/plugins/welcome/images/nokia_logo.png deleted file mode 100644 index 5f46512b7..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/nokia_logo.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/product_logo.png b/ground/openpilotgcs/src/plugins/welcome/images/product_logo.png deleted file mode 100644 index d48e48151..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/product_logo.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/qt_logo.png b/ground/openpilotgcs/src/plugins/welcome/images/qt_logo.png deleted file mode 100644 index 3cbfca726..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/qt_logo.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/images/rc_combined.png b/ground/openpilotgcs/src/plugins/welcome/images/rc_combined.png deleted file mode 100644 index c395794ca..000000000 Binary files a/ground/openpilotgcs/src/plugins/welcome/images/rc_combined.png and /dev/null differ diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/CommunityPanel.qml b/ground/openpilotgcs/src/plugins/welcome/qml/CommunityPanel.qml new file mode 100644 index 000000000..a9c3a17c4 --- /dev/null +++ b/ground/openpilotgcs/src/plugins/welcome/qml/CommunityPanel.qml @@ -0,0 +1,47 @@ +// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5 +import QtQuick 1.1 + +Item { + width: 600 + height: 300 + + BorderImage { + id: background + anchors.fill: parent + + border { left: 30; top: 30; right: 30; bottom: 30 } + source: "images/welcome-news-bg.png" + } + + NewsPanel { + id: newsPanel + anchors.left: parent.left + anchors.top: parent.top + anchors.bottom: parent.bottom + width: parent.width*0.6 + anchors.margins: 32 + + onClicked: welcomePlugin.openUrl(url) + } + + //better to use image instead + Rectangle { + id: separator + width: 1 + height: parent.height*0.7 + anchors.verticalCenter: parent.verticalCenter + anchors.left: newsPanel.right + anchors.margins: 16 + color: "#A0A0B0" + } + + SitesPanel { + anchors.left: newsPanel.right + anchors.right: parent.right + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.margins: 32 + + onClicked: welcomePlugin.openUrl(url) + } +} diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/NewsPanel.qml b/ground/openpilotgcs/src/plugins/welcome/qml/NewsPanel.qml new file mode 100644 index 000000000..d86311549 --- /dev/null +++ b/ground/openpilotgcs/src/plugins/welcome/qml/NewsPanel.qml @@ -0,0 +1,77 @@ +// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5 +import QtQuick 1.1 + +Item { + id: container + width: 100 + height: 62 + + signal clicked(string url) + + Text { + id: header + text: "Project News" + width: parent.width + color: "#303060" + font { + pointSize: 14 + weight: Font.Bold + } + } + + ListView { + id: view + width: parent.width + anchors { top: header.bottom; topMargin: 14; bottom: parent.bottom } + model: xmlModel + delegate: listDelegate + clip: true + } + + XmlListModel { + id: xmlModel + source: "http://www.openpilot.org/feed/" + query: "/rss/channel/item" + + XmlRole { name: "title"; query: "title/string()" } + XmlRole { name: "description"; query: "description/string()" } + XmlRole { name: "link"; query: "link/string()" } + } + + Component { + id: listDelegate + Item { + width: view.width + height: column.height + 16 + + Column { + id: column + spacing: 4 + Text { + text: title + width: view.width + elide: Text.ElideRight + font.bold: true + color: mouseArea.containsMouse ? "darkblue" : "black" + } + + Text { + text: description + width: view.width + elide: Text.ElideRight + color: mouseArea.containsMouse ? "darkblue" : "black" + } + } + + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: true + onClicked: { + console.log(link) + container.clicked(link) + } + } + } + } +} diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/SitesPanel.qml b/ground/openpilotgcs/src/plugins/welcome/qml/SitesPanel.qml new file mode 100644 index 000000000..d8ac28117 --- /dev/null +++ b/ground/openpilotgcs/src/plugins/welcome/qml/SitesPanel.qml @@ -0,0 +1,63 @@ +// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5 +import QtQuick 1.1 + +Item { + id: container + width: 100 + height: 62 + + signal clicked(string url) + + Text { + id: header + text: "OpenPilot Websites" + width: parent.width + color: "#303060" + font { + pointSize: 14 + weight: Font.Bold + } + } + + ListModel { + id: sitesModel + ListElement { title: "OpenPilot Home"; link: "http://www.openpilot.org" } + ListElement { title: "OpenPilot Wiki"; link: "http://wiki.openpilot.org" } + ListElement { title: "OpenPilot Store"; link: "http://www.openpilot.org/hardware/get-hardware/" } + ListElement { title: "OpenPilot Forums"; link: "http://forums.openpilot.org" } + ListElement { title: "OpenPilot Code Reviews"; link: "http://git.openpilot.org" } + ListElement { title: "OpenPilot Progress Tracker"; link: "http://progress.openpilot.org" } + } + + ListView { + id: view + width: parent.width + anchors { top: header.bottom; topMargin: 14; bottom: parent.bottom } + model: sitesModel + spacing: 8 + clip: true + + delegate: Text { + text: title + width: view.width + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + + font { + pointSize: 12 + weight: Font.Bold + } + + color: mouseArea.containsMouse ? "darkblue" : "black" + + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: true + onClicked: { + console.log(link) + container.clicked(link) + } + } + } + } +} diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/WelcomePageButton.qml b/ground/openpilotgcs/src/plugins/welcome/qml/WelcomePageButton.qml new file mode 100644 index 000000000..3da587216 --- /dev/null +++ b/ground/openpilotgcs/src/plugins/welcome/qml/WelcomePageButton.qml @@ -0,0 +1,70 @@ +// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5 +import QtQuick 1.1 + +Item { + id: welcomeButton + width: 116 + height: 116 + + property string baseIconName + property alias label : labelText.text + + signal clicked + + Image { + id: icon + source: "images/"+baseIconName+".png" + anchors.centerIn: parent + } + + Image { + id: hoveredIcon + source: "images/"+baseIconName+"-hover.png" + anchors.centerIn: parent + opacity: 0 + } + + Image { + id: labelImage + source: "images/button-label.png" + opacity: 0 + + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: hoveredIcon.top + anchors.bottomMargin: -8 + + Text { + id: labelText + anchors.baseline: parent.verticalCenter + anchors.baselineOffset: -4 + anchors.horizontalCenter: parent.horizontalCenter + + font { + weight: Font.DemiBold + pointSize: 14 + } + color: "#272727" + } + } + + states: State { + name: "hovered" + PropertyChanges { target: hoveredIcon; opacity: 1.0 } + PropertyChanges { target: labelImage; opacity: 1.0 } + } + + transitions: Transition { + from: ""; to: "hovered"; reversible: true + NumberAnimation { targets: [hoveredIcon, labelImage]; property: "opacity"; duration: 150; easing.type: Easing.InOutQuad } + } + + MouseArea { + id: mouseArea + hoverEnabled: true + anchors.fill: parent + + onEntered: welcomeButton.state = "hovered" + onExited: welcomeButton.state = "" + onClicked: welcomeButton.clicked() + } +} diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/images/button-label.png b/ground/openpilotgcs/src/plugins/welcome/qml/images/button-label.png new file mode 100644 index 000000000..b51247fbd Binary files /dev/null and b/ground/openpilotgcs/src/plugins/welcome/qml/images/button-label.png differ diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-bg.png b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-bg.png new file mode 100644 index 000000000..c3eb66107 Binary files /dev/null and b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-bg.png differ diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-flightdata-hover.png b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-flightdata-hover.png new file mode 100644 index 000000000..5686354f0 Binary files /dev/null and b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-flightdata-hover.png differ diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-flightdata.png b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-flightdata.png new file mode 100644 index 000000000..6d1868781 Binary files /dev/null and b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-flightdata.png differ diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-news-bg.png b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-news-bg.png new file mode 100644 index 000000000..4662dad73 Binary files /dev/null and b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-news-bg.png differ diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-op-bg.png b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-op-bg.png new file mode 100644 index 000000000..3c010a7fa Binary files /dev/null and b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-op-bg.png differ diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-op-logo.png b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-op-logo.png new file mode 100644 index 000000000..18181746c Binary files /dev/null and b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome-op-logo.png differ diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome.jpg b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome.jpg new file mode 100644 index 000000000..cb12ba81c Binary files /dev/null and b/ground/openpilotgcs/src/plugins/welcome/qml/images/welcome.jpg differ diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/main.qml b/ground/openpilotgcs/src/plugins/welcome/qml/main.qml new file mode 100644 index 000000000..48d9e0428 --- /dev/null +++ b/ground/openpilotgcs/src/plugins/welcome/qml/main.qml @@ -0,0 +1,80 @@ +import QtQuick 1.1 + +Rectangle { + width: 1024 + height: 768 + + color: "#272727" + + Image { + id: bg + source: "images/welcome-op-bg.png" + anchors.fill: parent + fillMode: Image.PreserveAspectFit + smooth: true + } + + Column { + anchors.centerIn: parent + width: parent.width + spacing: 32 + + Row { + //anchors.bottom: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + spacing: 16 + + Image { + source: "images/welcome-op-logo.png" + anchors.verticalCenter: parent.verticalCenter + } + + Grid { + id: buttons + columns: 3 + spacing: 4 + + WelcomePageButton { + baseIconName: "welcome-flightdata" + label: "Flight Data" + onClicked: welcomePlugin.openPage("Mode1") + } + + WelcomePageButton { + baseIconName: "welcome-flightdata" + label: "Configuration" + onClicked: welcomePlugin.openPage("Mode2") + } + + WelcomePageButton { + baseIconName: "welcome-flightdata" + label: "Flight Planner" + onClicked: welcomePlugin.openPage("Mode3") + } + + WelcomePageButton { + baseIconName: "welcome-flightdata" + label: "Scopes" + onClicked: welcomePlugin.openPage("Mode4") + } + + WelcomePageButton { + baseIconName: "welcome-flightdata" + label: "HIL" + onClicked: welcomePlugin.openPage("Mode5") + } + + WelcomePageButton { + baseIconName: "welcome-flightdata" + label: "Firmware" + onClicked: welcomePlugin.openPage("Mode6") + } + } //icons grid + } // images row + + CommunityPanel { + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width*0.8 + } + } +} diff --git a/ground/openpilotgcs/src/plugins/welcome/rssfetcher.cpp b/ground/openpilotgcs/src/plugins/welcome/rssfetcher.cpp deleted file mode 100644 index b4fccbffc..000000000 --- a/ground/openpilotgcs/src/plugins/welcome/rssfetcher.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/** - ****************************************************************************** - * - * @file rssfetcher.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup WelcomePlugin Welcome Plugin - * @{ - * @brief The GCS Welcome plugin - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "rssfetcher.h" - -#ifdef Q_OS_UNIX -#include -#endif - -using namespace Welcome::Internal; - -static const QString getOsString() -{ - QString osString; -#if defined(Q_OS_WIN) - switch (QSysInfo::WindowsVersion) { - case (QSysInfo::WV_4_0): - osString += QLatin1String("WinNT4.0"); - break; - case (QSysInfo::WV_5_0): - osString += QLatin1String("Windows NT 5.0"); - break; - case (QSysInfo::WV_5_1): - osString += QLatin1String("Windows NT 5.1"); - break; - case (QSysInfo::WV_5_2): - osString += QLatin1String("Windows NT 5.2"); - break; - case (QSysInfo::WV_6_0): - osString += QLatin1String("Windows NT 6.0"); - break; - case (QSysInfo::WV_6_1): - osString += QLatin1String("Windows NT 6.1"); - break; - default: - osString += QLatin1String("Windows NT (Unknown)"); - break; - } -#elif defined (Q_OS_MAC) - if (QSysInfo::ByteOrder == QSysInfo::BigEndian) - osString += QLatin1String("PPC "); - else - osString += QLatin1String("Intel "); - osString += QLatin1String("Mac OS X "); - switch (QSysInfo::MacintoshVersion) { - case (QSysInfo::MV_10_3): - osString += QLatin1String("10_3"); - break; - case (QSysInfo::MV_10_4): - osString += QLatin1String("10_4"); - break; - case (QSysInfo::MV_10_5): - osString += QLatin1String("10_5"); - break; - case (QSysInfo::MV_10_6): - osString += QLatin1String("10_6"); - break; - default: - osString += QLatin1String("(Unknown)"); - break; - } -#elif defined (Q_OS_UNIX) - struct utsname uts; - if (uname(&uts) == 0) - osString += QString("%1 %2").arg(QLatin1String(uts.sysname)) - .arg(QLatin1String(uts.release)); - else - osString += QLatin1String("Unix (Unknown)"); -#else - ossttring = QLatin1String("Unknown OS"); -#endif - return osString; -} - -RSSFetcher::RSSFetcher(int maxItems, QObject *parent) - : QObject(parent), m_items(0), m_maxItems(maxItems) -{ - connect(&m_http, SIGNAL(readyRead(const QHttpResponseHeader &)), - this, SLOT(readData(const QHttpResponseHeader &))); - - connect(&m_http, SIGNAL(requestFinished(int, bool)), - this, SLOT(finished(int, bool))); -} - -void RSSFetcher::fetch(const QUrl &url) -{ - QList proxies = QNetworkProxyFactory::systemProxyForQuery(QNetworkProxyQuery(url)); - if (proxies.count() > 0) - m_http.setProxy(proxies.first()); - m_http.setHost(url.host()); - QString agentStr = QString("OP-GCS/%1 (QHttp %2; %3; %4; %5 bit)") - .arg(Core::Constants::GCS_VERSION_LONG).arg(qVersion()) - .arg(getOsString()).arg(QLocale::system().name()) - .arg(QSysInfo::WordSize); - QHttpRequestHeader header("GET", url.path()); - //qDebug() << agentStr; - header.setValue("User-Agent", agentStr); - header.setValue("Host", url.host()); - m_connectionId = m_http.request(header); -} - -void RSSFetcher::readData(const QHttpResponseHeader &resp) -{ - if (resp.statusCode() != 200) - m_http.abort(); - else { - m_xml.addData(m_http.readAll()); - parseXml(); - } -} - -void RSSFetcher::finished(int id, bool error) -{ - Q_UNUSED(id) - m_items = 0; - emit finished(error); -} - -void RSSFetcher::parseXml() -{ - while (!m_xml.atEnd()) { - m_xml.readNext(); - if (m_xml.isStartElement()) { - if (m_xml.name() == "item") { - m_titleString.clear(); - m_descriptionString.clear(); - m_linkString.clear(); - } - m_currentTag = m_xml.name().toString(); - } else if (m_xml.isEndElement()) { - if (m_xml.name() == "item") { - m_items++; - if (m_items > m_maxItems) - return; - emit newsItemReady(m_titleString, m_descriptionString, m_linkString); - } - - } else if (m_xml.isCharacters() && !m_xml.isWhitespace()) { - if (m_currentTag == "title") - m_titleString += m_xml.text().toString(); - else if (m_currentTag == "description") - m_descriptionString += m_xml.text().toString(); - else if (m_currentTag == "link") - m_linkString += m_xml.text().toString(); - } - } - if (m_xml.error() && m_xml.error() != QXmlStreamReader::PrematureEndOfDocumentError) { - qWarning() << "XML ERROR:" << m_xml.lineNumber() << ": " << m_xml.errorString(); - m_http.abort(); - } -} diff --git a/ground/openpilotgcs/src/plugins/welcome/rssfetcher.h b/ground/openpilotgcs/src/plugins/welcome/rssfetcher.h deleted file mode 100644 index a08b9d318..000000000 --- a/ground/openpilotgcs/src/plugins/welcome/rssfetcher.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - ****************************************************************************** - * - * @file rssfetcher.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup WelcomePlugin Welcome Plugin - * @{ - * @brief The GCS Welcome plugin - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef RSSFETCHER_H -#define RSSFETCHER_H - -#include -#include -#include - -namespace Welcome { -namespace Internal { - -class RSSFetcher : public QObject -{ - Q_OBJECT -public: - RSSFetcher(int maxItems, QObject *parent = 0); - -signals: - void newsItemReady(const QString& title, const QString& desciption, const QString& url); - -public slots: - void fetch(const QUrl &url); - void finished(int id, bool error); - void readData(const QHttpResponseHeader &); - - signals: - void finished(bool error); - -private: - void parseXml(); - - QXmlStreamReader m_xml; - QString m_currentTag; - QString m_linkString; - QString m_descriptionString; - QString m_titleString; - - QHttp m_http; - int m_connectionId; - int m_items; - int m_maxItems; -}; - -} // namespace Welcome -} // namespace Internal - -#endif // RSSFETCHER_H - diff --git a/ground/openpilotgcs/src/plugins/welcome/welcome.pro b/ground/openpilotgcs/src/plugins/welcome/welcome.pro index 8ea9af5b5..39164e4d6 100644 --- a/ground/openpilotgcs/src/plugins/welcome/welcome.pro +++ b/ground/openpilotgcs/src/plugins/welcome/welcome.pro @@ -1,22 +1,16 @@ TEMPLATE = lib TARGET = Welcome -QT += network +QT += network declarative + include(../../openpilotgcsplugin.pri) include(welcome_dependencies.pri) + HEADERS += welcomeplugin.h \ welcomemode.h \ - rssfetcher.h \ - communitywelcomepagewidget.h \ - communitywelcomepage.h \ welcome_global.h SOURCES += welcomeplugin.cpp \ welcomemode.cpp \ - rssfetcher.cpp \ - communitywelcomepagewidget.cpp \ - communitywelcomepage.cpp -FORMS += welcomemode.ui \ - communitywelcomepagewidget.ui RESOURCES += welcome.qrc DEFINES += WELCOME_LIBRARY OTHER_FILES += Welcome.pluginspec diff --git a/ground/openpilotgcs/src/plugins/welcome/welcome.qrc b/ground/openpilotgcs/src/plugins/welcome/welcome.qrc index ce6c96735..6fab0e9fa 100644 --- a/ground/openpilotgcs/src/plugins/welcome/welcome.qrc +++ b/ground/openpilotgcs/src/plugins/welcome/welcome.qrc @@ -1,20 +1,16 @@ - images/btn_26.png - images/btn_26_hover.png - images/btn_27.png - images/btn_27_hover.png - images/feedback_arrow.png - images/feedback_arrow_hover.png - images/feedback-bar-background.png - images/list_bullet_arrow.png - images/mode_project.png - images/rc_combined.png - images/background_center_frame.png - images/center_frame_header.png - images/btn_26_pressed.png - images/combobox_arrow.png - images/arrow-left.png - images/arrow-right.png + qml/main.qml + qml/CommunityPanel.qml + qml/SitesPanel.qml + qml/WelcomePageButton.qml + qml/NewsPanel.qml + qml/images/welcome-news-bg.png + qml/images/welcome-op-logo.png + qml/images/button-label.png + qml/images/welcome-flightdata-hover.png + qml/images/welcome-flightdata.png + qml/images/welcome-op-bg.png + qml/images/welcome-bg.png diff --git a/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp b/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp index 8da08ba35..f08a58420 100644 --- a/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp +++ b/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp @@ -39,19 +39,18 @@ #include #include -#include -#include -#include #include -#include #include #include #include -#include +#include +#include +#include +#include -#include "ui_welcomemode.h" +#include using namespace ExtensionSystem; using namespace Utils; @@ -62,13 +61,7 @@ struct WelcomeModePrivate { WelcomeModePrivate(); - QScrollArea *m_scrollArea; - QWidget *m_widget; - QWidget *m_welcomePage; - QMap buttonMap; - QHBoxLayout * buttonLayout; - Ui::WelcomeMode ui; - int currentTip; + QDeclarativeView *declarativeView; }; WelcomeModePrivate::WelcomeModePrivate() @@ -80,34 +73,15 @@ WelcomeMode::WelcomeMode() : m_d(new WelcomeModePrivate), m_priority(Core::Constants::P_MODE_WELCOME) { - m_d->m_widget = new QWidget; - QVBoxLayout *l = new QVBoxLayout(m_d->m_widget); - l->setMargin(0); - l->setSpacing(0); -// l->addWidget(new Utils::StyledBar(m_d->m_widget)); - m_d->m_welcomePage = new QWidget(m_d->m_widget); - m_d->ui.setupUi(m_d->m_welcomePage); - m_d->ui.helpUsLabel->setAttribute(Qt::WA_LayoutUsesWidgetRect); - m_d->ui.feedbackButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); - l->addWidget(m_d->m_welcomePage); - - m_d->m_scrollArea = new QScrollArea; - m_d->m_scrollArea->setFrameStyle(QFrame::NoFrame); - m_d->m_scrollArea->setWidget(m_d->m_widget); - m_d->m_scrollArea->setWidgetResizable(true); - - PluginManager *pluginManager = PluginManager::instance(); - connect(pluginManager, SIGNAL(objectAdded(QObject*)), SLOT(welcomePluginAdded(QObject*))); - - connect(m_d->ui.feedbackButton, SIGNAL(clicked()), SLOT(slotFeedback())); - + m_d->declarativeView = new QDeclarativeView; + m_d->declarativeView->setResizeMode(QDeclarativeView::SizeRootObjectToView); + m_d->declarativeView->engine()->rootContext()->setContextProperty("welcomePlugin", this); + m_d->declarativeView->setSource(QUrl("qrc:/welcome/qml/main.qml")); } WelcomeMode::~WelcomeMode() { - // QSettings *settings = Core::ICore::instance()->settings(); - // settings->setValue("General/WelcomeTab", m_d->ui.stackedWidget->currentIndex()); - delete m_d->m_widget; + delete m_d->declarativeView; delete m_d; } @@ -128,7 +102,7 @@ int WelcomeMode::priority() const QWidget* WelcomeMode::widget() { - return m_d->m_scrollArea; + return m_d->declarativeView; } const char* WelcomeMode::uniqueModeName() const @@ -143,87 +117,14 @@ QList WelcomeMode::context() const return contexts; } -bool sortFunction(IWelcomePage * a, IWelcomePage *b) +void WelcomeMode::openUrl(const QString &url) { - return a->priority() < b->priority(); + QDesktopServices::openUrl(QUrl(url)); } -void WelcomeMode::initPlugins() +void WelcomeMode::openPage(const QString &page) { - m_d->buttonLayout = new QHBoxLayout(m_d->ui.navFrame); - m_d->buttonLayout->setMargin(0); - m_d->buttonLayout->setSpacing(0); - delete m_d->ui.stackedWidget->currentWidget(); - QList plugins = PluginManager::instance()->getObjects(); - qSort(plugins.begin(), plugins.end(), &sortFunction); - foreach (IWelcomePage* plugin, plugins) { -// QToolButton * btn = new QToolButton; -// btn->setCheckable(true); -// btn->setText(plugin->title()); -// btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); -// btn->setAutoExclusive(true); -// connect (btn, SIGNAL(clicked()), SLOT(showClickedPage())); - m_d->ui.stackedWidget->addWidget(plugin->page()); -// m_d->buttonLayout->addWidget(btn); -// m_d->buttonMap.insert(btn, plugin->page()); - } - m_d->buttonLayout->addSpacing(5); - - // TODO, This probably can beremoved. See OP-310 - QSettings *settings = Core::ICore::instance()->settings(); - int tabId = settings->value("General/WelcomeTab", 0).toInt(); - - int pluginCount = m_d->ui.stackedWidget->count(); - if (tabId < pluginCount) { - m_d->ui.stackedWidget->setCurrentIndex(tabId); - QMapIterator it(m_d->buttonMap); - while (it.hasNext()) - if (it.next().value() == m_d->ui.stackedWidget->currentWidget()) { - it.key()->setChecked(true); - break; - } - } - // TODO Delete until here - + Core::ModeManager::instance()->activateMode(page); } -void WelcomeMode::welcomePluginAdded(QObject *obj) -{ - if (IWelcomePage *plugin = qobject_cast(obj)) - { - QToolButton * btn = new QToolButton; - btn->setCheckable(true); - btn->setAutoExclusive(true); - btn->setText(plugin->title()); - btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - connect (btn, SIGNAL(clicked()), SLOT(showClickedPage())); - int insertPos = 0; - QList plugins = PluginManager::instance()->getObjects(); - foreach (IWelcomePage* p, plugins) { - if (plugin->priority() < p->priority()) - insertPos++; - else - break; - } - m_d->ui.stackedWidget->insertWidget(insertPos, plugin->page()); - m_d->buttonMap.insert(btn, plugin->page()); - m_d->buttonLayout->insertWidget(insertPos, btn); - } -} - -void WelcomeMode::showClickedPage() -{ - QAbstractButton *btn = qobject_cast(sender()); - QMap::iterator it = m_d->buttonMap.find(btn); - if (it.value()) - m_d->ui.stackedWidget->setCurrentWidget(it.value()); -} - -void WelcomeMode::slotFeedback() -{ - QDesktopServices::openUrl(QUrl(QLatin1String( - "http://forums.openpilot.org"))); -} - - } // namespace Welcome diff --git a/ground/openpilotgcs/src/plugins/welcome/welcomemode.h b/ground/openpilotgcs/src/plugins/welcome/welcomemode.h index 33c6a1ab5..24b47613e 100644 --- a/ground/openpilotgcs/src/plugins/welcome/welcomemode.h +++ b/ground/openpilotgcs/src/plugins/welcome/welcomemode.h @@ -60,13 +60,11 @@ public: QList context() const; void activated(); QString contextHelpId() const { return QLatin1String("OpenPilot GCS"); } - void initPlugins(); void setPriority(int priority) { m_priority = priority; } -private slots: - void slotFeedback(); - void welcomePluginAdded(QObject*); - void showClickedPage(); +public slots: + void openUrl(const QString &url); + void openPage(const QString &page); private: WelcomeModePrivate *m_d; diff --git a/ground/openpilotgcs/src/plugins/welcome/welcomemode.ui b/ground/openpilotgcs/src/plugins/welcome/welcomemode.ui deleted file mode 100644 index 234aef833..000000000 --- a/ground/openpilotgcs/src/plugins/welcome/welcomemode.ui +++ /dev/null @@ -1,379 +0,0 @@ - - - Welcome::WelcomeMode - - - - 0 - 0 - 864 - 690 - - - - #Welcome--WelcomePage { -background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(247, 247, 247, 255), stop:1 rgba(215, 215, 215, 255)); -} - -QToolButton, QPushButton, QComboBox { - border-image: url(:/welcome/images/btn_26.png) 4; - border-width: 4; - padding: 0px 6px; - font-size: 12px; -} - -*{ - color: black; -} - - QComboBox QAbstractItemView { - background-color:white; -} - - QComboBox::down-arrow { - image: url(:/welcome/images/combobox_arrow.png); - } - -QComboBox:drop-down -{ - subcontrol-origin: padding; - subcontrol-position: top right; - border-left-style: none; - border-top-right-radius: 1px; - border-bottom-right-radius: 1px; -} - -QToolButton:hover, QPushButton:hover, QComboBox:hover { - border-image: url(:/welcome/images/btn_26_hover.png) 4; -} - -QToolButton:disabled, QPushButton:disabled, QComboBox::disabled { - color:gray; -} - -QToolButton:pressed, QPushButton:pressed{ - border-image: url(:/welcome/images/btn_26_pressed.png) 4; -} - - - - - 0 - - - 0 - - - - - #gradientWidget { - background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(247, 247, 247, 255), stop:1 rgba(215, 215, 215, 255)); -} - - - - 4 - - - 4 - - - 0 - - - 0 - - - 0 - - - - - - 662 - 515 - - - - - 662 - 16777215 - - - - #mainFrame { - border-image: url(:/welcome/images/background_center_frame.png) 4; - border-width: 4; -} - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - 9 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 649 - 74 - - - - - 649 - 89 - - - - #headerFrame { - border-image: url(:/welcome/images/center_frame_header.png) 0; - border-width: 0; -} - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - - 0 - 0 - - - - - 0 - 10 - - - - - 50 - false - - - - PointingHandCursor - - - false - - - QToolButton { - border-image:none; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0.0, y2: 1.0, - stop: 0 #838383, - stop: 0.4 #707070, - stop: 0.401 #636363, - stop: 1 #4a4a4a); - border: 0px solid black; - border-top: 1px solid #303030; - border-bottom: 1px solid #202020; - color: white; - height:20px; -} - -QToolButton:hover { - border-image:none; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0.0, y2: 1.0, - stop: 0 #909090, - stop: 0.4 #808080, - stop: 0.401 #707070, - stop: 1 #555555); -} - -QToolButton:checked, QToolButton:checked:pressed { - border-image:none; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0.0, y2: 1.0, - stop: 0 #ffffff, - stop: 0.4 #eeeeee, - stop: 0.401 #e2e2e2, - stop: 1 #dddddd); - color: black; - border-top: 1px solid #606060; - border-bottom: 1px solid #404040; -} - -QToolButton:pressed { - border-image:none; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0.0, y2: 1.0, - stop: 0 #383838, - stop: 0.2 #404040, - stop: 0.201 #484848, - stop: 1 #505050); -} - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - 0 - - - - - 18 - - - 24 - - - - - - - - - 20 - - - 17 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Help us make OpenPilot even better - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 6 - 0 - - - - - - - - Qt::TabFocus - - - height:19px; - - - Feedback - - - - :/welcome/images/feedback_arrow.png:/welcome/images/feedback_arrow.png - - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 40 - - - - - - - - - - - - - - - - - - - - diff --git a/ground/openpilotgcs/src/plugins/welcome/welcomeplugin.cpp b/ground/openpilotgcs/src/plugins/welcome/welcomeplugin.cpp index 721c28b93..048254547 100644 --- a/ground/openpilotgcs/src/plugins/welcome/welcomeplugin.cpp +++ b/ground/openpilotgcs/src/plugins/welcome/welcomeplugin.cpp @@ -30,8 +30,6 @@ #include "welcomemode.h" -#include "communitywelcomepage.h" - #include #include #include @@ -49,7 +47,7 @@ using namespace Welcome::Internal; WelcomePlugin::WelcomePlugin() - : m_welcomeMode(0), m_communityWelcomePage(0) + : m_welcomeMode(0) { } @@ -59,10 +57,6 @@ WelcomePlugin::~WelcomePlugin() removeObject(m_welcomeMode); delete m_welcomeMode; } - if (m_communityWelcomePage) { - removeObject(m_communityWelcomePage); - delete m_communityWelcomePage; - } } /*! Initializes the plugin. Returns true on success. @@ -76,9 +70,6 @@ bool WelcomePlugin::initialize(const QStringList &arguments, QString *error_mess Q_UNUSED(arguments) Q_UNUSED(error_message) - m_communityWelcomePage = new Internal::CommunityWelcomePage; - addObject(m_communityWelcomePage); - m_welcomeMode = new WelcomeMode; addObject(m_welcomeMode); @@ -98,7 +89,6 @@ bool WelcomePlugin::initialize(const QStringList &arguments, QString *error_mess */ void WelcomePlugin::extensionsInitialized() { - m_welcomeMode->initPlugins(); Core::ModeManager::instance()->activateMode(m_welcomeMode->uniqueModeName()); } diff --git a/ground/openpilotgcs/src/plugins/welcome/welcomeplugin.h b/ground/openpilotgcs/src/plugins/welcome/welcomeplugin.h index 90db83e1e..b51ebb597 100644 --- a/ground/openpilotgcs/src/plugins/welcome/welcomeplugin.h +++ b/ground/openpilotgcs/src/plugins/welcome/welcomeplugin.h @@ -36,7 +36,6 @@ namespace Welcome { class WelcomeMode; namespace Internal { -class CommunityWelcomePage; class WelcomePlugin : public ExtensionSystem::IPlugin @@ -53,7 +52,6 @@ public: private: WelcomeMode *m_welcomeMode; - Internal::CommunityWelcomePage *m_communityWelcomePage; }; } // namespace Welcome