Skip to content
Permalink
Browse files
Merge branch 'master' of github.com:qgis/Quantum-GIS
  • Loading branch information
timlinux committed Aug 10, 2011
2 parents 89ddd03 + 7acce88 commit 3ab4c1363c2adf7ff9af7a0686ccf2b20dc23d12
Showing with 42 additions and 11 deletions.
  1. +25 −0 src/app/qgsconfigureshortcutsdialog.cpp
  2. +14 −1 src/app/qgsconfigureshortcutsdialog.h
  3. +1 −1 src/mapserver/qgsconfigparser.cpp
  4. +2 −9 src/mapserver/qgsprojectparser.cpp
@@ -43,8 +43,33 @@ QgsConfigureShortcutsDialog::QgsConfigureShortcutsDialog( QWidget* parent )
this, SLOT( actionChanged( QTreeWidgetItem*, QTreeWidgetItem* ) ) );

populateActions();

restoreState();
}

QgsConfigureShortcutsDialog::~QgsConfigureShortcutsDialog()
{
saveState();
}

/*!
* Function to save dialog window state
*/
void QgsConfigureShortcutsDialog::saveState()
{
QSettings settings;
settings.setValue( "/Windows/ShortcutsDialog/geometry", saveGeometry() );
}

/*!
* Function to restore dialog window state
*/
void QgsConfigureShortcutsDialog::restoreState()
{
QSettings settings;
restoreGeometry( settings.value( "/Windows/ShortcutsDialog/geometry" ).toByteArray() );
}

void QgsConfigureShortcutsDialog::populateActions()
{
QList<QAction*> actions = QgsShortcutsManager::instance()->listActions();
@@ -26,7 +26,8 @@ class QgsConfigureShortcutsDialog : public QDialog, private Ui::QgsConfigureShor

public:
QgsConfigureShortcutsDialog( QWidget* parent = NULL );

~QgsConfigureShortcutsDialog();

void populateActions();

protected:
@@ -51,6 +52,18 @@ class QgsConfigureShortcutsDialog : public QDialog, private Ui::QgsConfigureShor
protected:
bool mGettingShortcut;
int mModifiers, mKey;

private:
/*!
* Function to save dialog window state
*/
void saveState();

/*!
* Function to restore dialog window state
*/
void restoreState();

};

#endif
@@ -140,7 +140,7 @@ QStringList QgsConfigParser::createCRSListForLayer( QgsMapLayer* theMapLayer ) c

//check the db is available
myResult = sqlite3_open( myDatabaseFileName.toLocal8Bit().data(), &myDatabase );
if ( myResult )
if ( myResult && theMapLayer )
{
//if the database cannot be opened, add at least the epsg number of the source coordinate system
crsNumbers.push_back( theMapLayer->crs().authid() );
@@ -102,15 +102,8 @@ void QgsProjectParser::layersAndStylesCapabilities( QDomElement& parentElement,
layerParentTitleElem.appendChild( layerParentTitleText );
layerParentElem.appendChild( layerParentTitleElem );

QSet<QString> crsSet = supportedOutputCrsSet();
QSet<QString>::const_iterator crsIt = crsSet.constBegin();
for(; crsIt != crsSet.constEnd(); ++crsIt )
{
QDomElement crsElem = doc.createElement("CRS");
QDomText crsText = doc.createTextNode( *crsIt );
crsElem.appendChild( crsText );
layerParentElem.appendChild( crsElem );
}
QStringList crsList = createCRSListForLayer( 0 );
appendCRSElementsToLayer( layerParentElem, doc, crsList );

//Map rectangle. If not empty, this will be set for every layer (instead of the bbox that comes from the data)
QgsRectangle mapExtent = mapRectangle();

0 comments on commit 3ab4c13

Please sign in to comment.