Adding own GUI in Paraview - paraview

I need to add my own, self made qt gui in paraview. I heard about paraview plugins that should allow that. But I do not find a tutorial on it. How can I add buttons, checkboxes, comboboxes in Paraview?
Could somebody show me an example? Thanks in advance

The ParaView Wiki has lots of information on using and customising ParaView. In particular, see the section on plugins and the page on writing custom applications. These describe two different ways of customising the functionality of ParaView.
You don't state what language your GUI is written in, but if you can use or call Python then the easiest way to interact with ParaView may be through the Python scripting interface.

Related

Change focus in MATLAB App Designer

I'm looking for a method to programmatically change the focus to a different panel in the MATLAB App Designer. I have a push-button that I would like to use to shortcut the user to a specific panel in the same UI. My UI is arranged using a series of tab-panels, and I need a way to directly send the user to a different panel.
For normal (non App Designer) MATLAB UI components, I can use the command uicontrol(itemOfInterest); to give focus to a particular element of the UI, but this isn't possible with App Designer. Is there a specific command?
It seems that, for what concerns the App Designer, as of Matlab R2017a, this feature has not been implemented yet. Googling a little bit, I found this question, in which the OP basically asks the same. The provided (and accepted) answer is:
This functionality with "uicontrol" is currently unavailable in App
Designer. I have forwarded your feedback to our developers and they
will consider adding support for this in a future release of MATLAB.
With a little bit of patience, the focus support will be introduced in a new Matlab release. Meanwhile, I suggest you to do some research focusing on undocumented Matlab features and underlying Java components. With a little bit of luck and findjobj you could be able to achieve what you are looking for.

Converting Matlab GUI into a guide GUI

I have inherited a pile of Matlab scripts that manually build a GUI using calls to uicontrol, uimenu, etc. Over the years we have needed to remove and add elements to the GUI and since all the positions are specified manually in the scripts, the layout hasn't really changed to accommodate the missing elements so it is really starting to look like a pile of trash.
Is there a way to automatically convert my matlab scripted gui into something I can use with guide? I would rather not have to start over...
GUIs generated with GUIDE are not much better than manually scripted ones (if not worse in my opinion in terms of maintainability).
The sad truth is that there are no builtin layout managers in MATLAB (there are user-contributed ones on FEX like border layout, gridbag layout and others). If you are refactoring the code, please consider using some sort of GUI layout manager.
To answer your question, afaik there is no automatic tool for such a conversion.
To be exact, MATLAB has some undocumented layout managers: uiflowcontainer and uigridcontainer. See this article by Yair Altman
Well, there is no automatic conversion utility but you dont need to create everything from scratch with GUIDE.
Execute your GUI so that it shows up and save the figure window as a fig file. This file then can be edited with guide.
However this needs manual adjustments in your code. Especially if you need access to handles and I am also not sure about the callback functions.
However, as Amro already pointed out, GUIDE is not a perfect solution.

ipython notebook as a web tool dev platform

I am planning to port an existing application (or at least part of it where we process data to create graphs interactively) into an ipython based UI. I am wondering if it is possible to create a menu based app using ipython notebook as an engine. Any functionality to create menu-based applications in Ipython? From my experience with Ipython so far, I guess this is not available.
I am thinking of mimicking it by creating html code in markdown cells that will produce menus as select lists, choosing and submitting from there would call some cgi on a server that would update lower parts of the notebook using AJAX. Anyone did similar stuff?
Nothing prevent you from reusing the component.
We try to make them as reusable as possible and is should be easy to use our javascript to create your own js frontend. cf #minrk example here.
If some modification make component more standalone and reusable Patches are welcomed. at some point we might even have each component (codecell, tooltip, completer) installable with bower/component.io/whatever
I would recommend not to add menu through javascript in markdown cell as it will be disable soon.
You might want to have a look at Exhibitionist that uses ipython notebook for some noce stuff.

Need Help With Gtk+ Text Editor

I am creating a GTK+ text editor called Quick-Ed Pro. It was originally designed to be a cross-platform version of Quick-Ed , a text editor I wrote in raw Win Api. But after finding the awesome capabilities of GTK+ , Quick-Ed Pro emerged as an entirely different program with advanced GUI capabilities way better than Quick-Ed. But now Im stuck with a few problems.
Problems:
1- I want to make my editor multi-tabular like notepad++ or gedit. I dont know how to do this. What widget should I use?
2- GtkTextView does not seem to have any undo / redo functions. How can I make my own? (examples appreciated)
3- Gtk+ has a long startup time, usually 2-4 seconds unlike win api which started up in less than a second, so how can I create a small popup loading bar like the one in GIMP or Code::Blocks?
4-URL of my project: http://code.google.com/p/quick-ed/
URL of the WinApi Quick-Ed : http://code.google.com/p/burningprodigy ... e&can=2&q=
Any help will be appreciated. I need contributors. Please lend me a hand.
1) Tabs: You will need to write your own widget for this. No toolkit i know has one that is flexible enough to handle what is required in a good editor. But you can start with GtkNotebook for a quick prototype.
2) Yes this is a FAQ and imho bad that it is not solved directly in GTK. If you use gtkmm you can use http://view.sourceforge.net/classes.php otherwise look into the library to see how it is implemented and port it into C. There are other implementations for example for python available on the net.
3) You have to write a small dialog using the WinAPI and show this before you call the first GTK function. Usually i wouldn't recommend to do it - after the windows file cache has the files (or you have a SSD) loading speed is okay.
You should look into http://projects.gnome.org/gtksourceview/ to get a good editor. The GtkTextView is definitely not able to work as a source code editor. I'm maintaining a commerical IDE and Editor and by the way the most code is outside the editor widget anyway.

What is a good visualization library for creating state diagrams and animations?

I'd like to post-process log files and extract node data and transitions, and then graph them in a gui of some kind. So, I'd like to programmaticly draw bubble diagrams, maybe with animations showing packets going from node to node.
Ideally, perl or java would be the language of choice, but anything that runs on a linux platform would be fine.
What is the best library for this kind of thing?
Java Solutions
Two possibilities in Java include Prefuse and Visual Library. They both have the ability to display graphs with some animation ability. Prefuse has better graph layouts. Visual Library is more Swing-like if you are used to Swing development.
Adobe Flash
If you are willing to work with Adobe Flash, Flare is probably a little more suited to your task as it has better animation capabilities and has good graph layouts.
Animation Libraries
If your diagrams are fairly simple, you could create your own diagrams and use the Timing Framework or Trident for animation.
Other
Some other possibilities include Processing and JavaFX. Javascript libraries include ProcessingJS and Protovis.
Graphviz will draw you static diagrams. It can't do animations as far as I know.
If you can convert the output into graphviz dot format (graphviz) than you can use idot incremental viewer (iDot_incremental_viewer) which uses prefuse behind the scenes and it's completely free. The only thing you need to do here is to convert the output in simple dot file. Rest will be taken care of incremental viewer.