PDA

View Full Version : What's the best solution for making a "virtual folder list"



rsilva
8th May 2011, 15:13
I'm making now an application that the user can save their maps and create folders and arrange it like they want.

I'm using the normal directories with a "mapdir.xml" that contains that it's a valid map virtual folder and the number of valid maps and subdirectories. So, everything that the user do with the application to move, rename, delete or add, I'll create, delete, rename or move a directory or file. The maps has two files, "mapname.map" and "mapname.xml".

edit: The user is viewing the "valid" directories and files in a QTreeWidget, is there a better way to show these items ?

edit (again): I've just noticed while moving "big" directories makes there's a delay to update the items.

Is there a better way for doing this instead of using normal directories with "map format" ?

I've thinking about using SQL but I never used it, I can do it with this ?
Is there another good solution ?

wysota
8th May 2011, 23:48
There are plenty of solutions you might use. In the end you'll have to do some mapping between your virtual stucture and the real filesystem but from the application point of view you can implement any possible model, even one based on QMap or something similar.

nightghost
9th May 2011, 10:09
edit (again): I've just noticed while moving "big" directories makes there's a delay to update the items.

Is there a better way for doing this instead of using normal directories with "map format" ?

I've thinking about using SQL but I never used it, I can do it with this ?
Is there another good solution ?

You should check what is really causing the problem, before you think about a solution :)

rsilva
9th May 2011, 13:59
I'm not thinking to change it about the problem, I want to optimize it. Make faster and avoid some things that can cause problems.

nightghost
9th May 2011, 14:11
Isn't your problem, that your program is to slow? In order to optimize it you should first find the bottleneck, before you start. Maybe your data structures are the problem, but it can also be the slow file I/O or the wrong configuration of the tree, or...

rsilva
9th May 2011, 14:40
It's normal, only gets slow if moving big directories, but it's normal to slow in moving too much things in the filesystem.

But, I'm trying to avoid letting the entire tree in a directory. And trying to improve how the user interacts with it, like using treeWidget or changing to something faster or better to navigate.