From 66b1a62fa433183471861d650459827b381dbcd8 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Sun, 17 Mar 2013 13:02:49 +0100 Subject: [PATCH] Better image file handling in EditDialog Put the image editor into a scrollarea so the dialog doesn't screw up when importing a large image file. When importing a file add a filter to the file dialog to only show image files. --- src/EditDialog.cpp | 8 +++++++- src/EditDialog.ui | 25 ++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/EditDialog.cpp b/src/EditDialog.cpp index 70ab4050..4e5d3a90 100644 --- a/src/EditDialog.cpp +++ b/src/EditDialog.cpp @@ -59,11 +59,17 @@ void EditDialog::loadText(const QByteArray& data, int row, int col) void EditDialog::importData() { + // Get list of supported image file formats to include them in the file dialog filter + QString image_formats; + QList image_formats_list = QImageReader::supportedImageFormats(); + for(int i=0;i - + + + true + + + + + 0 + 0 + 358 + 267 + + + + + + + + + + + + +