Skip to content
Snippets Groups Projects
UASQuickView.h 1.93 KiB
Newer Older
  • Learn to ignore specific revisions
  • #ifndef UASQUICKVIEW_H
    #define UASQUICKVIEW_H
    
    #include <QWidget>
    #include <QTimer>
    #include <QLabel>
    #include "uas/UASInterface.h"
    #include "ui_UASQuickView.h"
    #include "UASQuickViewItem.h"
    
    #include "MAVLinkDecoder.h"
    #include "UASQuickViewItemSelect.h"
    
    #include "Vehicle.h"
    
    class UASQuickView : public QWidget
    {
        Q_OBJECT
    public:
        UASQuickView(QWidget *parent = 0);
    
        void addSource(MAVLinkDecoder *decoder);
    
        QList<QString> uasEnabledPropertyList;
    
    
        /** Maps from the property name to the current value */
    
        QMap<QString,double> uasPropertyValueMap;
    
    
        /** Maps from property name to the display item */
    
        QMap<QString,UASQuickViewItem*> uasPropertyToLabelMap;
    
    
        /** Selection dialog for selectin/deselecting gauge items */
    
        UASQuickViewItemSelect *quickViewSelectDialog;
    
    
        /** Saves gauge layout to settings file */
        void saveSettings();
    
        /** Loads gauge layout from settings file */
        void loadSettings();
    
        /** Column Count */
        int m_columnCount;
    
        QList<QVBoxLayout*> m_verticalLayoutList;
        void sortItems(int columncount);
        QList<int> m_verticalLayoutItemCount;
        int m_currentColumn;
        QMap<QString,int> m_PropertyToLayoutIndexMap;
    
        //FlowLayout *layout;
    
        void valueChanged(const int uasid, const QString& name, const QString& unit, const QVariant& value,const quint64 msecs);
    
    Don Gagne's avatar
    Don Gagne committed
        void addActionTriggered();
    
        void selectDialogClosed();
        void valueEnabled(QString value);
        void valueDisabled(QString value);
    
        void columnActionTriggered();
    
        
    private slots:
        void _activeVehicleChanged(Vehicle* vehicle);