Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GRASS] browser import options dialog
- Loading branch information
Showing
12 changed files
with
658 additions
and
109 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
INCLUDE_DIRECTORIES(${GRASS_INCLUDE_DIR}) | ||
INCLUDE_DIRECTORIES( | ||
${GRASS_INCLUDE_DIR} | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
ADD_GRASSLIB(6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
INCLUDE_DIRECTORIES(${GRASS_INCLUDE_DIR7}) | ||
INCLUDE_DIRECTORIES( | ||
${GRASS_INCLUDE_DIR7} | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
ADD_GRASSLIB(7) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/*************************************************************************** | ||
qgsgrassoptions.cpp | ||
------------------- | ||
begin : May, 2015 | ||
copyright : (C) 2015 Radim Blazek | ||
email : radim.blazek@gmail.com | ||
***************************************************************************/ | ||
/*************************************************************************** | ||
* * | ||
* 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. * | ||
* * | ||
***************************************************************************/ | ||
#include "qgsrasterprojector.h" | ||
|
||
#include "qgsgrassoptions.h" | ||
#include "ui_qgsgrassoptionsbase.h" | ||
|
||
QgsGrassOptions::QgsGrassOptions(QWidget *parent) | ||
: QDialog(parent) | ||
, QgsGrassOptionsBase() | ||
, mImportSettingsPath("/GRASS/browser/import") | ||
{ | ||
setupUi(this); | ||
|
||
connect( this, SIGNAL( accepted() ), this, SLOT( saveOptions() ) ); | ||
|
||
QSettings settings; | ||
|
||
QgsRasterProjector::Precision crsTransform = (QgsRasterProjector::Precision) settings.value( mImportSettingsPath + "/crsTransform", QgsRasterProjector::Approximate).toInt(); | ||
mCrsTransformationComboBox->addItem ( QgsRasterProjector::precisionLabel(QgsRasterProjector::Approximate), QgsRasterProjector::Approximate); | ||
mCrsTransformationComboBox->addItem ( QgsRasterProjector::precisionLabel(QgsRasterProjector::Exact), QgsRasterProjector::Exact); | ||
mCrsTransformationComboBox->setCurrentIndex ( mCrsTransformationComboBox->findData(crsTransform) ); | ||
|
||
mImportExternalCheckBox->setChecked( settings.value(mImportSettingsPath + "/external", true).toBool() ); | ||
} | ||
|
||
QgsGrassOptions::~QgsGrassOptions() | ||
{ | ||
} | ||
|
||
void QgsGrassOptions::saveOptions() | ||
{ | ||
QSettings settings; | ||
|
||
settings.setValue( mImportSettingsPath + "/crsTransform", | ||
mCrsTransformationComboBox->itemData( mCrsTransformationComboBox->currentIndex() ).toInt() ); | ||
|
||
settings.setValue( mImportSettingsPath + "/external", mImportExternalCheckBox->isChecked() ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/*************************************************************************** | ||
qgsgrassoptions.h | ||
------------------- | ||
begin : May, 2015 | ||
copyright : (C) 2015 Radim Blazek | ||
email : radim.blazek@gmail.com | ||
***************************************************************************/ | ||
/*************************************************************************** | ||
* * | ||
* 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. * | ||
* * | ||
***************************************************************************/ | ||
#ifndef QGSGRASSOPTIONS_H | ||
#define QGSGRASSOPTIONS_H | ||
|
||
#include <QDialog> | ||
|
||
#include "ui_qgsgrassoptionsbase.h" | ||
|
||
class GRASS_LIB_EXPORT QgsGrassOptions : public QDialog, private Ui::QgsGrassOptionsBase | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit QgsGrassOptions(QWidget *parent = 0); | ||
~QgsGrassOptions(); | ||
|
||
private slots: | ||
void saveOptions(); | ||
|
||
private: | ||
QString mImportSettingsPath; | ||
|
||
}; | ||
|
||
#endif // QGSGRASSOPTIONS_H |
Oops, something went wrong.
6a6b3b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blazek Bisected #13665 down to this commit. Reverting the raster projector part fixes it. Was that added intentionally? The commit message doesn't mention it.
6a6b3b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was added intentionally, unfortunately transformBoundingBox() is not precise enough.
Fixed in 1c22445.
6a6b3b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks related to 51fe632
6a6b3b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the same problem. 51fe632 does not fix the problem with cutted outer edges of rasters described in #13665.