mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00

VNote will scan files in the template folder in the config folder as template. Template supports magic word.
30 lines
590 B
C++
30 lines
590 B
C++
#ifndef VLINEEDIT_H
|
|
#define VLINEEDIT_H
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
|
// QLineEdit with meta word support.
|
|
class VLineEdit : public QLineEdit
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit VLineEdit(QWidget *p_parent = nullptr);
|
|
|
|
VLineEdit(const QString &p_contents, QWidget *p_parent = Q_NULLPTR);
|
|
|
|
// Return the evaluated text.
|
|
const QString &getEvaluatedText() const;
|
|
|
|
private slots:
|
|
void handleTextChanged(const QString &p_text);
|
|
|
|
private:
|
|
void init();
|
|
|
|
// We should keep the evaluated text identical with what's displayed.
|
|
QString m_evaluatedText;
|
|
};
|
|
|
|
#endif // VLINEEDIT_H
|