mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 22:50:31 +00:00
30770f5d85
This patch removed the use of copy-constructors on the QString to use the const-references. Even knowing that the QString is a refcounted class, let's not get that bad habit. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
32 lines
681 B
C++
32 lines
681 B
C++
#ifndef TAGWIDGET_H
|
|
#define TAGWIDGET_H
|
|
|
|
#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(const QString& text);
|
|
void clear();
|
|
void setCursorPosition(int position);
|
|
void wheelEvent(QWheelEvent *event);
|
|
public
|
|
slots:
|
|
void reparse();
|
|
void completionSelected(const QString& text);
|
|
void completionHighlighted(const QString& text);
|
|
|
|
protected:
|
|
void keyPressEvent(QKeyEvent *e);
|
|
|
|
private:
|
|
QCompleter *m_completer;
|
|
};
|
|
|
|
#endif // TAGWIDGET_H
|