Normal variables are created in my_qlabel class (point1, point2, result)
If radioButton.Checked() saves it to the corresponding array in mainWindow class
That info is stored in an array(initial point, end point, result)
same for other radio button(initial point, end point, diffCalculationResult) // stored in a different arrays as the 2 arrays will be written to 2 different files
Using getters & setters to send variables(my_qlabel) to arrays(mainWindow) as suggested(thanks)
Please check my code out:
Correct me where need be(most of it)
Created getters and setters in my_qlabel class
int my_qlabel::getStartPoint()
{
return x1;
}
int my_qlabel::getEndPoint()
{
return y1;
}
int my_qlabel::getOrientation()
{
return theta;
}
int my_qlabel::getStartPoint()
{
return x1;
}
int my_qlabel::getEndPoint()
{
return y1;
}
int my_qlabel::getOrientation()
{
return theta;
}
To copy to clipboard, switch view to plain text mode
RadioButtons: radioButton_1, radioButton_2
my connect statement
connect(ui->radioButton_1, SIGNAL(clicked()), this, SLOT(getInfo()));
connect(ui->radioButton_1, SIGNAL(clicked()), this, SLOT(getInfo()));
connect(ui->radioButton_1, SIGNAL(clicked()), this, SLOT(getInfo()));
connect(ui->radioButton_1, SIGNAL(clicked()), this, SLOT(getInfo()));
To copy to clipboard, switch view to plain text mode
void Dialog::getInfo()
{
if(ui->radioButton_1->clicked(true))
{
reCounter += 1;
reX[reCounter] = my_qlabel::getStartPoint();
reY[reCounter] = my_qlabel::getEndPoint();
reO[reCounter] = my_qlabel::getOrientation();
radioButton_1->setChecked(false);
}
else if(ui->radioButton_1->clicked(true))
{
void Dialog::getInfo()
{
if(ui->radioButton_1->clicked(true))
{
reCounter += 1;
reX[reCounter] = my_qlabel::getStartPoint();
reY[reCounter] = my_qlabel::getEndPoint();
reO[reCounter] = my_qlabel::getOrientation();
radioButton_1->setChecked(false);
}
else if(ui->radioButton_1->clicked(true))
{
To copy to clipboard, switch view to plain text mode
when Build -> 10 errors
1) QAbstractButton::clicked(bool) is protected
2)radioButtons 1& 2 not declared -> they are!
3)error in if statement with regards to radioButton
4) cannot call member functions of my_qlabel with out object
reX[reCounter] = my_qlabel::getStartPoint();
... in if statement above
reX[reCounter] = my_qlabel::getStartPoint();
... in if statement above
To copy to clipboard, switch view to plain text mode
help!
Bookmarks