File indexing completed on 2024-05-19 05:06:55
0001 /* 0002 SPDX-FileCopyrightText: 2017 Marc Hübner <mahueb55@gmail.com> 0003 SPDX-FileCopyrightText: 2020 Thomas Baumgart <tbaumgart@kde.org> 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef PLATFORMTOOLS_H 0008 #define PLATFORMTOOLS_H 0009 0010 0011 #include <QtGlobal> 0012 0013 class QString; 0014 0015 0016 namespace platformTools 0017 { 0018 0019 /** 0020 * This function returns the os username of the user account 0021 * under which the application is being run. 0022 */ 0023 QString osUsername(); 0024 0025 /** 0026 * This function returns the PID associated with the current process. 0027 */ 0028 uint processId(); 0029 0030 enum currencySymbolPosition_t 0031 { 0032 BeforeQuantityMoney, 0033 BeforeQuantityMoneyWithSpace, 0034 AfterQuantityMoney, 0035 AfterQuantityMoneyWithSpace, 0036 }; 0037 0038 currencySymbolPosition_t currencySymbolPosition(bool negativeValues = false); 0039 0040 enum currencySignPosition_t 0041 { 0042 ParensAround, 0043 PreceedQuantityAndSymbol, 0044 SucceedQuantityAndSymbol, 0045 PreceedSymbol, 0046 SucceedSymbol, 0047 }; 0048 0049 currencySignPosition_t currencySignPosition(bool negativeValues = false); 0050 }; 0051 0052 #endif // PLATFORMTOOLS_H