Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Show the open button also on desktop systems.

  • Loading branch information...
commit f68be352b51052aafbbfa63e7d2299935ac8fabd 1 parent 70003fa
@Earthwings Earthwings authored
View
BIN  src/icons/16x16/edit-clear-list.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
19 src/lib/CurrentLocationWidget.cpp
@@ -93,7 +93,6 @@ CurrentLocationWidget::CurrentLocationWidget( QWidget *parent, Qt::WindowFlags f
bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
d->m_currentLocationUi.positionTrackingComboBox->setVisible( !smallScreen );
d->m_currentLocationUi.locationLabel->setVisible( !smallScreen );
- d->m_currentLocationUi.openTrackPushButton->setVisible( smallScreen );
}
CurrentLocationWidget::~CurrentLocationWidget()
@@ -120,8 +119,8 @@ void CurrentLocationWidget::setMarbleWidget( MarbleWidget *widget )
d->m_currentLocationUi.locationLabel->setEnabled ( true );
bool const hasTrack = !d->m_widget->model()->positionTracking()->isTrackEmpty();
d->m_currentLocationUi.showTrackCheckBox->setEnabled( hasTrack );
- d->m_currentLocationUi.saveTrackPushButton->setEnabled( hasTrack );
- d->m_currentLocationUi.clearTrackPushButton->setEnabled( hasTrack );
+ d->m_currentLocationUi.saveTrackButton->setEnabled( hasTrack );
+ d->m_currentLocationUi.clearTrackButton->setEnabled( hasTrack );
}
//disconnect CurrentLocation Signals
@@ -183,11 +182,11 @@ void CurrentLocationWidget::setMarbleWidget( MarbleWidget *widget )
if ( d->m_widget->model()->positionTracking()->trackVisible() ) {
d->m_currentLocationUi.showTrackCheckBox->setCheckState(Qt::Checked);
}
- connect ( d->m_currentLocationUi.saveTrackPushButton, SIGNAL( clicked(bool)),
+ connect ( d->m_currentLocationUi.saveTrackButton, SIGNAL( clicked(bool)),
this, SLOT(saveTrack()));
- connect ( d->m_currentLocationUi.openTrackPushButton, SIGNAL( clicked(bool)),
+ connect ( d->m_currentLocationUi.openTrackButton, SIGNAL( clicked(bool)),
this, SLOT(openTrack()));
- connect (d->m_currentLocationUi.clearTrackPushButton, SIGNAL( clicked(bool)),
+ connect (d->m_currentLocationUi.clearTrackButton, SIGNAL( clicked(bool)),
this, SLOT(clearTrack()));
connect( d->m_widget->model(), SIGNAL( trackedPlacemarkChanged( const GeoDataPlacemark* ) ),
this, SLOT( trackPlacemark() ) );
@@ -284,8 +283,8 @@ void CurrentLocationWidgetPrivate::receiveGpsCoordinates( const GeoDataCoordinat
html = html.arg( distanceString ).arg( speedString + ' ' + unitString );
m_currentLocationUi.locationLabel->setText( html );
m_currentLocationUi.showTrackCheckBox->setEnabled( true );
- m_currentLocationUi.saveTrackPushButton->setEnabled( true );
- m_currentLocationUi.clearTrackPushButton->setEnabled( true );
+ m_currentLocationUi.saveTrackButton->setEnabled( true );
+ m_currentLocationUi.clearTrackButton->setEnabled( true );
}
void CurrentLocationWidgetPrivate::changePositionProvider( const QString &provider )
@@ -382,8 +381,8 @@ void CurrentLocationWidgetPrivate::clearTrack()
if ( result == QMessageBox::Yes ) {
m_widget->model()->positionTracking()->clearTrack();
m_widget->update();
- m_currentLocationUi.saveTrackPushButton->setEnabled( false );
- m_currentLocationUi.clearTrackPushButton->setEnabled( false );
+ m_currentLocationUi.saveTrackButton->setEnabled( false );
+ m_currentLocationUi.clearTrackButton->setEnabled( false );
}
}
View
120 src/lib/CurrentLocationWidget.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>137</width>
- <height>288</height>
+ <width>259</width>
+ <height>268</height>
</rect>
</property>
<property name="windowTitle">
@@ -40,41 +40,66 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="showTrackCheckBox">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Show Track</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="openTrackPushButton">
- <property name="text">
- <string>Open Track</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="saveTrackPushButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Save Track</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="clearTrackPushButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Clear Track</string>
- </property>
- </widget>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QCheckBox" name="showTrackCheckBox">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Show Track</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="clearTrackButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Clear Track</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../marble.qrc">
+ <normaloff>:/icons/16x16/edit-clear-list.png</normaloff>:/icons/16x16/edit-clear-list.png</iconset>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="openTrackButton">
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../marble.qrc">
+ <normaloff>:/icons/16x16/document-open.png</normaloff>:/icons/16x16/document-open.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="saveTrackButton">
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../marble.qrc">
+ <normaloff>:/icons/16x16/document-save.png</normaloff>:/icons/16x16/document-save.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
<widget class="QLabel" name="locationLabel">
@@ -102,14 +127,14 @@
</widget>
</item>
<item>
- <spacer name="trackRecenterVerticalSpacer">
+ <spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>20</height>
+ <height>40</height>
</size>
</property>
</spacer>
@@ -168,21 +193,10 @@
</property>
</widget>
</item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
- <resources/>
+ <resources>
+ <include location="../marble.qrc"/>
+ </resources>
<connections/>
</ui>
View
1  src/marble.qrc
@@ -55,6 +55,7 @@
<file>icons/16x16/task-attention.png</file>
<file>icons/16x16/edit-find.png</file>
<file>icons/16x16/configure.png</file>
+ <file>icons/16x16/edit-clear-list.png</file>
<file>icons/16x16/edit-clear-locationbar-ltr.png</file>
<file>icons/16x16/edit-clear-locationbar-rtl.png</file>
<file>icons/22x22/edit-clear-locationbar-ltr.png</file>
Please sign in to comment.
Something went wrong with that request. Please try again.