refactoring qad widgets part 2
c++ cast, nullptr, forward declaration, agregate ui, connect to member functions, order and clear includes
This commit is contained in:
@@ -26,13 +26,14 @@ bool MatrixEdit::isReadOnly() const {
|
||||
|
||||
void MatrixEdit::setReadOnly(bool yes) {
|
||||
ro = yes;
|
||||
/// TODO
|
||||
/// TODO : readonly not implemented
|
||||
}
|
||||
|
||||
|
||||
void MatrixEdit::setVectorMode(bool yes) {
|
||||
if (yes)
|
||||
if (yes) {
|
||||
ui->spinCols->setValue(1);
|
||||
}
|
||||
ui->labelCols->setHidden(yes);
|
||||
ui->spinCols->setHidden(yes);
|
||||
ui->buttonIdentity->setHidden(yes);
|
||||
@@ -74,7 +75,9 @@ QVector<double> MatrixEdit::vector() const {
|
||||
ret.fill(0.);
|
||||
for (int r = 0; r < ret.size(); ++r) {
|
||||
QTableWidgetItem * i = ui->table->item(r, 0);
|
||||
if (!i) continue;
|
||||
if (!i) {
|
||||
continue;
|
||||
}
|
||||
ret[r] = i->text().toDouble();
|
||||
}
|
||||
return ret;
|
||||
@@ -91,7 +94,9 @@ QVector<QVector<double> > MatrixEdit::matrix() const {
|
||||
ret[r].fill(0.);
|
||||
for (int c = 0; c < cc; ++c) {
|
||||
QTableWidgetItem * i = ui->table->item(r, c);
|
||||
if (!i) continue;
|
||||
if (!i) {
|
||||
continue;
|
||||
}
|
||||
ret[r][c] = i->text().toDouble();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user