[Marble-devel] Marble Declarative plugin extension for making QML

Anton Chernov chernov.anton.mail at gmail.com
Thu May 31 14:54:51 UTC 2012


Hi Dennis,

Here is a patch for soc-2012-plasma-active branch and test project.

Best regards,
Anton



2012/5/31 Dennis Nienhüser <earthwings at gentoo.org>:
> Hi Anton,
>
> it's pure virtual, right, but that's not a problem - you don't have to
> create any instance, but use the readily instantiated ones (the ones that
> MarbleWidget returns which in turn are the ones that PluginManager returns):
>
> RenderPlugin* MarbleWidget::renderPlugin( const QString&  name )
> {
>    foreach( Marble::RenderPlugin * plugin, m_marbleWidget->renderPlugins() )
> {
>        if( plugin->nameId() == name ) {
>            return plugin;
>        }
>    }
>
>    return 0;
> }
>
> So you can just move the Q_PROPERTY declarations etc and it will just work.
>
>
> Re coding style, no worries. I'm just trying to point things out early to
> avoid unnecessary work later.
>
> Regards,
> Dennis
>
> Am 31.05.2012 14:20, schrieb Anton Chernov:
>>
>> Hello Dennis,
>>
>> I'm not pretty sure about returning RenderPlugin instead of wrapper
>> object, because RenderPlugin is pure virtual now and does not have
>> default constructor. Please correct me if I mistake.
>>
>> Sorry about coding style - I'll try to be better and fix coding style.
>> I'm newbie in official Marble development, but play around sometimes.
>>
>> Best regards,
>> Anton
>>
>> 2012/5/31 Dennis Nienhüser<earthwings at gentoo.org>:
>>>
>>> Hi Anton,
>>>
>>> this matches indeed nicely with my work on the QML layers. I'm wondering
>>> if
>>> it wouldn't be easier to avoid using the wrapper object
>>> (DeclarativeRenderPlugin) here and instead return the RenderPlugin as is
>>> -
>>> possibly extending them by the needed Q_PROPERTY declarations and maybe
>>> making some methods Q_SLOTS (or marking them Q_INVOKABLE, I prefer slots
>>> though).
>>> Oh, and as this looks like it should end up as a review request, can you
>>> please use foo() instead of getFoo() for getters? We're trying to be
>>> close
>>> to the Qt API.
>>>
>>> Regards,
>>> Dennis
>>>
>>> Am 31.05.2012 12:39, schrieb Torsten Rahn:
>>>>
>>>> Hi Anton,
>>>>
>>>> thanks for your input on this topic. Did you see
>>>>
>>>> http://nienhueser.de/blog/?p=440
>>>>
>>>> "QML Layers in Marble" ?
>>>>
>>>> I guess Dennis has a few more comments on this topic.
>>>>
>>>> BR,
>>>> Torsten
>>>>
>>>>
>>>> On Donnerstag, 31. Mai 2012 12:33:13 Anton Chernov wrote:
>>>>>
>>>>> Hello Marble developers.
>>>>>
>>>>> I'm going to use Marble for special data processing case for internal
>>>>> usage in my company.
>>>>> I use QML for user interface in my project and I'm working on Marble
>>>>> intergarion to the project now.
>>>>>
>>>>> I think the best way to add some extensions to Marble is add a Render
>>>>> or Runner, or FloatItem plugins. But using Marble plugins in QML are
>>>>> little bit complicated, because we can only select active
>>>>> RenderPlugins and FloatItems but not manage theirs properties or
>>>>> handle events.
>>>>>
>>>>> I develop some additional class (DeclarativeRenderPlugin) which
>>>>> provide QML interface for plugins and share this interface from
>>>>> MarbleDeclarativeWidget. This extension allows get and change plugin
>>>>> properties, enable or disable plugins in QML etc. The example project
>>>>> based on "explore" example of Marble is also attached. The patch is
>>>>> based on current Marble master tree (commit
>>>>> 0299004157ce00cf901b6113c4ac14fa0c323c00 ).
>>>>>
>>>>> I think this kind of functionality in Marble declarative plugin will
>>>>> be very very useful. The code of patch may be a little rude, but shows
>>>>> the idea. I can continue this work if you say that it is needed.
>>>>> I'm open to your suggestions and feedback.
>>>>>
>>>>> Best regards,
>>>>> Anton Chernov
>>>>> LOTES TM LLC,
>>>>> +7910107001,
>>>>> +74996383760
>>>>> skype: chernov.anton
>>>>
>>>> _______________________________________________
>>>> 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
>>
>>
>>
>



-- 
С уважением,
Чернов Антон Григорьевич,
Нач. сектора интерактивных систем,
ООО "ЛОТЕС ТМ",
8(499)6383760
+79101077001
Skype: chernov.anton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qmlplugins.patch
Type: application/octet-stream
Size: 5191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20120531/27a962b3/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MarbleQMLTest.tgz
Type: application/x-gzip
Size: 33198 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20120531/27a962b3/attachment-0001.gz>


More information about the Marble-devel mailing list