Skip to content
Permalink
Browse files

Merge branch 'master' of git://github.com/qgis/Quantum-GIS into style…

…s_to_db
  • Loading branch information
Emilio Loi
Emilio Loi committed Apr 23, 2013
1 parent b4b779c commit 49f1b53b228c369ea2b2bedac33831acd95a779f
@@ -5,7 +5,7 @@
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Quantum GIS (QGIS)</TITLE>

<!-- Included style.css -->
<!-- Included /home/el1073/Faunalia/Quantum-GIS-master/doc/style.css -->
<STYLE TYPE="text/css">
body{ background: white;
color: black;
@@ -77,13 +77,13 @@
<DIV CLASS="header" ID="header">
<H1>Quantum GIS (QGIS)</H1>
<H2>Building QGIS from source - step by step</H2>
<H3>Sunday April 07, 2013</H3>
<H3>Tuesday April 23, 2013</H3>
</DIV>

<DIV CLASS="body" ID="body">
<P>
Last Updated: Sunday April 07, 2013
Last Change : Saturday December 08, 2012
Last Updated: Tuesday April 23, 2013
Last Change : Tuesday April 23, 2013
</P>
<DIV CLASS="toc">

@@ -3188,5 +3188,5 @@ <H1>9. Authors and Acknowledgments</H1>

</DIV>
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -t html -o INSTALL.html INSTALL.t2t -->
<!-- cmdline: txt2tags -o/home/el1073/Faunalia/Quantum-GIS-master/doc/INSTALL.html -t html /home/el1073/Faunalia/Quantum-GIS-master/doc/INSTALL.t2t -->
</BODY></HTML>
@@ -5,7 +5,7 @@
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Quantum GIS (QGIS) News</TITLE>

<!-- Included style.css -->
<!-- Included /home/el1073/Faunalia/Quantum-GIS-master/doc/style.css -->
<STYLE TYPE="text/css">
body{ background: white;
color: black;
@@ -77,7 +77,7 @@
<DIV CLASS="header" ID="header">
<H1>Quantum GIS (QGIS) News</H1>
<H2>Change history for the QGIS Project</H2>
<H3>Saturday May 26, 2012</H3>
<H3>Tuesday April 23, 2013</H3>
</DIV>

<DIV CLASS="toc">
@@ -145,8 +145,8 @@ <H3>Saturday May 26, 2012</H3>
</DIV>
<DIV CLASS="body" ID="body">
<P>
Last Updated: Saturday May 26, 2012
Last Change : Saturday May 26, 2012
Last Updated: Tuesday April 23, 2013
Last Change : Tuesday April 23, 2013
</P>

<A NAME="toc1"></A>
@@ -173,7 +173,7 @@ <H1>1. Whats new in Version 1.8.0 'Lisboa'?</H1>
<LI>Menu Re-organisation - The menus were re-organised a little - we now have separate menus for Vector and Raster and many plugins were updated to place their menus in the new Vector and Raster top level menus.
<LI>Offset Curves - a new digitising tool for creating offset curves was added.
<LI>Terrain Analysis Plugin - a new core plugin was added for doing terrain analysis - and it can make really good looking coloured relief maps.
<LI>Ellipse renderer symbollayer to render ellipse shapes (and also rectangles, triangles, crosses by specifying width and height). Moreover, the symbol layer allows to set all parameters (width, height, colors, rotation, outline with) from data fields, in mm or map units
<LI>Ellipse renderer - symbollayer to render ellipse shapes (and also rectangles, triangles, crosses by specifying width and height). Moreover, the symbol layer allows to set all parameters (width, height, colors, rotation, outline with) from data fields, in mm or map units
<LI>New scale selector with predefined scales
<LI>Option to add layers to selected or active group
<LI>Pan To Selected tool
@@ -327,8 +327,8 @@ <H1>3. Whats new in Version 1.7.1 'Wroclaw'?</H1>
<H1>4. Whats new in Version 1.7.0 'Wroclaw'?</H1>

<P>
This release is named after the town of Wrocław in Poland. The Department of
Climatology and Atmosphere Protection, University of Wrocław kindly hosted our
This release is named after the town of Wroclaw in Poland. The Department of
Climatology and Atmosphere Protection, University of Wroclaw kindly hosted our
developer meeting in November 2010. Please note that this is a release in
our 'cutting edge' release series. As such it contains new features and extends
the programmatic interface over QGIS 1.0.x and QGIS 1.6.0. As with any
@@ -2613,5 +2613,5 @@ <H1>18. 0.5</H1>
</DIV>

<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -t html -o news.html news.t2t -->
<!-- cmdline: txt2tags -o/home/el1073/Faunalia/Quantum-GIS-master/doc/news.html -t html /home/el1073/Faunalia/Quantum-GIS-master/doc/news.t2t -->
</BODY></HTML>
@@ -586,9 +586,10 @@ def saveAsScriptFile(self):
return
filename = QFileDialog.getSaveFileName(self,
"Save File As",
"*.py", "Script file (*.py)")
tabWidget.path, "Script file (*.py)")
if not filename.isEmpty():
self.tabListScript.remove(tabWidget.path)
#print tabWidget.path
self.tabListScript.remove(unicode(tabWidget.path))
tabWidget.path = filename
self.saveScriptFile()

@@ -477,7 +477,7 @@ def __init__(self, parent, parentConsole, filename, *args):
self.newEditor.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.newEditor.modificationChanged.connect(self.modified)
if filename:
self.newEditor.setText(open(filename, "rt").read())
self.newEditor.setText(open(unicode(filename), "rt").read())
self.newEditor.setModified(False)
self.path = filename

@@ -513,22 +513,23 @@ def save(self):
'Script was correctly saved.')
self.pc.callWidgetMessageBarEditor(msgText)
# Rename the original file, if it exists
overwrite = os.path.exists(self.path)
path = unicode(self.path)
overwrite = os.path.exists(path)
if overwrite:
temp_path = self.path + "~"
temp_path = path + "~"
if os.path.exists(temp_path):
os.remove(temp_path)
os.rename(self.path, temp_path)
os.rename(path, temp_path)
# Save the new contents
with open(self.path, "w") as f:
with open(path, "w") as f:
f.write(self.newEditor.text())
if overwrite:
os.remove(temp_path)
fN = self.path.split('/')[-1]
fN = path.split('/')[-1]
self.mw.setTabTitle(self, fN)
self.mw.setTabToolTip(self.mw.currentIndex(), self.path)
self.mw.setTabToolTip(self.mw.currentIndex(), path)
self.newEditor.setModified(False)
self.pc.updateTabListScript(self.path, action='append')
self.pc.updateTabListScript(path, action='append')
self.mw.listObject(self)

