Esempio n. 1
0
PlotWidget* MainWindow::createPlotWidget(QString title) {
    SubWindow *subWindow = new SubWindow(_mdiArea, title, SubWindow::SimulationOutput);

    QwtPlot *plot = new QwtPlot(subWindow);
    subWindow->setWidget(plot);
    return new PlotWidget(plot, subWindow);
}
Esempio n. 2
0
PlotWidget* MainWindow::createPlotWidget(QString title) {
    SubWindow *subWindow = new SubWindow(_mdiArea, title);
    subWindow->setType(SubWindow::Output);

    QwtPlot *plot = new QwtPlot(_mdiArea);
    subWindow->setWidget(plot);

    return new PlotWidget(plot, subWindow);
}
void OutputDestinationMakerQwt::createDestination(Output *output) {
    SubWindow *subWindow = new SubWindow(_mdiArea, output->title());
    subWindow->setType(SubWindow::Output);

    QwtPlot *plot = new QwtPlot(_mdiArea);

    subWindow->setWidget(plot);

    OutputDestination *destination = new OutputDestinationQwt(plot, subWindow, output);

	output->connectVariables(destination);
}
Esempio n. 4
0
void  MainWindow::viewModel() {
//    if (!viewModelSubWindow)
    SubWindow *viewModelSubWindow = new SubWindow(_mdiArea, "Model view", SubWindow::ModelView);

    imageLabel = new QLabel;
    imageLabel->setBackgroundRole(QPalette::Base);
    imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    imageLabel->setScaledContents(true);

    scrollArea = new QScrollArea;
    scrollArea->setBackgroundRole(QPalette::Dark);
    scrollArea->setWidget(imageLabel);
    viewModelSubWindow->setWidget(scrollArea);

    QImage image(liveSim->graphFilePath());
    imageLabel->setPixmap(QPixmap::fromImage(image));
    scaleFactor = 1.0;
    scrollArea->setWidgetResizable(true);

    viewModelSubWindow->adjustSize();
    viewModelSubWindow->showMaximized();
}