integrating plasma into kdevelop's dashboard

Aleix Pol aleixpol at kde.org
Wed Jul 28 14:44:00 CEST 2010


On Wed, Jul 28, 2010 at 5:14 AM, Aaron J. Seigo <aseigo at kde.org> wrote:

> On July 27, 2010, Aleix Pol wrote:
> > I've been looking into it and it's fine to use DataEngines. I have the
> > exact same problem though. I can create a kdevelop DataEngine with a
> > project DataContainer, but this is still created in the PluginLoader and
> I
> > can't have a reference to the Project.
>
> here's an example of how you could create an engine that knows when the
> project changes:
>
> QWeakPointer<MyDataEngine *> m_engine;
>
> DataEngine *MyPluginLoader::loadDataEngine(const QString &name)
> {
>        if (name == "org.kde.kdevelop.project") {
>                m_engine = new MyDataEngine;
>                connect(m_projectManager, SIGNAL(projectChanged(QString)),
>                               m_engine.data(),
> SLOT(projectChanged(QString)));
>                return m_engine.data();
>       }
>
>     return 0;
> }
>
> remember that DataEngineManager will delete the engine when it is no longer
> used, so be sure to use a QWeakPointer.
>
> similar approaches to the above should give you all the flexibility needed.
>
> --
> Aaron J. Seigo
> humru othro a kohnu se
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
>
> KDE core developer sponsored by Qt Development Frameworks
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
>
The problem is not that the project change, it's that there are many
projects open at the same time and I need to be able to tell which one the
plasmoid is targeting.

I thought I could use that data engine approach but looks like that all
projects would have to share the same DataEngine instance so I still need to
tell them separately what project do they have to target somehow.

Aleix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100728/af5fe717/attachment.htm 


More information about the Plasma-devel mailing list