Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qgis/Quantum-GIS
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Oct 21, 2011
2 parents 2ef1772 + b0112f1 commit 513f1c3
Show file tree
Hide file tree
Showing 46 changed files with 12,126 additions and 9,400 deletions.
1,732 changes: 931 additions & 801 deletions i18n/qgis_de.ts

Large diffs are not rendered by default.

17,606 changes: 9,881 additions & 7,725 deletions i18n/qgis_hr_HR.ts

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions i18n/qgis_it.ts
Expand Up @@ -2230,7 +2230,7 @@ Disabilita l'opzione "Usa estensioni di intersezione" per ottener
</message>
<message>
<source>Select directory with GDAL executables</source>
<translation>Scegli la cartella contenente gli eseguibili GDAL</translation>
<translation>Scegli la cartella contenente gli eseguibili di GDAL</translation>
</message>
<message>
<source>Select directory with the GDAL documentation</source>
Expand Down Expand Up @@ -10247,7 +10247,7 @@ p, li { white-space: pre-wrap; }
<message>
<location filename="../src/ui/qgsannotationwidgetbase.ui" line="50"/>
<source>Frame width</source>
<translation>Larghezza del riquadro</translation>
<translation>Spessore del riquadro</translation>
</message>
<message>
<location filename="../src/ui/qgsannotationwidgetbase.ui" line="67"/>
Expand Down Expand Up @@ -29412,7 +29412,7 @@ p, li { white-space: pre-wrap; }
<message>
<location filename="../src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.cpp" line="107"/>
<source>Calculating </source>
<translation>Calcolo in corso</translation>
<translation>Calcolo in corso </translation>
</message>
<message>
<location filename="../src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.cpp" line="107"/>
Expand Down Expand Up @@ -30992,7 +30992,7 @@ p, li { white-space: pre-wrap; }
<message>
<location filename="../src/plugins/spatialquery/qgsspatialquerydialogbase.ui" line="332"/>
<source>Zoom to item</source>
<translation>Zomm all&apos;oggetto</translation>
<translation>Zoom all&apos;oggetto</translation>
</message>
<message>
<location filename="../src/plugins/spatialquery/qgsspatialquerydialogbase.ui" line="353"/>
Expand Down
7 changes: 7 additions & 0 deletions images/images.qrc
Expand Up @@ -353,6 +353,13 @@
<file>themes/default/plugins/north_arrow.png</file>
<file>themes/default/plugins/scale_bar.png</file>
<file>themes/default/mActionAddWfsLayer.png</file>
<file>themes/gis/mIconWms.png</file>
<file>themes/gis/mIconWfs.png</file>
<file>themes/gis/mIconSpatialite.png</file>
<file>themes/gis/mIconRaster.png</file>
<file>themes/gis/mIconPostgis.png</file>
<file>themes/gis/mIconConnect.png</file>
<file>themes/gis/mIconDbSchema.png</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
Expand Down
Binary file added images/themes/gis/mIconConnect.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/themes/gis/mIconDbSchema.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/themes/gis/mIconPostgis.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/themes/gis/mIconRaster.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/themes/gis/mIconSpatialite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/themes/gis/mIconWfs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/themes/gis/mIconWms.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/app/qgsbrowserdockwidget.cpp
Expand Up @@ -269,7 +269,7 @@ void QgsBrowserDockWidget::refreshModel( const QModelIndex& index )
for ( int i = 0 ; i < mModel->rowCount( index ); i++ )
{
QModelIndex idx = mModel->index( i, 0, index );
if ( mBrowserView->isExpanded( idx ) )
if ( mBrowserView->isExpanded( idx ) || !mModel->hasChildren( idx ) )
{
refreshModel( idx );
}
Expand Down
1 change: 1 addition & 0 deletions src/app/qgslabelinggui.cpp
Expand Up @@ -62,6 +62,7 @@ QgsLabelingGui::QgsLabelingGui( QgsPalLabeling* lbl, QgsVectorLayer* layer, QgsM
}

chkMergeLines->setEnabled( layer->geometryType() == QGis::Line );
chkAddDirectionSymbol->setEnabled( layer->geometryType() == QGis::Line );
label_19->setEnabled( layer->geometryType() != QGis::Point );
mMinSizeSpinBox->setEnabled( layer->geometryType() != QGis::Point );

Expand Down
2 changes: 2 additions & 0 deletions src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -176,6 +176,8 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
cboGreen->addItem( myRasterBandName );
cboBlue->addItem( myRasterBandName );
cboxColorMapBand->addItem( myRasterBandName );
cboxTransparencyBand->addItem( myRasterBandName );
cboxTransparencyBand->setEnabled( true );
}

