2018-04-06 15:30:24 +00:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* This file may be used under the terms of the QSkinny License, Version 1.0
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2018-04-26 12:42:33 +00:00
|
|
|
#ifndef QSK_INPUT_PREDICTION_BAR_H
|
|
|
|
#define QSK_INPUT_PREDICTION_BAR_H
|
2018-04-06 15:30:24 +00:00
|
|
|
|
|
|
|
#include "QskBox.h"
|
|
|
|
|
2018-04-26 12:42:33 +00:00
|
|
|
class QSK_EXPORT QskInputPredictionBar : public QskBox
|
2018-04-06 15:30:24 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
using Inherited = QskBox;
|
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
public:
|
2018-04-06 15:30:24 +00:00
|
|
|
QSK_SUBCONTROLS( Panel, ButtonPanel, ButtonText )
|
|
|
|
|
2018-04-26 12:42:33 +00:00
|
|
|
QskInputPredictionBar( QQuickItem* parent = nullptr );
|
2018-07-31 15:32:25 +00:00
|
|
|
~QskInputPredictionBar() override;
|
2018-04-06 15:30:24 +00:00
|
|
|
|
2018-07-31 15:32:25 +00:00
|
|
|
QskAspect::Subcontrol effectiveSubcontrol(
|
2018-04-06 15:30:24 +00:00
|
|
|
QskAspect::Subcontrol subControl ) const override;
|
|
|
|
|
2018-05-01 09:52:29 +00:00
|
|
|
QStringList candidates() const;
|
2018-04-10 14:51:35 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
Q_SIGNALS:
|
2018-04-26 12:42:33 +00:00
|
|
|
void predictiveTextSelected( int );
|
2018-04-06 15:30:24 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
public Q_SLOTS:
|
2018-05-01 09:52:29 +00:00
|
|
|
void setPrediction( const QStringList& );
|
2018-04-06 15:30:24 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
private:
|
2018-04-26 12:42:33 +00:00
|
|
|
void buttonClicked();
|
|
|
|
void setScrollOffset( int );
|
2018-04-06 15:30:24 +00:00
|
|
|
|
|
|
|
class PrivateData;
|
|
|
|
std::unique_ptr< PrivateData > m_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|