Skip to content

Commit

Permalink
Fixed tooltip text throughout. Renamced combo box named cbxEncoding t…
Browse files Browse the repository at this point in the history
…o cmbEncoding
  • Loading branch information
ccrook committed Apr 17, 2013
1 parent e1421f5 commit cd24f54
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 28 deletions.
12 changes: 6 additions & 6 deletions src/providers/delimitedtext/qgsdelimitedtextsourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ QgsDelimitedTextSourceSelect::QgsDelimitedTextSourceSelect( QWidget * parent, Qt
buttonBox->button( QDialogButtonBox::Ok )->hide();
}

cbxEncoding->clear();
cmbEncoding->clear();
foreach ( QByteArray codec, QTextCodec::availableCodecs() )
{
cbxEncoding->addItem( codec );
cmbEncoding->addItem( codec );
}
cbxEncoding->setCurrentIndex( cbxEncoding->findText( "UTF-8" ) );
cmbEncoding->setCurrentIndex( cmbEncoding->findText( "UTF-8" ) );
loadSettings();

updateFieldsAndEnable();
Expand Down Expand Up @@ -249,7 +249,7 @@ void QgsDelimitedTextSourceSelect::loadSettings( QString subkey, bool loadGeomSe
}

QString encoding = settings.value( key + "/encoding", "" ).toString();
if ( ! encoding.isEmpty() ) cbxEncoding->setCurrentIndex( cbxEncoding->findText( encoding ) );
if ( ! encoding.isEmpty() ) cmbEncoding->setCurrentIndex( cmbEncoding->findText( encoding ) );
QString delimiters = settings.value( key + "/delimiters", "" ).toString();
if ( ! delimiters.isEmpty() ) setSelectedChars( delimiters );

