2021-09-30 12:52:22 +08:00
|
|
|
#ifndef EDITORSNIPPETWIDGET_H
|
|
|
|
#define EDITORSNIPPETWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include "settingswidget.h"
|
|
|
|
#include "../codesnippetsmanager.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class EditorSnippetWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
class EditorSnippetWidget : public SettingsWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit EditorSnippetWidget(const QString& name, const QString& group, QWidget *parent = nullptr);
|
|
|
|
~EditorSnippetWidget();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::EditorSnippetWidget *ui;
|
|
|
|
CodeSnippetsModel mModel;
|
|
|
|
private:
|
|
|
|
bool mUpdatingCode;
|
|
|
|
// SettingsWidget interface
|
|
|
|
protected:
|
|
|
|
void doLoad() override;
|
|
|
|
void doSave() override;
|
|
|
|
private slots:
|
2021-09-30 20:10:48 +08:00
|
|
|
void on_btnRemove_clicked();
|
|
|
|
void on_btnAdd_clicked();
|
2021-12-23 09:11:58 +08:00
|
|
|
|
|
|
|
// SettingsWidget interface
|
|
|
|
protected:
|
|
|
|
void updateIcons(const QSize &size) override;
|
2021-09-30 12:52:22 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // EDITORSNIPPETWIDGET_H
|