changeset 674:d8bd193ad17d

Abbreviate very long text elements in csv file format dialog
author Chris Cannam
date Mon, 04 Nov 2013 15:48:05 +0000
parents b5d3dea6d869
children 26c5f7fd4807 41029a6e55c6
files widgets/CSVFormatDialog.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/widgets/CSVFormatDialog.cpp	Wed Oct 09 14:55:49 2013 +0100
+++ b/widgets/CSVFormatDialog.cpp	Mon Nov 04 15:48:05 2013 +0000
@@ -17,6 +17,8 @@
 
 #include "layer/LayerFactory.h"
 
+#include "TextAbbrev.h"
+
 #include <QFrame>
 #include <QGridLayout>
 #include <QPushButton>
@@ -96,7 +98,8 @@
         for (int j = 0; j < example.size() && j < 6; ++j) {
             QLabel *label = new QLabel;
             label->setTextFormat(Qt::PlainText);
-            label->setText(example[j][i]);
+            QString text = TextAbbrev::abbreviate(example[j][i], 35);
+            label->setText(text);
             label->setFont(fp);
             label->setPalette(palette);
             label->setIndent(8);