Embedding HTML Help in a QT application - qt

I write an application, with Qt and it has a pretty big help system, which is including images, tables, links, etc... This help system is stored on a disk in a specific location as simple HTML files, together with the images and using a QWebkit control it's loaded in the application on request, and the user can browse it, etc...
Now, I would like to move away from my "in-house, file based" help solution, meaning: I want a help system which still will use my HTML files, but without the need to ship 100 files to the user, only 1 or 2.
I am aware of Qt's help system ( http://doc-snapshot.qt-project.org/4.8/qthelp-framework.html ) but I am wondering if there are any other solutions providing the same or similar functionality.
What I am looking for:
take all the HTML files and create one of them, including images
reader possibly embeddable in application, but separate application is good too.
multiplatform
support for context sensitive help (ie: "Click on what's this", help shows relevant page)

For huge help docs the best way is to use Qt Help Framework. For example QAssistant is done in this way.
It mainly consists of several html like files and index files. Then you "compile" them to get a binary(and compressed) version. You can split help in sections and so on...

I am using QWebView to display HTML help files. You get a widget and can integrate it in your application.
Qt have a good easy example here: http://qt-project.org/wiki/Open_Web_Page_in_QWebView
Since it is a widget, you can greate a stand-alone or integrated look and it it very flexible.

Related

In JavaFX, Is there a best practice or framework for creating program help files? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last year.
Improve this question
I've been experimenting with using HTML as a structure for generating a help information area for a desktop program that I've finished writing and that seems to work ok, though I don't really like the way it is turning out and I began to wonder if perhaps there might be a better way to go about it. Perhaps a library that makes generating and linking content within Java a little easier in that context or some other means that I'm not aware of.
I did some Googling on the topic but found nothing specifically in reference to help menu / content creation.
Does anyone know of any libraries out there that would make it easier to create help info for end users?
Or, is there a "best practice" for doing this or any other method to that end?
Thank you,
Mike
What does Idea do?
Intellij is large java app that has decent help documentation. You could look and see how they did that, if that is something you wish to emulate. I think it is mostly good quality writing and organization rather than tool support, though I guess they use decent tooling too.
I did a quick check to see how idea create their doc. They write in markdown format. Here is the markdown style guide they use for creating the document, in generated html form and in markdown authoring form. A repository of docs used for one of their products is their open source sdk docs. The SDK docs project is an Idea project, so I guess they just use Idea for authoring. If it seems to be something that would help you, you could try cloning the project and generating documentation from it or contacting the project contributors for more info.
As far as tying the help content into your app, either you can display it in situ using a WebView or link to it externally using HostServices. You could study the help system used within Idea to see how they generally do that, e.g. help menus used, key commands responded to, icons used to link to the help system, etc.
Generally, the way it works is:
The document is written in markdown then processed and rendered to html.
The html documents have copious anchors throughout.
The help menu items link to the anchors directly.
Help menus and shortcut keys follow platform specific conventions and differ between Windows and Mac.
There is a single ? icon in dialogs which appears in a consistent place and it links to an anchor in the html for context sensitive help in the dialog.
The documentation itself is hosted on a website so it can be accessed independently of the application.
The app launches an external browser to view the help rather than using something like a WebView to show the help internally.
Additionally, Idea will use tooltips which show up on hover. Tooltips aren't used for every control or UI element, only certain ones. If there is a keyboard accelerator which can be used to trigger the control action, then there is a tooltip for it, and in the tooltip it lets you know what the keyboard shortcut to trigger it is.
The rendered HTML to which the app is linked is hosted at the jetbrains website.
Linking to HTML help
You could:
Link to your own hosted website, OR
Link to html files packaged with your app.
Both could be rendered by either WebView or a browser showing a document using HostServices, using the file: protocol to access html files packaged with your app or https: protocol for files hosted on your web server.
What does SceneBuilder do?
For a pure JavaFX application, SceneBuilder is quite large and complex. It has no reliance on internal help at all, just a single help menu item, accessible via an F1 shortcut. The help links to a website authored and hosted by Oracle (using the standard tool Oracle use for authoring most Java platform docs, which is likely a commercial tool). It is not as nicely integrated and context sensitive as the Idea example but it does demonstrate a simple approach to documenting an app via an external website.

Lightbox2 from photo directory

