2014-02-11 18:14:46 +00:00
|
|
|
#ifndef TAGWIDGET_H
|
|
|
|
#define TAGWIDGET_H
|
2013-11-02 01:20:02 +00:00
|
|
|
|
|
|
|
#include "groupedlineedit.h"
|
|
|
|
#include <QCompleter>
|
|
|
|
#include <QPair>
|
|
|
|
|
|
|
|
class TagWidget : public GroupedLineEdit
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit TagWidget(QWidget *parent = 0);
|
|
|
|
void setCompleter(QCompleter *completer);
|
|
|
|
QPair<int, int> getCursorTagPosition();
|
|
|
|
void highlight();
|
|
|
|
void setText(QString text);
|
|
|
|
void clear();
|
|
|
|
void setCursorPosition(int position);
|
2014-01-19 15:33:24 +00:00
|
|
|
void wheelEvent(QWheelEvent *event);
|
2013-11-02 01:20:02 +00:00
|
|
|
public slots:
|
2014-02-09 17:35:23 +00:00
|
|
|
void reparse();
|
2013-11-02 01:20:02 +00:00
|
|
|
void completionSelected(QString);
|
2013-11-02 16:04:18 +00:00
|
|
|
protected:
|
|
|
|
void keyPressEvent(QKeyEvent *e);
|
2013-11-02 01:20:02 +00:00
|
|
|
private:
|
2014-02-09 17:35:23 +00:00
|
|
|
QCompleter *m_completer;
|
2013-11-02 01:20:02 +00:00
|
|
|
};
|
|
|
|
|
2014-02-11 18:14:46 +00:00
|
|
|
#endif // TAGWIDGET_H
|