8#include <QIntValidator>
11#include <QWidgetAction>
19using namespace swift::misc::aviation;
45 this->clearSelection();
51 if (callsigns.
contains(obj.getCallsign()))
56 this->selectRows(rows);
66 const ContainerType selected(this->selectedObjects());
67 return selected.getCallsigns();
94 int delta = newObjects.removeByCallsigns(callsigns);
123 const int c =
copy.replaceOrAddObjectByCallsign(
object);
bool isEmpty() const
Empty?
void updateContainerMaybeAsync(const ContainerType &container, bool sort=true, bool resize=true)
Based on size call sync / async update.
ContainerType selectedObjects() const
Selected objects.
CViewBase(QWidget *parent, ModelClass *model=nullptr)
Constructor.
const ContainerType & container() const
Access to container.
const ContainerType & containerOrFilteredContainer(bool *filtered=nullptr) const
Full container or cached filtered container as approproiate.
void copy()
Clipboard cut/copy/paste.
bool hasSelection() const
Selection (selected rows).
Base class for views with DB objects.
void selectCallsigns(const swift::misc::aviation::CCallsignSet &callsigns)
Select given callsigns.
typename swift::gui::models::CAtcStationListModel::ObjectType ObjectType
typename T::ContainerType ContainerType
Model container type.
int removeCallsign(const swift::misc::aviation::CCallsign &callsign)
Remove callsign.
int replaceOrAddObjectByCallsign(const ObjectType &object)
Update or insert data (based on callsign).
int removeCallsigns(const swift::misc::aviation::CCallsignSet &callsigns)
Remove callsigns.
CViewWithCallsignObjects(QWidget *parent=nullptr)
Constructor.
int replaceOrAddObjectsByCallsign(const ContainerType &container)
Update or insert data (based on callsign).
swift::misc::aviation::CCallsignSet selectedCallsigns() const
Get selected callsigns.
void selectObjects(const ContainerType &selectedObjects)
Reselect by callsigns.
void selectCallsign(const swift::misc::aviation::CCallsign &callsign)
Select callsign.
bool isEmpty() const
Synonym for empty.
bool contains(const T &object) const
Return true if there is an element equal to given object. Uses the most efficient implementation avai...
Value object encapsulating information of a callsign.
bool isEmpty() const
Is empty?
Value object for a set of callsigns.
Models to be used with views, mainly QTableView.
Views, mainly QTableView.
Free functions in swift::misc.
QObject * parent() const const
QSet< T >::iterator insert(QSet< T >::const_iterator it, const T &value)