Changeset - 40c94e30a042
[Not reviewed]
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-10-10 13:21:53
hy@ozderya.net
seperately buffer the ASCII and HEX command texts
2 files changed with 13 insertions and 0 deletions:
0 comments (0 inline, 0 general)
commandwidget.cpp
Show inline comments
 
@@ -77,6 +77,16 @@ void CommandWidget::onSendClicked()
 
void CommandWidget::onASCIIToggled(bool checked)
 
{
 
    ui->leCommand->setMode(checked);
 
    if (checked)
 
    {
 
        storedHexText = ui->leCommand->text();
 
        ui->leCommand->setText(storedAsciiText);
 
    }
 
    else
 
    {
 
        storedAsciiText = ui->leCommand->text();
 
        ui->leCommand->setText(storedHexText);
 
    }
 
}
 

	
 
bool CommandWidget::isASCIIMode()
commandwidget.h
Show inline comments
 
@@ -46,6 +46,9 @@ signals:
 

	
 
private:
 
    Ui::CommandWidget *ui;
 
    QString storedAsciiText;
 
    QString storedHexText;
 

	
 
    bool isASCIIMode(); // true: ascii mode, false hex mode
 

	
 
private slots:
0 comments (0 inline, 0 general)