// DockWidget No 1.
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
ptrTrendPlotter1 = new TrendPlotter(dock,TrendPlotter::sensor1to12);
dock->setWidget(ptrTrendPlotter1);
addDockWidget(Qt::LeftDockWidgetArea, dock);
// DockWidget No 2.
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
ptrTrendPlotter2 = new TrendPlotter(dock,TrendPlotter::sensor13to24);
dock->setWidget(ptrTrendPlotter2);
addDockWidget(Qt::LeftDockWidgetArea, dock);
// DockWidget No 3.
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
ptrTrendPlotter3 = new TrendPlotter(dock,TrendPlotter::sensor25to36);
dock->setWidget(ptrTrendPlotter3);
addDockWidget(Qt::RightDockWidgetArea, dock);
// DockWidget No 4.
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
ptrTrendPlotter4 = new BJSEECTrendPlotter(dock,BJSEECTrendPlotter::sensor37to48);
//Toolbar
btnZoom->setText("Zoom");
btnZoom->setCheckable(true);
btnZoom->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
// DockWidget No 1.
QDockWidget *dock = new QDockWidget(QObject::tr("Sensor 1 - 12"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
ptrTrendPlotter1 = new TrendPlotter(dock,TrendPlotter::sensor1to12);
dock->setWidget(ptrTrendPlotter1);
addDockWidget(Qt::LeftDockWidgetArea, dock);
// DockWidget No 2.
dock = new QDockWidget(QObject::tr("Sensor 13 - 24"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
ptrTrendPlotter2 = new TrendPlotter(dock,TrendPlotter::sensor13to24);
dock->setWidget(ptrTrendPlotter2);
addDockWidget(Qt::LeftDockWidgetArea, dock);
// DockWidget No 3.
dock = new QDockWidget(QObject::tr("Sensor 25 - 36"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
ptrTrendPlotter3 = new TrendPlotter(dock,TrendPlotter::sensor25to36);
dock->setWidget(ptrTrendPlotter3);
addDockWidget(Qt::RightDockWidgetArea, dock);
// DockWidget No 4.
dock = new QDockWidget(QObject::tr("Sensor 37 - 48"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
ptrTrendPlotter4 = new BJSEECTrendPlotter(dock,BJSEECTrendPlotter::sensor37to48);
//Toolbar
toolBar = new QToolBar(this);
QToolButton *btnZoom = new QToolButton(toolBar);
btnZoom->setText("Zoom");
btnZoom->setCheckable(true);
btnZoom->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
To copy to clipboard, switch view to plain text mode
Bookmarks