[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.1/kdeedu/marble
From: Torsten Rahn <tackat () kde ! org>
Date: 2008-07-16 19:56:07
Message-ID: 1216238167.602649.5931.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 833425 by rahn:
- Fixing map becoming unnavigable after projection change.
- Fixing proper credits according to the OSM license.
- Started to fix the "Clear cache button does nothing bug".
- Removed the UTM entry which is a feature that never got implemented
(hopefully it will get implemented for KDE 4.2).
- Removed actions from the legend which get now displayed in the menu.
M +0 -9 data/maps/earth/bluemarble/bluemarble.dgml
M +0 -10 data/maps/earth/citylights/citylights.dgml
M +0 -9 data/maps/earth/openstreetmap/openstreetmap.dgml
M +0 -9 data/maps/earth/plain/plain.dgml
M +0 -8 data/maps/earth/precip-dec/precip-dec.dgml
M +0 -8 data/maps/earth/precip-july/precip-july.dgml
M +0 -8 data/maps/earth/srtm/srtm.dgml
M +0 -8 data/maps/earth/temp-dec/temp-dec.dgml
M +0 -8 data/maps/earth/temp-july/temp-july.dgml
M +15 -0 src/KdeMainWindow.cpp
M +3 -0 src/KdeMainWindow.h
M +5 -0 src/lib/CacheStoragePolicy.cpp
M +5 -0 src/lib/CacheStoragePolicy.h
M +12 -0 src/lib/FileStoragePolicy.cpp
M +5 -0 src/lib/FileStoragePolicy.h
M +2 -2 src/lib/GeoPainter.cpp
M +2 -1 src/lib/MarbleMap.cpp
M +1 -6 src/lib/MarbleViewSettingsWidget.ui
M +5 -24 src/lib/MarbleWidget.cpp
M +2 -0 src/lib/StoragePolicy.h
M +1 -0 src/lib/SunControlWidget.cpp
M +3 -3 src/marble_part.cpp
--- branches/KDE/4.1/kdeedu/marble/data/maps/earth/bluemarble/bluemarble.dgml \
#833424:833425 @@ -232,15 +232,6 @@
<section name="coordinate-grid" checkable="true" \
connect="coordinate-grid" spacing="12"> <heading>Coordinate Grid</heading>
</section>
-
- <section name="compass" checkable="true" connect="compass" spacing="12">
- <heading>Compass</heading>
- </section>
-
- <section name="scalebar" checkable="true" connect="scalebar" \
spacing="12">
- <heading>Scale Bar</heading>
- </section>
-
</legend>
</document>
</dgml>
--- branches/KDE/4.1/kdeedu/marble/data/maps/earth/citylights/citylights.dgml \
#833424:833425 @@ -217,19 +217,9 @@
</item>
</section>
-
<section name="coordinate-grid" checkable="true" \
connect="coordinate-grid" spacing="12"> <heading>Coordinate Grid</heading>
</section>
-
- <section name="compass" checkable="true" connect="compass" spacing="12">
- <heading>Compass</heading>
- </section>
-
- <section name="scalebar" checkable="true" connect="scalebar" \
spacing="12">
- <heading>Scale Bar</heading>
- </section>
-
</legend>
</document>
</dgml>
--- branches/KDE/4.1/kdeedu/marble/data/maps/earth/openstreetmap/openstreetmap.dgml \
#833424:833425 @@ -242,15 +242,6 @@
<section name="coordinate-grid" checkable="true" \
connect="coordinate-grid" spacing="12"> <heading>Coordinate Grid</heading>
</section>
-
- <section name="compass" checkable="true" connect="compass" spacing="12">
- <heading>Compass</heading>
- </section>
-
- <section name="scalebar" checkable="true" connect="scalebar" \
spacing="12">
- <heading>Scale Bar</heading>
- </section>
-
</legend>
</document>
</dgml>
--- branches/KDE/4.1/kdeedu/marble/data/maps/earth/plain/plain.dgml #833424:833425
@@ -224,18 +224,9 @@
</item>
</section>
-
<section name="coordinate-grid" checkable="true" \
connect="coordinate-grid" spacing="12"> <heading>Coordinate Grid</heading>
</section>
-
- <section name="compass" checkable="true" connect="compass" spacing="12">
- <heading>Compass</heading>
- </section>
-
- <section name="scalebar" checkable="true" connect="scalebar" \
spacing="12">
- <heading>Scale Bar</heading>
- </section>
</legend>
</document>
</dgml>
--- branches/KDE/4.1/kdeedu/marble/data/maps/earth/precip-dec/precip-dec.dgml \
#833424:833425 @@ -285,14 +285,6 @@
<section name="coordinate-grid" checkable="true" \
connect="coordinate-grid" spacing="12"> <heading>Coordinate Grid</heading>
</section>
-
- <section name="compass" checkable="true" connect="compass" spacing="12">
- <heading>Compass</heading>
- </section>
-
- <section name="scalebar" checkable="true" connect="scalebar" \
spacing="12">
- <heading>Scale Bar</heading>
- </section>
</legend>
</document>
</dgml>
--- branches/KDE/4.1/kdeedu/marble/data/maps/earth/precip-july/precip-july.dgml \
#833424:833425 @@ -285,14 +285,6 @@
<section name="coordinate-grid" checkable="true" \
connect="coordinate-grid" spacing="12"> <heading>Coordinate Grid</heading>
</section>
-
- <section name="compass" checkable="true" connect="compass" spacing="12">
- <heading>Compass</heading>
- </section>
-
- <section name="scalebar" checkable="true" connect="scalebar" \
spacing="12">
- <heading>Scale Bar</heading>
- </section>
</legend>
</document>
</dgml>
--- branches/KDE/4.1/kdeedu/marble/data/maps/earth/srtm/srtm.dgml #833424:833425
@@ -335,14 +335,6 @@
<section name="coordinate-grid" checkable="true" \
connect="coordinate-grid" spacing="12"> <heading>Coordinate Grid</heading>
</section>
-
- <section name="compass" checkable="true" connect="compass" spacing="12">
- <heading>Compass</heading>
- </section>
-
- <section name="scalebar" checkable="true" connect="scalebar" \
spacing="12">
- <heading>Scale Bar</heading>
- </section>
</legend>
</document>
</dgml>
--- branches/KDE/4.1/kdeedu/marble/data/maps/earth/temp-dec/temp-dec.dgml \
#833424:833425 @@ -288,14 +288,6 @@
<section name="coordinate-grid" checkable="true" \
connect="coordinate-grid" spacing="12"> <heading>Coordinate Grid</heading>
</section>
-
- <section name="compass" checkable="true" connect="compass" spacing="12">
- <heading>Compass</heading>
- </section>
-
- <section name="scalebar" checkable="true" connect="scalebar" \
spacing="12">
- <heading>Scale Bar</heading>
- </section>
</legend>
</document>
</dgml>
--- branches/KDE/4.1/kdeedu/marble/data/maps/earth/temp-july/temp-july.dgml \
#833424:833425 @@ -289,14 +289,6 @@
<section name="coordinate-grid" checkable="true" \
connect="coordinate-grid" spacing="12"> <heading>Coordinate Grid</heading>
</section>
-
- <section name="compass" checkable="true" connect="compass" spacing="12">
- <heading>Compass</heading>
- </section>
-
- <section name="scalebar" checkable="true" connect="scalebar" \
spacing="12">
- <heading>Scale Bar</heading>
- </section>
</legend>
</document>
</dgml>
--- branches/KDE/4.1/kdeedu/marble/src/KdeMainWindow.cpp #833424:833425
@@ -18,6 +18,12 @@
#include <kparts/part.h>
#include <kparts/componentfactory.h>
+#include <QtCore/QDebug>
+
+// GeoData
+#include <GeoSceneDocument.h>
+#include <GeoSceneHead.h>
+
// Local dir
#include "ControlView.h"
#include "marble_part.h"
@@ -40,6 +46,10 @@
m_part->createInfoBoxesMenu();
setAutoSaveSettings();
+
+ connect( marbleWidget(), SIGNAL( themeChanged( QString ) ),
+ this, SLOT( setMapTitle() ) );
+ setMapTitle();
}
MainWindow::~MainWindow()
@@ -57,4 +67,9 @@
return m_part->controlView()->marbleWidget();
}
+void MainWindow::setMapTitle()
+{
+ setCaption( marbleWidget()->mapTheme()->head()->name() );
+}
+
#include "KdeMainWindow.moc"
--- branches/KDE/4.1/kdeedu/marble/src/KdeMainWindow.h #833424:833425
@@ -32,6 +32,9 @@
ControlView* marbleControl() const;
MarbleWidget* marbleWidget() const;
+ public slots:
+ void setMapTitle();
+
private:
MarblePart *m_part;
};
--- branches/KDE/4.1/kdeedu/marble/src/lib/CacheStoragePolicy.cpp #833424:833425
@@ -42,6 +42,11 @@
return true;
}
+void CacheStoragePolicy::clearCache()
+{
+ m_cache.clear();
+}
+
QString CacheStoragePolicy::lastErrorMessage() const
{
return m_errorMsg;
--- branches/KDE/4.1/kdeedu/marble/src/lib/CacheStoragePolicy.h #833424:833425
@@ -42,6 +42,11 @@
bool updateFile( const QString &fileName, const QByteArray &data );
/**
+ * Clears the cache.
+ */
+ void clearCache();
+
+ /**
* Returns the last error message.
*/
QString lastErrorMessage() const;
--- branches/KDE/4.1/kdeedu/marble/src/lib/FileStoragePolicy.cpp #833424:833425
@@ -15,6 +15,7 @@
// Qt
#include <QtCore/QDebug>
#include <QtCore/QDir>
+#include <QtCore/QDirIterator>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
@@ -75,6 +76,17 @@
return true;
}
+void FileStoragePolicy::clearCache()
+{
+ QDirIterator it( m_dataDirectory, QDirIterator::Subdirectories );
+ while (it.hasNext()) {
+ qDebug() << it.next();
+// if( it.fileName().endsWith(".jpg") )
+// QFile::remove( it.fileName() );
+ }
+
+}
+
QString FileStoragePolicy::lastErrorMessage() const
{
return m_errorMsg;
--- branches/KDE/4.1/kdeedu/marble/src/lib/FileStoragePolicy.h #833424:833425
@@ -39,6 +39,11 @@
bool updateFile( const QString &fileName, const QByteArray &data );
/**
+ * Clears the cache.
+ */
+ void clearCache();
+
+ /**
* Returns the last error message.
*/
QString lastErrorMessage() const;
--- branches/KDE/4.1/kdeedu/marble/src/lib/GeoPainter.cpp #833424:833425
@@ -48,7 +48,7 @@
{
int x, y;
bool previousGlobeHidesPoint;
- //AbstractProjection *projection = m_viewport->currentProjection();
+ AbstractProjection *projection = m_viewport->currentProjection();
if ( isGeoProjected == false ) {
@@ -58,7 +58,7 @@
GeoDataPoint *itPoint = const_cast<GeoDataPoint *>( points );
while ( itPoint < points + pointCount ) {
bool globeHidesPoint;
- //bool isVisible = projection->screenCoordinates( *itPoint, \
m_viewport, x, y, globeHidesPoint ); + bool isVisible = \
projection->screenCoordinates( *itPoint, m_viewport, x, y, globeHidesPoint );
if ( itPoint == points ){
polygon = new QPolygon;
--- branches/KDE/4.1/kdeedu/marble/src/lib/MarbleMap.cpp #833424:833425
@@ -72,7 +72,7 @@
MarbleMapPrivate::MarbleMapPrivate( MarbleMap *parent )
: m_parent( parent ),
m_persistentTileCacheLimit( 1024*1024*300 ), // 300 MB
- m_volatileTileCacheLimit( 1024*3 ) // 3 KB
+ m_volatileTileCacheLimit( 1024*1024*30 ) // 30 MB
{
/* NOOP */
}
@@ -1138,6 +1138,7 @@
void MarbleMap::clearPersistentTileCache()
{
+
}
void MarbleMap::setPersistentTileCacheLimit( quint64 kiloBytes )
--- branches/KDE/4.1/kdeedu/marble/src/lib/MarbleViewSettingsWidget.ui #833424:833425
@@ -104,11 +104,6 @@
<string>Degree (Decimal)</string>
</property>
</item>
- <item>
- <property name="text" >
- <string>UTM</string>
- </property>
- </item>
</widget>
</item>
</layout>
@@ -342,7 +337,7 @@
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0" >
<size>
<width>446</width>
<height>20</height>
--- branches/KDE/4.1/kdeedu/marble/src/lib/MarbleWidget.cpp #833424:833425
@@ -470,12 +470,7 @@
// We only have to repaint the background every time if the globe
// doesn't cover the whole image.
- if ( ! d->m_map->mapCoversViewport() ) {
- setAttribute( Qt::WA_NoSystemBackground, false );
- }
- else {
- setAttribute( Qt::WA_NoSystemBackground, true );
- }
+ setAttribute( Qt::WA_NoSystemBackground, d->m_map->mapCoversViewport() );
emit distanceChanged( distanceString() );
@@ -572,12 +567,7 @@
d->m_map->centerOn( lon, lat );
}
- if ( d->m_map->mapCoversViewport() ) {
- setAttribute(Qt::WA_NoSystemBackground, true );
- }
- else {
- setAttribute(Qt::WA_NoSystemBackground, false );
- }
+ setAttribute(Qt::WA_NoSystemBackground, d->m_map->mapCoversViewport() );
repaint();
}
@@ -616,14 +606,10 @@
{
d->m_map->setProjection( projection );
- if ( d->m_map->mapCoversViewport() ) {
- setAttribute( Qt::WA_NoSystemBackground, true );
- }
- else {
- setAttribute( Qt::WA_NoSystemBackground, false );
- }
+ setAttribute( Qt::WA_NoSystemBackground, d->m_map->mapCoversViewport() );
repaint();
+ setActiveRegion();
}
void MarbleWidget::setProjection( int projection )
@@ -712,12 +698,7 @@
// Redefine the area where the mousepointer becomes a navigationarrow
setActiveRegion();
- if ( d->m_map->mapCoversViewport() ) {
- setAttribute(Qt::WA_NoSystemBackground, true );
- }
- else {
- setAttribute(Qt::WA_NoSystemBackground, false );
- }
+ setAttribute(Qt::WA_NoSystemBackground, d->m_map->mapCoversViewport() );
repaint();
}
--- branches/KDE/4.1/kdeedu/marble/src/lib/StoragePolicy.h #833424:833425
@@ -27,6 +27,8 @@
virtual bool updateFile( const QString &fileName, const QByteArray &data ) = \
0;
+ virtual void clearCache() = 0;
+
virtual QString lastErrorMessage() const = 0;
};
--- branches/KDE/4.1/kdeedu/marble/src/lib/SunControlWidget.cpp #833424:833425
@@ -56,6 +56,7 @@
void SunControlWidget::nowClicked(bool checked)
{
+ Q_UNUSED( checked )
m_sunLocator->datetime()->setNow();
updateDateTime();
}
--- branches/KDE/4.1/kdeedu/marble/src/marble_part.cpp #833424:833425
@@ -618,20 +618,20 @@
QWidget *w_viewSettings = new QWidget( 0 );
w_viewSettings->setObjectName( "view_page" );
ui_viewSettings.setupUi( w_viewSettings );
- m_configDialog->addPage( w_viewSettings, i18n( "View" ), "preferences-view" \
); + m_configDialog->addPage( w_viewSettings, i18n( "View" ), "configure" );
// navigation page
Ui_MarbleNavigationSettingsWidget ui_navigationSettings;
QWidget *w_navigationSettings = new QWidget( 0 );
w_navigationSettings->setObjectName( "navigation_page" );
ui_navigationSettings.setupUi( w_navigationSettings );
- m_configDialog->addPage( w_navigationSettings, i18n( "Navigation" ), \
"preferences-navigation" ); + m_configDialog->addPage( w_navigationSettings, \
i18n( "Navigation" ), "transform-move" );
// cache page
MarbleCacheSettingsWidget *w_cacheSettings =
new MarbleCacheSettingsWidget();
w_cacheSettings->setObjectName( "cache_page" );
- m_configDialog->addPage( w_cacheSettings, i18n( "Cache & Proxy" ), \
"preferences-cache" ); + m_configDialog->addPage( w_cacheSettings, i18n( \
"Cache & Proxy" ), "preferences-web-browser-cache" );
connect( w_cacheSettings, SIGNAL( clearVolatileCache() ), \
m_controlView->marbleWidget(), SLOT( clearVolatileTileCache() ) );
connect( w_cacheSettings, SIGNAL( clearPersistentCache() ), \
m_controlView->marbleWidget(), SLOT( clearPersistentTileCache() ) );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic