Add "from" button in memo dialog
This commit is contained in:
@@ -6,22 +6,15 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>520</width>
|
<width>542</width>
|
||||||
<height>168</height>
|
<height>202</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Memo</string>
|
<string>Memo</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="2">
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Memo</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="memoSize">
|
<widget class="QLabel" name="memoSize">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">0 / 512</string>
|
<string notr="true">0 / 512</string>
|
||||||
@@ -31,7 +24,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="2">
|
<item row="2" column="1" colspan="2">
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@@ -41,9 +34,40 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2">
|
<item row="1" column="0" colspan="3">
|
||||||
<widget class="QPlainTextEdit" name="memoTxt"/>
|
<widget class="QPlainTextEdit" name="memoTxt"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Memo</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnInsertFrom">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add From Address</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|||||||
@@ -292,13 +292,18 @@ void MainWindow::memoButtonClicked(int number) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Insert From Address button
|
||||||
|
QObject::connect(memoDialog.btnInsertFrom, &QPushButton::clicked, [=] () {
|
||||||
|
memoDialog.memoTxt->setPlainText(memoDialog.memoTxt->toPlainText() +
|
||||||
|
"\n" + tr("From") + ":\n" + ui->inputsCombo->currentText());
|
||||||
|
});
|
||||||
|
|
||||||
memoDialog.memoTxt->setPlainText(currentMemo);
|
memoDialog.memoTxt->setPlainText(currentMemo);
|
||||||
memoDialog.memoTxt->setFocus();
|
memoDialog.memoTxt->setFocus();
|
||||||
|
|
||||||
if (dialog.exec() == QDialog::Accepted) {
|
if (dialog.exec() == QDialog::Accepted) {
|
||||||
memoTxt->setText(memoDialog.memoTxt->toPlainText());
|
memoTxt->setText(memoDialog.memoTxt->toPlainText());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::removeExtraAddresses() {
|
void MainWindow::removeExtraAddresses() {
|
||||||
|
|||||||
Reference in New Issue
Block a user