Changeset - bd0977f58c60
[Not reviewed]
reader-stat
0 1 0
Hasan Yavuz Ă–ZDERYA - 6 years ago 2019-04-17 15:27:07
hy@ozderya.net
set minimum width and right alignment for stat labels
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/mainwindow.cpp
Show inline comments
 
@@ -233,24 +233,29 @@ MainWindow::MainWindow(QWidget *parent) 
 
    plotMan->setPlotWidth(plotControlPanel.plotWidth());
 

	
 
    // init bps (bits per second) counter
 
    ui->statusBar->addPermanentWidget(&bpsLabel);
 

	
 
    // Init sps (sample per second) counter
 
    spsLabel.setText("0sps");
 
    spsLabel.setToolTip(tr("samples per second (per channel)"));
 
    ui->statusBar->addPermanentWidget(&spsLabel);
 
    connect(&sampleCounter, &SampleCounter::spsChanged,
 
            this, &MainWindow::onSpsChanged);
 

	
 
    bpsLabel.setMinimumWidth(70);
 
    bpsLabel.setAlignment(Qt::AlignRight);
 
    spsLabel.setMinimumWidth(70);
 
    spsLabel.setAlignment(Qt::AlignRight);
 

	
 
    // init demo
 
    QObject::connect(ui->actionDemoMode, &QAction::toggled,
 
                     this, &MainWindow::enableDemo);
 

	
 
    QObject::connect(ui->actionDemoMode, &QAction::toggled,
 
                     plotMan, &PlotManager::showDemoIndicator);
 

	
 
    // init stream connections
 
    connect(&dataFormatPanel, &DataFormatPanel::sourceChanged,
 
            this, &MainWindow::onSourceChanged);
 
    onSourceChanged(dataFormatPanel.activeSource());
 

	
0 comments (0 inline, 0 general)