mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
GCS-Added a few overloaded functions so that object and field pointers
can be used with confitaskwidget framework
This commit is contained in:
parent
45e21acefd
commit
84d55ca416
@ -61,6 +61,15 @@ void ConfigTaskWidget::addUAVObject(QString objectName,QList<int> * reloadGroups
|
||||
{
|
||||
addUAVObjectToWidgetRelation(objectName,"",NULL,0,1,false,reloadGroups);
|
||||
}
|
||||
|
||||
void ConfigTaskWidget::addUAVObject(UAVObject *objectName, QList<int> *reloadGroups)
|
||||
{
|
||||
QString objstr;
|
||||
if(objectName)
|
||||
objstr=objectName->getName();
|
||||
addUAVObject(objstr, reloadGroups);
|
||||
|
||||
}
|
||||
/**
|
||||
* Add an UAVObject field to widget relation to the management system
|
||||
* @param object name of the object to add
|
||||
@ -78,6 +87,17 @@ void ConfigTaskWidget::addUAVObjectToWidgetRelation(QString object, QString fiel
|
||||
Q_ASSERT(_field);
|
||||
addUAVObjectToWidgetRelation(object,field,widget,_field->getElementNames().indexOf(index));
|
||||
}
|
||||
|
||||
void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field, QWidget *widget, QString index)
|
||||
{
|
||||
QString objstr;
|
||||
QString fieldstr;
|
||||
if(obj)
|
||||
objstr=obj->getName();
|
||||
if(field)
|
||||
fieldstr=field->getName();
|
||||
addUAVObjectToWidgetRelation(objstr, fieldstr, widget, index);
|
||||
}
|
||||
/**
|
||||
* Add a UAVObject field to widget relation to the management system
|
||||
* @param object name of the object to add
|
||||
@ -103,6 +123,28 @@ void ConfigTaskWidget::addUAVObjectToWidgetRelation(QString object, QString fiel
|
||||
}
|
||||
addUAVObjectToWidgetRelation(object, field, widget,index,scale,isLimited,defaultReloadGroups,instID);
|
||||
}
|
||||
|
||||
void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField *field, QWidget *widget, QString element, double scale, bool isLimited, QList<int> *defaultReloadGroups, quint32 instID)
|
||||
{
|
||||
QString objstr;
|
||||
QString fieldstr;
|
||||
if(obj)
|
||||
objstr=obj->getName();
|
||||
if(field)
|
||||
fieldstr=field->getName();
|
||||
addUAVObjectToWidgetRelation(objstr, fieldstr, widget, element, scale, isLimited, defaultReloadGroups, instID);
|
||||
}
|
||||
void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject * obj,UAVObjectField * field, QWidget * widget, int index,double scale,bool isLimited,QList<int>* defaultReloadGroups, quint32 instID)
|
||||
{
|
||||
QString objstr;
|
||||
QString fieldstr;
|
||||
if(obj)
|
||||
objstr=obj->getName();
|
||||
if(field)
|
||||
fieldstr=field->getName();
|
||||
addUAVObjectToWidgetRelation(objstr,fieldstr,widget,index,scale,isLimited,defaultReloadGroups,instID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an UAVObject field to widget relation to the management system
|
||||
* @param object name of the object to add
|
||||
|
@ -94,11 +94,18 @@ public:
|
||||
static double listMean(QList<double> list);
|
||||
|
||||
void addUAVObject(QString objectName, QList<int> *reloadGroups=NULL);
|
||||
void addUAVObject(UAVObject * objectName, QList<int> *reloadGroups=NULL);
|
||||
|
||||
void addWidget(QWidget * widget);
|
||||
|
||||
void addUAVObjectToWidgetRelation(QString object,QString field,QWidget * widget,int index=0,double scale=1,bool isLimited=false,QList<int>* defaultReloadGroups=0,quint32 instID=0);
|
||||
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field, QWidget *widget, int index=0, double scale=1, bool isLimited=false, QList<int> *defaultReloadGroups=0, quint32 instID=0);
|
||||
|
||||
void addUAVObjectToWidgetRelation(QString object,QString field,QWidget * widget,QString element,double scale,bool isLimited=false,QList<int>* defaultReloadGroups=0,quint32 instID=0);
|
||||
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field,QWidget * widget,QString element,double scale,bool isLimited=false,QList<int>* defaultReloadGroups=0,quint32 instID=0);
|
||||
|
||||
void addUAVObjectToWidgetRelation(QString object, QString field, QWidget *widget, QString index);
|
||||
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field, QWidget *widget, QString index);
|
||||
|
||||
//BUTTONS//
|
||||
void addApplySaveButtons(QPushButton * update,QPushButton * save);
|
||||
|
Loading…
x
Reference in New Issue
Block a user