This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Load dolphin KPart

Tags: None
(comma "," separated)
User avatar
philippe.hac
Registered Member
Posts
2
Karma
0
OS

Load dolphin KPart

Sat Dec 05, 2009 2:18 pm
Hello there,

I want to include dolphin's viewport(the widget that displays the icons) into my app.
I searched google and took a look at the source code of dolphin and konqueror but didn't find a way to do that.

I found an example with katepart but that included the entire kate, not only a widget.

I want to include it like it appears in dolphin and konqueror, at least.
The best is to include it like it appears in the OpenFile dialog.

any way to do that?


----
EDIT:
I couldn't find a way to do that (embed Dolphin), but looking at K3B source code I saw how they do that and will implement that myself... The drawback is that I won't be able to show in groups or use the user configurations, bu t that will just suffice.
User avatar
anda_skoa
KDE Developer
Posts
783
Karma
4
OS

Re: Load dolphin KPart

Sun Dec 06, 2009 3:08 pm
Creating the Dolphin part should work with something like that
Code: Select all
KParts::ReadOnlyPart* part = KMimeTypeTrader::createInstanceFromQuery<KParts::ReadOnlyPart>("inode/directory", parentWidget, parentObject, "exist Library and Library == 'dolphinpart'");


Cheers,
_


anda_skoa, proud to be a member of KDE forums since 2008-Oct.
User avatar
philippe.hac
Registered Member
Posts
2
Karma
0
OS

Re: Load dolphin KPart

Mon Dec 07, 2009 8:01 pm
anda_skoa wrote:
Code: Select all
KParts::ReadOnlyPart* part = KMimeTypeTrader::createInstanceFromQuery<KParts::ReadOnlyPart>("inode/directory", parentWidget, parentObject, "exist Library and Library == 'dolphinpart'");



Where it read createInstanceFromQuery it should be createPartInstanceFromQuery,
And thanks very much ^^

-----------------------------
EDIT:

It now loads the part but it does NOT:
* use my dolphin's (or konqueror's) configurations (like show in groups)
* accept nameFilters (just don't work)
* give me a way to change the configurations or retrieve it status (couldn't find any function to communicate with DolphinView other than openUrl() and setNameFilter(), and any useful signal or slot)
* open files or folders, but copy/move/link operations work.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]