From b9bd1b60e47e55f68791a4c58f957175a182aed3 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 14 Aug 2017 20:00:19 +0300 Subject: [PATCH] Method SetTemplate. --HG-- branch : feature --- src/libs/vtools/dialogs/support/dialogeditlabel.cpp | 4 ++-- src/libs/vtools/dialogs/support/dialogeditlabel.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp index 59a80d36a..af36f047e 100644 --- a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp @@ -361,7 +361,7 @@ void DialogEditLabel::ImportTemplate() { VLabelTemplate ltemplate; ltemplate.setXMLContent(VLabelTemplateConverter(fileName).Convert()); - InitEditLines(ltemplate.ReadLines()); + SetTemplate(ltemplate.ReadLines()); } catch (VException &e) { @@ -516,7 +516,7 @@ QVector DialogEditLabel::GetTemplate() const } //--------------------------------------------------------------------------------------------------------------------- -void DialogEditLabel::InitEditLines(const QVector &lines) +void DialogEditLabel::SetTemplate(const QVector &lines) { ui->listWidgetEdit->blockSignals(true); ui->listWidgetEdit->clear(); diff --git a/src/libs/vtools/dialogs/support/dialogeditlabel.h b/src/libs/vtools/dialogs/support/dialogeditlabel.h index 3450af694..ad785ddfa 100644 --- a/src/libs/vtools/dialogs/support/dialogeditlabel.h +++ b/src/libs/vtools/dialogs/support/dialogeditlabel.h @@ -50,6 +50,7 @@ public: virtual ~DialogEditLabel(); QVector GetTemplate() const; + void SetTemplate(const QVector &lines); private slots: void ShowLineDetails(); @@ -78,8 +79,6 @@ private: QString ReplacePlaceholders(QString line) const; - - void InitEditLines(const QVector &lines); void InitPreviewLines(const QVector &lines); };