Skip to content

Commit ef8a135

Browse files
author
Hugo Mercier
authoredJan 13, 2017
Merge pull request #3987 from mhugo/servermultithread
[server] parallel map rendering
2 parents 49b6c5f + 932d9fb commit ef8a135

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1166
-102
lines changed
 

‎python/server/qgsserversettings.sip

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/***************************************************************************
2+
qgsserversettings.sip
3+
---------------------
4+
begin : December 19, 2016
5+
copyright : (C) 2016 by Paul Blottiere
6+
email : paul dot blottiere at oslandia dot com
7+
8+
***************************************************************************/
9+
10+
/***************************************************************************
11+
* *
12+
* This program is free software; you can redistribute it and/or modify *
13+
* it under the terms of the GNU General Public License as published by *
14+
* the Free Software Foundation; either version 2 of the License, or *
15+
* (at your option) any later version. *
16+
* *
17+
***************************************************************************/
18+
19+
20+
/** \ingroup server
21+
* QgsServerSettings provides a way to retrieve settings by prioritizing
22+
* according to environment variables, ini file and default values.
23+
* @note added in QGIS 3.0
24+
*/
25+
class QgsServerSettings
26+
{
27+
%TypeHeaderCode
28+
#include "qgsserversettings.h"
29+
%End
30+
31+
public:
32+
/** Constructor.
33+
*/
34+
QgsServerSettings();
35+
36+
/** Load settings according to current environment variables.
37+
*/
38+
void load();
39+
40+
/** Log a summary of settings curently loaded.
41+
*/
42+
void logSummary() const;
43+
44+
/** Returns the ini file loaded by QSetting.
45+
* @return the path of the ini file or an empty string if none is loaded.
46+
*/
47+
QString iniFile() const;
48+
49+
/** Returns the maximum number of threads to use.
50+
* @return the number of threads.
51+
*/
52+
int maxThreads() const;
53+
54+
/** Returns parallel rendering setting.
55+
* @return true if parallel rendering is activated, false otherwise.
56+
*/
57+
bool parallelRendering() const;
58+
59+
/** Returns the log level.
60+
* @return the log level.
61+
*/
62+
QgsMessageLog::MessageLevel logLevel() const;
63+
64+
/** Returns the log file.
65+
* @return the path of the log file or an empty string if none is defined.
66+
*/
67+
QString logFile() const;
68+
69+
/** Returns the QGS project file to use.
70+
* @return the path of the QGS project or an empty string if none is defined.
71+
*/
72+
QString projectFile() const;
73+
74+
/**
75+
* Returns the maximum number of cached layers.
76+
* @return the number of cached layers.
77+
*/
78+
int maxCacheLayers() const;
79+
80+
/** Returns the cache size.
81+
* @return the cache size.
82+
*/
83+
qint64 cacheSize() const;
84+
85+
/** Returns the cache directory.
86+
* @return the directory.
87+
*/
88+
QString cacheDirectory() const;
89+
};

‎python/server/qgswcserver.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class QgsWCSServer: public QgsOWSServer
3636
{
3737
public:
3838
/** Constructor. Takes parameter map and a pointer to a renderer object (does not take ownership)*/
39-
QgsWCSServer( const QString& configFilePath, QMap<QString, QString>& parameters, QgsWCSProjectParser* pp,
39+
QgsWCSServer( const QString& configFilePath, const QgsServerSettings& settings, QMap<QString, QString>& parameters, QgsWCSProjectParser* pp,
4040
QgsRequestHandler* rh, const QgsAccessControl* accessControl );
4141
~QgsWCSServer();
4242

0 commit comments

Comments
 (0)
Please sign in to comment.