Skip to content
Permalink
Browse files
Merge branch 'master' of https://github.com/qgis/Quantum-GIS
  • Loading branch information
volaya committed Dec 12, 2012
2 parents d401a6e + f218a39 commit 260b4a19d2dd124f17fb66a1fed746bd5e96712a
@@ -0,0 +1,241 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
id="svg2"
version="1.1"
inkscape:version="0.48.2 r9819"
sodipodi:docname="north-arrow_0_qgis_decoration.svg">
<title
id="title3281">clean</title>
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.375"
inkscape:cx="7.384133"
inkscape:cy="51.75386"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="false"
inkscape:window-width="1853"
inkscape:window-height="1203"
inkscape:window-x="0"
inkscape:window-y="22"
inkscape:window-maximized="0"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>clean</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="SVG"
style="display:inline">
<path
d="m 28.733399,1.9303007 2.099609,0 2.651367,5 0,-5 1.782226,0 0,7.2900391 -2.099609,0 -2.651367,-5 0,5 -1.782227,0 0,-7.2900391"
id="path3135"
inkscape:connector-curvature="0" />
<g
transform="translate(0.17718469,-988.35782)"
style="fill:#000000;display:inline"
id="g3157">
<g
transform="matrix(0.99994712,0.010284,-0.010284,0.99994712,10.534756,-0.27307416)"
id="g3031"
style="fill:#000000">
<path
sodipodi:type="star"
id="path3011"
sodipodi:sides="3"
sodipodi:cx="28.38015"
sodipodi:cy="30.634148"
sodipodi:r1="10.753833"
sodipodi:r2="5.3769169"
sodipodi:arg1="1.0273187"
sodipodi:arg2="2.0745163"
inkscape:flatsided="false"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 33.941125,39.83852 -8.156342,-4.495306 -8.156341,-4.495307 7.97122,-4.815946 7.971221,-4.815946 0.185121,9.311253 z"
transform="matrix(1.4982981,0.00865322,-0.03303257,0.39249441,-17.738736,1012.0075)"
inkscape:transform-center-x="4.0139764"
inkscape:transform-center-y="0.0045815852"
style="fill:#000000" />
<path
sodipodi:type="star"
id="path3011-1"
sodipodi:sides="3"
sodipodi:cx="28.38015"
sodipodi:cy="30.634148"
sodipodi:r1="10.753833"
sodipodi:r2="5.3769169"
sodipodi:arg1="1.0273187"
sodipodi:arg2="2.0745163"
inkscape:flatsided="false"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 33.941125,39.83852 -8.156342,-4.495306 -8.156341,-4.495307 7.97122,-4.815946 7.971221,-4.815946 0.185121,9.311253 z"
transform="matrix(-1.4981048,0.02557574,0.02405792,-0.39314657,81.652122,1035.2953)"
inkscape:transform-center-x="-4.0014193"
inkscape:transform-center-y="0.17954567"
style="fill:#000000;display:inline" />
</g>
<g
id="g3031-7"
style="fill:#000000;display:inline"
transform="matrix(0.01553881,-0.99987927,0.99987927,0.01553881,-992.37479,1040.4582)">
<path
sodipodi:type="star"
id="path3011-4"
sodipodi:sides="3"
sodipodi:cx="28.38015"
sodipodi:cy="30.634148"
sodipodi:r1="10.753833"
sodipodi:r2="5.3769169"
sodipodi:arg1="1.0273187"
sodipodi:arg2="2.0745163"
inkscape:flatsided="false"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 33.941125,39.83852 -8.156342,-4.495306 -8.156341,-4.495307 7.97122,-4.815946 7.971221,-4.815946 0.185121,9.311253 z"
transform="matrix(1.4982981,0.00865322,-0.03303257,0.39249441,-17.738736,1012.0075)"
inkscape:transform-center-x="4.0139764"
inkscape:transform-center-y="0.0045815852"
style="fill:#000000" />
<path
sodipodi:type="star"
id="path3011-1-0"
sodipodi:sides="3"
sodipodi:cx="28.38015"
sodipodi:cy="30.634148"
sodipodi:r1="10.753833"
sodipodi:r2="5.3769169"
sodipodi:arg1="1.0273187"
sodipodi:arg2="2.0745163"
inkscape:flatsided="false"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 33.941125,39.83852 -8.156342,-4.495306 -8.156341,-4.495307 7.97122,-4.815946 7.971221,-4.815946 0.185121,9.311253 z"
transform="matrix(-1.4981048,0.02557574,0.02405792,-0.39314657,81.652122,1035.2953)"
inkscape:transform-center-x="-4.0014193"
inkscape:transform-center-y="0.17954567"
style="fill:#000000;display:inline" />
</g>
</g>
<g
transform="translate(-0.1276863,-988.65554)"
style="display:inline"
id="g3233">
<g
id="g3214">
<g
id="g3081"
transform="matrix(0.99818577,-0.06020931,0.06020931,0.99818577,-61.604173,3.7721126)"
style="fill:#000000">
<path
inkscape:transform-center-y="1.7054032"
inkscape:transform-center-x="-1.2984237"
transform="matrix(0.28352309,0.23690893,0.13287844,0.23707335,23.517817,1014.0608)"
d="M 49.665262,48.084105 26.499758,45.159307 3.3342545,42.234504 17.449956,23.634988 31.565661,5.0354748 40.615463,26.559789 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="false"
sodipodi:arg2="1.6963885"
sodipodi:arg1="0.64919095"
sodipodi:r2="13.480791"
sodipodi:r1="26.961578"
sodipodi:cy="31.784695"
sodipodi:cx="28.188393"
sodipodi:sides="3"
id="path3061"
style="fill:#000000"
sodipodi:type="star" />
<path
inkscape:transform-center-y="-2.6641536"
transform="matrix(-0.28352309,-0.23690893,-0.13287844,-0.23707335,40.064338,1034.189)"
d="M 49.665262,48.084105 26.499758,45.159307 3.3342545,42.234504 17.449956,23.634988 31.565661,5.0354748 40.615463,26.559789 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="false"
sodipodi:arg2="1.6963885"
sodipodi:arg1="0.64919095"
sodipodi:r2="13.480791"
sodipodi:r1="26.961578"
sodipodi:cy="31.784695"
sodipodi:cx="28.188393"
sodipodi:sides="3"
id="path3061-9"
style="fill:#000000;display:inline"
sodipodi:type="star" />
</g>
<g
style="fill:#000000;display:inline"
id="g3081-4"
transform="matrix(-0.0065556,-0.99997851,0.99997851,-0.0065556,-991.48742,1062.4861)">
<path
inkscape:transform-center-y="1.7054032"
inkscape:transform-center-x="-1.2984237"
transform="matrix(0.28352309,0.23690893,0.13287844,0.23707335,23.517817,1014.0608)"
d="M 49.665262,48.084105 26.499758,45.159307 3.3342545,42.234504 17.449956,23.634988 31.565661,5.0354748 40.615463,26.559789 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="false"
sodipodi:arg2="1.6963885"
sodipodi:arg1="0.64919095"
sodipodi:r2="13.480791"
sodipodi:r1="26.961578"
sodipodi:cy="31.784695"
sodipodi:cx="28.188393"
sodipodi:sides="3"
id="path3061-8"
style="fill:#000000"
sodipodi:type="star" />
<path
inkscape:transform-center-y="-2.6641536"
transform="matrix(-0.28352309,-0.23690893,-0.13287844,-0.23707335,40.064338,1034.189)"
d="M 49.665262,48.084105 26.499758,45.159307 3.3342545,42.234504 17.449956,23.634988 31.565661,5.0354748 40.615463,26.559789 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="false"
sodipodi:arg2="1.6963885"
sodipodi:arg1="0.64919095"
sodipodi:r2="13.480791"
sodipodi:r1="26.961578"
sodipodi:cy="31.784695"
sodipodi:cx="28.188393"
sodipodi:sides="3"
id="path3061-9-8"
style="fill:#000000;display:inline"
sodipodi:type="star" />
</g>
</g>
</g>
</g>
</svg>
@@ -76,6 +76,6 @@ class QgsDistanceArea
static QString textUnit( double value, int decimals, QGis::UnitType u, bool isArea, bool keepBaseUnit = false );

