Qmmp
Loading...
Searching...
No Matches
src
qmmpui
templateeditor.h
1
/***************************************************************************
2
* Copyright (C) 2010-2025 by Ilya Kotov *
3
* forkotov02@ya.ru *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
* *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
14
* *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19
***************************************************************************/
20
21
#ifndef TEMPLATEEDITOR_H
22
#define TEMPLATEEDITOR_H
23
24
#include <QDialog>
25
#include "qmmpui_export.h"
26
27
namespace
Ui {
28
class
TemplateEditor;
29
}
30
34
class
QMMPUI_EXPORT
TemplateEditor
:
public
QDialog
35
{
36
Q_OBJECT
37
public
:
42
explicit
TemplateEditor
(QWidget *parent =
nullptr
);
46
~TemplateEditor
();
50
QString
currentTemplate
()
const
;
54
void
setTemplate
(
const
QString &text = QString());
59
void
setDefaultTemplate
(
const
QString &text);
68
static
QString
getTemplate
(QWidget *parent,
const
QString &title,
const
QString &text = QString(),
69
const
QString &default_template = QString(),
bool
*ok =
nullptr
);
70
71
private
:
72
void
createMenu();
73
Ui::TemplateEditor *m_ui;
74
QString m_defaultTemplate;
75
76
};
77
78
#endif
// TEMPLATEEDITOR_H
TemplateEditor::getTemplate
static QString getTemplate(QWidget *parent, const QString &title, const QString &text=QString(), const QString &default_template=QString(), bool *ok=nullptr)
TemplateEditor::currentTemplate
QString currentTemplate() const
TemplateEditor::TemplateEditor
TemplateEditor(QWidget *parent=nullptr)
TemplateEditor::setDefaultTemplate
void setDefaultTemplate(const QString &text)
TemplateEditor::setTemplate
void setTemplate(const QString &text=QString())
TemplateEditor::~TemplateEditor
~TemplateEditor()
Generated on
for Qmmp by
1.16.1