#include <QApplication>
#include "MyMainWindow.h"
#include <QGridLayout>
int main(int argc, char *argv[])
{
MyMainWindow fenetre;
fenetre.setWindowFlags(Qt::Window);
MyGridLayout->addWidget(fenetre.get_WindowNumber1(),0,0,3,3);
MyGridLayout->addWidget(fenetre.get_WindowNumber2(),0,3,3,3);
MyGridLayout->addWidget(fenetre.get_WindowNumber3(),0,6,3,3);
MyGridLayout->addWidget(fenetre.get_WindowNumber4(),3,0,3,3);
MyGridLayout->addWidget(fenetre.get_WindowNumber5(),3,3,3,3);
MyGridLayout->addWidget(fenetre.get_WindowNumber6(),3,6,3,3);
MyGridLayout->addWidget(fenetre.get_BUTTONRun(),0,8);
MyGridLayout->addWidget(fenetre.get_BUTTONQuit(),0,9);
MyGridLayout->addWidget(fenetre.get_BUTTONAbout(),1,8);
MyGridLayout->addWidget(fenetre.get_BUTTONContact(),1,9);
fenetre.setLayout(MyGridLayout);
fenetre.show();
return app.exec();
}
#include <QApplication>
#include "MyMainWindow.h"
#include <QGridLayout>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyMainWindow fenetre;
fenetre.setWindowFlags(Qt::Window);
QGridLayout *MyGridLayout = new QGridLayout;
MyGridLayout->addWidget(fenetre.get_WindowNumber1(),0,0,3,3);
MyGridLayout->addWidget(fenetre.get_WindowNumber2(),0,3,3,3);
MyGridLayout->addWidget(fenetre.get_WindowNumber3(),0,6,3,3);
MyGridLayout->addWidget(fenetre.get_WindowNumber4(),3,0,3,3);
MyGridLayout->addWidget(fenetre.get_WindowNumber5(),3,3,3,3);
MyGridLayout->addWidget(fenetre.get_WindowNumber6(),3,6,3,3);
MyGridLayout->addWidget(fenetre.get_BUTTONRun(),0,8);
MyGridLayout->addWidget(fenetre.get_BUTTONQuit(),0,9);
MyGridLayout->addWidget(fenetre.get_BUTTONAbout(),1,8);
MyGridLayout->addWidget(fenetre.get_BUTTONContact(),1,9);
fenetre.setLayout(MyGridLayout);
fenetre.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
#include "MyMainWindow.h"
MyMainWindow
::MyMainWindow() : QWidget(){
myPlot1
=new QwtPlot(WindowNumber1
);
myPlot2
=new QwtPlot(WindowNumber2
);
myPlot3
=new QwtPlot(WindowNumber3
);
myPlot4
=new QwtPlot(WindowNumber4
);
myPlot5
=new QwtPlot(WindowNumber5
);
myPlot6
=new QwtPlot(WindowNumber6
);
QObject::connect(BUTTONQuit,
SIGNAL(clicked
()),
qApp,
SLOT(quit
()));
QObject::connect(BUTTONAbout,
SIGNAL(clicked
()),
qApp,
SLOT(aboutQt
()));
}
MyMainWindow::~MyMainWindow()
{
}
{
return BUTTONRun;
}
{
return BUTTONQuit;
}
{
return BUTTONAbout;
}
{
return BUTTONContact;
}
QWidget* MyMainWindow
::get_WindowNumber1() {
return WindowNumber1;
}
QWidget* MyMainWindow
::get_WindowNumber2() {
return WindowNumber2;
}
QWidget* MyMainWindow
::get_WindowNumber3() {
return WindowNumber3;
}
QWidget* MyMainWindow
::get_WindowNumber4() {
return WindowNumber4;
}
QWidget* MyMainWindow
::get_WindowNumber5() {
return WindowNumber5;
}
QWidget* MyMainWindow
::get_WindowNumber6() {
return WindowNumber6;
}
#include "MyMainWindow.h"
MyMainWindow::MyMainWindow() : QWidget()
{
WindowNumber1= new QWidget(this);
WindowNumber2= new QWidget(this);
WindowNumber3= new QWidget(this);
WindowNumber4= new QWidget(this);
WindowNumber5= new QWidget(this);
WindowNumber6= new QWidget(this);
myPlot1=new QwtPlot(WindowNumber1);
myPlot2=new QwtPlot(WindowNumber2);
myPlot3=new QwtPlot(WindowNumber3);
myPlot4=new QwtPlot(WindowNumber4);
myPlot5=new QwtPlot(WindowNumber5);
myPlot6=new QwtPlot(WindowNumber6);
BUTTONRun = new QPushButton("RUN", this);
BUTTONQuit = new QPushButton("STOP", this);
BUTTONAbout = new QPushButton("About", this);
BUTTONContact = new QPushButton("Contact", this);
QObject::connect(BUTTONQuit, SIGNAL(clicked()), qApp, SLOT(quit()));
QObject::connect(BUTTONAbout, SIGNAL(clicked()), qApp, SLOT(aboutQt()));
}
MyMainWindow::~MyMainWindow()
{
}
QPushButton* MyMainWindow::get_BUTTONRun()
{
return BUTTONRun;
}
QPushButton* MyMainWindow::get_BUTTONQuit()
{
return BUTTONQuit;
}
QPushButton* MyMainWindow::get_BUTTONAbout()
{
return BUTTONAbout;
}
QPushButton* MyMainWindow::get_BUTTONContact()
{
return BUTTONContact;
}
QWidget* MyMainWindow::get_WindowNumber1()
{
return WindowNumber1;
}
QWidget* MyMainWindow::get_WindowNumber2()
{
return WindowNumber2;
}
QWidget* MyMainWindow::get_WindowNumber3()
{
return WindowNumber3;
}
QWidget* MyMainWindow::get_WindowNumber4()
{
return WindowNumber4;
}
QWidget* MyMainWindow::get_WindowNumber5()
{
return WindowNumber5;
}
QWidget* MyMainWindow::get_WindowNumber6()
{
return WindowNumber6;
}
To copy to clipboard, switch view to plain text mode
// Row 0, Column 0, 1, 2. All these are 3-Rows in height, and 1-Column is Width
MyGridLayout->addWidget(fenetre.get_WindowNumber1(),0,0,3,1);
MyGridLayout->addWidget(fenetre.get_WindowNumber2(),0,1,3,1);
MyGridLayout->addWidget(fenetre.get_WindowNumber3(),0,2,3,1);
// Row 3, Column 0, 1, 2. All these are 3-Rows in height, and 1-Column is Width
MyGridLayout->addWidget(fenetre.get_WindowNumber4(),3,0,3,1);
MyGridLayout->addWidget(fenetre.get_WindowNumber5(),3,1,3,1);
MyGridLayout->addWidget(fenetre.get_WindowNumber6(),3,2,3,1);
//Buttons
// Row 0, 1, 2, 3, Column 3. All these are 1-Row in height, and 1-Column is Width
MyGridLayout->addWidget(fenetre.get_BUTTONRun() ,0,3,1,1);
MyGridLayout->addWidget(fenetre.get_BUTTONQuit() ,1,3,1,1);
MyGridLayout->addWidget(fenetre.get_BUTTONAbout() ,2,3,1,1);
MyGridLayout->addWidget(fenetre.get_BUTTONContact(),3,3,1,1);
// Row 0, Column 0, 1, 2. All these are 3-Rows in height, and 1-Column is Width
MyGridLayout->addWidget(fenetre.get_WindowNumber1(),0,0,3,1);
MyGridLayout->addWidget(fenetre.get_WindowNumber2(),0,1,3,1);
MyGridLayout->addWidget(fenetre.get_WindowNumber3(),0,2,3,1);
// Row 3, Column 0, 1, 2. All these are 3-Rows in height, and 1-Column is Width
MyGridLayout->addWidget(fenetre.get_WindowNumber4(),3,0,3,1);
MyGridLayout->addWidget(fenetre.get_WindowNumber5(),3,1,3,1);
MyGridLayout->addWidget(fenetre.get_WindowNumber6(),3,2,3,1);
//Buttons
// Row 0, 1, 2, 3, Column 3. All these are 1-Row in height, and 1-Column is Width
MyGridLayout->addWidget(fenetre.get_BUTTONRun() ,0,3,1,1);
MyGridLayout->addWidget(fenetre.get_BUTTONQuit() ,1,3,1,1);
MyGridLayout->addWidget(fenetre.get_BUTTONAbout() ,2,3,1,1);
MyGridLayout->addWidget(fenetre.get_BUTTONContact(),3,3,1,1);
To copy to clipboard, switch view to plain text mode
Bookmarks