30 |
30 |
31 /*! |
31 /*! |
32 @proto |
32 @proto |
33 @hbcore |
33 @hbcore |
34 \class HbPredictionCallback |
34 \class HbPredictionCallback |
35 \brief A callback method for prediction engine API. |
35 \brief A callback method for prediction engine API. |
36 |
36 |
37 This callback class can be delivered as a parameter for various prediction engine API methods. |
37 This callback class can be delivered as a parameter for various prediction engine API methods. |
38 When it is given, the prediction engine can use it for querying editor buffer contents and |
38 When it is given, the prediction engine can use it for querying editor buffer contents and |
39 cursor position. This information is needed for example in case of context sensitive prediction. |
39 cursor position. This information is needed for example in case of context sensitive prediction. |
40 |
40 |
41 \sa HbPredictionEngine |
41 \sa HbPredictionEngine |
42 */ |
42 */ |
43 class HbPredictionCallback |
43 class HbPredictionCallback |
44 { |
44 { |
45 public: |
45 public: |
46 virtual ~HbPredictionCallback() {} |
46 virtual ~HbPredictionCallback() {} |
47 |
47 |
48 virtual QString surroundingText() = 0; |
48 virtual QString surroundingText() = 0; |
49 virtual int cursorPosition() = 0; |
49 virtual int cursorPosition() = 0; |
50 virtual QList<HbKeyPressProbability> probableKeypresses() |
50 virtual QList<HbKeyPressProbability> probableKeypresses() |
51 { |
51 { |
52 return QList<HbKeyPressProbability>(); |
52 return QList<HbKeyPressProbability>(); |
53 } |
53 } |
54 }; |
54 }; |
55 |
55 |
56 #endif // HB_INPUT_PREDICTION_CALLBACK_H |
56 #endif // HB_INPUT_PREDICTION_CALLBACK_H |
57 |
57 |