~ubuntu-branches/ubuntu/utopic/qgis/utopic

« back to all changes in this revision

Viewing changes to src/gui/qgsencodingfiledialog.cpp

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-04-24 15:12:20 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120424151220-r88g00af5fpn5fc3
Tags: 1.7.4+1.7.5~20120320-1
The "Sometimes they come back" release.

* Branching from Qgis tree and adapting to current Debian Policy and
  standards. The target tree is currently set to release-1.7.
  (closes: #661491, #606304, #615683, #616182, #600308)
* Policy bumped to 3.9.3.
* Moving to debhelper compatibility level 9.
* Source format is now 3.0 with quilt support.
* Merged with 2bf42287 upstream git snapshot.
* Migrated to dh_python2 instead of python-central.
  (closes: #617048)
* Snapshot in qgis.org release-1.7: c936d031
* Added an automagic creation of a lintian override for sqlite embedding.
  This is required for uploading currently.
* Added missing ${misc:Depends} to make lintian happy.
* Copyright notes updated and debian/copyright moved to format 1.0.
* More licenses notices now reported in debian/copyright. Thanks ftpmasters.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include "qgsencodingfiledialog.h"
17
17
#include "qgsproject.h"
18
18
#include "qgslogger.h"
 
19
#include "qgsvectordataprovider.h"
 
20
 
19
21
#include <QSettings>
20
22
#include <QComboBox>
21
23
#include <QPushButton>
23
25
#include <QLayout>
24
26
#include <QTextCodec>
25
27
 
26
 
 
27
28
QgsEncodingFileDialog::QgsEncodingFileDialog( QWidget * parent,
28
29
    const QString & caption, const QString & directory,
29
30
    const QString & filter, const QString & encoding )
35
36
  QLabel* l = new QLabel( tr( "Encoding:" ), this );
36
37
  layout()->addWidget( l );
37
38
  layout()->addWidget( mEncodingComboBox );
38
 
  mEncodingComboBox->addItem( "BIG5" );
39
 
  mEncodingComboBox->addItem( "BIG5-HKSCS" );
40
 
  mEncodingComboBox->addItem( "EUCJP" );
41
 
  mEncodingComboBox->addItem( "EUCKR" );
42
 
  mEncodingComboBox->addItem( "GB2312" );
43
 
  mEncodingComboBox->addItem( "GBK" );
44
 
  mEncodingComboBox->addItem( "GB18030" );
45
 
  mEncodingComboBox->addItem( "JIS7" );
46
 
  mEncodingComboBox->addItem( "SHIFT-JIS" );
47
 
  mEncodingComboBox->addItem( "TSCII" );
48
 
  mEncodingComboBox->addItem( "UTF-8" );
49
 
  mEncodingComboBox->addItem( "UTF-16" );
50
 
  mEncodingComboBox->addItem( "KOI8-R" );
51
 
  mEncodingComboBox->addItem( "KOI8-U" );
52
 
  mEncodingComboBox->addItem( "ISO8859-1" );
53
 
  mEncodingComboBox->addItem( "ISO8859-2" );
54
 
  mEncodingComboBox->addItem( "ISO8859-3" );
55
 
  mEncodingComboBox->addItem( "ISO8859-4" );
56
 
  mEncodingComboBox->addItem( "ISO8859-5" );
57
 
  mEncodingComboBox->addItem( "ISO8859-6" );
58
 
  mEncodingComboBox->addItem( "ISO8859-7" );
59
 
  mEncodingComboBox->addItem( "ISO8859-8" );
60
 
  mEncodingComboBox->addItem( "ISO8859-8-I" );
61
 
  mEncodingComboBox->addItem( "ISO8859-9" );
62
 
  mEncodingComboBox->addItem( "ISO8859-10" );
63
 
  mEncodingComboBox->addItem( "ISO8859-13" );
64
 
  mEncodingComboBox->addItem( "ISO8859-14" );
65
 
  mEncodingComboBox->addItem( "ISO8859-15" );
66
 
  mEncodingComboBox->addItem( "IBM 850" );
67
 
  mEncodingComboBox->addItem( "IBM 866" );
68
 
  mEncodingComboBox->addItem( "CP874" );
69
 
  mEncodingComboBox->addItem( "CP1250" );
70
 
  mEncodingComboBox->addItem( "CP1251" );
71
 
  mEncodingComboBox->addItem( "CP1252" );
72
 
  mEncodingComboBox->addItem( "CP1253" );
73
 
  mEncodingComboBox->addItem( "CP1254" );
74
 
  mEncodingComboBox->addItem( "CP1255" );
75
 
  mEncodingComboBox->addItem( "CP1256" );
76
 
  mEncodingComboBox->addItem( "CP1257" );
77
 
  mEncodingComboBox->addItem( "CP1258" );
78
 
  mEncodingComboBox->addItem( "Apple Roman" );
79
 
  mEncodingComboBox->addItem( "TIS-620" );
 
39
 
 
40
  mEncodingComboBox->addItems( QgsVectorDataProvider::availableEncodings() );
80
41
 
81
42
  // Use default encoding if none supplied
82
43
  QString enc = encoding;
129
90
{
130
91
  if ( ! mCancelAllButton )
131
92
  {
132
 
    mCancelAllButton = new QPushButton( "Cancel &All", NULL );
 
93
    mCancelAllButton = new QPushButton( tr( "Cancel &All" ), NULL );
133
94
    layout()->addWidget( mCancelAllButton ); // Ownership transfered, no need to delete later on
134
95
    connect( mCancelAllButton, SIGNAL( clicked() ), this, SLOT( pbnCancelAll_clicked() ) );
135
96
  }