cboRed->addItem( TRSTRING_NOT_SET );
Expand Down
2 changes: 1 addition & 1 deletion src/browser/qgsbrowser.cpp
Expand Up @@ -531,7 +531,7 @@ void QgsBrowser::refresh( const QModelIndex& index )
for ( int i = 0 ; i < mModel->rowCount( index ); i++ )
{
QModelIndex idx = mModel->index( i, 0, index );
if ( treeView->isExpanded( idx ) )
if ( treeView->isExpanded( idx ) || !mModel->hasChildren( idx ) )
{
refresh( idx );
}
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgsbrowsermodel.cpp
Expand Up @@ -134,6 +134,10 @@ QVariant QgsBrowserModel::data( const QModelIndex &index, int role ) const
{
return item->name();
}
else if ( role == Qt::ToolTipRole )
{
return item->toolTip();
}
else if ( role == Qt::DecorationRole && index.column() == 0 )
{
return item->icon();
Expand Down
35 changes: 35 additions & 0 deletions src/core/qgsdataitem.cpp
Expand Up @@ -76,6 +76,16 @@ const QIcon &QgsLayerItem::iconTable()
return icon;
}

const QIcon &QgsLayerItem::iconRaster()
{
static QIcon icon;

if ( icon.isNull() )
icon = QIcon( getThemePixmap( "/mIconRaster.png" ) );

return icon;
}

const QIcon &QgsLayerItem::iconDefault()
{
static QIcon icon;
Expand All @@ -86,6 +96,16 @@ const QIcon &QgsLayerItem::iconDefault()
return icon;
}

const QIcon &QgsDataCollectionItem::iconDataCollection()
{
static QIcon icon;

if ( icon.isNull() )
icon = QIcon( getThemePixmap( "/mIconDbSchema.png" ) );

return icon;
}

const QIcon &QgsDataCollectionItem::iconDir()
{
static QIcon icon;
Expand Down Expand Up @@ -277,6 +297,7 @@ QgsLayerItem::QgsLayerItem( QgsDataItem* parent, QString name, QString path, QSt
case Line: mIcon = iconLine(); break;
case Polygon: mIcon = iconPolygon(); break;
case TableLayer: mIcon = iconTable(); break;
case Raster: mIcon = iconRaster(); break;
default: mIcon = iconDefault(); break;
}
}
Expand Down Expand Up @@ -304,6 +325,7 @@ bool QgsLayerItem::equal( const QgsDataItem *other )
QgsDataCollectionItem::QgsDataCollectionItem( QgsDataItem* parent, QString name, QString path )
: QgsDataItem( Collection, parent, name, path )
{
mIcon = iconDataCollection();
}

QgsDataCollectionItem::~QgsDataCollectionItem()
Expand Down Expand Up @@ -565,3 +587,16 @@ void QgsDirectoryParamWidget::showHideColumn()
}
settings.setValue( "/dataitem/directoryHiddenColumns", lst );
}


QgsErrorItem::QgsErrorItem( QgsDataItem* parent, QString error, QString path )
: QgsDataItem( QgsDataItem::Error, parent, error, path )
{
mIcon = QIcon( getThemePixmap( "/mIconDelete.png" ) );

mPopulated = true; // no more children
}

QgsErrorItem::~QgsErrorItem()
{
}
25 changes: 25 additions & 0 deletions src/core/qgsdataitem.h
Expand Up @@ -46,6 +46,7 @@ class CORE_EXPORT QgsDataItem : public QObject
Collection,
Directory,
Layer,
Error,
};

QgsDataItem( QgsDataItem::Type type, QgsDataItem* parent, QString name, QString path );
Expand Down Expand Up @@ -111,6 +112,9 @@ class CORE_EXPORT QgsDataItem : public QObject

void setIcon( QIcon icon ) { mIcon = icon; }

void setToolTip( QString msg ) { mToolTip = msg; }
QString toolTip() const { return mToolTip; }

protected:

Type mType;
Expand All @@ -119,6 +123,7 @@ class CORE_EXPORT QgsDataItem : public QObject
bool mPopulated;
QString mName;
QString mPath; // it is also used to identify item in tree
QString mToolTip;
QIcon mIcon;

public slots:
Expand Down Expand Up @@ -179,6 +184,7 @@ class CORE_EXPORT QgsLayerItem : public QgsDataItem
static const QIcon &iconLine();
static const QIcon &iconPolygon();
static const QIcon &iconTable();
static const QIcon &iconRaster();
static const QIcon &iconDefault();
};

Expand All @@ -195,6 +201,7 @@ class CORE_EXPORT QgsDataCollectionItem : public QgsDataItem
void addChild( QgsDataItem *item ) { mChildren.append( item ); }

static const QIcon &iconDir(); // shared icon: open/closed directory
static const QIcon &iconDataCollection(); // default icon for data collection
};

/** A directory: contains subdirectories and layers */
Expand Down Expand Up @@ -225,6 +232,24 @@ class CORE_EXPORT QgsDirectoryItem : public QgsDataCollectionItem
static QVector<QLibrary*> mLibraries;
};

/**
Data item that can be used to report problems (e.g. network error)
*/
class CORE_EXPORT QgsErrorItem : public QgsDataItem
{
Q_OBJECT
public:

QgsErrorItem( QgsDataItem* parent, QString error, QString path );
~QgsErrorItem();

//QVector<QgsDataItem*> createChildren();
//virtual bool equal( const QgsDataItem *other );
};


// ---------

class QgsDirectoryParamWidget : public QTreeWidget
{
Q_OBJECT
Expand Down

0 comments on commit 513f1c3

Please sign in to comment.