@@ -142,6 +142,7 @@ void usage( const QString &appName )
142
142
<< QStringLiteral ( " \t [--dxf-scale-denom scale]\t scale for dxf output\n " )
143
143
<< QStringLiteral ( " \t [--dxf-encoding encoding]\t encoding to use for dxf output\n " )
144
144
<< QStringLiteral ( " \t [--dxf-map-theme maptheme]\t map theme to use for dxf output\n " )
145
+ << QStringLiteral ( " \t [--take-screenshots output_path]\t take screen shots for the user documentation\n " )
145
146
<< QStringLiteral ( " \t [--profile name]\t load a named profile from the users profiles folder.\n " )
146
147
<< QStringLiteral ( " \t [--profiles-path path]\t path to store user profile folders. Will create profiles inside a {path}\\ profiles folder \n " )
147
148
<< QStringLiteral ( " \t [--version-migration]\t force the settings migration from older version if found\n " )
@@ -529,6 +530,9 @@ int main( int argc, char *argv[] )
529
530
QString dxfMapTheme;
530
531
QgsRectangle dxfExtent;
531
532
533
+ bool takeScreenShots = false ;
534
+ QString screenShotsPath;
535
+
532
536
// This behavior will set initial extent of map canvas, but only if
533
537
// there are no command line arguments. This gives a usable map
534
538
// extent when qgis starts with no layers loaded. When layers are
@@ -745,6 +749,11 @@ int main( int argc, char *argv[] )
745
749
{
746
750
dxfMapTheme = args[++i];
747
751
}
752
+ else if ( arg == QLatin1String ( " --take-screenshots" ) )
753
+ {
754
+ takeScreenShots = true ;
755
+ screenShotsPath = args[++i];
756
+ }
748
757
#ifdef HAVE_OPENCL
749
758
else if ( arg == QLatin1String ( " --openclprogramfolder" ) )
750
759
{
@@ -1457,6 +1466,11 @@ int main( int argc, char *argv[] )
1457
1466
1458
1467
#endif
1459
1468
1469
+ if ( takeScreenShots )
1470
+ {
1471
+ qgis->takeAppScreenShots ( screenShotsPath );
1472
+ }
1473
+
1460
1474
// ///////////////////////////////////////////////////////////////////
1461
1475
// Continue on to interactive gui...
1462
1476
// ///////////////////////////////////////////////////////////////////
0 commit comments