コード例 #1
0
ファイル: main_window.cpp プロジェクト: ZhaoweiDing/UniSim
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);
}
コード例 #2
0
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);
}