David Faure wrote:
> On Sunday 19 February 2006 16:29, Christoffer Brodd-Reijer wrote:
>> Hi,
>> I have a number of questions unanswered about KParts and they are
>> currently stalling my development quite a bit. So here goes..
>> First out, how does this Browser Extension work? I have a tree view for
>> displaying contents in a directory but I want to use the
>> openURLRequest() to take action when a user clicks on a file. How can I
>> extend my ReadOnlyPart with the Browser Extension?

> Are you implementing a part of a host?
> I thought you were using existing parts, so you don't need to actually extend
> the part, you need to find its existing browser extension.
> For that, use BrowserExtension::childObject( part )

Oh, btw.. No I am not. At least not for now, I don't know if that should
be a better approach for me or if it will just add extra complicity to
the project (and to my learning curve).

I am using a query to get an appropriate kpart to show the contents of a
folder (but I am playing around, giving it some conditions so I can
discover different kparts.) Here is the actual rows where I create the part.

URL path("file:///media/psp/PSP/photo");
QString mimetype = KMimeType::findByURL(path)->name();
treePart =
KParts::ComponentFactory::createPartInstanceFromQu ery
(mimetype, "Name == 'Tree View'", splitter, 0L, this, 0L);

>> Secondly, the tree part is great but it seems that it doesn't use
>> expandable folders, is there some way I can change it's this? How much
>> can I control with my kparts? Say, for example, that I want to set
>> number of columns to be just name and size by default? Or perform some
>> acton (like converting) when the user drag and drops a file into my kpart?

> I'm not sure which tree-view part you're talking about here.

Well, currently I am trying out the "Tree View" of konqueror but I don't
mind changing that if there is a better part to serve the purpose I was
describing earlier.

> The konqlistview
> with a tree that includes files? You should be able to control its columns by
> adjusting the configuration file, but well, this will influence that same listview
> in konqueror then... For dnd you would need to derive from that part, which
> isn't really possible since it's a private class in a dlopened module (not a shared lib).
> The directory views are mostly for konqueror's purpose. But I'm open to patches
> to make them more reusable for other apps

I described my problem and I am not sure if there is an easy solution to
solve it today, or if it will require you to patch the kparts, but I
will appreciate any help I can get, just via mail or via improved parts.

Thank you.

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<