hi every one i want ask that i have made a program and i have store a data in csv file. now i want a gui which includes buttons which upon pressing opens a a file and plot a graph.is there 开发者_如何学Pythona way through which i can add gui in my program using gcc.and also i want to ask how can i make a moving graph just like ECG.
thank alot.
Have you looked into using a toolkit like GTK+, if not i would suggest you check it out. GTK+ is written natively in C so i think it should work for you.
Rephrasing your quesiton:
You have a C program that stores data in a csv file. You wish to display this information as a graph but don't know how to build a GUI or graphical display. Further, you want animation (it would be good if you linked to what "ECG" is) probably to display temporal aspects.
If I have this right, I suggest you learn the GTK and Cairo libraries and use those to build your GUI. Build GUI's is tedious and unrewarding work (to me), particularly in C. I'd think hard about if you really want to bother making a GUI instead of doing something simple like calling out to gnuplot to build the graph as a file that the user can open, though this won't get you any animation.
I suggest you switch your project to C++ and use Qt for your GUI.
If gcc is not a requirement, then check out SciPy or Octave.
精彩评论