1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-08 19:46:06 +01:00
LibrePilot/ground/openpilotgcs/src/plugins/config/smartsavebutton.h
zedamota 0d92e00125 Several bugfixes.
Created "simple wizard" button witch bypasses the sticks identification screen.
Small bugfix to fix GCS crashing if trying to upload a firmware bigger then the HW capacity.
2011-08-23 11:25:28 +01:00

50 lines
1.1 KiB
C++

#ifndef SMARTSAVEBUTTON_H
#define SMARTSAVEBUTTON_H
#include "uavtalk/telemetrymanager.h"
#include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h"
#include "uavobject.h"
#include <QPushButton>
#include <QList>
#include <QEventLoop>
#include "uavobjectutilmanager.h"
#include <QObject>
#include <QDebug>
class smartSaveButton:public QObject
{
public:
Q_OBJECT
public:
smartSaveButton(QPushButton * update,QPushButton * save);
void setObjects(QList<UAVDataObject *>);
void addObject(UAVDataObject *);
void clearObjects();
signals:
void preProcessOperations();
void saveSuccessfull();
void beginOp();
void endOp();
private slots:
void processClick();
void transaction_finished(UAVObject* obj, bool result);
void saving_finished(int,bool);
private:
QPushButton *bupdate;
QPushButton *bsave;
quint32 current_objectID;
UAVDataObject * current_object;
bool up_result;
bool sv_result;
QEventLoop loop;
QList<UAVDataObject *> objects;
protected:
public slots:
void enableControls(bool value);
};
#endif // SMARTSAVEBUTTON_H