dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Map Plugin

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...
 

Detailed Description

Delegate between the flight data model and the views (provides a QComboBox)

Waypoint editor dialog.

Function Documentation

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.

Returns
The widget for the index

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.

Parameters
valueThe value of this data
localeThe locale to convert the text to
Returns

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.

Parameters
[in]numberThe 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.

Parameters
comboThe 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.

Parameters
editorThe editor dialog
indexThe 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.

Parameters
editor
modelThe editor dialog
indexThe 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.