1// qstandardpaths.sip generated by MetaSIP 2// 3// This file is part of the QtCore Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23class QStandardPaths 24{ 25%TypeHeaderCode 26#include <qstandardpaths.h> 27%End 28 29public: 30 enum StandardLocation 31 { 32 DesktopLocation, 33 DocumentsLocation, 34 FontsLocation, 35 ApplicationsLocation, 36 MusicLocation, 37 MoviesLocation, 38 PicturesLocation, 39 TempLocation, 40 HomeLocation, 41 DataLocation, 42 CacheLocation, 43 GenericDataLocation, 44 RuntimeLocation, 45 ConfigLocation, 46 DownloadLocation, 47 GenericCacheLocation, 48%If (Qt_5_2_0 -) 49 GenericConfigLocation, 50%End 51%If (Qt_5_4_0 -) 52 AppDataLocation, 53%End 54%If (Qt_5_4_0 -) 55 AppLocalDataLocation, 56%End 57%If (Qt_5_5_0 -) 58 AppConfigLocation, 59%End 60 }; 61 62 static QString writableLocation(QStandardPaths::StandardLocation type); 63 static QStringList standardLocations(QStandardPaths::StandardLocation type); 64 65 enum LocateOption 66 { 67 LocateFile, 68 LocateDirectory, 69 }; 70 71 typedef QFlags<QStandardPaths::LocateOption> LocateOptions; 72 static QString locate(QStandardPaths::StandardLocation type, const QString &fileName, QFlags<QStandardPaths::LocateOption> options = QStandardPaths::LocateFile); 73 static QStringList locateAll(QStandardPaths::StandardLocation type, const QString &fileName, QFlags<QStandardPaths::LocateOption> options = QStandardPaths::LocateFile); 74%If (PyQt_NotBootstrapped) 75 static QString displayName(QStandardPaths::StandardLocation type); 76%End 77 static QString findExecutable(const QString &executableName, const QStringList &paths = QStringList()); 78 static void enableTestMode(bool testMode); 79%If (Qt_5_2_0 -) 80 static void setTestModeEnabled(bool testMode); 81%End 82 83private: 84 QStandardPaths(); 85 ~QStandardPaths(); 86}; 87 88%If (Qt_5_8_0 -) 89QFlags<QStandardPaths::LocateOption> operator|(QStandardPaths::LocateOption f1, QFlags<QStandardPaths::LocateOption> f2); 90%End 91