Qmmp
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
TemplateEditor Class Reference

#include <templateeditor.h>

Inherits QDialog.

Public Member Functions

 TemplateEditor (QWidget *parent=nullptr)
 
QString currentTemplate () const
 
void setTemplate (const QString &text=QString())
 
void setDefaultTemplate (const QString &text)
 

Static Public Member Functions

static QString getTemplate (QWidget *parent, const QString &title, const QString &text=QString(), const QString &default_template=QString(), bool *ok=nullptr)
 

Detailed Description

The TemplateEditor class provides simple template editor dialog.

Author
Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru

Constructor & Destructor Documentation

◆ TemplateEditor()

TemplateEditor ( QWidget * parent = nullptr)
explicit

Constructor.

Parameters
parentParent widget.

Member Function Documentation

◆ currentTemplate()

QString currentTemplate ( ) const

Returns current template from editor.

◆ getTemplate()

static QString getTemplate ( QWidget * parent,
const QString & title,
const QString & text = QString(),
const QString & default_template = QString(),
bool * ok = nullptr )
static

Static convenience function to get a template from the user.

Parameters
parentParent widget.
titleWindow title.
textTemplate which is placed in the text edit.
default_templateThis template will be placed in the text edit if the user pressed Reset.
okThis varible will be set to true (false) if the user pressed OK (Cancel).

◆ setDefaultTemplate()

void setDefaultTemplate ( const QString & text)

Sets default template to text. This template will be placed in the text edit if the user pressed Reset

◆ setTemplate()

void setTemplate ( const QString & text = QString())

Sets template which is placed in the text edit to text.


The documentation for this class was generated from the following file: