Qmmp
templateeditor.h
1 /***************************************************************************
2  * Copyright (C) 2010-2017 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 
26 namespace Ui {
27  class TemplateEditor;
28 }
29 
33 class TemplateEditor : public QDialog
34 {
35 Q_OBJECT
36 public:
41  explicit TemplateEditor(QWidget *parent = 0);
45  QString currentTemplate() const;
49  void setTemplate(const QString &text = QString());
54  void setDefaultTemplate(const QString &text);
63  static QString getTemplate (QWidget *parent, const QString &title, const QString &text = QString(),
64  const QString &default_template = QString(), bool *ok = 0);
65 
66 private slots:
67  void on_resetButton_clicked();
68 
69 private:
70  void createMenu();
71  Ui::TemplateEditor *m_ui;
72  QString m_defaultTemplate;
73 
74 };
75 
76 #endif // TEMPLATEEDITOR_H
Definition: columneditor_p.h:26
The TemplateEditor class provides simple template editor dialog.
Definition: templateeditor.h:33