mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-19 10:57:07 +00:00
Make clipboard image scalable (SVG)
This commit is contained in:
@@ -103,7 +103,7 @@
|
|||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabGeneral">
|
<widget class="QWidget" name="tabGeneral">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@@ -627,6 +627,9 @@ p, li { white-space: pre-wrap; }
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Copy to clipboard</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Copy</string>
|
<string>&Copy</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -274,7 +274,10 @@ void MainWindow::copy_to_clipboard()
|
|||||||
{
|
{
|
||||||
QClipboard *clipboard = QGuiApplication::clipboard();
|
QClipboard *clipboard = QGuiApplication::clipboard();
|
||||||
QMimeData *data = new QMimeData;
|
QMimeData *data = new QMimeData;
|
||||||
QString filename = ".zint.gif";
|
QString filename = ".zint.svg";
|
||||||
|
double scale = spnScale->value();
|
||||||
|
|
||||||
|
spnScale->setValue(10);
|
||||||
|
|
||||||
if (!m_bc.bc.save_to_file(filename)) {
|
if (!m_bc.bc.save_to_file(filename)) {
|
||||||
return;
|
return;
|
||||||
@@ -284,6 +287,8 @@ void MainWindow::copy_to_clipboard()
|
|||||||
clipboard->setMimeData(data, QClipboard::Clipboard);
|
clipboard->setMimeData(data, QClipboard::Clipboard);
|
||||||
|
|
||||||
QFile::remove(filename);
|
QFile::remove(filename);
|
||||||
|
|
||||||
|
spnScale->setValue(scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::change_options()
|
void MainWindow::change_options()
|
||||||
|
|||||||
Reference in New Issue
Block a user