Hello world,

i use QtCreator and Qwt, i try to plot in real time 6 curve but i not a master in programmation and it's very difficult for me...

can you help me to:
1°) place my curve correctly
2°) with the good size

i do a project to place 6curve and 4button on a windows, the result is nice (http://imageshack.us/photo/my-images/851/myplots.jpg/) but i want to increase the size of my plot and have a good arrangement
==> the plots have to take the total windows (except button emplacement)

How i have to modify this programm to have bigger plots with a good arrangement ?
main.cpp
Qt Code:
  1. #include <QApplication>
  2. #include "MyMainWindow.h"
  3. #include <QGridLayout>
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication app(argc, argv);
  7. MyMainWindow fenetre;
  8. fenetre.setWindowFlags(Qt::Window);
  9.  
  10. QGridLayout *MyGridLayout = new QGridLayout;
  11. MyGridLayout->addWidget(fenetre.get_WindowNumber1(),0,0,3,3);
  12. MyGridLayout->addWidget(fenetre.get_WindowNumber2(),0,3,3,3);
  13. MyGridLayout->addWidget(fenetre.get_WindowNumber3(),0,6,3,3);
  14. MyGridLayout->addWidget(fenetre.get_WindowNumber4(),3,0,3,3);
  15. MyGridLayout->addWidget(fenetre.get_WindowNumber5(),3,3,3,3);
  16. MyGridLayout->addWidget(fenetre.get_WindowNumber6(),3,6,3,3);
  17. MyGridLayout->addWidget(fenetre.get_BUTTONRun(),0,8);
  18. MyGridLayout->addWidget(fenetre.get_BUTTONQuit(),0,9);
  19. MyGridLayout->addWidget(fenetre.get_BUTTONAbout(),1,8);
  20. MyGridLayout->addWidget(fenetre.get_BUTTONContact(),1,9);
  21. fenetre.setLayout(MyGridLayout);
  22. fenetre.show();
  23. return app.exec();
  24. }
To copy to clipboard, switch view to plain text mode 
MyMainWindow.h
Qt Code:
  1. #ifndef MYMAINWINDOW_H
  2. #define MYMAINWINDOW_H
  3.  
  4. #include <QApplication>
  5. #include <QWidget>
  6. #include <QPushButton>
  7. #include <QMessageBox>
  8. #include <qwt_plot.h>
  9.  
  10. class MyMainWindow : public QWidget
  11. {
  12. Q_OBJECT
  13.  
  14. public:
  15. MyMainWindow();
  16. ~MyMainWindow();
  17. QPushButton* get_BUTTONRun();
  18. QPushButton* get_BUTTONQuit();
  19. QPushButton* get_BUTTONAbout();
  20. QPushButton* get_BUTTONContact();
  21. QWidget* get_WindowNumber1();
  22. QWidget* get_WindowNumber2();
  23. QWidget* get_WindowNumber3();
  24. QWidget* get_WindowNumber4();
  25. QWidget* get_WindowNumber5();
  26. QWidget* get_WindowNumber6();
  27.  
  28. private:
  29. QPushButton *BUTTONRun;
  30. QPushButton *BUTTONQuit;
  31. QPushButton *BUTTONAbout;
  32. QPushButton *BUTTONContact;
  33. QWidget *WindowNumber1;
  34. QWidget *WindowNumber2;
  35. QWidget *WindowNumber3;
  36. QWidget *WindowNumber4;
  37. QWidget *WindowNumber5;
  38. QWidget *WindowNumber6;
  39. QwtPlot *myPlot1;
  40. QwtPlot *myPlot2;
  41. QwtPlot *myPlot3;
  42. QwtPlot *myPlot4;
  43. QwtPlot *myPlot5;
  44. QwtPlot *myPlot6;
  45. };
  46. #endif // MYMAINWINDOW_H
To copy to clipboard, switch view to plain text mode 
MyMainWindow.cpp
Qt Code:
  1. #include "MyMainWindow.h"
  2.  
  3. MyMainWindow::MyMainWindow() : QWidget()
  4. {
  5. WindowNumber1= new QWidget(this);
  6. WindowNumber2= new QWidget(this);
  7. WindowNumber3= new QWidget(this);
  8. WindowNumber4= new QWidget(this);
  9. WindowNumber5= new QWidget(this);
  10. WindowNumber6= new QWidget(this);
  11. myPlot1=new QwtPlot(WindowNumber1);
  12. myPlot2=new QwtPlot(WindowNumber2);
  13. myPlot3=new QwtPlot(WindowNumber3);
  14. myPlot4=new QwtPlot(WindowNumber4);
  15. myPlot5=new QwtPlot(WindowNumber5);
  16. myPlot6=new QwtPlot(WindowNumber6);
  17.  
  18. BUTTONRun = new QPushButton("RUN", this);
  19. BUTTONQuit = new QPushButton("STOP", this);
  20. BUTTONAbout = new QPushButton("About", this);
  21. BUTTONContact = new QPushButton("Contact", this);
  22.  
  23. QObject::connect(BUTTONQuit, SIGNAL(clicked()), qApp, SLOT(quit()));
  24. QObject::connect(BUTTONAbout, SIGNAL(clicked()), qApp, SLOT(aboutQt()));
  25.  
  26. }
  27. MyMainWindow::~MyMainWindow()
  28. {
  29.  
  30. }
  31.  
  32. QPushButton* MyMainWindow::get_BUTTONRun()
  33. {
  34. return BUTTONRun;
  35. }
  36.  
  37. QPushButton* MyMainWindow::get_BUTTONQuit()
  38. {
  39. return BUTTONQuit;
  40. }
  41.  
  42. QPushButton* MyMainWindow::get_BUTTONAbout()
  43. {
  44. return BUTTONAbout;
  45. }
  46.  
  47. QPushButton* MyMainWindow::get_BUTTONContact()
  48. {
  49. return BUTTONContact;
  50. }
  51.  
  52. QWidget* MyMainWindow::get_WindowNumber1()
  53. {
  54. return WindowNumber1;
  55. }
  56.  
  57. QWidget* MyMainWindow::get_WindowNumber2()
  58. {
  59. return WindowNumber2;
  60. }
  61.  
  62. QWidget* MyMainWindow::get_WindowNumber3()
  63. {
  64. return WindowNumber3;
  65. }
  66.  
  67. QWidget* MyMainWindow::get_WindowNumber4()
  68. {
  69. return WindowNumber4;
  70. }
  71.  
  72. QWidget* MyMainWindow::get_WindowNumber5()
  73. {
  74. return WindowNumber5;
  75. }
  76.  
  77. QWidget* MyMainWindow::get_WindowNumber6()
  78. {
  79. return WindowNumber6;
  80. }
To copy to clipboard, switch view to plain text mode