def modified(self, modified):
@@ -722,12 +723,12 @@ def closeCurrentWidget(self):

def restoreTabs(self):
for script in self.restoreTabList:
pathFile = str(script.toString())
if os.path.exists(pathFile):
tabName = pathFile.split('/')[-1]
self.newTabEditor(tabName, pathFile)
else:
self.newTabEditor(filename=None)
pathFile = unicode(script.toString())
if os.path.exists(pathFile):
tabName = pathFile.split('/')[-1]
self.newTabEditor(tabName, pathFile)
else:
self.newTabEditor(filename=None)
self.topFrame.close()
self.enableToolBarEditor(True)

@@ -755,22 +756,34 @@ def listObject(self, tab):
else:
tabWidget = self.widget(tab)
if tabWidget.path:
pathFile, file = os.path.split(str(tabWidget.path))
pathFile, file = os.path.split(unicode(tabWidget.path))
module, ext = os.path.splitext(file)
#print sys.modules[module]
if pathFile not in sys.path:
sys.path.append(pathFile)
try:
reload(pyclbr)
dictObject = {}
superClassName = []
readModule = pyclbr.readmodule(module)
readModuleFunction = pyclbr.readmodule_ex(module)
for name, class_data in sorted(readModule.items(), key=lambda x:x[1].lineno):
if class_data.file == tabWidget.path:
for superClass in class_data.super:
if superClass == 'object':
continue
if isinstance(superClass, basestring):
superClassName.append(superClass)
else:
superClassName.append(superClass.name)
classItem = QTreeWidgetItem()
classItem.setText(0, name)
if superClassName:
for i in superClassName: super = i
classItem.setText(0, name + ' [' + super + ']')
classItem.setToolTip(0, name + ' [' + super + ']')
else:
classItem.setText(0, name)
classItem.setToolTip(0, name)
classItem.setText(1, str(class_data.lineno))
classItem.setToolTip(0, name)
classItem.setIcon(0, QgsApplication.getThemeIcon("console/iconClassTreeWidgetConsole.png"))
dictObject[name] = class_data.lineno
for meth, lineno in sorted(class_data.methods.items(), key=itemgetter(1)):
@@ -27,7 +27,7 @@ class QgsVectorDataProvider : QgsDataProvider
RandomSelectGeometryAtId = 1024,
SequentialSelectGeometryAtId = 2048,
CreateAttributeIndex = 4096,
SetEncoding = 8192,
SelectEncoding = 8192,
};