Is it possible to use the Lightbox2 script to display all photos from a given directory instead of listing each photo in the html?
This is really just a yes or no question, but please feel free to explain. I want to know if this is possible and if I should spend my time trying to figure it out. Thanks for the help.
No, Lightbox2 is written in JavaScript.
When used on a webpage, JavaScript is a client-side scripting language.
This means that the code executes on your web browser, and only has access to data the web browser makes available to it.
For more info: Client-side scripting
You need to use a server-side language (PHP, ASP.NET, etc.) to work with the server-side directories.
Here is an answer to a similar question, with a suggestion to create an index file w/ all the image file names that you could then parse with JavaScript. I don't think it would be much more efficient than manually adding img elements though.
Is there a way to return a list of all the image file names from a folder using only Javascript?

Document sharing on whiteboard application using flex

I am creating a whiteboard application using flex. I want to add a document sharing functionality to the application i.e, the user can upload the documents which will be loaded into the whiteboard and users can annotate over the document.
I googled a lot but still not sure where to start how to start. I only got the idea that the document can be converted to series of images on the server side and can be loaded in to flex app.
Can the experts help me get started with this. I am planning to use java for the server side.
Thanks all.
I'm not sure about uploading files to whiteboard itself. I think it's better to use loader and put your whiteboard on top of it.
What about software to convert documents. I'm not server side programmer, but I can share programs that we are using to convert documents:
Now we are using Print2Flash for almost all documents, but planning to give a chance for iSpring to convert Powerpoint presentations.
Both are live projects, getting improvements often enough and can convert documents to swf files. Personally I like the way Print2Flash provides ability to customize resulting swf with your own patterns and gives great flexibility to interract with it. As I know, nowadays iSpring added AS3 API to converted files, which is huge enhancement, but it's kinda expensive.
And don't forget about OpenOffice. It has not that good converter, but at least it is free. We've used it before, but gave preference to Print2Flash.
Hope my answer will give you a place to start.
Cheers.

Multiple-target cross-browser drag& drop file upload

We're investigating if it's possible to have the following: A webpage with multiple 'folders' to which a user can drag & drop a files. It's meant to be used as an interface to upload scanned documents to an archive.
For example, we would have page that states: 'Quotes', 'Invoices' & 'Misc'. Depending on the sort of document the user would drag & drop the file from the local file system to one of these three folders. It should then upload the file to the correct folder on the web server.
Is this possible, and if it is, any existing solutions using ASP.NET?
You can use modern browsers HTML5 functionalities to do so. A detailed explanation here:
http://www.useragentman.com/blog/2010/01/10/cross-browser-html5-drag-and-drop/
There is also the jQuery plugin: https://github.com/weixiyen/jquery-filedrop This one is a bit bogus (truncates files with accents like in french, doesn't handle correctly several drop areas in the same page, ...), but are easy to fix (I sent a fixed version to the author weeks ago, but didn't get any feedback...)
With some Ajax and the correct server-side solution, it works like a charm. I don't know any .NET solution, though.
Best,
You could use a silverlight app or a java applet, but those are the only solutions that I know of... The users would obviously need to have silverlight or the jre installed.

Any way to analyze the size of a SWF built in Flex?

I have a Flex application that seems larger than it should be. There is a lot of code in it, but not a lot of assets and it just seems large, but I'm not sure how to go about figuring out where the space is going.
I know about the –link-report option, but it only gives the sizes of externally linked library classes. I'm very interested in seeing a report of the sizes of all the classes and resources in my application and it would be a huge bonus if I could also view their dependencies. Not knowing how the code is compiled I'm not sure if this is even possible, but it seems like it should since the compiler can give me the sizes of individual classes linked from other libraries.
I did some searching around, but couldn't find anything helpful. Everything points to the optimization techniques of modularizing and externally linking libraries, which I understand and will implement, but I would really love some more detailed reports of what my compiled application looks like.
To be clear, I'm not really interested in tips on how to reduce the file size, just a report on what is used for and which classes are referencing what.
Anybody have any ideas?
CORRECTION - The link report does show all classes. My particular project in Flex Builder had several CSS files set to compile to swfs. My link report for the main app was being overwritten by these css compiles!
The link report actually contains all compiled classes and not just the ones in external libraries (at least with the Flex 4 SDK). There is an xsl available that will generate an html file of the link report so it is easier to read.
Check this post: http://blog.iconara.net/2007/02/25/visualizing-mxmlcs-link-report/
There is a command-line utility called flash.swf.tools.SwfxPrinter in swfkit.jar, which comes with Flex Builder (or the plug-in or the SDK) and which you can use to analyze information about class sizes. Joe Berkovitz wrote some good instructions on how to make use of it in his blog, and he was working on an AIR-based GUI tool that leverages it, but I'm not sure if he ever published the tool. Still, you can use his instructions to leverage the utility directly from the JAR.
I found a handy little AIR app that really helps organize the link report info.
http://www.kahunaburger.com/2008/03/08/air-link-report-visualizer/
It's old but still works very well.

Resources