vnote/src/widgets/dialogs/notetemplateselector.h
chendapao e8fe0726ff
QuickAccess: add quick note (#2373)
* 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>
2023-08-24 22:51:17 +08:00

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