Expand Down Expand Up @@ -281,7 +281,7 @@ void QgsDelimitedTextSourceSelect::saveSettings( QString subkey, bool saveGeomSe
QSettings settings;
QString key = mPluginKey;
if ( ! subkey.isEmpty() ) key.append( "/" ).append( subkey );
settings.setValue( key + "/encoding", cbxEncoding->currentText() );
settings.setValue( key + "/encoding", cmbEncoding->currentText() );
settings.setValue( key + "/geometry", saveGeometry() );

if ( delimiterCSV->isChecked() )
Expand Down Expand Up @@ -331,7 +331,7 @@ void QgsDelimitedTextSourceSelect::saveSettingsForFile( QString filename )
bool QgsDelimitedTextSourceSelect::loadDelimitedFileDefinition()
{
mFile->setFileName( txtFilePath->text() );
mFile->setEncoding( cbxEncoding->currentText() );
mFile->setEncoding( cmbEncoding->currentText() );
if ( delimiterChars->isChecked() )
{
mFile->setTypeCSV( selectedChars(), txtQuoteChars->text(), txtEscapeChars->text() );
Expand Down
96 changes: 74 additions & 22 deletions src/ui/qgsdelimitedtextsourceselectbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
</iconset>
</property>
<property name="toolTip">
<string>Number fields use comma for a decimal point</string>
<string/>
</property>
<property name="statusTip">
<string>Number fields use comma for a decimal point</string>
<string/>
</property>
<property name="whatsThis">
<string>Number fields use comma for a decimal point</string>
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
Expand All @@ -52,13 +52,13 @@
</sizepolicy>
</property>
<property name="toolTip">
<string>Each line in the file is split using a regular expression to define the end of each field</string>
<string>A regular expression defines the end of each field. Each line is a separate record</string>
</property>
<property name="statusTip">
<string>Each line in the file is split using a regular expression to define the end of each field</string>
<string>A regular expression defines the end of each field. Each line is a separate record</string>
</property>
<property name="whatsThis">
<string>Each line in the file is split using a regular expression to define the end of each field</string>
<string>A regular expression defines the end of each field. Each line is a separate record</string>
</property>
<property name="text">
<string>Regular expression</string>
Expand All @@ -68,13 +68,13 @@
<item row="2" column="0">
<widget class="QRadioButton" name="delimiterChars">
<property name="toolTip">
<string>Fields are delimited by specified delimiters with quote and escape characters</string>
<string>Fields are delimited by specified delimiters with quote and escape characters which allow delimiters and new lines within a field</string>
</property>
<property name="statusTip">
<string>Fields are delimited by specified delimiters with quote and escape characters</string>
<string>Fields are delimited by specified delimiters with quote and escape characters which allow delimiters and new lines within a field</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Fields are delimited by specified delimiters with quote and escape characters&lt;/p&gt;&lt;p&gt;Fields quoted using a quote characters may contain delimiters and new lines&lt;/p&gt;&lt;p&gt;The escape character can escape new lines and quotes within quoted fields&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Fields are delimited by specified delimiters with quote and escape characters which allow delimiters and new lines within a field</string>
</property>
<property name="text">
<string>Selected delimiters</string>
Expand Down Expand Up @@ -122,6 +122,15 @@
</property>
<item>
<widget class="QCheckBox" name="cbxDelimComma">
<property name="toolTip">
<string>Comma character is one of the delimiters</string>
</property>
<property name="statusTip">
<string>Comma character is one of the delimiters</string>
</property>
<property name="whatsThis">
<string>Comma character is one of the delimiters</string>
</property>
<property name="text">
<string>Comma</string>
</property>
Expand All @@ -132,6 +141,12 @@
<property name="toolTip">
<string>Tab character is one of the delimiters</string>
</property>
<property name="statusTip">
<string>Tab character is one of the delimiters</string>
</property>
<property name="whatsThis">
<string>Tab character is one of the delimiters</string>
</property>
<property name="text">
<string>Tab</string>
</property>
Expand All @@ -145,6 +160,12 @@
<property name="toolTip">
<string>Space character is one of the delimiters</string>
</property>
<property name="statusTip">
<string>Space character is one of the delimiters</string>
</property>
<property name="whatsThis">
<string>Space character is one of the delimiters</string>
</property>
<property name="text">
<string>Space</string>
</property>
Expand All @@ -155,13 +176,31 @@
</item>
<item>
<widget class="QCheckBox" name="cbxDelimColon">
<property name="toolTip">
<string>Colon character is one of the delimiters</string>
</property>
<property name="statusTip">
<string>Colon character is one of the delimiters</string>
</property>
<property name="whatsThis">
<string>Colon character is one of the delimiters</string>
</property>
<property name="text">
<string>Colon</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbxDelimSemicolon">
<property name="toolTip">
<string>Semicolon character is one of the delimiters</string>
</property>
<property name="statusTip">
<string>Semicolon character is one of the delimiters</string>
</property>
<property name="whatsThis">
<string>Semicolon character is one of the delimiters</string>
</property>
<property name="text">
<string>Semicolon</string>
</property>
Expand Down Expand Up @@ -545,10 +584,13 @@
</size>
</property>
<property name="toolTip">
<string>Name of the field containing y values</string>
<string>Name of the field containing well known text value</string>
</property>
<property name="statusTip">
<string>Name of the field containing well known text value</string>
</property>
<property name="whatsThis">
<string>Name of the field containing y values. Choose a field from the list. The list is generated by parsing the header row of the delimited text file.</string>
<string>Name of the field containing well known text value</string>
</property>
<property name="editable">
<bool>false</bool>
Expand Down Expand Up @@ -742,7 +784,17 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxEncoding"/>
<widget class="QComboBox" name="cmbEncoding">
<property name="toolTip">
<string>Select the file encoding</string>
</property>
<property name="statusTip">
<string>Select the file encoding</string>
</property>
<property name="whatsThis">
<string>Select the file encoding</string>
</property>
</widget>
</item>
</layout>
</item>
Expand Down Expand Up @@ -829,13 +881,13 @@
</size>
</property>
<property name="toolTip">
<string>The number of lines at the beginning of the file to ignore</string>
<string>The number of lines to discard from the beginning of the file</string>
</property>
<property name="statusTip">
<string>The number of lines at the beginning of the file to ignore</string>
<string>The number of lines to discard from the beginning of the file</string>
</property>
<property name="whatsThis">
<string>The number of lines at the beginning of the file to ignore</string>
<string>The number of lines to discard from the beginning of the file</string>
</property>
<property name="wrapping">
<bool>false</bool>
Expand All @@ -851,13 +903,13 @@
<item>
<widget class="QCheckBox" name="cbxUseHeader">
<property name="toolTip">
<string>Field names are read from the first line. If not selected then fields are numbered</string>
<string>Field names are read from the first record. If not selected then fields are numbered</string>
</property>
<property name="statusTip">
<string>Field names are read from the first line. If not selected then fields are numbered</string>
<string>Field names are read from the first record. If not selected then fields are numbered</string>
</property>
<property name="whatsThis">
<string>Field names are read from the first line. If not selected then fields are numbered</string>
<string>Field names are read from the first record. If not selected then fields are numbered</string>
</property>
<property name="text">
<string>First record has field names</string>
Expand Down Expand Up @@ -929,13 +981,13 @@
<bool>true</bool>
</property>
<property name="toolTip">
<string>X and Y coordinates have comma for decimal point</string>
<string>Number fields use comma for a decimal point</string>
</property>
<property name="statusTip">
<string>X and Y coordinates have comma for decimal point</string>
<string>Number fields use comma for a decimal point</string>
</property>
<property name="whatsThis">
<string>X and Y coordinates have comma for decimal point</string>
<string>Number fields use comma for a decimal point</string>
</property>
<property name="text">
<string>Decimal point is comma</string>
Expand Down Expand Up @@ -966,7 +1018,7 @@
<tabstop>txtFilePath</tabstop>
<tabstop>btnBrowseForFile</tabstop>
<tabstop>txtLayerName</tabstop>
<tabstop>cbxEncoding</tabstop>
<tabstop>cmbEncoding</tabstop>
<tabstop>delimiterCSV</tabstop>
<tabstop>delimiterChars</tabstop>
<tabstop>cbxDelimComma</tabstop>
Expand Down

0 comments on commit cd24f54

Please sign in to comment.