vnote/src/widgets/lineeditwithsnippet.h
2021-07-05 21:51:50 +08:00

26 lines
545 B
C++

#ifndef LINEEDITWITHSNIPPET_H
#define LINEEDITWITHSNIPPET_H
#include "lineedit.h"
namespace vnotex
{
// A line edit with snippet support.
class LineEditWithSnippet : public LineEdit
{
Q_OBJECT
public:
explicit LineEditWithSnippet(QWidget *p_parent = nullptr);
LineEditWithSnippet(const QString &p_contents, QWidget *p_parent = nullptr);
// Get text with snippets evaluated.
QString evaluatedText() const;
private:
void setTips();
};
}
#endif // LINEEDITWITHSNIPPET_H