File indexing completed on 2024-05-12 16:42:16

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