C++ (Qt) QGridLayout *gridLayout; gridLayout = new QGridLayout(); gridLayout->setMargin(4); gridLayout->setSpacing(2); gridLayout->setColumnMinimumWidth(0, 60); gridLayout->setColumnMinimumWidth(1, 45); gridLayout->setColumnStretch(0, 0); gridLayout->setColumnStretch(1, 1); gridLayout->setColumnStretch(2, 2); gridLayout->addWidget(lbl_CurrentText = new QLabel(CurrentText), 0, 0, Qt::AlignLeft); gridLayout->addWidget(lbl_CurrentVal = new QLabel(CurrentVal), 0, 1, Qt::AlignLeft); gridLayout->addWidget(lbl_WorstText = new QLabel(WorstText), 1, 0, Qt::AlignLeft); gridLayout->addWidget(lbl_WorstVal = new QLabel(WorstVal), 1, 1, Qt::AlignLeft); gridLayout->addWidget(lbl_TrshText = new QLabel(TrshText), 2, 0, Qt::AlignLeft); gridLayout->addWidget(lbl_TrshVal = new QLabel(TrshVal), 2, 1, Qt::AlignLeft); gridLayout->addWidget(lbl_Leg1Text = new QLabel(Leg1Text), 3, 0, Qt::AlignLeft); gridLayout->addWidget(lbl_Leg1Val = new QLabel(Leg1Val), 3, 1, Qt::AlignLeft); gridLayout->addWidget(lbl_Leg2Text = new QLabel(Leg2Text), 4, 0, Qt::AlignLeft); gridLayout->addWidget(lbl_Leg2Val = new QLabel(Leg2Val), 4, 1, Qt::AlignLeft); gridLayout->addWidget(plot_data = new QwtPlot(), 0, 2, 5, 1, Qt::AlignLeft); curve_line1 = new QwtPlotCurve; curve_backg1 = new QwtPlotCurve; m_line = new QwtPlotMarker; setLayout(gridLayout);
C++ (Qt)void setPlot(const double &plotMin, const double &plotMax, const double &plotStep) { QFont plotFont("Times", 8, QFont::Light); plot_data->setCanvasLineWidth(0); plot_data->setAxisScale(0, plotMin, plotMax, plotStep); plot_data->setAxisFont(0, plotFont); plot_data->setMinimumSize(195, 100); plot_data->setMaximumSize(16000, 300); plot_data->enableAxis(2,false); plot_data->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); }
plot_data->enableAxis(2,false);
C++ (Qt)gridLayout->setColumnStretch(0, 0);gridLayout->setColumnStretch(1, 1);gridLayout->setColumnStretch(2, 2);
C++ (Qt)gridLayout->setColumnStretch(2, 1);
gridLayout->setColumnStretch(2, 1);