sensorfw
screeninterpreterfilter.h
Go to the documentation of this file.
1
27#ifndef SCREENINTERPRETERFILTER_H
28#define SCREENINTERPRETERFILTER_H
29
30#include "filter.h"
31#include "posedata.h"
32
33#include <ContextProvider>
34
47class ScreenInterpreterFilter : public QObject, public Filter<PoseData, ScreenInterpreterFilter, PoseData>
48{
49 Q_OBJECT
50
51public:
52 ScreenInterpreterFilter(ContextProvider::Property* topEdgeProperty, ContextProvider::Property* isCoveredProperty, ContextProvider::Property* isFlatProperty);
53
54private:
55 ContextProvider::Property* topEdgeProperty;
56 ContextProvider::Property* isCoveredProperty;
57 ContextProvider::Property* isFlatProperty;
58 void interpret(unsigned, const PoseData* data);
59 void provideScreenData(PoseData::Orientation orientation);
60
61 const float threshold;
62 bool isCovered;
63 bool isFlat;
64 PoseData::Orientation lastOrientation;
65 QString topEdge;
66 int offset;
67 static const char* orientationValues[4];
68};
69
70#endif
Datatype for device pose interpretation.
Definition: posedata.h:34
Orientation
Possible device postures.
Definition: posedata.h:74
Filter for providing the Screen.TopEdge, Position.IsFlat, and Screen.IsCovered context properties.
ScreenInterpreterFilter(ContextProvider::Property *topEdgeProperty, ContextProvider::Property *isCoveredProperty, ContextProvider::Property *isFlatProperty)
Datatype for device 'pose' (orientation)