2022-02-17 15:17:19 +00:00
|
|
|
#ifndef AUTOCOMPLETE_P_H
|
|
|
|
#define AUTOCOMPLETE_P_H
|
2017-10-06 12:05:09 +00:00
|
|
|
|
2022-02-17 12:21:27 +00:00
|
|
|
#include <QtWidgets/QGraphicsDropShadowEffect>
|
|
|
|
#include <QtWidgets/QVBoxLayout>
|
|
|
|
#include <QEvent>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QPainter>
|
|
|
|
#include <QDebug>
|
|
|
|
|
2022-02-17 15:17:19 +00:00
|
|
|
#include "autocomplete.h"
|
|
|
|
#include "autocomplete_internal.h"
|
|
|
|
#include "flatbutton.h"
|
|
|
|
#include "textfield_p.h"
|
2017-10-12 21:27:50 +00:00
|
|
|
|
2022-02-17 00:46:23 +00:00
|
|
|
namespace md
|
|
|
|
{
|
|
|
|
|
|
|
|
class AutoCompleteOverlay;
|
|
|
|
class AutoCompleteStateMachine;
|
2017-10-12 21:27:50 +00:00
|
|
|
|
2022-02-17 00:46:23 +00:00
|
|
|
class AutoCompletePrivate : public TextFieldPrivate
|
2017-10-12 21:27:50 +00:00
|
|
|
{
|
2022-02-17 00:46:23 +00:00
|
|
|
Q_DISABLE_COPY(AutoCompletePrivate)
|
|
|
|
Q_DECLARE_PUBLIC(AutoComplete)
|
2017-10-12 21:27:50 +00:00
|
|
|
|
|
|
|
public:
|
2022-02-17 00:46:23 +00:00
|
|
|
AutoCompletePrivate(AutoComplete *q);
|
|
|
|
virtual ~AutoCompletePrivate();
|
2017-10-12 21:27:50 +00:00
|
|
|
|
|
|
|
void init();
|
|
|
|
|
2017-10-15 10:38:53 +00:00
|
|
|
QWidget *menu;
|
2017-10-15 13:20:07 +00:00
|
|
|
QWidget *frame;
|
2022-02-17 00:46:23 +00:00
|
|
|
AutoCompleteStateMachine *stateMachine;
|
2017-10-15 10:38:53 +00:00
|
|
|
QVBoxLayout *menuLayout;
|
|
|
|
QStringList dataSource;
|
|
|
|
int maxWidth;
|
2017-10-12 21:27:50 +00:00
|
|
|
};
|
|
|
|
|
2022-02-17 00:46:23 +00:00
|
|
|
}
|
|
|
|
|
2022-02-17 15:17:19 +00:00
|
|
|
#endif // AUTOCOMPLETE_P_H
|