Changeset - e0b4536d2f3b
[Not reviewed]
add-textview
0 1 0
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-07-05 21:45:28
hy@ozderya.net
do not disable textview widget so that user can select/copy
1 file changed with 0 insertions and 3 deletions:
0 comments (0 inline, 0 general)
mainwindow.cpp
Show inline comments
 
@@ -138,29 +138,26 @@ MainWindow::MainWindow(QWidget *parent) 
 

	
 
    // init number format
 
    if (numberFormatButtons.checkedId() >= 0)
 
    {
 
        selectNumberFormat((NumberFormat) numberFormatButtons.checkedId());
 
    }
 
    else
 
    {
 
        selectNumberFormat(NumberFormat_uint8);
 
    }
 

	
 
    // init text view
 
    ui->ptTextView->setEnabled(ui->cbEnableTextView->isChecked());
 
    // TODO: does this work in binary mode? (no new lines)
 
    ui->ptTextView->setMaximumBlockCount(10000);
 
    QObject::connect(ui->cbEnableTextView, &QCheckBox::toggled,
 
                     ui->ptTextView, &QWidget::setEnabled);
 
    QObject::connect(ui->pbClearTextView, &QPushButton::clicked,
 
                     ui->ptTextView, &QPlainTextEdit::clear);
 

	
 
    // Init sps (sample per second) counter
 
    sampleCount = 0;
 
    spsLabel.setText("0sps");
 
    spsLabel.setToolTip("samples per second (total of all channels)");
 
    ui->statusBar->addPermanentWidget(&spsLabel);
 
    spsTimer.start(SPS_UPDATE_TIMEOUT * 1000);
 
    QObject::connect(&spsTimer, &QTimer::timeout,
 
                     this, &MainWindow::spsTimerTimeout);
 

	
0 comments (0 inline, 0 general)