PDA

View Full Version : How to overlay icons for a dir/file using Qt ?



rawfool
21st March 2014, 09:49
How can I achieve svn like folder/file overlays ?
I want to change the icons of the overlays as the corresponding directory/file(s) are modified. I'm watching the directory using inotify, so any change in the file(s)/sub-directorie(s) of the watch directory shall give me a signal and based on the signal I need to update the relevant icon to the views in the directory.

Thank you.

Update:
Something like in the pic shown below -
10157

anda_skoa
21st March 2014, 13:28
Well, how do you currently achieve the base visualization?

QListView and a model?

Cheers,
_

rawfool
23rd March 2014, 15:32
I'm not having any widgets, I'm into the window given by the corresponding OS(target might be any Linux distro).
I'm watching a directory using inotify and I'm getting signals about any activity in the watch directory. So, in a given window manager for any OS, is there any way I can overlay icons in the watch directory like svn does ?
Thank you.

anda_skoa
30th March 2014, 11:34
That depends on the target program, i.e. how it plugin architecture looks like (if it has one) and what those plugins can do.

Cheers,
_

rawfool
2nd April 2014, 13:11
Since there are no Qt APIs as such, I learnt that, I need to use the corresponding file manager specific APIs.
So I'm starting to try with GNOME's nautilus file manager. I understood that I need to use nautilus_file_info_add_emblem() and other APIs in nautilus-file-info. But I'm unable to find how & which lib should I add in my Qt project to access nautilus file manager APIs ?

Link: nautilus-file-info (https://developer.gnome.org/libnautilus-extension/stable/libnautilus-extension-nautilus-file-info.html)

Kindly help me. Thank you.

anda_skoa
2nd April 2014, 17:09
You'll have to ask on a GNOME forum. There is likely a Nautilus plugin library

Cheers,
_