|
| 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 | +}; |
0 commit comments