This is a discussion on Re: More on KParts - KDE ; 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.. ...
David Faure wrote:
> On Sunday 19 February 2006 16:29, Christoffer Brodd-Reijer wrote:
>> 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 )
>> 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. 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 think that instead of asking specific questions about a topic that I
am not too familiar about I will just describe my problem instead.
I have a folder in which I have a number of photos. The problem is that
this folder may contain one level of additional folders, that is, in
each folder the content is limited to files.
In this example root can contain folders but folder cannot. I hope I
made myself clear enough.
Here is what I want to do..
I want to show this in a tree view, and add a kpart to the right that
will show a preview of the pictures if the user clicks on it (and
nothing if the user clicks on a folder).
I also want to allow the user to copy/move files into this directory
with drag-and-drop, but I want to make sure that he only copies bmp and
jpg files (or in another case, where we are talking movies instead, I
want to make sure they are of a certain format and offer the user
conversion of his file if he is trying to copy/move a movie with a
format that is not allowed).
So the column thing is not really important, I was just wondering how
much power I have over the kpart. As you see, I only need to view the
content (if I want to do this in one view I need expandable folders),
listen for clicks on a file (openURLRequest?) and drop events (to give
the user limited access to copy/move files to this directory (he cannot
add any format and only one level of folders are allowed)).
Oh, to make myself even clearer this is for the Playstation Portable.
Thank you in advance,
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 <<