yes, it is called when user clicks convert button:
connect(ui.convertButton, SIGNAL(clicked()), this, SLOT(convert()));
connect(ui.convertButton, SIGNAL(clicked()), this, SLOT(convert()));
To copy to clipboard, switch view to plain text mode
The only thing which has changed since last thread, is this function:
void Dialog::convert()
{
if (ui.beaufortBox->isChecked() && ui.knotBox_2->isChecked())
{
QString current
= ui.
fromLineEdit->text
();
int converted = current.toInt();
if (converted == 0)
{
ui.whiteLabel->setText("0-1");
}
else
{
ui.whiteLabel->setText("none");
}
}
}
void Dialog::convert()
{
if (ui.beaufortBox->isChecked() && ui.knotBox_2->isChecked())
{
QString current = ui.fromLineEdit->text();
int converted = current.toInt();
if (converted == 0)
{
ui.whiteLabel->setText("0-1");
}
else
{
ui.whiteLabel->setText("none");
}
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks