mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: rename eventname.* to eventtype.*
This structure is used to hide events of a certain type. The type was inferred from its name, but now includes flags. So event_type is more appropriate. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7a74a6c426
commit
d3c9cb14bf
10 changed files with 94 additions and 95 deletions
|
@ -4,7 +4,7 @@
|
|||
#include "profile-widget/divepixmapcache.h"
|
||||
#include "profile-widget/animationfunctions.h"
|
||||
#include "core/event.h"
|
||||
#include "core/eventname.h"
|
||||
#include "core/eventtype.h"
|
||||
#include "core/format.h"
|
||||
#include "core/profile.h"
|
||||
#include "core/gettextfromc.h"
|
||||
|
@ -226,7 +226,7 @@ bool DiveEventItem::isInteresting(const struct dive *d, const struct divecompute
|
|||
|
||||
bool DiveEventItem::shouldBeHidden()
|
||||
{
|
||||
return is_event_hidden(ev->name, ev->flags);
|
||||
return is_event_type_hidden(ev->name, ev->flags);
|
||||
}
|
||||
|
||||
void DiveEventItem::recalculatePos()
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "profile-widget/profilescene.h"
|
||||
#include "core/device.h"
|
||||
#include "core/event.h"
|
||||
#include "core/eventname.h"
|
||||
#include "core/eventtype.h"
|
||||
#include "core/subsurface-string.h"
|
||||
#include "core/qthelper.h"
|
||||
#include "core/range.h"
|
||||
|
@ -656,7 +656,7 @@ void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
if (any_events_hidden() || std::any_of(profileScene->eventItems.begin(), profileScene->eventItems.end(), [] (const DiveEventItem *item) { return !item->isVisible(); }))
|
||||
if (any_event_types_hidden() || std::any_of(profileScene->eventItems.begin(), profileScene->eventItems.end(), [] (const DiveEventItem *item) { return !item->isVisible(); }))
|
||||
m.addAction(tr("Unhide all events"), this, &ProfileWidget2::unhideEvents);
|
||||
m.exec(event->globalPos());
|
||||
}
|
||||
|
@ -702,7 +702,7 @@ void ProfileWidget2::hideSimilarEvents(DiveEventItem *item)
|
|||
const struct event *event = item->getEvent();
|
||||
|
||||
if (!empty_string(event->name)) {
|
||||
hide_similar_events(event->name, event->flags);
|
||||
hide_event_type(event->name, event->flags);
|
||||
|
||||
replot();
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ void ProfileWidget2::hideSimilarEvents(DiveEventItem *item)
|
|||
|
||||
void ProfileWidget2::unhideEvents()
|
||||
{
|
||||
show_all_events();
|
||||
show_all_event_types();
|
||||
for (DiveEventItem *item: profileScene->eventItems)
|
||||
item->show();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue