Skip to content

Commit

Permalink
do not translate geometry types, change dbmanager translation context…
Browse files Browse the repository at this point in the history
… names (fix #6837)
  • Loading branch information
brushtyler committed Dec 10, 2012
1 parent 7a62127 commit 3da32c0
Show file tree
Hide file tree
Showing 18 changed files with 182 additions and 141 deletions.
4 changes: 2 additions & 2 deletions python/plugins/db_manager/dlg_add_geometry_column.py
Expand Up @@ -29,9 +29,9 @@
from .dlg_db_error import DlgDbError
from .db_plugins.plugin import TableField

from .ui.ui_DlgAddGeometryColumn import Ui_DlgAddGeometryColumn
from .ui.ui_DlgAddGeometryColumn import Ui_DbManagerDlgAddGeometryColumn as Ui_Dialog

class DlgAddGeometryColumn(QDialog, Ui_DlgAddGeometryColumn):
class DlgAddGeometryColumn(QDialog, Ui_Dialog):

GEOM_TYPES = ["POINT", "LINESTRING", "POLYGON", "MULTIPOINT", "MULTILINESTRING", "MULTIPOLYGON", "GEOMETRYCOLLECTION"]

Expand Down
5 changes: 2 additions & 3 deletions python/plugins/db_manager/dlg_create_constraint.py
Expand Up @@ -29,10 +29,9 @@
from .dlg_db_error import DlgDbError
from .db_plugins.plugin import TableConstraint

from .ui.ui_DlgCreateConstraint import Ui_DlgCreateConstraint

class DlgCreateConstraint(QDialog, Ui_DlgCreateConstraint):
from .ui.ui_DlgCreateConstraint import Ui_DbManagerDlgCreateConstraint as Ui_Dialog

class DlgCreateConstraint(QDialog, Ui_Dialog):
def __init__(self, parent=None, table=None, db=None):
QDialog.__init__(self, parent)
self.table = table
Expand Down
6 changes: 2 additions & 4 deletions python/plugins/db_manager/dlg_create_index.py
Expand Up @@ -29,11 +29,9 @@
from .dlg_db_error import DlgDbError
from .db_plugins.plugin import TableIndex

from .ui.ui_DlgCreateIndex import Ui_DlgCreateIndex


class DlgCreateIndex(QDialog, Ui_DlgCreateIndex):
from .ui.ui_DlgCreateIndex import Ui_DbManagerDlgCreateIndex as Ui_Dialog

class DlgCreateIndex(QDialog, Ui_Dialog):
def __init__(self, parent=None, table=None, db=None):
QDialog.__init__(self, parent)
self.table = table
Expand Down
5 changes: 2 additions & 3 deletions python/plugins/db_manager/dlg_create_table.py
Expand Up @@ -29,7 +29,7 @@
from .db_plugins.plugin import DbError, ConnectionError
from .dlg_db_error import DlgDbError

from .ui.ui_DlgCreateTable import Ui_DlgCreateTable
from .ui.ui_DlgCreateTable import Ui_DbManagerDlgCreateTable as Ui_Dialog


class TableFieldsDelegate(QItemDelegate):
Expand Down Expand Up @@ -79,8 +79,7 @@ def setModelData(self, editor, model, index):
self.emit(SIGNAL("columnNameChanged()"))


class DlgCreateTable(QDialog, Ui_DlgCreateTable):

class DlgCreateTable(QDialog, Ui_Dialog):
GEOM_TYPES = ["POINT", "LINESTRING", "POLYGON", "MULTIPOINT", "MULTILINESTRING", "MULTIPOLYGON", "GEOMETRYCOLLECTION"]

def __init__(self, item, parent=None):
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/db_manager/dlg_db_error.py
Expand Up @@ -25,10 +25,10 @@
from PyQt4.QtCore import *
from PyQt4.QtGui import *

from .ui.ui_DlgDbError import Ui_DlgDbError
from .ui.ui_DlgDbError import Ui_DbManagerDlgDbError as Ui_Dialog
from .db_plugins.plugin import DbError

class DlgDbError(QDialog, Ui_DlgDbError):
class DlgDbError(QDialog, Ui_Dialog):
def __init__(self, e, parent=None):
QDialog.__init__(self, parent)
self.setupUi(self)
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/db_manager/dlg_export_vector.py
Expand Up @@ -28,9 +28,9 @@
import qgis.core
from qgis.utils import iface

from .ui.ui_DlgExportVector import Ui_DlgExportVector
from .ui.ui_DlgExportVector import Ui_DbManagerDlgExportVector as Ui_Dialog

class DlgExportVector(QDialog, Ui_DlgExportVector):
class DlgExportVector(QDialog, Ui_Dialog):

def __init__(self, inLayer, inDb, parent=None):
QDialog.__init__(self, parent)
Expand Down
5 changes: 2 additions & 3 deletions python/plugins/db_manager/dlg_field_properties.py
Expand Up @@ -29,10 +29,9 @@

from .db_plugins.plugin import TableField

from .ui.ui_DlgFieldProperties import Ui_DlgFieldProperties

class DlgFieldProperties(QDialog, Ui_DlgFieldProperties):
from .ui.ui_DlgFieldProperties import Ui_DbManagerDlgFieldProperties as Ui_Dialog

class DlgFieldProperties(QDialog, Ui_Dialog):
def __init__(self, parent=None, fld=None, table=None, db=None):
QDialog.__init__(self, parent)
self.fld = fld
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/db_manager/dlg_import_vector.py
Expand Up @@ -28,9 +28,9 @@
import qgis.core
from qgis.utils import iface

from .ui.ui_DlgImportVector import Ui_DlgImportVector
from .ui.ui_DlgImportVector import Ui_DbManagerDlgImportVector as Ui_Dialog

class DlgImportVector(QDialog, Ui_DlgImportVector):
class DlgImportVector(QDialog, ):

HAS_INPUT_MODE, ASK_FOR_INPUT_MODE = range(2)

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/db_manager/dlg_sql_window.py
Expand Up @@ -28,12 +28,12 @@
from .db_plugins.plugin import BaseError
from .dlg_db_error import DlgDbError

from .ui.ui_DlgSqlWindow import Ui_DlgSqlWindow
from .ui.ui_DlgSqlWindow import Ui_DbManagerDlgSqlWindow as Ui_Dialog

from .highlighter import SqlHighlighter
from .completer import SqlCompleter

class DlgSqlWindow(QDialog, Ui_DlgSqlWindow):
class DlgSqlWindow(QDialog, Ui_Dialog):

def __init__(self, iface, db, parent=None):
QDialog.__init__(self, parent)
Expand Down
5 changes: 2 additions & 3 deletions python/plugins/db_manager/dlg_table_properties.py
Expand Up @@ -34,10 +34,9 @@
from .dlg_create_constraint import DlgCreateConstraint
from .dlg_create_index import DlgCreateIndex

from .ui.ui_DlgTableProperties import Ui_DlgTableProperties

class DlgTableProperties(QDialog, Ui_DlgTableProperties):
from .ui.ui_DlgTableProperties import Ui_DbManagerDlgTableProperties as Ui_Dialog

class DlgTableProperties(QDialog, Ui_Dialog):
def __init__(self, table, parent=None):
QDialog.__init__(self, parent)
self.table = table
Expand Down
26 changes: 13 additions & 13 deletions python/plugins/db_manager/ui/DlgAddGeometryColumn.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DlgAddGeometryColumn</class>
<widget class="QDialog" name="DlgAddGeometryColumn">
<class>DbManagerDlgAddGeometryColumn</class>
<widget class="QDialog" name="DbManagerDlgAddGeometryColumn">
<property name="geometry">
<rect>
<x>0</x>
Expand All @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string>Add geometry column</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
Expand All @@ -27,7 +27,7 @@
<item row="0" column="1" colspan="2">
<widget class="QLineEdit" name="editName">
<property name="text">
<string>geom</string>
<string notr="true">geom</string>
</property>
</widget>
</item>
Expand All @@ -45,37 +45,37 @@
<widget class="QComboBox" name="cboType">
<item>
<property name="text">
<string>POINT</string>
<string notr="true">POINT</string>
</property>
</item>
<item>
<property name="text">
<string>LINESTRING</string>
<string notr="true">LINESTRING</string>
</property>
</item>
<item>
<property name="text">
<string>POLYGON</string>
<string notr="true">POLYGON</string>
</property>
</item>
<item>
<property name="text">
<string>MULTIPOINT</string>
<string notr="true">MULTIPOINT</string>
</property>
</item>
<item>
<property name="text">
<string>MULTILINESTRING</string>
<string notr="true">MULTILINESTRING</string>
</property>
</item>
<item>
<property name="text">
<string>MULTIPOLYGON</string>
<string notr="true">MULTIPOLYGON</string>
</property>
</item>
<item>
<property name="text">
<string>GEOMETRYCOLLECTION</string>
<string notr="true">GEOMETRYCOLLECTION</string>
</property>
</item>
</widget>
Expand Down Expand Up @@ -126,7 +126,7 @@
<item row="3" column="1">
<widget class="QLineEdit" name="editSrid">
<property name="text">
<string>-1</string>
<string notr="true">-1</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -154,7 +154,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DlgAddGeometryColumn</receiver>
<receiver>DbManagerDlgAddGeometryColumn</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
Expand Down
6 changes: 3 additions & 3 deletions python/plugins/db_manager/ui/DlgCreateConstraint.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DlgCreateConstraint</class>
<widget class="QDialog" name="DlgCreateConstraint">
<class>DbManagerDlgCreateConstraint</class>
<widget class="QDialog" name="DbManagerDlgCreateConstraint">
<property name="geometry">
<rect>
<x>0</x>
Expand Down Expand Up @@ -65,7 +65,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DlgCreateConstraint</receiver>
<receiver>DbManagerDlgCreateConstraint</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
Expand Down
12 changes: 8 additions & 4 deletions python/plugins/db_manager/ui/DlgCreateIndex.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DlgCreateIndex</class>
<widget class="QDialog" name="DlgCreateIndex">
<class>DbManagerDlgCreateIndex</class>
<widget class="QDialog" name="DbManagerDlgCreateIndex">
<property name="geometry">
<rect>
<x>0</x>
Expand Down Expand Up @@ -32,7 +32,11 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="editName"/>
<widget class="QLineEdit" name="editName">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
Expand All @@ -56,7 +60,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DlgCreateIndex</receiver>
<receiver>DbManagerDlgCreateIndex</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
Expand Down
30 changes: 17 additions & 13 deletions python/plugins/db_manager/ui/DlgCreateTable.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DlgCreateTable</class>
<widget class="QDialog" name="DlgCreateTable">
<class>DbManagerDlgCreateTable</class>
<widget class="QDialog" name="DbManagerDlgCreateTable">
<property name="geometry">
<rect>
<x>0</x>
Expand Down Expand Up @@ -40,7 +40,11 @@
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="editName"/>
<widget class="QLineEdit" name="editName">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
</item>
Expand Down Expand Up @@ -126,37 +130,37 @@
<widget class="QComboBox" name="cboGeomType">
<item>
<property name="text">
<string>POINT</string>
<string notr="true">POINT</string>
</property>
</item>
<item>
<property name="text">
<string>LINESTRING</string>
<string notr="true">LINESTRING</string>
</property>
</item>
<item>
<property name="text">
<string>POLYGON</string>
<string notr="true">POLYGON</string>
</property>
</item>
<item>
<property name="text">
<string>MULTIPOINT</string>
<string notr="true">MULTIPOINT</string>
</property>
</item>
<item>
<property name="text">
<string>MULTILINESTRING</string>
<string notr="true">MULTILINESTRING</string>
</property>
</item>
<item>
<property name="text">
<string>MULTIPOLYGON</string>
<string notr="true">MULTIPOLYGON</string>
</property>
</item>
<item>
<property name="text">
<string>GEOMETRYCOLLECTION</string>
<string notr="true">GEOMETRYCOLLECTION</string>
</property>
</item>
</widget>
Expand All @@ -174,7 +178,7 @@
<item row="1" column="1">
<widget class="QLineEdit" name="editGeomColumn">
<property name="text">
<string>geom</string>
<string notr="true">geom</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -224,7 +228,7 @@
<item row="3" column="1">
<widget class="QLineEdit" name="editGeomSrid">
<property name="text">
<string>-1</string>
<string notr="true">-1</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -278,7 +282,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DlgCreateTable</receiver>
<receiver>DbManagerDlgCreateTable</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
Expand Down

0 comments on commit 3da32c0

Please sign in to comment.