//! Helper for conversion between physical units
void convertMeasurement( double &measure, QGis::UnitType &measureUnits, QGis::UnitType displayUnits, bool isArea );
void convertMeasurement( double &measure /In,Out/, QGis::UnitType &measureUnits /In,Out/, QGis::UnitType displayUnits, bool isArea );

};
@@ -32,7 +32,7 @@ for i in $(<files); do
author=volayaf
;;

src/app/gps/qwtpolar-*|src/app/qtmain_android.cpp|src/core/spatialite/*|src/core/spatialindex/src/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
src/app/gps/qwtpolar-*|src/app/qtmain_android.cpp|src/core/spatialite/*|src/core/spatialindex/src/*|src/core/gps/qextserialport/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
# Skip third party files
echo $f skipped
continue
@@ -28,6 +28,8 @@
#include "qgsmapcanvas.h"
#include "qgsattributeaction.h"
#include "qgsfeatureaction.h"
#include "qgslogger.h"
#include "qgsnetworkaccessmanager.h"

#include <QCloseEvent>
#include <QLabel>
@@ -46,7 +48,36 @@
#include <QDesktopServices>
#include <QMessageBox>

#include "qgslogger.h"
QgsWebView::QgsWebView( QWidget *parent ) : QWebView( parent )
{
page()->setNetworkAccessManager( QgsNetworkAccessManager::instance() );
page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
settings()->setAttribute( QWebSettings::LocalContentCanAccessRemoteUrls, true );
#ifdef QGISDEBUG
settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled, true );
#endif
}

void QgsWebView::print( void )
{
QPrinter printer;
QPrintDialog *dialog = new QPrintDialog( &printer );
if ( dialog->exec() == QDialog::Accepted )
QWebView::print( &printer );
}

void QgsWebView::contextMenuEvent( QContextMenuEvent *e )
{
QMenu *menu = page()->createStandardContextMenu();
if ( menu )
{
QAction *action = new QAction( tr( "Print" ), this );
connect( action, SIGNAL( triggered() ), this, SLOT( print() ) );
menu->addAction( action );
menu->exec( e->globalPos() );
delete menu;
}
}

class QgsIdentifyResultsDock : public QDockWidget
{
@@ -289,15 +320,9 @@ void QgsIdentifyResults::addFeature( QgsRasterLayer *layer,
QTreeWidgetItem *attrItem = new QTreeWidgetItem( QStringList() << attributes.begin().key() << "" );
featItem->addChild( attrItem );

QWebView *wv = new QWebView( attrItem->treeWidget() );
QgsWebView *wv = new QgsWebView( attrItem->treeWidget() );
wv->setHtml( attributes.begin().value() );
wv->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );

QAction *action = new QAction( tr( "Print" ), wv );
connect( action, SIGNAL( triggered() ), this, SLOT( print() ) );
wv->insertAction( 0, action );

wv->setContextMenuPolicy( Qt::ActionsContextMenu );
mPrintToolButton->setVisible( true );

connect( wv, SIGNAL( linkClicked( const QUrl & ) ), this, SLOT( openUrl( const QUrl & ) ) );
@@ -1040,22 +1065,6 @@ void QgsIdentifyResults::openUrl( const QUrl &url )
}
}

void QgsIdentifyResults::print()
{
QAction *action = qobject_cast<QAction*>( sender() );
if ( !action )
return;

QWebView *wv = qobject_cast<QWebView*>( action->parent() );
if ( !wv )
return;

QPrinter printer;
QPrintDialog *dialog = new QPrintDialog( &printer );
if ( dialog->exec() == QDialog::Accepted )
wv->print( &printer );
}

void QgsIdentifyResults::printCurrentItem()
{
QTreeWidgetItem *item = lstResults->currentItem();
@@ -25,6 +25,7 @@

#include <QWidget>
#include <QList>
#include <QWebView>

class QCloseEvent;
class QTreeWidgetItem;
@@ -119,7 +120,6 @@ class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
void on_mCollapseToolButton_clicked( bool checked ) { Q_UNUSED( checked ); collapseAll(); }

void openUrl( const QUrl &url );
void print();
void printCurrentItem();

private:
@@ -148,4 +148,16 @@ class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
QDockWidget *mDock;
};

class QgsWebView : public QWebView
{
Q_OBJECT;
public:
QgsWebView( QWidget *parent = 0 );
public slots:
void print( void );
protected:
void contextMenuEvent( QContextMenuEvent* );
};


#endif
@@ -315,7 +315,7 @@ bool QgsMapToolIdentify::identifyVectorLayer( QgsVectorLayer *layer, int x, int
convertMeasurement( calc, area, myDisplayUnits, true ); // area and myDisplayUnits are out params
QString str = calc.textUnit( area, 3, myDisplayUnits, true );
derivedAttributes.insert( tr( "Area" ), str );
convertMeasurement( calc, perimeter, myDisplayUnits, false ); // area and myDisplayUnits are out params
convertMeasurement( calc, perimeter, myDisplayUnits, false ); // perimeter and myDisplayUnits are out params
str = calc.textUnit( perimeter, 3, myDisplayUnits, false );
derivedAttributes.insert( tr( "Perimeter" ), str );
}

2 comments on commit 260b4a1

@slarosa

This comment has been minimized.

Copy link
Member

@slarosa slarosa replied Dec 12, 2012

Hi Victor,
Something seems gone wrong in this commit ! I cannot build anymore !
Please, could you fix it ?

Thanks !

@slarosa

This comment has been minimized.

Copy link
Member

@slarosa slarosa replied Dec 12, 2012

Sorry, I meant this commit 7197a31

Please sign in to comment.