mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
201f0c8f89
commit
705e61b62c
3 changed files with 16 additions and 1 deletions
|
@ -18,6 +18,12 @@ FilterWidget2::FilterWidget2(QWidget* parent)
|
||||||
ui->maxAirTemp->setValue(data.maxAirTemp);
|
ui->maxAirTemp->setValue(data.maxAirTemp);
|
||||||
ui->minWaterTemp->setValue(data.minWaterTemp);
|
ui->minWaterTemp->setValue(data.minWaterTemp);
|
||||||
ui->maxWaterTemp->setValue(data.maxWaterTemp);
|
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());
|
ui->to->setDate(data.to.date());
|
||||||
|
|
||||||
connect(ui->maxRating, &StarWidget::valueChanged,
|
connect(ui->maxRating, &StarWidget::valueChanged,
|
||||||
|
|
|
@ -141,7 +141,7 @@
|
||||||
<widget class="QDoubleSpinBox" name="maxWaterTemp"/>
|
<widget class="QDoubleSpinBox" name="maxWaterTemp"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="0">
|
<item row="10" column="0">
|
||||||
<widget class="QLabel" name="label_10">
|
<widget class="QLabel" name="labelEquipment">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Equipment</string>
|
<string>Equipment</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -68,6 +68,12 @@ namespace {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Finish this iimplementation.
|
||||||
|
bool hasEquipment(const QStringList& equipment, const struct dive *d)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiFilterSortModel *MultiFilterSortModel::instance()
|
MultiFilterSortModel *MultiFilterSortModel::instance()
|
||||||
|
@ -129,6 +135,9 @@ bool MultiFilterSortModel::showDive(const struct dive *d) const
|
||||||
if (!hasLocation(filterData.location, d))
|
if (!hasLocation(filterData.location, d))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (!hasEquipment(filterData.equipment, d))
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue