[PATCH] Spring loading folder behaviour

Kévin 'ervin' Ottens ervin at ipsquad.net
Thu May 20 22:20:56 BST 2004


David Faure a dit :
> What is "spring loading folder"?

I knew I've forgotten something... Sorry!

> Is that the feature where hovering on top of a folder during a
> drag-and-drop operation opens that folder?

It's exactly this. Hold something on top of a folder during
drag'n'drop and it opens the folder.

> One thing I noticed: you use static objects, which is not allowed in
> libraries and loadable modules. One has to use KStaticDeleter instead.

I wasn't aware of this... I'll take a look to this.

> But what's the point of the static list of parts? It looks strange and
> potentially dangerous to me. What about the static QTimer? Hmm, all
> iconviews
> need to be notified? All of this is only used during a drag-and-drop,
> right?

Yes, it's only used during drag'n'drop. The point of having a static
QTimer is that all iconview need to start or stop it. Knowing if a drag
entered or left a view is only know by the last view where drag events
occurred.

The static list of parts is used only if the user wants to open a window
for each folder. When the spring loading is finished (aborted by timeout
or objects dropped in a view) we must know all the parts involved to
close their window.

> I think it would be cleaner to define a new class, make it a singleton
> and access it from all the iconviews. But since I'm a bit confused about
> what this feature is about, I could be wrong.

It sounds like a good idea to group the needed objects, maybe some code
can sit in a separate class too. I'll try to see what can be done in this
area.

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."






More information about the kfm-devel mailing list