In my C-code I repeatedly use a function from an external library:
XCALL("Blabla");
...
XCALL_END("Blabla");
It would be very helpful to be able to put each XCALL call into the outline view for better code querying. However, I could not find an easy solution for this. Also, installed Xtext in hope it was easy to configure. Any ideas?
Many thanks in advance!
I couldn't find any customization point open by CDT for modifying the behavior of the Outline view so I think you would have to get the CDT sources and build your customized version if you want to do that - or maybe see if they would be interested in you making this behavior customizable via extensions. In any case, this would represent quite a lot of work.
Related
QtCreator comes with cool Qt-related documentation and functionality: when you select a Qt class and press F1, it opens a sidebar with that class specific documentation page.
Now, QtCreator lets me install C++ documentation (found here: http://qt-project.org/wiki/Qt_Creator_Documentation_Gallery - I've tried the en.cppreference.com version). However, selecting an STL class and pressing F1 only opens the default, generic page listine, sort of "Home" of the documentation.
Is it possible to have a mimic functionality for C++ STL docs to the one of Qt docs?
Also, I've checked it in QtCreator 2.4 running on Ubuntu 12.04. Is it maybe fixed in newer versions?
In case you're still looking for an answer to this (or for anyone else finding this posting), there is a working solution now. In the official documentation gallery there is a download link labelled STL documentation. That version will provide correctly working context sensitive look-up. There are a few things where that seems to fail though (like std::unique_ptr), but for most things I tested it works just fine. Some things find a technically correct but not helpful entry though. As an example, std::fill(...) will link to the correct entry in "std Namespace Reference" (which is just a line of the definition, and not linked to anything useful either) but not the description on the "Mutating" page (which is the first suggestion when searching for 'fill' via the index).
Please ignore the two links that are still at the top of that page though, those either completely lock-up the help system (docs.google.com) or just don't provide context sensitive help (en.cppreference.com).
Unfortunately, cppreference docs don't support navigation with F1.
Hi I want to use Tab Activity(My Tab View must be at bottom) and android version 4.0 or later told that tabactivity is deprecated. so it must be a better way than it. but I could not find properly. some tutorials gave me advise to use Fragments but really I don't know anything about it. so please suggest me best tutorial or sample code for Fragments Or other best alternative way.
Thanks!
One suggestion is to use the Sherlock ActionBar. Inside the package there are good sample projects about Fragments, ActionBar, Navigation with tabs! I recommend ActionBarSherlock!
It also is 2.x compatible!!!
here is a link from android developer site,
http://developer.android.com/reference/android/app/TabActivity.html
and a tutorial,
http://maxalley.wordpress.com/2013/05/18/android-creating-a-tab-layout-with-fragmenttabhost-and-fragments/
Just by following above links you can create i easily.
I was looking at MeVisLab and I wondered if anyone knows a good framework for making a user interface similar to the one they use. I like the designing flow with boxes and arrows thing.
What I would really like is to able to integrate with C++ using Qt, and perhaps export the graph to xml of something like that.
There is another example of the interface here:
I hope someone knows something
Qt's Graphics View is a "framework" which does a good bit of the handling for the kind of scenario you describe. It doesn't take much code to get off the ground and within striking range of what you're looking for:
http://doc.qt.nokia.com/latest/graphicsview-diagramscene.html
http://doc.qt.nokia.com/latest/graphicsview-elasticnodes.html
I'm not aware of any open-source Qt-based programs that offer exactly what you want already written. Just noticed IBM did open source "DataExplorer", which is interesting to me...I might go take a look at that myself:
http://www.research.ibm.com/dx/
I'm working on an application using OpenGL and C++ that parses some structured input from a file and displays it graphically. I'd like to start an Open File dialog when the application loads to allow the user to choose the file they want to have displayed. I haven't been able to find what I need on the web. Is there a way to achieve this in C++? If so, how? Thank you in advance.
You have two choices, a quick one, and a good one:
Quick and pretty simple, use the Navigation Services framework from Carbon and NavCreateGetFileDialog(). You'll be done quick, and you'll have to learn almost nothing new, but your code won't run in 64-bit (which Apple is pushing everyone towards) and you'll have to link the Carbon framework. Navigation Services is officially removed in 64-bit, and is generally deprecated going forward (though I expect it to linger in 32-bit for quite a while).
A little more work the first time you do it (because you need to learn some Objective-C), but much more powerful and fully supported, wrap up NSOpenPanel in an Objective-C++ class and expose that to your C++. This is my Wrapping C++ pattern, just backwards. If you go this way and have trouble, drop a note and I'll try to speed up posting a blog entry on it.
To add to what Rob wrote:
Unfortunately, there's no simple equivalent to Windows's GetOpenFileName.
If you use Carbon: I don't really think NavCreatGetFileDialog is easy to use... you can use this code in the CarbonDev to see how to use it. The code there returns CFURLRef. To get the POSIX path, use CFURLGetFileSystemReprestnation.
That said, I recommend you to use Cocoa. Rob will write a blog post how to use NSOpenPanel from GLUT :)
I am looking for a spell checker for c++ source code. Unfortunately all I can find is Visual Studio specific. I would like something which works on Linux.
Edit:
Ultimately I want to automate it in some way. I am not very proficient in spell checking, but what I am thinking of is a not-interactive console tool which prints error messages, or something like that.
Personally I use vim, but not everyone on the project does of course.
Currently we are using svn so it is possible to integrate it into the pre-commit-hook maybe?
Don't you guys do something similar?
Eclipse (Java based so will do mac, linux etc.) has spellcheckers built in. With the CDT plugin you can edit and build C++ code.
Vim also supports spell checking.
See the other question for more.
Emacs too has spell checking, flyspell-prog-mode, is the one I use, it is a (very!) personal preference which one works best for you.
The automating the spell check idea is a much trickier one. The best you can hope for is one that will tell you if there are spelling errors. That's trickier than it sounds, especially with code comments which may have all sorts of valid abbreviations which are not real words.
Having a company policy that whatever people have their EDITOR environment variable set to has a spell check enabled, should cut down on the spelling errors in commit messages, for example.
I found something!
svn co svn://anonsvn.kde.org/home/kde/trunk/quality/krazy2 krazy2
this is part of the quality management of KDE.
Besides a multitude of checks (KDE-specific, qt-specific, cpp-specific, ...) there is automated spell checking.
hope this helps
Which editors do you use? Many of them have spell checking abilities. E.g., gedit just needs to have the spellcheck plugin enabled.
You can check out some alpha code I just whipped up for a similar purpose: pyspellcode. It's Zlib licensed and uses clang and hunspell.
No idea how pyspellcode compares to what KDE does/provides but am happy to receive comparisons and will prioritize its development more if there's interest it.
At just over 200 lines, I'm guessing pyspellcode is at least lighter weight than KDE's solution though KDE's solution I imagine is way more tested.