qtmaterialautocomplete.h 726 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef QTMATERIALAUTOCOMPLETE_H
  2. #define QTMATERIALAUTOCOMPLETE_H
  3. #include "qtmaterialtextfield.h"
  4. class QtMaterialAutoCompletePrivate;
  5. class QtMaterialAutoComplete : public QtMaterialTextField
  6. {
  7. Q_OBJECT
  8. public:
  9. explicit QtMaterialAutoComplete(QWidget *parent = 0);
  10. ~QtMaterialAutoComplete();
  11. void setDataSource(const QStringList &data);
  12. signals:
  13. void itemSelected(QString);
  14. protected slots:
  15. void updateResults(QString text);
  16. protected:
  17. bool event(QEvent *event) Q_DECL_OVERRIDE;
  18. bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE;
  19. private:
  20. Q_DISABLE_COPY(QtMaterialAutoComplete)
  21. Q_DECLARE_PRIVATE(QtMaterialAutoComplete)
  22. };
  23. #endif // QTMATERIALAUTOCOMPLETE_H