mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00

* feature_quick_create_note * adj name and complete quick create * del unused * del unused * adj name * adj to const * adj name 2 * adj * fix --------- Co-authored-by: Le Tan <tamlokveer@gmail.com>
41 lines
813 B
C++
41 lines
813 B
C++
#ifndef NOTETEMPLATESELECTOR_H
|
|
#define NOTETEMPLATESELECTOR_H
|
|
|
|
#include <QWidget>
|
|
|
|
class QComboBox;
|
|
class QPlainTextEdit;
|
|
|
|
namespace vnotex
|
|
{
|
|
class NoteTemplateSelector : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit NoteTemplateSelector(QWidget *p_parent = nullptr);
|
|
|
|
QString getCurrentTemplate() const;
|
|
bool setCurrentTemplate(const QString &p_template);
|
|
|
|
const QString& getTemplateContent() const;
|
|
|
|
signals:
|
|
void templateChanged();
|
|
|
|
private:
|
|
void setupUI();
|
|
|
|
void setupTemplateComboBox(QWidget *p_parent);
|
|
|
|
void updateCurrentTemplate();
|
|
|
|
QComboBox *m_templateComboBox = nullptr;
|
|
|
|
QPlainTextEdit *m_templateTextEdit = nullptr;
|
|
|
|
QString m_templateContent;
|
|
};
|
|
}
|
|
|
|
#endif // NOTETEMPLATESELECTOR_H
|