[QGIS Commit] r11719 - in trunk/qgis/src: app providers/ogr ui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Sep 27 03:55:01 EDT 2009
Author: timlinux
Date: 2009-09-27 03:55:01 -0400 (Sun, 27 Sep 2009)
New Revision: 11719
Added:
trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp
trunk/qgis/src/app/qgsnewvectorlayerdialog.h
trunk/qgis/src/ui/qgsnewvectorlayerdialogbase.ui
Removed:
trunk/qgis/src/app/qgsgeomtypedialog.cpp
trunk/qgis/src/app/qgsgeomtypedialog.h
trunk/qgis/src/ui/qgsaddattrdialogbase.ui
Modified:
trunk/qgis/src/app/CMakeLists.txt
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
trunk/qgis/src/ui/qgsattributetabledialog.ui
trunk/qgis/src/ui/qgsgeomtypedialogbase.ui
Log:
Usability improvements to the new vector layer dialog. Also refactored so that the dialog an class names are now a more logical QgsNewVectorDialog
Modified: trunk/qgis/src/app/CMakeLists.txt
===================================================================
--- trunk/qgis/src/app/CMakeLists.txt 2009-09-27 01:19:07 UTC (rev 11718)
+++ trunk/qgis/src/app/CMakeLists.txt 2009-09-27 07:55:01 UTC (rev 11719)
@@ -20,7 +20,7 @@
qgsspatialitefilterproxymodel.cpp
qgsspatialitetablemodel.cpp
qgsdelattrdialog.cpp
- qgsgeomtypedialog.cpp
+ qgsnewvectorlayerdialog.cpp
qgsgraduatedsymboldialog.cpp
qgshelpviewer.cpp
qgsidentifyresults.cpp
@@ -122,7 +122,7 @@
qgsconfigureshortcutsdialog.h
qgscustomprojectiondialog.h
qgsdelattrdialog.h
- qgsgeomtypedialog.h
+ qgsnewvectorlayerdialog.h
qgsgraduatedsymboldialog.h
qgshelpviewer.h
qgsidentifyresults.h
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2009-09-27 01:19:07 UTC (rev 11718)
+++ trunk/qgis/src/app/qgisapp.cpp 2009-09-27 07:55:01 UTC (rev 11719)
@@ -102,7 +102,7 @@
#include "qgsogrsublayersdialog.h"
#include "qgsexception.h"
#include "qgsfeature.h"
-#include "qgsgeomtypedialog.h"
+#include "qgsnewvectorlayerdialog.h"
#include "qgshelpviewer.h"
#include "qgsgenericprojectionselector.h"
#include "qgslegend.h"
@@ -3139,6 +3139,9 @@
void QgisApp::newVectorLayer()
{
+ QgsDebugMsg( "++++++++++++++++++++++++++++++++++++++++++" );
+ QgsDebugMsg( "newVectorLayer called" );
+ QgsDebugMsg( "++++++++++++++++++++++++++++++++++++++++++" );
if ( mMapCanvas && mMapCanvas->isDrawing() )
{
@@ -3148,13 +3151,14 @@
QGis::WkbType geometrytype;
QString fileformat;
- QgsGeomTypeDialog geomDialog( this );
+ QgsNewVectorLayerDialog geomDialog( this );
if ( geomDialog.exec() == QDialog::Rejected )
{
return;
}
geometrytype = geomDialog.selectedType();
fileformat = geomDialog.selectedFileFormat();
+ QgsDebugMsg ( QString( "New file format will be: %1" ).arg( fileformat ) );
std::list<std::pair<QString, QString> > attributes;
geomDialog.attributes( attributes );
@@ -3260,6 +3264,9 @@
fileNames.append( fileName );
//todo: the last parameter will change accordingly to layer type
addVectorLayers( fileNames, enc, "file" );
+ QgsDebugMsg( "++++++++++++++++++++++++++++++++++++++++++" );
+ QgsDebugMsg( "newVectorLayer done!" );
+ QgsDebugMsg( "++++++++++++++++++++++++++++++++++++++++++" );
}
void QgisApp::fileOpen()
Deleted: trunk/qgis/src/app/qgsgeomtypedialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsgeomtypedialog.cpp 2009-09-27 01:19:07 UTC (rev 11718)
+++ trunk/qgis/src/app/qgsgeomtypedialog.cpp 2009-09-27 07:55:01 UTC (rev 11719)
@@ -1,115 +0,0 @@
-/***************************************************************************
- qgsgeomtypedialog.cpp - description
- -------------------
- begin : October 2004
- copyright : (C) 2004 by Marco Hugentobler
- email : marco.hugentobler at autoform.ch
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-/* $Id$ */
-
-#include "qgsgeomtypedialog.h"
-#include "qgsapplication.h"
-#include "qgisapp.h" // <- for theme icons
-#include "qgslogger.h"
-#include <QPushButton>
-
-QgsGeomTypeDialog::QgsGeomTypeDialog( QWidget *parent, Qt::WFlags fl )
- : QDialog( parent, fl )
-{
- setupUi( this );
- mAddAttributeButton->setIcon( QgisApp::getThemeIcon( "/mActionNewAttribute.png" ) );
- mRemoveAttributeButton->setIcon( QgisApp::getThemeIcon( "/mActionDeleteAttribute.png" ) );
- mTypeBox->addItem( tr( "String" ), "String" );
- mTypeBox->addItem( tr( "Integer" ), "Integer" );
- mTypeBox->addItem( tr( "Real" ), "Real" );
-
- mPointRadioButton->setChecked( true );
- mFileFormatComboBox->addItem( "ESRI Shapefile" );
- /*mFileFormatComboBox->addItem("Comma Separated Value");
- mFileFormatComboBox->addItem("GML");
- mFileFormatComboBox->addItem("Mapinfo File");*/
- mOkButton = buttonBox->button( QDialogButtonBox::Ok );
- mOkButton->setEnabled( false );
-}
-
-QgsGeomTypeDialog::~QgsGeomTypeDialog()
-{
-}
-
-void QgsGeomTypeDialog::on_mTypeBox_currentIndexChanged( int index )
-{
- mPrecision->setEnabled( index == 2 ); // Real
-}
-
-QGis::WkbType QgsGeomTypeDialog::selectedType() const
-{
- if ( mPointRadioButton->isChecked() )
- {
- return QGis::WKBPoint;
- }
- else if ( mLineRadioButton->isChecked() )
- {
- return QGis::WKBLineString;
- }
- else if ( mPolygonRadioButton->isChecked() )
- {
- return QGis::WKBPolygon;
- }
- return QGis::WKBUnknown;
-}
-
-void QgsGeomTypeDialog::on_mAddAttributeButton_clicked()
-{
- QString myName = mNameEdit->text();
- QString myWidth = mWidth->text();
- QString myPrecision = mPrecision->text();
- //use userrole to avoid translated type string
- QString myType = mTypeBox->itemData( mTypeBox->currentIndex(), Qt::UserRole ).toString();
- mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << myName << myType << myWidth << myPrecision ) );
- if ( mAttributeView->topLevelItemCount() > 0 )
- {
- mOkButton->setEnabled( true );
- }
- mNameEdit->clear();
-}
-
-void QgsGeomTypeDialog::on_mRemoveAttributeButton_clicked()
-{
- delete( mAttributeView->currentItem() );
- if ( mAttributeView->topLevelItemCount() == 0 )
- {
- mOkButton->setEnabled( false );
- }
-}
-
-void QgsGeomTypeDialog::on_buttonBox_helpRequested()
-{
- QgsContextHelp::run( context_id );
-}
-
-void QgsGeomTypeDialog::attributes( std::list<std::pair<QString, QString> >& at ) const
-{
- QTreeWidgetItemIterator it( mAttributeView );
- while ( *it )
- {
- QTreeWidgetItem *item = *it;
- QString type = QString( "%1;%2;%3" ).arg( item->text( 1 ) ).arg( item->text( 2 ) ).arg( item->text( 3 ) );
- at.push_back( std::make_pair( item->text( 0 ), type ) );
- QgsDebugMsg( QString( "appending %1//%2" ).arg( item->text( 0 ) ).arg( type ) );
- ++it;
- }
-}
-
-QString QgsGeomTypeDialog::selectedFileFormat() const
-{
- return mFileFormatComboBox->currentText();
-}
Deleted: trunk/qgis/src/app/qgsgeomtypedialog.h
===================================================================
--- trunk/qgis/src/app/qgsgeomtypedialog.h 2009-09-27 01:19:07 UTC (rev 11718)
+++ trunk/qgis/src/app/qgsgeomtypedialog.h 2009-09-27 07:55:01 UTC (rev 11719)
@@ -1,52 +0,0 @@
-/***************************************************************************
- qgsgeomtypedialog.h - description
- -------------------
- begin : October 2004
- copyright : (C) 2004 by Marco Hugentobler
- email : marco.hugentobler at autoform.ch
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-/* $Id$ */
-#ifndef QGSGEOMTYPEDIALOG_H
-#define QGSGEOMTYPEDIALOG_H
-
-#include "ui_qgsgeomtypedialogbase.h"
-#include "qgisgui.h"
-#include "qgscontexthelp.h"
-
-#include "qgis.h"
-
-class QgsGeomTypeDialog: public QDialog, private Ui::QgsGeomTypeDialogBase
-{
- Q_OBJECT
- public:
- QgsGeomTypeDialog( QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags );
- ~QgsGeomTypeDialog();
- /**Returns the selected geometry type*/
- QGis::WkbType selectedType() const;
- /**Appends the chosen attribute names and types to at*/
- void attributes( std::list<std::pair<QString, QString> >& at ) const;
- /**Returns the file format for storage*/
- QString selectedFileFormat() const;
-
- protected slots:
- void on_mAddAttributeButton_clicked();
- void on_mRemoveAttributeButton_clicked();
- void on_buttonBox_helpRequested();
- void on_mTypeBox_currentIndexChanged( int index );
-
- private:
- QPushButton * mOkButton;
- static const int context_id = 165149618;
-
-};
-
-#endif //QGSGEOMTYPEDIALOG_H
Copied: trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp (from rev 11718, trunk/qgis/src/app/qgsgeomtypedialog.cpp)
===================================================================
--- trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp (rev 0)
+++ trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp 2009-09-27 07:55:01 UTC (rev 11719)
@@ -0,0 +1,123 @@
+/***************************************************************************
+ qgsnewvectorlayerdialog.cpp - description
+ -------------------
+ begin : October 2004
+ copyright : (C) 2004 by Marco Hugentobler
+ email : marco.hugentobler at autoform.ch
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+/* $Id$ */
+
+#include "qgsnewvectorlayerdialog.h"
+#include "qgsapplication.h"
+#include "qgisapp.h" // <- for theme icons
+#include "qgslogger.h"
+#include <QPushButton>
+
+QgsNewVectorLayerDialog::QgsNewVectorLayerDialog( QWidget *parent, Qt::WFlags fl )
+ : QDialog( parent, fl )
+{
+ setupUi( this );
+ mAddAttributeButton->setIcon( QgisApp::getThemeIcon( "/mActionNewAttribute.png" ) );
+ mRemoveAttributeButton->setIcon( QgisApp::getThemeIcon( "/mActionDeleteAttribute.png" ) );
+ mTypeBox->addItem( tr( "Text data" ), "String" );
+ mTypeBox->addItem( tr( "Whole number" ), "Integer" );
+ mTypeBox->addItem( tr( "Decimal number" ), "Real" );
+
+ mPointRadioButton->setChecked( true );
+ mFileFormatComboBox->addItem( tr( "ESRI Shapefile" ), "ESRI Shapefile" );
+ /* Disabled until provider properly supports editing the created file formats */
+ //mFileFormatComboBox->addItem( tr( "Comma Separated Value" ), "Comma Separated Value" );
+ //mFileFormatComboBox->addItem(tr( "GML"), "GML" );
+ //mFileFormatComboBox->addItem(tr( "Mapinfo File" ), "Mapinfo File" );
+ if ( mFileFormatComboBox->count() == 1 )
+ {
+ mFileFormatComboBox->setVisible( false );
+ mFileFormatLabel->setVisible( false );
+ }
+ mOkButton = buttonBox->button( QDialogButtonBox::Ok );
+ mOkButton->setEnabled( false );
+}
+
+QgsNewVectorLayerDialog::~QgsNewVectorLayerDialog()
+{
+}
+
+void QgsNewVectorLayerDialog::on_mTypeBox_currentIndexChanged( int index )
+{
+ mPrecision->setEnabled( index == 2 ); // Real
+}
+
+QGis::WkbType QgsNewVectorLayerDialog::selectedType() const
+{
+ if ( mPointRadioButton->isChecked() )
+ {
+ return QGis::WKBPoint;
+ }
+ else if ( mLineRadioButton->isChecked() )
+ {
+ return QGis::WKBLineString;
+ }
+ else if ( mPolygonRadioButton->isChecked() )
+ {
+ return QGis::WKBPolygon;
+ }
+ return QGis::WKBUnknown;
+}
+
+void QgsNewVectorLayerDialog::on_mAddAttributeButton_clicked()
+{
+ QString myName = mNameEdit->text();
+ QString myWidth = mWidth->text();
+ QString myPrecision = mPrecision->text();
+ //use userrole to avoid translated type string
+ QString myType = mTypeBox->itemData( mTypeBox->currentIndex(), Qt::UserRole ).toString();
+ mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << myName << myType << myWidth << myPrecision ) );
+ if ( mAttributeView->topLevelItemCount() > 0 )
+ {
+ mOkButton->setEnabled( true );
+ }
+ mNameEdit->clear();
+}
+
+void QgsNewVectorLayerDialog::on_mRemoveAttributeButton_clicked()
+{
+ delete( mAttributeView->currentItem() );
+ if ( mAttributeView->topLevelItemCount() == 0 )
+ {
+ mOkButton->setEnabled( false );
+ }
+}
+
+void QgsNewVectorLayerDialog::on_buttonBox_helpRequested()
+{
+ QgsContextHelp::run( context_id );
+}
+
+void QgsNewVectorLayerDialog::attributes( std::list<std::pair<QString, QString> >& at ) const
+{
+ QTreeWidgetItemIterator it( mAttributeView );
+ while ( *it )
+ {
+ QTreeWidgetItem *item = *it;
+ QString type = QString( "%1;%2;%3" ).arg( item->text( 1 ) ).arg( item->text( 2 ) ).arg( item->text( 3 ) );
+ at.push_back( std::make_pair( item->text( 0 ), type ) );
+ QgsDebugMsg( QString( "appending %1//%2" ).arg( item->text( 0 ) ).arg( type ) );
+ ++it;
+ }
+}
+
+QString QgsNewVectorLayerDialog::selectedFileFormat() const
+{
+ //use userrole to avoid translated type string
+ QString myType = mFileFormatComboBox->itemData( mFileFormatComboBox->currentIndex(), Qt::UserRole ).toString();
+ return myType;
+}
Property changes on: trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:mergeinfo
+
Added: svn:eol-style
+ native
Copied: trunk/qgis/src/app/qgsnewvectorlayerdialog.h (from rev 11718, trunk/qgis/src/app/qgsgeomtypedialog.h)
===================================================================
--- trunk/qgis/src/app/qgsnewvectorlayerdialog.h (rev 0)
+++ trunk/qgis/src/app/qgsnewvectorlayerdialog.h 2009-09-27 07:55:01 UTC (rev 11719)
@@ -0,0 +1,52 @@
+/***************************************************************************
+ qgsnewvectorlayerdialog.h - description
+ -------------------
+ begin : October 2004
+ copyright : (C) 2004 by Marco Hugentobler
+ email : marco.hugentobler at autoform.ch
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+/* $Id$ */
+#ifndef qgsnewvectorlayerdialog_H
+#define qgsnewvectorlayerdialog_H
+
+#include "ui_qgsnewvectorlayerdialogbase.h"
+#include "qgisgui.h"
+#include "qgscontexthelp.h"
+
+#include "qgis.h"
+
+class QgsNewVectorLayerDialog: public QDialog, private Ui::QgsNewVectorLayerDialogBase
+{
+ Q_OBJECT
+ public:
+ QgsNewVectorLayerDialog( QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags );
+ ~QgsNewVectorLayerDialog();
+ /**Returns the selected geometry type*/
+ QGis::WkbType selectedType() const;
+ /**Appends the chosen attribute names and types to at*/
+ void attributes( std::list<std::pair<QString, QString> >& at ) const;
+ /**Returns the file format for storage*/
+ QString selectedFileFormat() const;
+
+ protected slots:
+ void on_mAddAttributeButton_clicked();
+ void on_mRemoveAttributeButton_clicked();
+ void on_buttonBox_helpRequested();
+ void on_mTypeBox_currentIndexChanged( int index );
+
+ private:
+ QPushButton * mOkButton;
+ static const int context_id = 165149618;
+
+};
+
+#endif //qgsnewvectorlayerdialog_H
Property changes on: trunk/qgis/src/app/qgsnewvectorlayerdialog.h
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:mergeinfo
+
Added: svn:eol-style
+ native
Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.cpp 2009-09-27 01:19:07 UTC (rev 11718)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.cpp 2009-09-27 07:55:01 UTC (rev 11719)
@@ -1383,6 +1383,7 @@
QGis::WkbType vectortype,
const std::list<std::pair<QString, QString> >& attributes )
{
+ QgsDebugMsg( QString( "Creating empty vector layer with format: %1" ).arg( format ));
OGRSFDriverH driver;
QgsApplication::registerOgrDrivers();
driver = OGRGetDriverByName( format.toAscii() );
Deleted: trunk/qgis/src/ui/qgsaddattrdialogbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsaddattrdialogbase.ui 2009-09-27 01:19:07 UTC (rev 11718)
+++ trunk/qgis/src/ui/qgsaddattrdialogbase.ui 2009-09-27 07:55:01 UTC (rev 11719)
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>QgsAddAttrDialogBase</class>
- <widget class="QDialog" name="QgsAddAttrDialogBase">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>356</width>
- <height>207</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Add Attribute</string>
- </property>
- <property name="modal">
- <bool>true</bool>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="textLabel1">
- <property name="text">
- <string>Name:</string>
- </property>
- <property name="buddy">
- <cstring>mNameEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="mNameEdit"/>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="textLabel1_2">
- <property name="text">
- <string>Comment:</string>
- </property>
- <property name="buddy">
- <cstring>mCommentEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="mCommentEdit"/>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="textLabel2">
- <property name="text">
- <string>Type:</string>
- </property>
- <property name="buddy">
- <cstring>mTypeBox</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QComboBox" name="mTypeBox"/>
- </item>
- <item row="3" column="1">
- <widget class="QLabel" name="mTypeName">
- <property name="text">
- <string>Type:</string>
- </property>
- <property name="buddy">
- <cstring>mTypeBox</cstring>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="textLabel2_2">
- <property name="text">
- <string>Width</string>
- </property>
- <property name="buddy">
- <cstring>mLength</cstring>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QSpinBox" name="mLength"/>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="textLabel2_3">
- <property name="text">
- <string>Precision</string>
- </property>
- <property name="buddy">
- <cstring>mPrec</cstring>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QSpinBox" name="mPrec"/>
- </item>
- <item row="6" column="1">
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <tabstops>
- <tabstop>mNameEdit</tabstop>
- <tabstop>mTypeBox</tabstop>
- </tabstops>
- <resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>QgsAddAttrDialogBase</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>260</x>
- <y>109</y>
- </hint>
- <hint type="destinationlabel">
- <x>307</x>
- <y>68</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>QgsAddAttrDialogBase</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>196</x>
- <y>106</y>
- </hint>
- <hint type="destinationlabel">
- <x>6</x>
- <y>77</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>
Modified: trunk/qgis/src/ui/qgsattributetabledialog.ui
===================================================================
--- trunk/qgis/src/ui/qgsattributetabledialog.ui 2009-09-27 01:19:07 UTC (rev 11718)
+++ trunk/qgis/src/ui/qgsattributetabledialog.ui 2009-09-27 07:55:01 UTC (rev 11719)
@@ -43,7 +43,7 @@
<item>
<widget class="QToolButton" name="mRemoveSelectionButton" >
<property name="toolTip" >
- <string>Remove selection</string>
+ <string>Unselect all</string>
</property>
<property name="text" >
<string/>
@@ -65,7 +65,7 @@
<item>
<widget class="QToolButton" name="mSelectedToTopButton" >
<property name="toolTip" >
- <string>Move selected to top</string>
+ <string>Move selection to top</string>
</property>
<property name="text" >
<string/>
Modified: trunk/qgis/src/ui/qgsgeomtypedialogbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsgeomtypedialogbase.ui 2009-09-27 01:19:07 UTC (rev 11718)
+++ trunk/qgis/src/ui/qgsgeomtypedialogbase.ui 2009-09-27 07:55:01 UTC (rev 11719)
@@ -1,58 +1,64 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
+<ui version="4.0" >
<class>QgsGeomTypeDialogBase</class>
- <widget class="QDialog" name="QgsGeomTypeDialogBase">
- <property name="geometry">
+ <widget class="QDialog" name="QgsGeomTypeDialogBase" >
+ <property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
- <width>353</width>
- <height>397</height>
+ <width>364</width>
+ <height>466</height>
</rect>
</property>
- <property name="windowTitle">
+ <property name="windowTitle" >
<string>New Vector Layer</string>
</property>
- <property name="modal">
+ <property name="modal" >
<bool>true</bool>
</property>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="mFileFormatLabel">
- <property name="text">
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="mFileFormatLabel" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="text" >
<string>File format</string>
</property>
- <property name="buddy">
+ <property name="buddy" >
<cstring>mFileFormatComboBox</cstring>
</property>
</widget>
</item>
- <item row="0" column="1" colspan="3">
- <widget class="QComboBox" name="mFileFormatComboBox"/>
+ <item row="0" column="1" colspan="2" >
+ <widget class="QComboBox" name="mFileFormatComboBox" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ </widget>
</item>
- <item row="1" column="0" colspan="4">
- <widget class="QGroupBox" name="buttonGroup1">
- <property name="title">
+ <item row="1" column="0" colspan="3" >
+ <widget class="QGroupBox" name="buttonGroup1" >
+ <property name="title" >
<string>Type</string>
</property>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QRadioButton" name="mPointRadioButton">
- <property name="text">
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QRadioButton" name="mPointRadioButton" >
+ <property name="text" >
<string>Point</string>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QRadioButton" name="mLineRadioButton">
- <property name="text">
+ <item row="0" column="1" >
+ <widget class="QRadioButton" name="mLineRadioButton" >
+ <property name="text" >
<string>Line</string>
</property>
</widget>
</item>
- <item row="0" column="2">
- <widget class="QRadioButton" name="mPolygonRadioButton">
- <property name="text">
+ <item row="0" column="2" >
+ <widget class="QRadioButton" name="mPolygonRadioButton" >
+ <property name="text" >
<string>Polygon</string>
</property>
</widget>
@@ -60,149 +66,161 @@
</layout>
</widget>
</item>
- <item row="2" column="0" colspan="4">
- <widget class="QLabel" name="mAttributeLabel">
- <property name="text">
+ <item row="2" column="0" colspan="3" >
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
<string>Attributes</string>
</property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="textLabel1" >
+ <property name="text" >
+ <string>Name</string>
+ </property>
+ <property name="buddy" >
+ <cstring>mNameEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="3" >
+ <widget class="QLineEdit" name="mNameEdit" />
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="textLabel2" >
+ <property name="text" >
+ <string>Type</string>
+ </property>
+ <property name="buddy" >
+ <cstring>mTypeBox</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" colspan="3" >
+ <widget class="QComboBox" name="mTypeBox" />
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Width</string>
+ </property>
+ <property name="buddy" >
+ <cstring>mWidth</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLineEdit" name="mWidth" />
+ </item>
+ <item row="2" column="2" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Precision</string>
+ </property>
+ <property name="buddy" >
+ <cstring>mPrecision</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3" >
+ <widget class="QLineEdit" name="mPrecision" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
- <item row="3" column="0">
- <widget class="QLabel" name="textLabel1">
- <property name="text">
- <string>Name</string>
+ <item row="3" column="0" colspan="2" >
+ <widget class="QToolButton" name="mRemoveAttributeButton" >
+ <property name="toolTip" >
+ <string>Delete selected attribute</string>
</property>
- <property name="buddy">
- <cstring>mNameEdit</cstring>
+ <property name="text" >
+ <string>Removed selected item below</string>
</property>
- </widget>
- </item>
- <item row="3" column="1" colspan="3">
- <widget class="QLineEdit" name="mNameEdit"/>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="textLabel2">
- <property name="text">
- <string>Type</string>
+ <property name="icon" >
+ <iconset>../../images/themes/default/mActionDeleteAttribute.png</iconset>
</property>
- <property name="buddy">
- <cstring>mTypeBox</cstring>
+ <property name="toolButtonStyle" >
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
- <item row="4" column="1" colspan="3">
- <widget class="QComboBox" name="mTypeBox"/>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Width</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QLineEdit" name="mWidth"/>
- </item>
- <item row="6" column="2">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Precision</string>
- </property>
- </widget>
- </item>
- <item row="6" column="3">
- <widget class="QLineEdit" name="mPrecision">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="13" column="0" colspan="4">
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QToolButton" name="mRemoveAttributeButton">
- <property name="toolTip">
- <string>Delete selected attribute</string>
- </property>
- <property name="text">
- <string>...</string>
- </property>
- <property name="icon">
- <iconset>
- <normaloff>../../images/themes/default/mActionDeleteAttribute.png</normaloff>../../images/themes/default/mActionDeleteAttribute.png</iconset>
- </property>
- </widget>
- </item>
- <item row="7" column="3">
- <widget class="QToolButton" name="mAddAttributeButton">
- <property name="toolTip">
+ <item row="3" column="2" >
+ <widget class="QToolButton" name="mAddAttributeButton" >
+ <property name="toolTip" >
<string>Add attribute</string>
</property>
- <property name="layoutDirection">
+ <property name="layoutDirection" >
<enum>Qt::RightToLeft</enum>
</property>
- <property name="text">
- <string>...</string>
+ <property name="text" >
+ <string>Add to list below</string>
</property>
- <property name="icon">
- <iconset>
- <normaloff>../../images/themes/default/mActionNewAttribute.png</normaloff>../../images/themes/default/mActionNewAttribute.png</iconset>
+ <property name="icon" >
+ <iconset>../../images/themes/default/mActionNewAttribute.png</iconset>
</property>
+ <property name="toolButtonStyle" >
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
</widget>
</item>
- <item row="12" column="0" colspan="4">
- <widget class="QTreeWidget" name="mAttributeView">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <item row="4" column="0" colspan="3" >
+ <widget class="QTreeWidget" name="mAttributeView" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="alternatingRowColors">
+ <property name="alternatingRowColors" >
<bool>true</bool>
</property>
- <property name="rootIsDecorated">
+ <property name="rootIsDecorated" >
<bool>false</bool>
</property>
- <property name="columnCount">
+ <property name="columnCount" >
<number>4</number>
</property>
<column>
- <property name="text">
+ <property name="text" >
<string>Name</string>
</property>
</column>
<column>
- <property name="text">
+ <property name="text" >
<string>Type</string>
</property>
</column>
<column>
- <property name="text">
+ <property name="text" >
<string>Width</string>
</property>
</column>
<column>
- <property name="text">
+ <property name="text" >
<string>Precision</string>
</property>
</column>
</widget>
</item>
+ <item row="5" column="0" colspan="3" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
- <layoutdefault spacing="6" margin="11"/>
+ <layoutdefault spacing="6" margin="11" />
<tabstops>
<tabstop>mFileFormatComboBox</tabstop>
<tabstop>mPointRadioButton</tabstop>
@@ -210,6 +228,10 @@
<tabstop>mPolygonRadioButton</tabstop>
<tabstop>mNameEdit</tabstop>
<tabstop>mTypeBox</tabstop>
+ <tabstop>mWidth</tabstop>
+ <tabstop>mPrecision</tabstop>
+ <tabstop>mRemoveAttributeButton</tabstop>
+ <tabstop>mAddAttributeButton</tabstop>
<tabstop>mAttributeView</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
@@ -221,11 +243,11 @@
<receiver>QgsGeomTypeDialogBase</receiver>
<slot>accept()</slot>
<hints>
- <hint type="sourcelabel">
+ <hint type="sourcelabel" >
<x>349</x>
<y>400</y>
</hint>
- <hint type="destinationlabel">
+ <hint type="destinationlabel" >
<x>387</x>
<y>304</y>
</hint>
@@ -237,11 +259,11 @@
<receiver>QgsGeomTypeDialogBase</receiver>
<slot>reject()</slot>
<hints>
- <hint type="sourcelabel">
+ <hint type="sourcelabel" >
<x>275</x>
<y>400</y>
</hint>
- <hint type="destinationlabel">
+ <hint type="destinationlabel" >
<x>242</x>
<y>308</y>
</hint>
Copied: trunk/qgis/src/ui/qgsnewvectorlayerdialogbase.ui (from rev 11718, trunk/qgis/src/ui/qgsaddattrdialogbase.ui)
===================================================================
--- trunk/qgis/src/ui/qgsnewvectorlayerdialogbase.ui (rev 0)
+++ trunk/qgis/src/ui/qgsnewvectorlayerdialogbase.ui 2009-09-27 07:55:01 UTC (rev 11719)
@@ -0,0 +1,320 @@
+<ui version="4.0" >
+ <class>QgsNewVectorLayerDialogBase</class>
+ <widget class="QDialog" name="QgsNewVectorLayerDialogBase" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>364</width>
+ <height>488</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>New Vector Layer</string>
+ </property>
+ <property name="modal" >
+ <bool>true</bool>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="mFileFormatLabel" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="text" >
+ <string>File format</string>
+ </property>
+ <property name="buddy" >
+ <cstring>mFileFormatComboBox</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QComboBox" name="mFileFormatComboBox" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="2" >
+ <widget class="QGroupBox" name="buttonGroup1" >
+ <property name="title" >
+ <string>Type</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QRadioButton" name="mPointRadioButton" >
+ <property name="text" >
+ <string>Point</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QRadioButton" name="mLineRadioButton" >
+ <property name="text" >
+ <string>Line</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2" >
+ <widget class="QRadioButton" name="mPolygonRadioButton" >
+ <property name="text" >
+ <string>Polygon</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="2" >
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>New attribute</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="textLabel1" >
+ <property name="text" >
+ <string>Name</string>
+ </property>
+ <property name="buddy" >
+ <cstring>mNameEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="4" >
+ <widget class="QLineEdit" name="mNameEdit" />
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="textLabel2" >
+ <property name="text" >
+ <string>Type</string>
+ </property>
+ <property name="buddy" >
+ <cstring>mTypeBox</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" colspan="4" >
+ <widget class="QComboBox" name="mTypeBox" />
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Width</string>
+ </property>
+ <property name="buddy" >
+ <cstring>mWidth</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="2" >
+ <widget class="QLineEdit" name="mWidth" />
+ </item>
+ <item row="2" column="3" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Precision</string>
+ </property>
+ <property name="buddy" >
+ <cstring>mPrecision</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="4" >
+ <widget class="QLineEdit" name="mPrecision" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>121</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="2" colspan="3" >
+ <widget class="QToolButton" name="mAddAttributeButton" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Add attribute to list</string>
+ </property>
+ <property name="layoutDirection" >
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text" >
+ <string>Add to attributes list</string>
+ </property>
+ <property name="icon" >
+ <iconset>../../images/themes/default/mActionNewAttribute.png</iconset>
+ </property>
+ <property name="toolButtonStyle" >
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2" >
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="title" >
+ <string>Attributes list</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" colspan="2" >
+ <widget class="QTreeWidget" name="mAttributeView" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="alternatingRowColors" >
+ <bool>true</bool>
+ </property>
+ <property name="rootIsDecorated" >
+ <bool>false</bool>
+ </property>
+ <property name="columnCount" >
+ <number>4</number>
+ </property>
+ <column>
+ <property name="text" >
+ <string>Name</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Type</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Width</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Precision</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>121</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QToolButton" name="mRemoveAttributeButton" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Delete selected attribute</string>
+ </property>
+ <property name="text" >
+ <string>Removed selected attribute</string>
+ </property>
+ <property name="icon" >
+ <iconset>../../images/themes/default/mActionDeleteAttribute.png</iconset>
+ </property>
+ <property name="toolButtonStyle" >
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="4" column="0" colspan="2" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <tabstops>
+ <tabstop>mFileFormatComboBox</tabstop>
+ <tabstop>mPointRadioButton</tabstop>
+ <tabstop>mLineRadioButton</tabstop>
+ <tabstop>mPolygonRadioButton</tabstop>
+ <tabstop>mNameEdit</tabstop>
+ <tabstop>mTypeBox</tabstop>
+ <tabstop>mWidth</tabstop>
+ <tabstop>mPrecision</tabstop>
+ <tabstop>mAddAttributeButton</tabstop>
+ <tabstop>mAttributeView</tabstop>
+ <tabstop>mRemoveAttributeButton</tabstop>
+ <tabstop>buttonBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>QgsNewVectorLayerDialogBase</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>349</x>
+ <y>400</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>387</x>
+ <y>304</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>QgsNewVectorLayerDialogBase</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>275</x>
+ <y>400</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>242</x>
+ <y>308</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
Property changes on: trunk/qgis/src/ui/qgsnewvectorlayerdialogbase.ui
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:mergeinfo
+
Added: svn:eol-style
+ native
More information about the QGIS-commit
mailing list