Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'upstream/master' into feature/export-pn…
…g-first-8493

Conflicts:
	src/gui/qgisgui.h
  • Loading branch information
michaelkirk committed Jan 27, 2015
2 parents 262a5b2 + 1cd7dc6 commit d7bef1c
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 11 deletions.
3 changes: 2 additions & 1 deletion CODING
Expand Up @@ -277,7 +277,8 @@ Braces should start on the line following the expression:
{
// do stuff
...
}else
}
else
{
// do something else
...
Expand Down
6 changes: 3 additions & 3 deletions INSTALL
@@ -1,9 +1,9 @@
QGIS
Building QGIS from source - step by step
Tuesday December 30, 2014
Tuesday January 20, 2015


Last Updated: Tuesday December 30, 2014
Last Updated: Tuesday January 20, 2015
Last Change : Monday November 24, 2014


Expand Down Expand Up @@ -1689,7 +1689,7 @@ In a Terminal cd to the qgis source folder previously downloaded, then:
cd build
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
-D CMAKE_BUILD_TYPE=MINSIZEREL -D ENABLE_TESTS=FALSE \
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
-D WITH_PYSPATIALITE=FALSE \
-D SPATIALINDEX_LIBRARY=/usr/local/lib/libspatialindex.dylib \
-D SPATIALINDEX_INCLUDE_DIR=/usr/local/include/spatialindex \
-D QWT_LIBRARY=/usr/local/qwt-6.0.2/lib/libqwt.dylib \
Expand Down
3 changes: 2 additions & 1 deletion doc/CODING.html
Expand Up @@ -422,7 +422,8 @@ <H3>1.7.3. Braces</H3>
{
// do stuff
...
}else
}
else
{
// do something else
...
Expand Down
3 changes: 2 additions & 1 deletion doc/CODING.t2t
Expand Up @@ -252,7 +252,8 @@ Braces should start on the line following the expression:
{
// do stuff
...
}else
}
else
{
// do something else
...
Expand Down
6 changes: 3 additions & 3 deletions doc/INSTALL.html
Expand Up @@ -77,12 +77,12 @@
<DIV CLASS="header" ID="header">
<H1>QGIS</H1>
<H2>Building QGIS from source - step by step</H2>
<H3>Tuesday December 30, 2014</H3>
<H3>Tuesday January 20, 2015</H3>
</DIV>

<DIV CLASS="body" ID="body">
<P>
Last Updated: Tuesday December 30, 2014
Last Updated: Tuesday January 20, 2015
Last Change : Monday November 24, 2014
</P>
<DIV CLASS="toc">
Expand Down Expand Up @@ -2340,7 +2340,7 @@ <H2>5.7. Configure the build</H2>
cd build
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
-D CMAKE_BUILD_TYPE=MINSIZEREL -D ENABLE_TESTS=FALSE \
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
-D WITH_PYSPATIALITE=FALSE \
-D SPATIALINDEX_LIBRARY=/usr/local/lib/libspatialindex.dylib \
-D SPATIALINDEX_INCLUDE_DIR=/usr/local/include/spatialindex \
-D QWT_LIBRARY=/usr/local/qwt-6.0.2/lib/libqwt.dylib \
Expand Down
9 changes: 8 additions & 1 deletion src/gui/qgisgui.cpp
Expand Up @@ -175,9 +175,16 @@ namespace QgisGui
return qMakePair<QString, QString>( outputFileName, ext );
}

QString createFileFilter_( QString const &longName, QString const &glob )
{
return QString("%1 (%2 %3)").arg( longName ).arg( glob.toLower() ).arg( glob.toUpper() );
}

QString createFileFilter_( QString const &format )
{
return QString( "%1 format (*.%2 *.%1)" ).arg( format.toUpper() ).arg( format.toLower() );
QString longName = format + " format";
QString glob = "*" + format;
return createFileFilter_( longName, glob );
}

} // end of QgisGui namespace
13 changes: 12 additions & 1 deletion src/gui/qgisgui.h
Expand Up @@ -82,13 +82,24 @@ namespace QgisGui
*/
QPair<QString, QString> GUI_EXPORT getSaveAsImageName( QWidget * theParent, QString theMessage, QString defaultFilename = QString::null );

/**
Convenience function for readily creating file filters.
Given a long name for a file filter and a regular expression, return
a file filter string suitable for use in a QFileDialog::OpenFiles()
call. The regular express, glob, will have both all lower and upper
case versions added.
*/
QString GUI_EXPORT createFileFilter_( QString const &longName, QString const &glob );

/**
* Create file filters suitable for use with QFileDialog
*
* @param format extension e.g. "png"
* @return QString e.g. "PNG format (*.png, *.PNG)"
*/
QString createFileFilter_( QString const &format );
QString GUI_EXPORT createFileFilter_( QString const &format );

}

#endif

0 comments on commit d7bef1c

Please sign in to comment.