[Marble-devel] overview map not displaying correctly

Konrad Enzensberger e.konrad at mpegcode.com
Tue Aug 30 14:57:25 UTC 2011


Hi,

hello marble does not call:
//marble QtMainWindow.cpp
// The config dialog has to read settings.
m_configDialog->readSettings();

without this, you will not meat the overview methode:
void OverviewMap::setSettings( QHash<QString,QVariant> settings )

which emits the signal :  emit settingsChanged( nameId() )

and because of this, this slot is not called:
void OverviewMap::updateSettings()

and because of this, the overview member  m_svgPaths
will be empty, and no image can be loaded in:

void OverviewMap::changeBackground( const QString& target )
{
    m_svgobj.load( m_svgPaths[target] );
}

this could be a workaround if you do not create a configDialog
like marble QtMainWindow does (quick and dirty).

void OverviewMap::changeBackground( const QString& target )
{
//enz - no config dialog used
if(!m_svgobj.load( m_svgPaths[target] ))
{
QString path;
path = MarbleDirs::path( "svg/worldmap.svg" );
m_svgPaths[m_planetID[2]] = path;
m_svgobj.load( m_svgPaths[target] );
m_posColor = QColor(255,255,255);
}

}

regards, konrad

----- Original Message ----- 
From: "A A" <azata42 at gmail.com>
To: <marble-devel at kde.org>
Sent: Tuesday, August 30, 2011 4:23 PM
Subject: Re: [Marble-devel] overview map not displaying correctly


> Thank you so much for your suggestion but it still didn't work.
> However, even if it did, I don't think this wouldn't be a good
> solution for us since we are embedding the marble widget in a much
> larger program and would like this to work out of the box without any
> special customization. This used to work in earlier versions of marble
> with no problem.
>
> Note also that when running the regular marble executable (installed
> in bin), the map overview works fine. It's only the hello marble
> program where this doesn't work. I looked in the OverviewMap.cpp file
> and compared the regular marble program with the hello marble one, and
> it seems that in the latter case, various settings are not being read
> in at all, unlike the former case (e.g. I noticed that the function
> updateSettings() never gets called in the hello marble program).
> However, I could not figure out what to do to ensure the settings are
> loaded. Any further ideas?
>
> Thanks again!
>
> On Tue, Aug 30, 2011 at 4:57 AM, Konrad Enzensberger
> <e.konrad at mpegcode.com> wrote:
>> hi,
>>
>> check if worldmap.svg is located in:
>> ..\data\svg
>> folder.
>> if yes, right click on overview widget and set the worldmap.svg
>> as overview map.
>> next time you start marble this settings should be restored.
>>
>> see ..\plugins\render\overviewmap\OverviewMap.cpp
>> how the overview map image is set,
>>
>> regards, konrad
>>
>> ----- Original Message ----- From: "A A" <azata42 at gmail.com>
>> To: <marble-devel at kde.org>
>> Sent: Tuesday, August 30, 2011 5:06 AM
>> Subject: [Marble-devel] overview map not displaying correctly
>>
>>
>>> I apologize if this question has been asked before.
>>>
>>> I am trying to run the Hello Marble example at
>>> http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus without
>>> modification.
>>>
>>> However, the overview map on the upper left corner is not being
>>> displayed correctly as you can see in the attached image.
>>>
>>> I am running on Ubuntu 10.04 (64-bit), with Qt 4.7.3 and git master
>>> branch of marble.
>>>
>>> Any suggestions?
>>>
>>> Thanks!
>>>
>>
>>
>> --------------------------------------------------------------------------------
>>
>>
>>> _______________________________________________
>>> Marble-devel mailing list
>>> Marble-devel at kde.org
>>> https://mail.kde.org/mailman/listinfo/marble-devel
>>>
>>
>>
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel 



More information about the Marble-devel mailing list