MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / formatNext

Function formatNext

src/gui/NetSchedulerDialog.cpp:49–57  ·  view source on GitHub ↗

Friendly one-line preview of the next firing, e.g. "Next: Tue Jun 23, 8:00 PM CDT" — used in the editor and the table.

Source from the content-addressed store, hash-verified

47// Friendly one-line preview of the next firing, e.g.
48// "Next: Tue Jun 23, 8:00 PM CDT" — used in the editor and the table.
49QString formatNext(const NetEntry& entry)
50{
51 const QDateTime occ = NetRecurrence::nextOccurrence(entry, QDateTime::currentDateTimeUtc());
52 if (!occ.isValid())
53 return QStringLiteral("No upcoming dates");
54 const QString when = occ.toString("ddd MMM d, h:mm AP");
55 const QString abbr = occ.timeZoneAbbreviation();
56 return abbr.isEmpty() ? when : QString("%1 %2").arg(when, abbr);
57}
58
59// --- editor -------------------------------------------------------------
60//

Callers 2

editNetEntryFunction · 0.85
populateTableMethod · 0.85

Calls 4

nextOccurrenceFunction · 0.85
isValidMethod · 0.45
toStringMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected