diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/globe.cpp | 25 | ||||
-rw-r--r-- | qt-ui/globe.h | 13 | ||||
-rw-r--r-- | qt-ui/mainwindow.ui | 62 |
3 files changed, 75 insertions, 25 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp new file mode 100644 index 000000000..770e51b02 --- /dev/null +++ b/qt-ui/globe.cpp @@ -0,0 +1,25 @@ +#include "globe.h" +#include <marble/AbstractFloatItem.h> + +using namespace Marble; + +GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent) +{ + setMapThemeId("earth/bluemarble/bluemarble.dgml"); + setProjection( Marble::Spherical ); + + // Enable the cloud cover and enable the country borders + setShowClouds( true ); + setShowBorders( true ); + + // Hide the FloatItems: Compass and StatusBar + setShowOverviewMap(false); + setShowScaleBar(false); + + Q_FOREACH( AbstractFloatItem * floatItem, floatItems() ){ + if ( floatItem && floatItem->nameId() == "compass" ) { + floatItem->setPosition( QPoint( 10, 10 ) ); + floatItem->setContentSize( QSize( 50, 50 ) ); + } + } +} diff --git a/qt-ui/globe.h b/qt-ui/globe.h new file mode 100644 index 000000000..bdf40fb1a --- /dev/null +++ b/qt-ui/globe.h @@ -0,0 +1,13 @@ +#ifndef GLOBE_H +#define GLOBE_H + +#include <marble/MarbleWidget.h> + +class GlobeGPS : public Marble::MarbleWidget{ + Q_OBJECT +public: + GlobeGPS(QWidget *parent); + +}; + +#endif diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index b2969ac61..ab0cd5f49 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -14,8 +14,8 @@ <string>MainWindow</string> </property> <widget class="QWidget" name="centralwidget"> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> <widget class="QSplitter" name="mainSplitter"> <property name="orientation"> <enum>Qt::Vertical</enum> @@ -27,9 +27,13 @@ <widget class="MainTab" name="InfoWidget" native="true"/> <widget class="ProfileGraphicsView" name="ProfileWidget"/> </widget> - <widget class="DiveListView" name="ListWidget"> - <property name="styleSheet"> - <string notr="true"> QTreeView { + <widget class="QSplitter" name="globeListSplitter"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <widget class="DiveListView" name="ListWidget"> + <property name="styleSheet"> + <string notr="true"> QTreeView { show-decoration-selected: 1; } @@ -58,25 +62,27 @@ } </string> - </property> - <property name="alternatingRowColors"> - <bool>true</bool> - </property> - <property name="selectionMode"> - <enum>QAbstractItemView::ExtendedSelection</enum> - </property> - <property name="rootIsDecorated"> - <bool>true</bool> - </property> - <property name="sortingEnabled"> - <bool>true</bool> - </property> - <property name="animated"> - <bool>true</bool> - </property> - <property name="allColumnsShowFocus"> - <bool>true</bool> - </property> + </property> + <property name="alternatingRowColors"> + <bool>true</bool> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::ExtendedSelection</enum> + </property> + <property name="rootIsDecorated"> + <bool>true</bool> + </property> + <property name="sortingEnabled"> + <bool>true</bool> + </property> + <property name="animated"> + <bool>true</bool> + </property> + <property name="allColumnsShowFocus"> + <bool>true</bool> + </property> + </widget> + <widget class="GlobeGPS" name="widget" native="true"/> </widget> </widget> </item> @@ -88,7 +94,7 @@ <x>0</x> <y>0</y> <width>763</width> - <height>20</height> + <height>25</height> </rect> </property> <widget class="QMenu" name="menuFile"> @@ -365,6 +371,12 @@ <extends>QGraphicsView</extends> <header>profilegraphics.h</header> </customwidget> + <customwidget> + <class>GlobeGPS</class> + <extends>QWidget</extends> + <header>globe.h</header> + <container>1</container> + </customwidget> </customwidgets> <resources/> <connections/> |