/** bitmask of all provider's editing capabilities */
@@ -42,6 +42,8 @@ SET(QGIS_APP_SRCS
qgslabelengineconfigdialog.cpp
qgslabelinggui.cpp
qgslabelpreview.cpp
qgsloadstylefromdbdialog.cpp
qgssavestyletodbdialog.cpp

qgsmaptooladdfeature.cpp
qgsmaptooladdvertex.cpp
@@ -81,8 +83,6 @@ SET(QGIS_APP_SRCS
qgsmaptoolsvgannotation.cpp
qgsmaptooltextannotation.cpp
qgsmaptoolvertexedit.cpp
qgssavestyletodbdialog.cpp
qgsloadstylefromdbdialog.cpp

nodetool/qgsmaptoolnodetool.cpp
nodetool/qgsselectedfeature.cpp
@@ -197,6 +197,8 @@ SET (QGIS_APP_MOC_HDRS
qgslabelengineconfigdialog.h
qgslabelinggui.h
qgslabelpropertydialog.h
qgsloadstylefromdbdialog.h
qgssavestyletodbdialog.h
qgsshortcutsmanager.h

qgsmaptooladdfeature.h
@@ -229,8 +231,6 @@ SET (QGIS_APP_MOC_HDRS
qgsmaptoolsimplify.h
qgsmaptoolsplitfeatures.h
qgsmaptoolvertexedit.h
qgssavestyletodbdialog.h
qgsloadstylefromdbdialog.h

nodetool/qgsmaptoolnodetool.h
nodetool/qgsselectedfeature.h
@@ -34,7 +34,6 @@
#include "qgslabelinggui.h"
#include "qgslabel.h"
#include "qgslegenditem.h"

#include "qgsgenericprojectionselector.h"
#include "qgslogger.h"
#include "qgsmaplayerregistry.h"
@@ -182,7 +181,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
pbnIndex->setEnabled( false );
}

if ( capabilities & QgsVectorDataProvider::SetEncoding )
if ( capabilities & QgsVectorDataProvider::SelectEncoding )
{
cboProviderEncoding->addItems( QgsVectorDataProvider::availableEncodings() );
QString enc = layer->dataProvider()->encoding();
@@ -194,8 +193,16 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
}
cboProviderEncoding->setCurrentIndex( encindex );
}
else if ( layer->dataProvider()->name() == "ogr" )
{
// if OGR_L_TestCapability(OLCStringsAsUTF8) returns true, OGR provider encoding can be set to only UTF-8
// so make encoding box grayed out
cboProviderEncoding->addItem( layer->dataProvider()->encoding() );
cboProviderEncoding->setEnabled( false );
}
else
{
// other providers do not use mEncoding, so hide the group completely
mDataSourceEncodingFrame->hide();
}
}
@@ -413,7 +420,7 @@ void QgsVectorLayerProperties::apply()
// provider-specific options
if ( layer->dataProvider() )
{
if ( layer->dataProvider()->capabilities() & QgsVectorDataProvider::SetEncoding )
if ( layer->dataProvider()->capabilities() & QgsVectorDataProvider::SelectEncoding )
{
layer->setProviderEncoding( cboProviderEncoding->currentText() );
}
@@ -598,7 +605,6 @@ void QgsVectorLayerProperties::on_pbnLoadDefaultStyle_clicked()
//something went wrong - let them know why
QMessageBox::information( this, tr( "Default Style" ), myMessage );
}

}

