From 0d5b249cd44fb89b68681297921e955e1e7a16f5 Mon Sep 17 00:00:00 2001 From: g_j_m Date: Tue, 6 Feb 2007 09:09:39 +0000 Subject: [PATCH] Replace some Qt3 widgets with Qt4 ones Move the delimited plugin help text from the .ui file to the .cpp file (allows for easier translation) Remove some unnecessry #includes git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6541 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/core/qgsclipper.h | 1 - .../qgsdelimitedtextplugingui.cpp | 4 + .../qgsdelimitedtextpluginguibase.ui | 358 ++++++++---------- src/providers/ogr/qgsogrprovider.cpp | 1 - 4 files changed, 166 insertions(+), 198 deletions(-) diff --git a/src/core/qgsclipper.h b/src/core/qgsclipper.h index 1b717bf4375..c481278f05a 100644 --- a/src/core/qgsclipper.h +++ b/src/core/qgsclipper.h @@ -21,7 +21,6 @@ #define QGSCLIPPER_H #include "qgspoint.h" -#include "q3pointarray.h" #include #include diff --git a/src/plugins/delimited_text/qgsdelimitedtextplugingui.cpp b/src/plugins/delimited_text/qgsdelimitedtextplugingui.cpp index 86b991e4d30..79049fd926e 100644 --- a/src/plugins/delimited_text/qgsdelimitedtextplugingui.cpp +++ b/src/plugins/delimited_text/qgsdelimitedtextplugingui.cpp @@ -42,6 +42,10 @@ QgsDelimitedTextPluginGui::QgsDelimitedTextPluginGui(QgisInterface * _qI, QWidge QString key = "/Plugin-DelimitedText"; txtDelimiter->setText(settings.readEntry(key + "/delimiter")); + teInstructions->setHtml(tr("

Description

" +"

Select a delimited text file containing x and y coordinates that you would like to use as a point layer and this plugin will do the job for you!

" +"

Use the layer name box to specify the legend name for the new layer. Use the delimiter box to specify what delimeter is used in your file (e.g. space, comma or tab). After choosing a delimiter, press the parse button an select the columns containing the x and y values for the layer.

")); + } QgsDelimitedTextPluginGui::~QgsDelimitedTextPluginGui() { diff --git a/src/plugins/delimited_text/qgsdelimitedtextpluginguibase.ui b/src/plugins/delimited_text/qgsdelimitedtextpluginguibase.ui index 13ab59746c8..d665d579ddb 100644 --- a/src/plugins/delimited_text/qgsdelimitedtextpluginguibase.ui +++ b/src/plugins/delimited_text/qgsdelimitedtextpluginguibase.ui @@ -6,7 +6,7 @@ 0 0 657 - 517 + 547 @@ -17,19 +17,33 @@ - 10 + 9 6 - - + + + + + Sans Serif + 20 + 50 + false + false + false + false + + - Cancel + Delimited Text Layer + + + Qt::AlignCenter - + :/new/prefix1/delimited_text.png @@ -39,20 +53,129 @@ - - - - QFrame::VLine - - - QFrame::Sunken - + + - Qt::Vertical + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - + + + + 0 + + + 6 + + + + + Layer name + + + + + + + Name to display in the map legend + + + Name displayed in the map legend + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 20 + 21 + + + + + + + + Delimiter + + + + + + + + 25 + 32767 + + + + Delimiter to use when splitting fields in the text file. The delimiter can be more than one character. + + + Delimiter to use when splitting fields in the delimited text file. The delimiter can be 1 or more characters in length. + + + + + + + + + 0 + + + 6 + + + + + Delimited text file + + + + + + + Full path to the delimited text file + + + Full path to the delimited text file. In order to properly parse the fields in the file, the delimiter must be defined prior to entering the file name. Use the Browse button to the right of this field to choose the input file. + + + true + + + + + + + true + + + Browse to find the delimited text file to be processed + + + Use this button to browse to the location of the delimited text file. This button will not be enabled until a delimiter has been entered in the <i>Delimiter</i> box. Once a file is chosen, the X and Y field drop-down boxes will be populated with the fields from the delimited text file. + + + Browse... + + + + + + 0 @@ -130,29 +253,33 @@ - - - - Sample text + + + + QFrame::VLine + + + QFrame::Sunken Qt::Vertical + + + + + + Sample text + - 10 + 9 6 - - - Qt::PlainText - - - Q3TextEdit::NoWrap - + true @@ -161,164 +288,16 @@ - - - - <html><head><meta name="qrichtext" content="1" /></head><body style="font-size:12pt;font-family:Arial"> -<p style="margin-top:16px"><span style="font-size:16pt;font-weight:600">Description</span></p> -<p>Select a delimited text file containing x and y coordinates that you would like to use as a point layer and this plugin will do the job for you! </p> -<p>Use the layer name box to specify the legend name for the new layer. Use the delimiter box to specify what delimeter is used in your file (e.g. space, comma or tab). After choosing a delimiter, press the parse button an select the columns containing the x and y values for the layer.</p> -</body></html> - - - - Q3TextEdit::WidgetWidth - + + true - - - - - - - Sans Serif - 20 - 50 - false - false - false - false - - - - Delimited Text Layer - - - Qt::AlignCenter - - - - - - - 0 - - - 6 - - - - - Delimited text file - - - - - - - Full path to the delimited text file - - - Full path to the delimited text file. In order to properly parse the fields in the file, the delimiter must be defined prior to entering the file name. Use the Browse button to the right of this field to choose the input file. - - - true - - - - - - - true - - - Browse to find the delimited text file to be processed - - - Use this button to browse to the location of the delimited text file. This button will not be enabled until a delimiter has been entered in the <i>Delimiter</i> box. Once a file is chosen, the X and Y field drop-down boxes will be populated with the fields from the delimited text file. - - - Browse... - - - - - - - - - 0 - - - 6 - - - - - Layer name - - - - - - - Name to display in the map legend - - - Name displayed in the map legend - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 20 - 21 - - - - - - - - Delimiter - - - - - - - - 25 - 32767 - - - - Delimiter to use when splitting fields in the text file. The delimiter can be more than one character. - - - Delimiter to use when splitting fields in the delimited text file. The delimiter can be 1 or more characters in length. - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::NoButton|QDialogButtonBox::Ok + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> @@ -326,22 +305,11 @@ - - Q3GroupBox - QGroupBox -
Qt3Support/Q3GroupBox
- 1 -
QgsFileDropEdit QLineEdit
qgsfiledropedit.h
- - Q3TextEdit - Q3Frame -
Qt3Support/Q3TextEdit
-
txtLayerName @@ -350,8 +318,6 @@ btnBrowseForFile cmbXField cmbYField - pbnCancel_2 - teInstructions diff --git a/src/providers/ogr/qgsogrprovider.cpp b/src/providers/ogr/qgsogrprovider.cpp index 6419abfecf1..5538022822b 100644 --- a/src/providers/ogr/qgsogrprovider.cpp +++ b/src/providers/ogr/qgsogrprovider.cpp @@ -31,7 +31,6 @@ email : sherman at mrcc.com #include #include "ogr_api.h"//only for a test -#include #include #include #include