mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-12 20:11:30 +00:00
divelistview capitalisation consitency
affects mainly capitalisation on the dive list context menu Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fbb01e37d3
commit
402198871b
1 changed files with 17 additions and 17 deletions
|
@ -50,7 +50,7 @@ DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelec
|
||||||
header()->setMinimumHeight(metrics.height() + 10);
|
header()->setMinimumHeight(metrics.height() + 10);
|
||||||
#endif
|
#endif
|
||||||
header()->setStretchLastSection(true);
|
header()->setStretchLastSection(true);
|
||||||
QAction *showSearchBox = new QAction(tr("Show Search Box"), this);
|
QAction *showSearchBox = new QAction(tr("Show search box"), this);
|
||||||
showSearchBox->setShortcut(Qt::CTRL + Qt::Key_F);
|
showSearchBox->setShortcut(Qt::CTRL + Qt::Key_F);
|
||||||
showSearchBox->setShortcutContext(Qt::WindowShortcut);
|
showSearchBox->setShortcutContext(Qt::WindowShortcut);
|
||||||
addAction(showSearchBox);
|
addAction(showSearchBox);
|
||||||
|
@ -703,12 +703,12 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event)
|
||||||
dive_trip_t *trip = (dive_trip_t *)contextMenuIndex.data(DiveTripModel::TRIP_ROLE).value<void *>();
|
dive_trip_t *trip = (dive_trip_t *)contextMenuIndex.data(DiveTripModel::TRIP_ROLE).value<void *>();
|
||||||
QMenu popup(this);
|
QMenu popup(this);
|
||||||
if (currentLayout == DiveTripModel::TREE) {
|
if (currentLayout == DiveTripModel::TREE) {
|
||||||
popup.addAction(tr("expand all"), this, SLOT(expandAll()));
|
popup.addAction(tr("Expand all"), this, SLOT(expandAll()));
|
||||||
popup.addAction(tr("collapse all"), this, SLOT(collapseAll()));
|
popup.addAction(tr("Collapse all"), this, SLOT(collapseAll()));
|
||||||
collapseAction = popup.addAction(tr("collapse others"), this, SLOT(collapseAll()));
|
collapseAction = popup.addAction(tr("Collapse others"), this, SLOT(collapseAll()));
|
||||||
if (d) {
|
if (d) {
|
||||||
popup.addAction(tr("remove dive(s) from trip"), this, SLOT(removeFromTrip()));
|
popup.addAction(tr("Remove dive(s) from trip"), this, SLOT(removeFromTrip()));
|
||||||
popup.addAction(tr("create new trip above"), this, SLOT(newTripAbove()));
|
popup.addAction(tr("Create new trip above"), this, SLOT(newTripAbove()));
|
||||||
if (!d->divetrip) {
|
if (!d->divetrip) {
|
||||||
struct dive *top = d;
|
struct dive *top = d;
|
||||||
struct dive *bottom = d;
|
struct dive *bottom = d;
|
||||||
|
@ -722,28 +722,28 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_trip_before_after(top, (currentOrder == Qt::AscendingOrder)))
|
if (is_trip_before_after(top, (currentOrder == Qt::AscendingOrder)))
|
||||||
popup.addAction(tr("add dive(s) to trip immediately above"), this, SLOT(addToTripAbove()));
|
popup.addAction(tr("Add dive(s) to trip immediately above"), this, SLOT(addToTripAbove()));
|
||||||
if (is_trip_before_after(bottom, (currentOrder == Qt::DescendingOrder)))
|
if (is_trip_before_after(bottom, (currentOrder == Qt::DescendingOrder)))
|
||||||
popup.addAction(tr("add dive(s) to trip immediately below"), this, SLOT(addToTripBelow()));
|
popup.addAction(tr("Add dive(s) to trip immediately below"), this, SLOT(addToTripBelow()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (trip) {
|
if (trip) {
|
||||||
popup.addAction(tr("merge trip with trip above"), this, SLOT(mergeTripAbove()));
|
popup.addAction(tr("Merge trip with trip above"), this, SLOT(mergeTripAbove()));
|
||||||
popup.addAction(tr("merge trip with trip below"), this, SLOT(mergeTripBelow()));
|
popup.addAction(tr("Merge trip with trip below"), this, SLOT(mergeTripBelow()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (d) {
|
if (d) {
|
||||||
popup.addAction(tr("delete dive(s)"), this, SLOT(deleteDive()));
|
popup.addAction(tr("Delete dive(s)"), this, SLOT(deleteDive()));
|
||||||
#if 0
|
#if 0
|
||||||
popup.addAction(tr("mark dive(s) invalid", this, SLOT(markDiveInvalid())));
|
popup.addAction(tr("Mark dive(s) invalid", this, SLOT(markDiveInvalid())));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (amount_selected > 1 && consecutive_selected())
|
if (amount_selected > 1 && consecutive_selected())
|
||||||
popup.addAction(tr("merge selected dives"), this, SLOT(mergeDives()));
|
popup.addAction(tr("Merge selected dives"), this, SLOT(mergeDives()));
|
||||||
if (amount_selected >= 1) {
|
if (amount_selected >= 1) {
|
||||||
popup.addAction(tr("renumber dive(s)"), this, SLOT(renumberDives()));
|
popup.addAction(tr("Renumber dive(s)"), this, SLOT(renumberDives()));
|
||||||
popup.addAction(tr("shift times"), this, SLOT(shiftTimes()));
|
popup.addAction(tr("Shift times"), this, SLOT(shiftTimes()));
|
||||||
popup.addAction(tr("load images"), this, SLOT(loadImages()));
|
popup.addAction(tr("Load images"), this, SLOT(loadImages()));
|
||||||
}
|
}
|
||||||
// "collapse all" really closes all trips,
|
// "collapse all" really closes all trips,
|
||||||
// "collapse" keeps the trip with the selected dive open
|
// "collapse" keeps the trip with the selected dive open
|
||||||
|
@ -764,7 +764,7 @@ void DiveListView::shiftTimes()
|
||||||
|
|
||||||
void DiveListView::loadImages()
|
void DiveListView::loadImages()
|
||||||
{
|
{
|
||||||
QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open Image Files"), lastUsedImageDir(), tr("Image Files (*.jpg *.jpeg *.pnm *.tif *.tiff)"));
|
QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open image files"), lastUsedImageDir(), tr("Image files (*.jpg *.jpeg *.pnm *.tif *.tiff)"));
|
||||||
if (fileNames.isEmpty())
|
if (fileNames.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue