mirror of
https://github.com/fralx/LimeReport.git
synced 2025-10-09 22:08:06 +03:00
Add barcodeVariablesList
This commit is contained in:
@@ -30,15 +30,22 @@
|
||||
#include "lrtextitempropertyeditor.h"
|
||||
#include "ui_ltextitempropertyeditor.h"
|
||||
#include <QCompleter>
|
||||
#include <QListWidget>
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
TextItemPropertyEditor::TextItemPropertyEditor(QWidget *parent) :
|
||||
TextItemPropertyEditor::TextItemPropertyEditor(QWidget *parent, const QStringList &availVars) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::TextItemPropertyEditor)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->textEdit->setAcceptRichText(false);
|
||||
ui->listVars->setVisible(!availVars.isEmpty());
|
||||
ui->listVars->addItems(availVars);
|
||||
connect(ui->listVars, &QListWidget::itemClicked, this,
|
||||
[this](QListWidgetItem *item) {
|
||||
ui->textEdit->setPlainText(item->text());
|
||||
});
|
||||
}
|
||||
|
||||
TextItemPropertyEditor::~TextItemPropertyEditor()
|
||||
|
@@ -43,7 +43,7 @@ class TextItemPropertyEditor : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TextItemPropertyEditor(QWidget *parent = 0);
|
||||
explicit TextItemPropertyEditor(QWidget *parent = 0, const QStringList &availVars ={});
|
||||
~TextItemPropertyEditor();
|
||||
void setText(const QString &value);
|
||||
QString text();
|
||||
|
@@ -9,8 +9,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
<width>530</width>
|
||||
<height>369</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
@@ -25,7 +25,21 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit"/>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="listVars">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
@@ -38,6 +52,7 @@
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../items/items.qrc"/>
|
||||
<include location="../../items/items.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
Reference in New Issue
Block a user