Hide unimplemented components from search

Those fields are not ready yet, hide them.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2018-11-16 15:23:39 +01:00 committed by Dirk Hohndel
parent 201f0c8f89
commit 705e61b62c
3 changed files with 16 additions and 1 deletions

View file

@ -18,6 +18,12 @@ FilterWidget2::FilterWidget2(QWidget* parent)
ui->maxAirTemp->setValue(data.maxAirTemp);
ui->minWaterTemp->setValue(data.minWaterTemp);
ui->maxWaterTemp->setValue(data.maxWaterTemp);
// TODO: unhide this when we discover how to search for equipment.
ui->equipment->hide();
ui->labelEquipment->hide();
ui->invertFilter->hide();
ui->to->setDate(data.to.date());
connect(ui->maxRating, &StarWidget::valueChanged,

View file

@ -141,7 +141,7 @@
<widget class="QDoubleSpinBox" name="maxWaterTemp"/>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_10">
<widget class="QLabel" name="labelEquipment">
<property name="text">
<string>Equipment</string>
</property>

View file

@ -68,6 +68,12 @@ namespace {
}
return true;
}
// TODO: Finish this iimplementation.
bool hasEquipment(const QStringList& equipment, const struct dive *d)
{
return true;
}
}
MultiFilterSortModel *MultiFilterSortModel::instance()
@ -129,6 +135,9 @@ bool MultiFilterSortModel::showDive(const struct dive *d) const
if (!hasLocation(filterData.location, d))
return false;
if (!hasEquipment(filterData.equipment, d))
return false;
return true;
}