2018-08-17 11:01:07 +03:00
# QuasarAppLib
2021-03-29 11:25:56 +03:00
Global functions used in applications QuasarApp.
This lib include include next modules:
2018-08-11 18:34:34 +03:00
2021-03-29 11:25:56 +03:00
* Locales - This module use for parse local files. This module allows you to work with translations.
* Params - This module use for parese app params and create log.
* Settings - This is a module that allows you to work with application settings.
* Global - This module contains other global functions.
2018-08-11 18:34:34 +03:00
2018-08-11 18:35:28 +03:00
2021-04-07 21:25:05 +03:00
## Build
* git clone https://github.com/QuasarApp/QuasarAppLib.git
* git submodule update --init --recursive
* cd QuasarAppLib
* cmake -DCMAKE_PREFIX_PATH=Yuor/Qt/Dir/Path .
* make -j8
* make test #(for testing)
2022-05-25 18:08:51 +03:00
### Available build options:
```cmake
option(QA_ALLOW_NOT_SUPPORTED_OPTIONS "Enable for allow any command line options" ON)
2024-06-24 13:35:09 +02:00
option(QA_DISABLE_LOG "Disabled all logs (force sets verbose to 0)" OFF)
2022-05-25 18:08:51 +03:00
```
2021-04-07 21:25:05 +03:00
## Include
#### The cmake build do not required Qt libraries.
* cd yourRepo
* git submodule add https://github.com/QuasarApp/QuasarAppLib.git # add the repository of QtBigInt into your repo like submodule
* git submodule update --init --recursive
* Include in your CMakeLists.txt file the main CMakeLists.txt file of QuasarAppLib library
>> add_subdirectory(QuasarAppLib)
* Rebuild yuor project
2021-05-01 11:34:40 +03:00
```cmake
2021-04-07 21:25:05 +03:00
add_subdirectory(QuasarAppLib)
2021-04-07 21:55:10 +03:00
target_link_libraries(MyBinary PUBLIC QuasarApp)
2021-04-07 21:25:05 +03:00
```
### Note
2022-05-25 18:08:51 +03:00
2021-04-07 21:25:05 +03:00
By Default QuasarAppLib makes as a static library. If you want to create a shared library just add the BUILD_SHARED_LIBS into your main CMakeLists.txt file.
Example :
2021-05-01 11:34:40 +03:00
```cmake
2021-04-07 21:25:05 +03:00
set(BUILD_SHARED_LIBS ON)
add_subdirectory(QuasarAppLib)
2021-04-07 21:55:10 +03:00
target_link_libraries(MyBinary PUBLIC QuasarApp)
2021-04-07 21:25:05 +03:00
```
# Usage
2021-05-01 11:34:40 +03:00
```cpp
2021-04-07 21:25:05 +03:00
#include <quasarapp.h>
2021-04-26 11:54:40 +03:00
if (!QuasarAppUtils::Params::parseParams(argc, argv)) {
QuasarAppUtils::Params::log("Warning message", QuasarAppUtils::Warning);
2021-07-28 13:17:26 +03:00
QuasarAppUtils::Params::showHelp();
2021-04-26 11:54:40 +03:00
exit(0);
}
2021-04-07 21:25:05 +03:00
```