Using c++ how to show overlay icon in finder mac osx - c++

Recently we developed a MAC installer(.dmg). This is developed in c++ and QT. We had a hard requirement to show overlay icons on the files in the finder like how CVS/Dropbox shows sync status on files.
My question is exactly similar to below post. I understand that, if we try to show overlay icons in finder, MAC app store doesn't allow my app to be there. I am fine with this, my users will download the app from the website.
How can i add icon overlay in finder?
Am pretty much new to MAC and c++ also, Can you please provide me suggestion or solution in c++ in detailed.

I know this answer is somewhat late, but better than no answer, isn't it?!
Dropbox uses an open source framework called mach_inject. Originally developed by Jonathan Rentzsch, and known as Mach_Star, it allows code injection into applications.
Dropbox use this to inject into the OSX Finder application. If you Google for "Dropbox mach_inject" you'll find various references to this. Although it's not exactly what you want, there's also a project here which also injects into Finder, but to add menu items. You should be able to use that as reference.

Related

Integrating QML and a Map/Location Technology for Windows

I need to display a map containing markers for some devices locations. This application runs on windows (Desktop).
I am trying to find a good technology to display the map, and use coordinates, but I am having no success on finding any.
I've read a bit about QT Location Module and its Map component which seems to be really easy to use, but I couldn't make it work on windows (Compile doesn't find the module). People said this module is for mobile only.
My question is: is there a good api for using map/location with QT, QML into a Desktop application??
Location is going to be integrated in the main release of Qt but it is currently just an Add-on Module (git download url on the fourth row).
Useful information to ease the installation can be found in this thread of the Qt forum.
Finally, I've investigated the problem myself sometime ago and I've found this site full of interesting projects which uses Google API. Each project can be downloaded from GoogleCode. I've not test any of them but they look quite promising and maybe they can satisfy your needs.

open window to choose images c++

I am using c++ in ubuntu 12.04 using gcc. Am trying to perform few image processing tasks using opencv. For this, I want the user to select an image. Is it possible to open the directory explorer through c++, and let user choose the image, by selecting folders or drives, etc.? I actually did not know how to google this question exactly, my apologies if this is pretty rudimentary. Your help is much appreciated. Thanks in advance
You will want to use a GUI toolkit like Qt. They ususally have some sort of function for what you want. In the case of Qt the QFileDialog would be good.
For learning Qt: There are official tutorials or maybe this question.
If you want to go down this route you can also use a completely separate program just for getting a file name. Something like zenity maybe. Which platform do you want to do this on?

How to add custom menu upon right click on file / folder programmatically in c++ / QT?

We have an app which syncs files and folder like the way dropbox does. This is an c++ / QT based installer.
We would like add custom menu in the right click context menu of a file or folder like the way dropbox does in the below screen shot.
We are targeting both windows & Mac platforms. Can anyone suggest me how to start with it?
On Mac, you're going to have problems as adding to the general Finder Context Menu has been deprecated.
So, you may be thinking, if it's deprecated, then how do Dropbox do this? From what I've researched in the past, I believe they use code injection to inject into the running Finder application's address space and then an Objective-C feature known as method swizzling to change calling a method to one of their own, which is located in the injected code.
This is all fairly hardcore and very low level, but if you're going to go on that journey, you can start by looking into a library called mach_inject and googling about it. The source code can be found here: -
https://github.com/rentzsch/mach_inject
However, be aware that there are those that believe code-injection is wrong and won't install Dropbox or any other software that uses it. In addition, if you're planning on releasing a product in the Mac Store, I wouldn't expect any application that performs code injection to be allowed.
For windows, I could find a complete Shell extension example over here.
http://www.codeproject.com/Articles/441/The-Complete-Idiot-s-Guide-to-Writing-Shell-Extens?fid=519&select=3236397&fr=76&df=90&mpp=25&noise=3&prof=True&sort=Position&view=None&spc=Relaxed

Internet Explorer window in Qt?

Is there a way to show an Internet Explorer instance/frame inside a Qt Widget? I need to show a web page in my application (just show, no need for interaction), and while I read about WebKit for Qt, I'd like to know if there is another way without it, since I'm trying to keep the application as small as possible, and it would make me very unhappy to include such a large library (and nobody wants that, right?)
Yes, you need the commercial edition of Qt and then, you can use ActiveQt.
Your windows has 10GiB+ already in windows/system/. I think using WebKit is better investment than making your app depend on such old component as the IE frame... Just my 2c.

MSHTML MFC Tutorial

I know this has been asked twice before but both had no proper replies and are dated so in case someone has found something in these days, I'm asking again!.
Any one knows any good tutorial for MSHTML or some open source project which can be read to understand how various operations can be done in MSHTML - MFC?
Thanks
Your question makes it difficult to know exactly what you are trying to do, but the main MFC class that you need to use is CHtmlView. The MSDN has the definitive sources of information about it:
CHtmlView class
Creating a Web
Browser-Style MFC Application
Using MFC to Host a WebBrowser Control
If you find those links a bit terse, then this page contains some slightly friendlier articles:
Advanced CHtmlView Hosting
However, I would also ask whether you are definitely 100% sure that you want to use MFC?
The reason I ask is because I've worked for a number of years on an open-source project that hosts the Microsoft WebBrowser control and we saw significant performance improvements when we stripped out MFC from the project. The MFC abstractions weren't really buying us anything over the COM interfaces that are exposed by the control. Stripping out the MFC also made our code much simpler.
The project is open source, so if you want to see the code for yourself, you can get more information here. It is specifically the LibRender project that hosts the WebBrowser control. If you want to see it running, you should build the SWViewer solution.
The one place I like to visit for MFC is Newcomer's site There are some useful tutorials and demos of various things there. Although its more of a general MFC site, so maybe you can find what you are looking for there.