dRonin
adbada4
dRonin GCS
|
Delegate between the flight data model and the views (provides a QComboBox) More...
Classes | |
class | WaypointDelegate |
The WaypointDelegate class is used to handle updating the values in the mode combo box to the data model. More... | |
class | WaypointDialog |
The WaypointDialog class creates a dialog for editing the properties of a single waypoint. More... | |
Functions | |
WaypointDelegate::WaypointDelegate (QObject *parent=nullptr) | |
QWidget * | WaypointDelegate::createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const |
Create the QComboxBox for the mode or pass to the default implementation. More... | |
bool | WaypointDelegate::eventFilter (QObject *object, QEvent *event) |
This filter is required to make combo boxes work. More... | |
void | WaypointDelegate::setEditorData (QWidget *editor, const QModelIndex &index) const |
Set data in the UI when the model is changed. More... | |
void | WaypointDelegate::setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const |
Set data in the model when the UI is changed. More... | |
void | WaypointDelegate::updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const |
Update the size of the editor widget. More... | |
QString | WaypointDelegate::displayText (const QVariant &value, const QLocale &locale) const |
Convert the variant to a string value. More... | |
void | WaypointDelegate::loadComboBox (QComboBox *combo) const |
Populate the selections in the mode combo box. More... | |
WaypointDialog::WaypointDialog (QWidget *parent, QAbstractItemModel *model, QItemSelectionModel *selection) | |
WaypointDialog::~WaypointDialog () | |
void | WaypointDialog::editWaypoint (int number) |
Edit the requested waypoint, show dialog if it is not showing. More... | |
Delegate between the flight data model and the views (provides a QComboBox)
Waypoint editor dialog.
QWidget * WaypointDelegate::createEditor | ( | QWidget * | parent, |
const QStyleOptionViewItem & | option, | ||
const QModelIndex & | index | ||
) | const |
Create the QComboxBox for the mode or pass to the default implementation.
WaypointDelegate::createEditor Returns the widget used to edit the item specified by index for editing. The parent widget and style option are used to control how the editor widget appears.
Definition at line 41 of file waypointdelegate.cpp.
QString WaypointDelegate::displayText | ( | const QVariant & | value, |
const QLocale & | locale | ||
) | const |
Convert the variant to a string value.
WaypointDelegate::displayText Convert the variant to a string value.
value | The value of this data |
locale | The locale to convert the text to |
Definition at line 148 of file waypointdelegate.cpp.
void WaypointDialog::editWaypoint | ( | int | number | ) |
Edit the requested waypoint, show dialog if it is not showing.
WaypointDialog::editWaypoint Edit the requested waypoint, show dialog if it is not showing.
[in] | number | The waypoint to edit |
Definition at line 138 of file waypointdialog.cpp.
bool WaypointDelegate::eventFilter | ( | QObject * | object, |
QEvent * | event | ||
) |
This filter is required to make combo boxes work.
WaypointDelegate::eventFilter Filter any events that are on the combox box from going to the view. This makes the combo box contents pop up and be selectable.
Definition at line 63 of file waypointdelegate.cpp.
void WaypointDelegate::loadComboBox | ( | QComboBox * | combo | ) | const |
Populate the selections in the mode combo box.
WaypointDelegate::loadComboBox Populate the combo box with the list of flight modes.
combo | The QComboBox to add options to |
type |
Definition at line 158 of file waypointdelegate.cpp.
void WaypointDelegate::setEditorData | ( | QWidget * | editor, |
const QModelIndex & | index | ||
) | const |
Set data in the UI when the model is changed.
WaypointDelegate::setEditorData Set the data in the UI from the model for a particular element index.
editor | The editor dialog |
index | The model parameter index to use |
Definition at line 83 of file waypointdelegate.cpp.
void WaypointDelegate::setModelData | ( | QWidget * | editor, |
QAbstractItemModel * | model, | ||
const QModelIndex & | index | ||
) | const |
Set data in the model when the UI is changed.
WaypointDelegate::setModelData Update the model from the UI for a particular element index.
editor | |
model | The editor dialog |
index | The model parameter index to change |
Definition at line 106 of file waypointdelegate.cpp.
void WaypointDelegate::updateEditorGeometry | ( | QWidget * | editor, |
const QStyleOptionViewItem & | option, | ||
const QModelIndex & | index | ||
) | const |
Update the size of the editor widget.
WaypointDelegate::updateEditorGeometry Update the size of the editor widget.
Definition at line 126 of file waypointdelegate.cpp.
WaypointDelegate::WaypointDelegate | ( | QObject * | parent = nullptr | ) |
Definition at line 30 of file waypointdelegate.cpp.
WaypointDialog::WaypointDialog | ( | QWidget * | parent, |
QAbstractItemModel * | model, | ||
QItemSelectionModel * | selection | ||
) |
Definition at line 32 of file waypointdialog.cpp.
WaypointDialog::~WaypointDialog | ( | ) |
Definition at line 108 of file waypointdialog.cpp.