VariablesViewPlugin.h
Go to the documentation of this file.
00001 #ifndef VARIABLE_VIEW_PLUGIN_H
00002 #define VARIABLE_VIEW_PLUGIN_H
00003 
00004 #include <QWidget>
00005 #include <QDialog>
00006 #include "../Plugin.h"
00007 #include "../TargetModels.h"
00008 #include "../../compiler/compiler.h"
00009 
00010 class QLabel;
00011 class QComboBox;
00012 
00013 namespace Aseba
00014 {
00017         
00018         class TargetVariablesModel;
00019         
00020         class LinearCameraViewVariablesDialog : public QDialog
00021         {
00022                 Q_OBJECT
00023                 
00024         public:
00025                 QComboBox* redVariable;
00026                 QComboBox* greenVariable;
00027                 QComboBox* blueVariable;
00028                 QComboBox* valuesRanges;
00029                 
00030                 LinearCameraViewVariablesDialog(TargetVariablesModel* variablesModel);
00031                 virtual ~LinearCameraViewVariablesDialog() {}
00032         };
00033         
00034         class LinearCameraViewPlugin: public QWidget, public NodeToolInterface, public InvasivePlugin, public VariableListener
00035         {
00036                 Q_OBJECT
00037                 
00038         public:
00039                 LinearCameraViewPlugin(NodeTab* nodeTab);
00040                 
00041                 virtual QWidget* createMenuEntry();
00042                 virtual void closeAsSoonAsPossible();
00043         
00044         signals:
00045                 void dialogBoxResult(bool ok);
00046                 
00047         private slots:
00048                 void setEnabled(bool enabled);
00049                 
00050         private:
00051                 void enablePlugin();
00052                 void disablePlugin();
00053                 
00054                 virtual void timerEvent ( QTimerEvent * event );
00055                 virtual void variableValueUpdated(const QString& name, const VariablesDataVector& values);
00056                 
00057         private:
00058                 enum ValuesRange
00059                 {
00060                         VALUES_RANGE_AUTO = 0,
00061                         VALUES_RANGE_8BITS,
00062                         VALUES_RANGE_PERCENT
00063                 } valuesRange;
00064                 QLabel *image;
00065                 QString redName, greenName, blueName;
00066                 unsigned redPos, greenPos, bluePos;
00067                 unsigned redSize, greenSize, blueSize;
00068                 VariablesDataVector red, green, blue;
00069                 unsigned componentsReceived;
00070         };
00071         
00073 }; // Aseba
00074 
00075 #endif


aseba
Author(s): Stéphane Magnenat
autogenerated on Thu Jan 2 2014 11:17:17