Have a look at QWT for plotting stuff.
It's nice to be important but it's more important to be nice.
Then maybe you should use something you are more familiar with to get that job done until you are more at home with Qt. If you just jump into the deep end your going to have countless problems and your project will take forever.
You can then start with something simple with Qt and work your way up. Maybe even eventually port the application to Qt if you have time.
FS Lover (25th October 2009)
Well, you come here, tell us that you want to do something very difficult and that you have no clue and want some help.
The problem is that you did not ask specific questions. If there is some question that I can answer with "Yes" and "No" or when you give us some code and say: "Here it does not compile" or "there is a crash", we can help.
But till now it sounds like we shall do the work you get paid for.
If your company wants you to code some application in Qt and you have no clue how to do that, ask your company to get some paid training.
We are realy like to help you but we will not spend hours and hours on you try to figure out what your problem is. We like to help, but keep in mind we do this in our free time because we like Qt programming. If you are unsatisfied with our service, buy some support from Nokia.
It's nice to be important but it's more important to be nice.
FS Lover (25th October 2009)
What I need is some guide line on how to build the widget where I should show the wave form of the sound track I will load. Something as you can see in the image in this link:
http://www.guidesandtutorials.com/audacity-tracks.html.
I don't want you write it for me ( also because I want to learn Qt ). I need an help on build it and If I can't I'll pay someone to write it for me, but at the moment I want to try to write it.
Thank you in advance.
Best Regards
Franco Amato
Subclass QWidget, reimplement paintEvent and mousePress/mouseRelease.
It's nice to be important but it's more important to be nice.
why don't you take a closer look at how audacity (open source project) did this particular waveform display and try if you can map it to something in Qt.
Qt has one of the best documentation of all its classes and very good examples. There surely must be one that relates to what you want to do.
If you still can't figure it out, at least you will have some better questions to ask.
good luck,
-a
Franco Amato
Hi,
I started writing some code.
The class interface:
Qt Code:
#ifndef __WAVEFORMDISPLAY_H__ #define __WAVEFORMDISPLAY_H__ #include <QWidget> { Q_OBJECT public: protected: private: }; #endif //__WAVEFORMDISPLAY_H__To copy to clipboard, switch view to plain text mode
And the methods:
Qt Code:
#include "waveformdisplay.h" { setAutoFillBackground(true); setWindowTitle( tr("Waveform display") ); resize(500, 200); } // Paint event { painter.setPen( pen ); painter.drawLine(line); } // Mouse press event { event->accept(); } // Mouse move event { event->accept(); } // Mouse release event { event->accept(); }To copy to clipboard, switch view to plain text mode
Do you already have some suggestions? Code is just to start and I already got linker error about mouse event![]()
Franco Amato
If you would have shown as the error message of the linker, it would be a lot easier to help.
Anyway, in this simple case I guess you just forgot the WaveFormDisplay:: in the method signature of your implementation to the linker does not know that the three mouse-event-handler belong to your class.
But also some comments to your code:
- Why do you "accept" the mouse-events already?
- Although it is good to write documentation, you "document the obvious": http://freeworld.thc.org/root/phun/unmaintain.html
It's nice to be important but it's more important to be nice.
Bookmarks