void QgsVectorLayerProperties::on_pbnSaveDefaultStyle_clicked()
@@ -704,6 +710,7 @@ void QgsVectorLayerProperties::saveStyleAs( StyleType styleType )
QSettings myQSettings; // where we keep last used filter in persistent state
QString myLastUsedDir = myQSettings.value( "style/lastStyleDir", "." ).toString();

QString format, extension;
if( styleType == DB )
{
QString infoWindowTitle = QObject::tr( "Save style to DB (%1)" ).arg( layer->providerType() );
@@ -743,7 +743,6 @@ bool QgsMapLayer::loadNamedStyleFromDb( const QString db, const QString theURI,
sqlite3_close( myDatabase );

return theResultFlag;

}

QString QgsMapLayer::loadNamedStyle( const QString theURI, bool &theResultFlag )
@@ -753,8 +752,8 @@ QString QgsMapLayer::loadNamedStyle( const QString theURI, bool &theResultFlag )
theResultFlag = false;

QDomDocument myDocument( "qgis" );
// location of problem associated with errorMsg

// location of problem associated with errorMsg
int line, column;
QString myErrorMessage;

@@ -775,7 +774,7 @@ QString QgsMapLayer::loadNamedStyle( const QString theURI, bool &theResultFlag )
QString qml;
if ( loadNamedStyleFromDb( QDir( QgsApplication::qgisSettingsDirPath() ).absoluteFilePath( "qgis.qmldb" ), theURI, qml ) ||
( project.exists() && loadNamedStyleFromDb( project.absoluteDir().absoluteFilePath( project.baseName() + ".qmldb" ), theURI, qml ) ) ||
loadNamedStyleFromDb( QDir( QgsApplication::pkgDataPath() ).absoluteFilePath( "resources/qgis.qmldb" ), theURI, qml )/* || (loadStyleExternalMethod && loadStyleExternalMethod(theURI, qml, myErrorMessage))*/)
loadNamedStyleFromDb( QDir( QgsApplication::pkgDataPath() ).absoluteFilePath( "resources/qgis.qmldb" ), theURI, qml ) )
{
theResultFlag = myDocument.setContent( qml, &myErrorMessage, &line, &column );
if ( !theResultFlag )
@@ -881,12 +880,11 @@ void QgsMapLayer::exportNamedStyle(QDomDocument &doc, QString &errorMsg)

QString QgsMapLayer::saveDefaultStyle( bool & theResultFlag )
{
return saveNamedStyle( styleURI(), theResultFlag );
return saveNamedStyle( styleURI(), theResultFlag );
}

QString QgsMapLayer::saveNamedStyle( const QString theURI, bool & theResultFlag )
{

QString myErrorMessage;
QDomDocument myDocument;
exportNamedStyle( myDocument, myErrorMessage );
@@ -84,8 +84,8 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
/** DEPRECATED - do not use */
SequentialSelectGeometryAtId = 1 << 11,
CreateAttributeIndex = 1 << 12,
/** Uses mEncoding for conversion of 8-bit strings to unicode */
SetEncoding = 1 << 13,
/** allows user to select encoding */
SelectEncoding = 1 << 13,
};

/** bitmask of all provider's editing capabilities */

0 comments on commit 49f1b53

Please sign in to comment.
You can’t perform that action at this time.