├── .clang_complete ├── .gitignore ├── Doxyfile ├── README.md ├── doc ├── CSVLogger_8cpp.html ├── CSVLogger_8cpp__incl.map ├── CSVLogger_8cpp__incl.md5 ├── CSVLogger_8cpp__incl.png ├── CSVLogger_8h.html ├── CSVLogger_8h__dep__incl.map ├── CSVLogger_8h__dep__incl.md5 ├── CSVLogger_8h__dep__incl.png ├── CSVLogger_8h__incl.map ├── CSVLogger_8h__incl.md5 ├── CSVLogger_8h__incl.png ├── CSVLogger_8h_source.html ├── LoggerPlugin_8cpp.html ├── LoggerPlugin_8cpp__incl.map ├── LoggerPlugin_8cpp__incl.md5 ├── LoggerPlugin_8cpp__incl.png ├── LoggerPlugin_8h.html ├── LoggerPlugin_8h__dep__incl.map ├── LoggerPlugin_8h__dep__incl.md5 ├── LoggerPlugin_8h__dep__incl.png ├── LoggerPlugin_8h__incl.map ├── LoggerPlugin_8h__incl.md5 ├── LoggerPlugin_8h__incl.png ├── LoggerPlugin_8h_source.html ├── LoggerUtil_8cpp.html ├── LoggerUtil_8cpp__incl.map ├── LoggerUtil_8cpp__incl.md5 ├── LoggerUtil_8cpp__incl.png ├── LoggerUtil_8h.html ├── LoggerUtil_8h__dep__incl.map ├── LoggerUtil_8h__dep__incl.md5 ├── LoggerUtil_8h__dep__incl.png ├── LoggerUtil_8h__incl.map ├── LoggerUtil_8h__incl.md5 ├── LoggerUtil_8h__incl.png ├── LoggerUtil_8h_source.html ├── SimpleLogger_8cpp.html ├── SimpleLogger_8cpp__incl.map ├── SimpleLogger_8cpp__incl.md5 ├── SimpleLogger_8cpp__incl.png ├── SimpleLogger_8h.html ├── SimpleLogger_8h__dep__incl.map ├── SimpleLogger_8h__dep__incl.md5 ├── SimpleLogger_8h__dep__incl.png ├── SimpleLogger_8h__incl.map ├── SimpleLogger_8h__incl.md5 ├── SimpleLogger_8h__incl.png ├── SimpleLogger_8h_source.html ├── annotated.html ├── annotated_dup.js ├── bc_s.png ├── bdwn.png ├── classQMLLogger_1_1CSVLogger-members.html ├── classQMLLogger_1_1CSVLogger.html ├── classQMLLogger_1_1CSVLogger.js ├── classQMLLogger_1_1CSVLogger__inherit__graph.map ├── classQMLLogger_1_1CSVLogger__inherit__graph.md5 ├── classQMLLogger_1_1CSVLogger__inherit__graph.png ├── classQMLLogger_1_1LoggerUtil-members.html ├── classQMLLogger_1_1LoggerUtil.html ├── classQMLLogger_1_1LoggerUtil.js ├── classQMLLogger_1_1LoggerUtil__inherit__graph.map ├── classQMLLogger_1_1LoggerUtil__inherit__graph.md5 ├── classQMLLogger_1_1LoggerUtil__inherit__graph.png ├── classQMLLogger_1_1SimpleLogger-members.html ├── classQMLLogger_1_1SimpleLogger.html ├── classQMLLogger_1_1SimpleLogger.js ├── classQMLLogger_1_1SimpleLogger__inherit__graph.map ├── classQMLLogger_1_1SimpleLogger__inherit__graph.md5 ├── classQMLLogger_1_1SimpleLogger__inherit__graph.png ├── classes.html ├── closed.png ├── dir_68267d1309a1af8e8297ef4c3efbcdba.html ├── dir_68267d1309a1af8e8297ef4c3efbcdba.js ├── doc.png ├── doxygen.css ├── doxygen.png ├── dynsections.js ├── files.html ├── files.js ├── folderclosed.png ├── folderopen.png ├── functions.html ├── functions_func.html ├── functions_prop.html ├── graph_legend.html ├── graph_legend.md5 ├── graph_legend.png ├── hierarchy.html ├── hierarchy.js ├── index.html ├── inherit_graph_0.map ├── inherit_graph_0.md5 ├── inherit_graph_0.png ├── inherits.html ├── jquery.js ├── menu.js ├── menudata.js ├── nav_f.png ├── nav_g.png ├── nav_h.png ├── navtree.css ├── navtree.js ├── navtreedata.js ├── navtreeindex0.js ├── open.png ├── resize.js ├── search │ ├── all_0.html │ ├── all_0.js │ ├── all_1.html │ ├── all_1.js │ ├── all_2.html │ ├── all_2.js │ ├── all_3.html │ ├── all_3.js │ ├── all_4.html │ ├── all_4.js │ ├── all_5.html │ ├── all_5.js │ ├── all_6.html │ ├── all_6.js │ ├── all_7.html │ ├── all_7.js │ ├── all_8.html │ ├── all_8.js │ ├── classes_0.html │ ├── classes_0.js │ ├── classes_1.html │ ├── classes_1.js │ ├── classes_2.html │ ├── classes_2.js │ ├── close.png │ ├── files_0.html │ ├── files_0.js │ ├── files_1.html │ ├── files_1.js │ ├── files_2.html │ ├── files_2.js │ ├── functions_0.html │ ├── functions_0.js │ ├── functions_1.html │ ├── functions_1.js │ ├── mag_sel.png │ ├── nomatches.html │ ├── pages_0.html │ ├── pages_0.js │ ├── properties_0.html │ ├── properties_0.js │ ├── properties_1.html │ ├── properties_1.js │ ├── properties_2.html │ ├── properties_2.js │ ├── properties_3.html │ ├── properties_3.js │ ├── properties_4.html │ ├── properties_4.js │ ├── properties_5.html │ ├── properties_5.js │ ├── search.css │ ├── search.js │ ├── search_l.png │ ├── search_m.png │ ├── search_r.png │ └── searchdata.js ├── splitbar.png ├── sync_off.png ├── sync_on.png ├── tab_a.png ├── tab_b.png ├── tab_h.png ├── tab_s.png └── tabs.css ├── qml-logger.pro ├── qmldir ├── samples ├── csv-logger-button │ ├── README.md │ ├── android │ │ ├── AndroidManifest.xml │ │ ├── build.gradle │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── res │ │ │ └── values │ │ │ └── libs.xml │ ├── csv-logger-button.pro │ ├── qml.qrc │ └── src │ │ ├── main.cpp │ │ └── main.qml └── simple-logger-button │ ├── README.md │ ├── android │ ├── AndroidManifest.xml │ ├── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── res │ │ └── values │ │ └── libs.xml │ ├── qml.qrc │ ├── simple-logger-button.pro │ └── src │ ├── main.cpp │ └── main.qml └── src ├── CSVLogger.cpp ├── CSVLogger.h ├── LoggerPlugin.cpp ├── LoggerPlugin.h ├── LoggerUtil.cpp ├── LoggerUtil.h ├── SimpleLogger.cpp └── SimpleLogger.h /.clang_complete: -------------------------------------------------------------------------------- 1 | -I/opt/Qt/5.10.0/gcc_64/include 2 | -I/opt/Qt/5.10.0/gcc_64/include/QtQuick 3 | -I/opt/Qt/5.10.0/gcc_64/include/QtGui 4 | -I/opt/Qt/5.10.0/gcc_64/include/QtQml 5 | -I/opt/Qt/5.10.0/gcc_64/include/QtNetwork 6 | -I/opt/Qt/5.10.0/gcc_64/include/QtBluetooth 7 | -I/opt/Qt/5.10.0/gcc_64/include/QtCore 8 | -I/opt/Qt/5.10.0/android_armv7/include/QtAndroidExtras 9 | -Iinclude/ 10 | -fPIE 11 | -std=c++11 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #Temp build files 2 | build*/ 3 | xml/ 4 | 5 | #Temp QT files 6 | *.user 7 | 8 | #Annoying files 9 | *~ 10 | 11 | #Ubuntu ignores 12 | .directory 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | qml-logger 2 | ========== 3 | 4 | qml-logger is a file logging plugin that enables logging data to given file from QML. It is tested with Qt 5.10.1 on the 5 | following: 6 | 7 | - Ubuntu 17.10 8 | - macOS 10.13.3 with Xcode 9.3 9 | - Windows 10 (UWP x64 (MSVC 2017)) with Visual Studio 2017 Community (with `Universal Windows Platform development` and `C++ Universal Windows Platform tools`) 10 | - Android 7.1.2 with Ubuntu 17.10 host with Android API 23, Android SDK Tools 25.2.5 and Android NDK r10e 11 | 12 | See [samples/](samples/) for example uses. 13 | 14 | See [doc/index.html](doc/index.html) for the API. 15 | 16 | build [Linux & macOS] 17 | --------------------- 18 | 19 | ``` 20 | $ mkdir build && cd build 21 | $ qt-install-dir/qt-version/target-platform/bin/qmake .. 22 | $ make install 23 | ``` 24 | 25 | This will install the QML plugin inside the Qt sysroot, which you must have write access to. **Be aware that this is not a sandboxed installation.** 26 | 27 | build [Android] 28 | --------------- 29 | 30 | ``` 31 | $ export ANDROID_NDK_ROOT=/path-to-android-ndk/ 32 | $ mkdir build && cd build 33 | $ qt-install-dir/qt-version/target-platform/bin/qmake .. 34 | $ make install 35 | ``` 36 | 37 | This will install the QML plugin inside the Qt sysroot, which you must have write access to. **Be aware that this is not a sandboxed installation.** 38 | 39 | build [Windows] 40 | --------------- 41 | 42 | Run the following in the `Developer Command Prompt for VS 2017`: 43 | 44 | ``` 45 | > "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 46 | > mkdir build 47 | > cd build 48 | > qt-install-root\qt-version\target-platform\bin\qmake .. 49 | > nmake 50 | > nmake install 51 | ``` 52 | 53 | This will install the QML plugin inside the Qt sysroot, which you must have write access to. **Be aware that this is not a sandboxed installation.** 54 | 55 | build documentation 56 | ------------------- 57 | 58 | Install dependencies: 59 | ``` 60 | $ apt install doxygen doxyqml 61 | ``` 62 | 63 | Then, generate the documentation: 64 | ``` 65 | $ doxygen 66 | ``` 67 | -------------------------------------------------------------------------------- /doc/CSVLogger_8cpp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: src/CSVLogger.cpp File Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |
83 |
CSVLogger.cpp File Reference
84 |
85 |
86 | 87 |

Source for a QML CSV file logger. 88 | More...

89 |
#include "LoggerUtil.h"
90 | #include "CSVLogger.h"
91 | #include <QDir>
92 | #include <QStandardPaths>
93 | #include <QDateTime>
94 | #include <QSysInfo>
95 | #include <QNetworkInterface>
96 | #include <QBluetoothLocalDevice>
97 |
98 | Include dependency graph for CSVLogger.cpp:
99 |
100 |
101 | 102 | 103 | 104 | 105 |
106 |

Detailed Description

107 |

Source for a QML CSV file logger.

108 |
Author
Ayberk Özgür
109 |
Date
2016-06-15
110 |
111 |
112 | 113 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /doc/CSVLogger_8cpp__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /doc/CSVLogger_8cpp__incl.md5: -------------------------------------------------------------------------------- 1 | 485ba7584645e8e63e5710c16e84d8ff -------------------------------------------------------------------------------- /doc/CSVLogger_8cpp__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/CSVLogger_8cpp__incl.png -------------------------------------------------------------------------------- /doc/CSVLogger_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /doc/CSVLogger_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | 4404ab6ce0803e7f941a20eaf0a201cd -------------------------------------------------------------------------------- /doc/CSVLogger_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/CSVLogger_8h__dep__incl.png -------------------------------------------------------------------------------- /doc/CSVLogger_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /doc/CSVLogger_8h__incl.md5: -------------------------------------------------------------------------------- 1 | d5f58139482e27e9173eb99ca22425af -------------------------------------------------------------------------------- /doc/CSVLogger_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/CSVLogger_8h__incl.png -------------------------------------------------------------------------------- /doc/LoggerPlugin_8cpp__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /doc/LoggerPlugin_8cpp__incl.md5: -------------------------------------------------------------------------------- 1 | fbabc2991de71044e1f1619780cc0170 -------------------------------------------------------------------------------- /doc/LoggerPlugin_8cpp__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/LoggerPlugin_8cpp__incl.png -------------------------------------------------------------------------------- /doc/LoggerPlugin_8h.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: src/LoggerPlugin.h File Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |
83 |
LoggerPlugin.h File Reference
84 |
85 |
86 | 87 |

Object that exposes the Logger plugin components as QML objects. 88 | More...

89 |
#include <QQmlExtensionPlugin>
90 | #include <qqml.h>
91 |
92 | Include dependency graph for LoggerPlugin.h:
93 |
94 |
95 | 96 | 97 |
98 |
99 | This graph shows which files directly or indirectly include this file:
100 |
101 |
102 | 103 | 104 | 105 |
106 |
107 |

Go to the source code of this file.

108 |

Detailed Description

109 |

Object that exposes the Logger plugin components as QML objects.

110 |
Author
Ayberk Özgür
111 |
Date
2016-06-15
112 |
113 |
114 | 115 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /doc/LoggerPlugin_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /doc/LoggerPlugin_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | 941eca4ac4e81f9fa715a7e4c7fba87d -------------------------------------------------------------------------------- /doc/LoggerPlugin_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/LoggerPlugin_8h__dep__incl.png -------------------------------------------------------------------------------- /doc/LoggerPlugin_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /doc/LoggerPlugin_8h__incl.md5: -------------------------------------------------------------------------------- 1 | d4bf4ffee02d26f335cea1a13bd48d1f -------------------------------------------------------------------------------- /doc/LoggerPlugin_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/LoggerPlugin_8h__incl.png -------------------------------------------------------------------------------- /doc/LoggerUtil_8cpp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: src/LoggerUtil.cpp File Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |
83 |
LoggerUtil.cpp File Reference
84 |
85 |
86 | 87 |

Logger utilities header. 88 | More...

89 |
#include "LoggerUtil.h"
90 | #include <QSysInfo>
91 | #include <QBluetoothLocalDevice>
92 | #include <QNetworkInterface>
93 |
94 | Include dependency graph for LoggerUtil.cpp:
95 |
96 |
97 | 98 | 99 | 100 |
101 |

Detailed Description

102 |

Logger utilities header.

103 |
Author
Ayberk Özgür
104 |
Date
2016-11-14
105 |
106 |
107 | 108 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /doc/LoggerUtil_8cpp__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /doc/LoggerUtil_8cpp__incl.md5: -------------------------------------------------------------------------------- 1 | 26841c1bb2999de276449f59d6f69672 -------------------------------------------------------------------------------- /doc/LoggerUtil_8cpp__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/LoggerUtil_8cpp__incl.png -------------------------------------------------------------------------------- /doc/LoggerUtil_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /doc/LoggerUtil_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | 5ac6d1f6bc5ad641eb7856877e18e89f -------------------------------------------------------------------------------- /doc/LoggerUtil_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/LoggerUtil_8h__dep__incl.png -------------------------------------------------------------------------------- /doc/LoggerUtil_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /doc/LoggerUtil_8h__incl.md5: -------------------------------------------------------------------------------- 1 | 4a4d5864197a5c197979c4c73c7d7d6e -------------------------------------------------------------------------------- /doc/LoggerUtil_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/LoggerUtil_8h__incl.png -------------------------------------------------------------------------------- /doc/SimpleLogger_8cpp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: src/SimpleLogger.cpp File Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |
83 |
SimpleLogger.cpp File Reference
84 |
85 |
86 | 87 |

Source for a simple line-by-line logger. 88 | More...

89 |
#include "SimpleLogger.h"
90 | #include <QDir>
91 | #include <QStandardPaths>
92 | #include <QDateTime>
93 | #include "LoggerUtil.h"
94 |
95 | Include dependency graph for SimpleLogger.cpp:
96 |
97 |
98 | 99 | 100 | 101 | 102 |
103 |

Detailed Description

104 |

Source for a simple line-by-line logger.

105 |
Author
Ayberk Özgür
106 |
Date
2016-06-15
107 |
108 |
109 | 110 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /doc/SimpleLogger_8cpp__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /doc/SimpleLogger_8cpp__incl.md5: -------------------------------------------------------------------------------- 1 | 49ee3788da562737781e25b99ec0b08d -------------------------------------------------------------------------------- /doc/SimpleLogger_8cpp__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/SimpleLogger_8cpp__incl.png -------------------------------------------------------------------------------- /doc/SimpleLogger_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /doc/SimpleLogger_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | 2201c647f2695f7775f0c1be070e96ac -------------------------------------------------------------------------------- /doc/SimpleLogger_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/SimpleLogger_8h__dep__incl.png -------------------------------------------------------------------------------- /doc/SimpleLogger_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /doc/SimpleLogger_8h__incl.md5: -------------------------------------------------------------------------------- 1 | 205efde073f2af6f74fc9fe9a0789e47 -------------------------------------------------------------------------------- /doc/SimpleLogger_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/SimpleLogger_8h__incl.png -------------------------------------------------------------------------------- /doc/annotated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: Class List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |
83 |
Class List
84 |
85 |
86 |
Here are the classes, structs, unions and interfaces with brief descriptions:
87 |
[detail level 12]
88 | 89 | 90 | 91 | 92 |
 NQMLLogger
 CCSVLoggerUtility to log CSV data line by line with optional timestamp
 CLoggerUtilLogger utilities
 CSimpleLoggerUtility to log strings line by line with optional timestamp and unique device ID
93 |
94 |
95 |
96 | 97 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /doc/annotated_dup.js: -------------------------------------------------------------------------------- 1 | var annotated_dup = 2 | [ 3 | [ "QMLLogger", null, [ 4 | [ "CSVLogger", "classQMLLogger_1_1CSVLogger.html", "classQMLLogger_1_1CSVLogger" ], 5 | [ "LoggerUtil", "classQMLLogger_1_1LoggerUtil.html", "classQMLLogger_1_1LoggerUtil" ], 6 | [ "SimpleLogger", "classQMLLogger_1_1SimpleLogger.html", "classQMLLogger_1_1SimpleLogger" ] 7 | ] ] 8 | ]; -------------------------------------------------------------------------------- /doc/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/bc_s.png -------------------------------------------------------------------------------- /doc/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/bdwn.png -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1CSVLogger.js: -------------------------------------------------------------------------------- 1 | var classQMLLogger_1_1CSVLogger = 2 | [ 3 | [ "close", "classQMLLogger_1_1CSVLogger.html#a77f7a8148fd1556c6342c84ef45232c0", null ], 4 | [ "log", "classQMLLogger_1_1CSVLogger.html#a73ea1e5c7366c5f0b0e4dd36aa8c973c", null ], 5 | [ "filename", "classQMLLogger_1_1CSVLogger.html#a9db30c672dff6b43760bbcb1811a8a91", null ], 6 | [ "header", "classQMLLogger_1_1CSVLogger.html#aeb90c315493d8fc581fdb40a61ca8867", null ], 7 | [ "logMillis", "classQMLLogger_1_1CSVLogger.html#a51bd24a4ac8e9e0e3779812ab76af333", null ], 8 | [ "logTime", "classQMLLogger_1_1CSVLogger.html#a2850689779d0c326606f6506a27371a9", null ], 9 | [ "precision", "classQMLLogger_1_1CSVLogger.html#a8f0273e02d9eb41699bc2e86d983f2bc", null ], 10 | [ "toConsole", "classQMLLogger_1_1CSVLogger.html#af599b63efe8319311d9a5655c3b75569", null ] 11 | ]; -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1CSVLogger__inherit__graph.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1CSVLogger__inherit__graph.md5: -------------------------------------------------------------------------------- 1 | 426011f27e1e4a10e09563a177107a7d -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1CSVLogger__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/classQMLLogger_1_1CSVLogger__inherit__graph.png -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1LoggerUtil-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |
83 |
QMLLogger::LoggerUtil Member List
84 |
85 |
86 | 87 |

This is the complete list of members for QMLLogger::LoggerUtil, including all inherited members.

88 | 89 | 90 |
uniqueDeviceIDQMLLogger::LoggerUtil
91 |
92 | 93 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1LoggerUtil.js: -------------------------------------------------------------------------------- 1 | var classQMLLogger_1_1LoggerUtil = 2 | [ 3 | [ "uniqueDeviceID", "classQMLLogger_1_1LoggerUtil.html#a8492385c3b09756b44023881e9a9dcc6", null ] 4 | ]; -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1LoggerUtil__inherit__graph.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1LoggerUtil__inherit__graph.md5: -------------------------------------------------------------------------------- 1 | 43c96ea29b2072bcd0c848e8e5b9c5cc -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1LoggerUtil__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/classQMLLogger_1_1LoggerUtil__inherit__graph.png -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1SimpleLogger-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |
83 |
QMLLogger::SimpleLogger Member List
84 |
85 |
86 | 87 |

This is the complete list of members for QMLLogger::SimpleLogger, including all inherited members.

88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 |
filenameQMLLogger::SimpleLogger
log(const QString &data)QMLLogger::SimpleLoggerslot
logDeviceInfoQMLLogger::SimpleLogger
logMillisQMLLogger::SimpleLogger
logTimeQMLLogger::SimpleLogger
toConsoleQMLLogger::SimpleLogger
96 |
97 | 98 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1SimpleLogger.js: -------------------------------------------------------------------------------- 1 | var classQMLLogger_1_1SimpleLogger = 2 | [ 3 | [ "log", "classQMLLogger_1_1SimpleLogger.html#ab7ead4ea661f64090a3cd26ea2c89ece", null ], 4 | [ "filename", "classQMLLogger_1_1SimpleLogger.html#acb7d62bf0a704dd23b7d4a2c5f782c32", null ], 5 | [ "logDeviceInfo", "classQMLLogger_1_1SimpleLogger.html#a580ca4d5c8d731506e29c78aab899f41", null ], 6 | [ "logMillis", "classQMLLogger_1_1SimpleLogger.html#adbcd5344afe7a5ff58e762a4b34328a4", null ], 7 | [ "logTime", "classQMLLogger_1_1SimpleLogger.html#a3df298d037c9d5a5ffe39d8ded8b426d", null ], 8 | [ "toConsole", "classQMLLogger_1_1SimpleLogger.html#a4aa4bab85434ff1a7ef8ca5556ba5351", null ] 9 | ]; -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1SimpleLogger__inherit__graph.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1SimpleLogger__inherit__graph.md5: -------------------------------------------------------------------------------- 1 | 8adbb494262a0d31f5304b15d8f63e11 -------------------------------------------------------------------------------- /doc/classQMLLogger_1_1SimpleLogger__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/classQMLLogger_1_1SimpleLogger__inherit__graph.png -------------------------------------------------------------------------------- /doc/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: Class Index 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |
83 |
Class Index
84 |
85 |
86 |
c | l | s
87 | 88 | 92 | 93 | 94 | 95 |
  c  
89 |
  l  
90 |
  s  
91 |
CSVLogger (QMLLogger)   LoggerUtil (QMLLogger)   SimpleLogger (QMLLogger)   
96 |
c | l | s
97 |
98 |
99 | 100 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /doc/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/closed.png -------------------------------------------------------------------------------- /doc/dir_68267d1309a1af8e8297ef4c3efbcdba.js: -------------------------------------------------------------------------------- 1 | var dir_68267d1309a1af8e8297ef4c3efbcdba = 2 | [ 3 | [ "CSVLogger.cpp", "CSVLogger_8cpp.html", null ], 4 | [ "CSVLogger.h", "CSVLogger_8h.html", [ 5 | [ "CSVLogger", "classQMLLogger_1_1CSVLogger.html", "classQMLLogger_1_1CSVLogger" ] 6 | ] ], 7 | [ "LoggerPlugin.cpp", "LoggerPlugin_8cpp.html", null ], 8 | [ "LoggerPlugin.h", "LoggerPlugin_8h.html", null ], 9 | [ "LoggerUtil.cpp", "LoggerUtil_8cpp.html", null ], 10 | [ "LoggerUtil.h", "LoggerUtil_8h.html", [ 11 | [ "LoggerUtil", "classQMLLogger_1_1LoggerUtil.html", "classQMLLogger_1_1LoggerUtil" ] 12 | ] ], 13 | [ "SimpleLogger.cpp", "SimpleLogger_8cpp.html", null ], 14 | [ "SimpleLogger.h", "SimpleLogger_8h.html", [ 15 | [ "SimpleLogger", "classQMLLogger_1_1SimpleLogger.html", "classQMLLogger_1_1SimpleLogger" ] 16 | ] ] 17 | ]; -------------------------------------------------------------------------------- /doc/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/doc.png -------------------------------------------------------------------------------- /doc/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/doxygen.png -------------------------------------------------------------------------------- /doc/dynsections.js: -------------------------------------------------------------------------------- 1 | function toggleVisibility(linkObj) 2 | { 3 | var base = $(linkObj).attr('id'); 4 | var summary = $('#'+base+'-summary'); 5 | var content = $('#'+base+'-content'); 6 | var trigger = $('#'+base+'-trigger'); 7 | var src=$(trigger).attr('src'); 8 | if (content.is(':visible')===true) { 9 | content.hide(); 10 | summary.show(); 11 | $(linkObj).addClass('closed').removeClass('opened'); 12 | $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); 13 | } else { 14 | content.show(); 15 | summary.hide(); 16 | $(linkObj).removeClass('closed').addClass('opened'); 17 | $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); 18 | } 19 | return false; 20 | } 21 | 22 | function updateStripes() 23 | { 24 | $('table.directory tr'). 25 | removeClass('even').filter(':visible:even').addClass('even'); 26 | } 27 | 28 | function toggleLevel(level) 29 | { 30 | $('table.directory tr').each(function() { 31 | var l = this.id.split('_').length-1; 32 | var i = $('#img'+this.id.substring(3)); 33 | var a = $('#arr'+this.id.substring(3)); 34 | if (l 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: Class Members - Functions 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |   91 |
92 |
93 | 94 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /doc/functions_prop.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: Class Members - Properties 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |   112 |
113 |
114 | 115 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /doc/graph_legend.md5: -------------------------------------------------------------------------------- 1 | 387ff8eb65306fa251338d3c9bd7bfff -------------------------------------------------------------------------------- /doc/graph_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/graph_legend.png -------------------------------------------------------------------------------- /doc/hierarchy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: Class Hierarchy 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |
83 |
Class Hierarchy
84 |
85 |
86 |
87 |

Go to the graphical class hierarchy

88 | This inheritance list is sorted roughly, but not completely, alphabetically:
89 |
[detail level 12]
90 | 91 | 92 | 93 | 94 |
 CQQuickItem
 CQMLLogger::CSVLoggerUtility to log CSV data line by line with optional timestamp
 CQMLLogger::LoggerUtilLogger utilities
 CQMLLogger::SimpleLoggerUtility to log strings line by line with optional timestamp and unique device ID
95 |
96 |
97 |
98 | 99 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /doc/hierarchy.js: -------------------------------------------------------------------------------- 1 | var hierarchy = 2 | [ 3 | [ "QQuickItem", null, [ 4 | [ "QMLLogger::CSVLogger", "classQMLLogger_1_1CSVLogger.html", null ], 5 | [ "QMLLogger::LoggerUtil", "classQMLLogger_1_1LoggerUtil.html", null ], 6 | [ "QMLLogger::SimpleLogger", "classQMLLogger_1_1SimpleLogger.html", null ] 7 | ] ] 8 | ]; -------------------------------------------------------------------------------- /doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: qml-logger 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |
83 |
qml-logger
84 |
85 |
86 |

qml-logger is a file logging plugin that enables logging data to given file from QML. See README.md for more information.

87 |
88 |
89 | 90 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /doc/inherit_graph_0.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/inherit_graph_0.md5: -------------------------------------------------------------------------------- 1 | acf7022d9afa19568e79013d38a1f429 -------------------------------------------------------------------------------- /doc/inherit_graph_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/inherit_graph_0.png -------------------------------------------------------------------------------- /doc/inherits.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | qml-logger: Class Hierarchy 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 34 | 35 | 36 |
31 |
qml-logger 32 |
33 |
37 |
38 | 39 | 40 | 43 | 44 | 45 | 51 | 52 |
53 |
54 | 59 |
61 |
62 |
63 | 66 |
67 | 68 |
72 |
73 | 74 | 75 |
76 | 79 |
80 | 81 |
82 |
83 |
Class Hierarchy
84 |
85 |
86 | 89 | 96 |
90 | 91 | 92 | 93 | 94 | 95 |
97 |
98 |
99 | 100 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /doc/menu.js: -------------------------------------------------------------------------------- 1 | function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { 2 | function makeTree(data,relPath) { 3 | var result=''; 4 | if ('children' in data) { 5 | result+=''; 12 | } 13 | return result; 14 | } 15 | 16 | $('#main-nav').append(makeTree(menudata,relPath)); 17 | $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); 18 | if (searchEnabled) { 19 | if (serverSide) { 20 | $('#main-menu').append('
  • '); 21 | } else { 22 | $('#main-menu').append('
  • '); 23 | } 24 | } 25 | $('#main-menu').smartmenus(); 26 | } 27 | -------------------------------------------------------------------------------- /doc/menudata.js: -------------------------------------------------------------------------------- 1 | var menudata={children:[ 2 | {text:"Main Page",url:"index.html"}, 3 | {text:"Classes",url:"annotated.html",children:[ 4 | {text:"Class List",url:"annotated.html"}, 5 | {text:"Class Index",url:"classes.html"}, 6 | {text:"Class Hierarchy",url:"inherits.html"}, 7 | {text:"Class Members",url:"functions.html",children:[ 8 | {text:"All",url:"functions.html"}, 9 | {text:"Functions",url:"functions_func.html"}, 10 | {text:"Properties",url:"functions_prop.html"}]}]}, 11 | {text:"Files",url:"files.html",children:[ 12 | {text:"File List",url:"files.html"}]}]} 13 | -------------------------------------------------------------------------------- /doc/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/nav_f.png -------------------------------------------------------------------------------- /doc/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/nav_g.png -------------------------------------------------------------------------------- /doc/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/nav_h.png -------------------------------------------------------------------------------- /doc/navtree.css: -------------------------------------------------------------------------------- 1 | #nav-tree .children_ul { 2 | margin:0; 3 | padding:4px; 4 | } 5 | 6 | #nav-tree ul { 7 | list-style:none outside none; 8 | margin:0px; 9 | padding:0px; 10 | } 11 | 12 | #nav-tree li { 13 | white-space:nowrap; 14 | margin:0px; 15 | padding:0px; 16 | } 17 | 18 | #nav-tree .plus { 19 | margin:0px; 20 | } 21 | 22 | #nav-tree .selected { 23 | background-image: url('tab_a.png'); 24 | background-repeat:repeat-x; 25 | color: #fff; 26 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 27 | } 28 | 29 | #nav-tree img { 30 | margin:0px; 31 | padding:0px; 32 | border:0px; 33 | vertical-align: middle; 34 | } 35 | 36 | #nav-tree a { 37 | text-decoration:none; 38 | padding:0px; 39 | margin:0px; 40 | outline:none; 41 | } 42 | 43 | #nav-tree .label { 44 | margin:0px; 45 | padding:0px; 46 | font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; 47 | } 48 | 49 | #nav-tree .label a { 50 | padding:2px; 51 | } 52 | 53 | #nav-tree .selected a { 54 | text-decoration:none; 55 | color:#fff; 56 | } 57 | 58 | #nav-tree .children_ul { 59 | margin:0px; 60 | padding:0px; 61 | } 62 | 63 | #nav-tree .item { 64 | margin:0px; 65 | padding:0px; 66 | } 67 | 68 | #nav-tree { 69 | padding: 0px 0px; 70 | background-color: #FAFAFF; 71 | font-size:14px; 72 | overflow:auto; 73 | } 74 | 75 | #doc-content { 76 | overflow:auto; 77 | display:block; 78 | padding:0px; 79 | margin:0px; 80 | -webkit-overflow-scrolling : touch; /* iOS 5+ */ 81 | } 82 | 83 | #side-nav { 84 | padding:0 6px 0 0; 85 | margin: 0px; 86 | display:block; 87 | position: absolute; 88 | left: 0px; 89 | width: 250px; 90 | } 91 | 92 | .ui-resizable .ui-resizable-handle { 93 | display:block; 94 | } 95 | 96 | .ui-resizable-e { 97 | background-image:url("splitbar.png"); 98 | background-size:100%; 99 | background-repeat:no-repeat; 100 | background-attachment: scroll; 101 | cursor:ew-resize; 102 | height:100%; 103 | right:0; 104 | top:0; 105 | width:6px; 106 | } 107 | 108 | .ui-resizable-handle { 109 | display:none; 110 | font-size:0.1px; 111 | position:absolute; 112 | z-index:1; 113 | } 114 | 115 | #nav-tree-contents { 116 | margin: 6px 0px 0px 0px; 117 | } 118 | 119 | #nav-tree { 120 | background-image:url('nav_h.png'); 121 | background-repeat:repeat-x; 122 | background-color: #F9FAFC; 123 | -webkit-overflow-scrolling : touch; /* iOS 5+ */ 124 | } 125 | 126 | #nav-sync { 127 | position:absolute; 128 | top:5px; 129 | right:24px; 130 | z-index:0; 131 | } 132 | 133 | #nav-sync img { 134 | opacity:0.3; 135 | } 136 | 137 | #nav-sync img:hover { 138 | opacity:0.9; 139 | } 140 | 141 | @media print 142 | { 143 | #nav-tree { display: none; } 144 | div.ui-resizable-handle { display: none; position: relative; } 145 | } 146 | 147 | -------------------------------------------------------------------------------- /doc/navtreedata.js: -------------------------------------------------------------------------------- 1 | var NAVTREE = 2 | [ 3 | [ "qml-logger", "index.html", [ 4 | [ "Classes", "annotated.html", [ 5 | [ "Class List", "annotated.html", "annotated_dup" ], 6 | [ "Class Index", "classes.html", null ], 7 | [ "Class Hierarchy", "hierarchy.html", "hierarchy" ], 8 | [ "Class Members", "functions.html", [ 9 | [ "All", "functions.html", null ], 10 | [ "Functions", "functions_func.html", null ], 11 | [ "Properties", "functions_prop.html", null ] 12 | ] ] 13 | ] ], 14 | [ "Files", null, [ 15 | [ "File List", "files.html", "files" ] 16 | ] ] 17 | ] ] 18 | ]; 19 | 20 | var NAVTREEINDEX = 21 | [ 22 | ".html" 23 | ]; 24 | 25 | var SYNCONMSG = 'click to disable panel synchronisation'; 26 | var SYNCOFFMSG = 'click to enable panel synchronisation'; -------------------------------------------------------------------------------- /doc/navtreeindex0.js: -------------------------------------------------------------------------------- 1 | var NAVTREEINDEX0 = 2 | { 3 | ".html":[0,0,0], 4 | "CSVLogger_8cpp.html":[1,0,0,0], 5 | "CSVLogger_8h.html":[1,0,0,1], 6 | "CSVLogger_8h_source.html":[1,0,0,1], 7 | "LoggerPlugin_8cpp.html":[1,0,0,2], 8 | "LoggerPlugin_8h.html":[1,0,0,3], 9 | "LoggerPlugin_8h_source.html":[1,0,0,3], 10 | "LoggerUtil_8cpp.html":[1,0,0,4], 11 | "LoggerUtil_8h.html":[1,0,0,5], 12 | "LoggerUtil_8h_source.html":[1,0,0,5], 13 | "SimpleLogger_8cpp.html":[1,0,0,6], 14 | "SimpleLogger_8h.html":[1,0,0,7], 15 | "SimpleLogger_8h_source.html":[1,0,0,7], 16 | "annotated.html":[0,0], 17 | "classQMLLogger_1_1CSVLogger.html":[0,0,0,0], 18 | "classQMLLogger_1_1CSVLogger.html#a2850689779d0c326606f6506a27371a9":[0,0,0,0,5], 19 | "classQMLLogger_1_1CSVLogger.html#a51bd24a4ac8e9e0e3779812ab76af333":[0,0,0,0,4], 20 | "classQMLLogger_1_1CSVLogger.html#a73ea1e5c7366c5f0b0e4dd36aa8c973c":[0,0,0,0,1], 21 | "classQMLLogger_1_1CSVLogger.html#a77f7a8148fd1556c6342c84ef45232c0":[0,0,0,0,0], 22 | "classQMLLogger_1_1CSVLogger.html#a8f0273e02d9eb41699bc2e86d983f2bc":[0,0,0,0,6], 23 | "classQMLLogger_1_1CSVLogger.html#a9db30c672dff6b43760bbcb1811a8a91":[0,0,0,0,2], 24 | "classQMLLogger_1_1CSVLogger.html#aeb90c315493d8fc581fdb40a61ca8867":[0,0,0,0,3], 25 | "classQMLLogger_1_1CSVLogger.html#af599b63efe8319311d9a5655c3b75569":[0,0,0,0,7], 26 | "classQMLLogger_1_1LoggerUtil.html":[0,0,0,1], 27 | "classQMLLogger_1_1LoggerUtil.html#a8492385c3b09756b44023881e9a9dcc6":[0,0,0,1,0], 28 | "classQMLLogger_1_1SimpleLogger.html":[0,0,0,2], 29 | "classQMLLogger_1_1SimpleLogger.html#a3df298d037c9d5a5ffe39d8ded8b426d":[0,0,0,2,4], 30 | "classQMLLogger_1_1SimpleLogger.html#a4aa4bab85434ff1a7ef8ca5556ba5351":[0,0,0,2,5], 31 | "classQMLLogger_1_1SimpleLogger.html#a580ca4d5c8d731506e29c78aab899f41":[0,0,0,2,2], 32 | "classQMLLogger_1_1SimpleLogger.html#ab7ead4ea661f64090a3cd26ea2c89ece":[0,0,0,2,0], 33 | "classQMLLogger_1_1SimpleLogger.html#acb7d62bf0a704dd23b7d4a2c5f782c32":[0,0,0,2,1], 34 | "classQMLLogger_1_1SimpleLogger.html#adbcd5344afe7a5ff58e762a4b34328a4":[0,0,0,2,3], 35 | "classes.html":[0,1], 36 | "dir_68267d1309a1af8e8297ef4c3efbcdba.html":[1,0,0], 37 | "files.html":[1,0], 38 | "functions.html":[0,3,0], 39 | "functions_func.html":[0,3,1], 40 | "functions_prop.html":[0,3,2], 41 | "hierarchy.html":[0,2], 42 | "index.html":[], 43 | "pages.html":[] 44 | }; 45 | -------------------------------------------------------------------------------- /doc/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/open.png -------------------------------------------------------------------------------- /doc/resize.js: -------------------------------------------------------------------------------- 1 | function initResizable() 2 | { 3 | var cookie_namespace = 'doxygen'; 4 | var sidenav,navtree,content,header,collapsed,collapsedWidth=0,barWidth=6,desktop_vp=768,titleHeight; 5 | 6 | function readCookie(cookie) 7 | { 8 | var myCookie = cookie_namespace+"_"+cookie+"="; 9 | if (document.cookie) { 10 | var index = document.cookie.indexOf(myCookie); 11 | if (index != -1) { 12 | var valStart = index + myCookie.length; 13 | var valEnd = document.cookie.indexOf(";", valStart); 14 | if (valEnd == -1) { 15 | valEnd = document.cookie.length; 16 | } 17 | var val = document.cookie.substring(valStart, valEnd); 18 | return val; 19 | } 20 | } 21 | return 0; 22 | } 23 | 24 | function writeCookie(cookie, val, expiration) 25 | { 26 | if (val==undefined) return; 27 | if (expiration == null) { 28 | var date = new Date(); 29 | date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week 30 | expiration = date.toGMTString(); 31 | } 32 | document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; 33 | } 34 | 35 | function resizeWidth() 36 | { 37 | var windowWidth = $(window).width() + "px"; 38 | var sidenavWidth = $(sidenav).outerWidth(); 39 | content.css({marginLeft:parseInt(sidenavWidth)+"px"}); 40 | writeCookie('width',sidenavWidth-barWidth, null); 41 | } 42 | 43 | function restoreWidth(navWidth) 44 | { 45 | var windowWidth = $(window).width() + "px"; 46 | content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); 47 | sidenav.css({width:navWidth + "px"}); 48 | } 49 | 50 | function resizeHeight() 51 | { 52 | var headerHeight = header.outerHeight(); 53 | var footerHeight = footer.outerHeight(); 54 | var windowHeight = $(window).height() - headerHeight - footerHeight; 55 | content.css({height:windowHeight + "px"}); 56 | navtree.css({height:windowHeight + "px"}); 57 | sidenav.css({height:windowHeight + "px"}); 58 | var width=$(window).width(); 59 | if (width!=collapsedWidth) { 60 | if (width=desktop_vp) { 61 | if (!collapsed) { 62 | collapseExpand(); 63 | } 64 | } else if (width>desktop_vp && collapsedWidth0) { 76 | restoreWidth(0); 77 | collapsed=true; 78 | } 79 | else { 80 | var width = readCookie('width'); 81 | if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } 82 | collapsed=false; 83 | } 84 | } 85 | 86 | header = $("#top"); 87 | sidenav = $("#side-nav"); 88 | content = $("#doc-content"); 89 | navtree = $("#nav-tree"); 90 | footer = $("#nav-path"); 91 | $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); 92 | $(sidenav).resizable({ minWidth: 0 }); 93 | $(window).resize(function() { resizeHeight(); }); 94 | var device = navigator.userAgent.toLowerCase(); 95 | var touch_device = device.match(/(iphone|ipod|ipad|android)/); 96 | if (touch_device) { /* wider split bar for touch only devices */ 97 | $(sidenav).css({ paddingRight:'20px' }); 98 | $('.ui-resizable-e').css({ width:'20px' }); 99 | $('#nav-sync').css({ right:'34px' }); 100 | barWidth=20; 101 | } 102 | var width = readCookie('width'); 103 | if (width) { restoreWidth(width); } else { resizeWidth(); } 104 | resizeHeight(); 105 | var url = location.href; 106 | var i=url.indexOf("#"); 107 | if (i>=0) window.location.hash=url.substr(i); 108 | var _preventDefault = function(evt) { evt.preventDefault(); }; 109 | $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); 110 | $(".ui-resizable-handle").dblclick(collapseExpand); 111 | $(window).load(resizeHeight); 112 | } 113 | 114 | 115 | -------------------------------------------------------------------------------- /doc/search/all_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/all_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['close',['close',['../classQMLLogger_1_1CSVLogger.html#a77f7a8148fd1556c6342c84ef45232c0',1,'QMLLogger::CSVLogger']]], 4 | ['csvlogger',['CSVLogger',['../classQMLLogger_1_1CSVLogger.html',1,'QMLLogger']]], 5 | ['csvlogger_2ecpp',['CSVLogger.cpp',['../CSVLogger_8cpp.html',1,'']]], 6 | ['csvlogger_2eh',['CSVLogger.h',['../CSVLogger_8h.html',1,'']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /doc/search/all_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/all_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['filename',['filename',['../classQMLLogger_1_1CSVLogger.html#a9db30c672dff6b43760bbcb1811a8a91',1,'QMLLogger::CSVLogger::filename()'],['../classQMLLogger_1_1SimpleLogger.html#acb7d62bf0a704dd23b7d4a2c5f782c32',1,'QMLLogger::SimpleLogger::filename()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/all_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/all_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['header',['header',['../classQMLLogger_1_1CSVLogger.html#aeb90c315493d8fc581fdb40a61ca8867',1,'QMLLogger::CSVLogger']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/all_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/all_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['log',['log',['../classQMLLogger_1_1CSVLogger.html#a73ea1e5c7366c5f0b0e4dd36aa8c973c',1,'QMLLogger::CSVLogger::log()'],['../classQMLLogger_1_1SimpleLogger.html#ab7ead4ea661f64090a3cd26ea2c89ece',1,'QMLLogger::SimpleLogger::log()']]], 4 | ['logdeviceinfo',['logDeviceInfo',['../classQMLLogger_1_1SimpleLogger.html#a580ca4d5c8d731506e29c78aab899f41',1,'QMLLogger::SimpleLogger']]], 5 | ['loggerplugin_2ecpp',['LoggerPlugin.cpp',['../LoggerPlugin_8cpp.html',1,'']]], 6 | ['loggerplugin_2eh',['LoggerPlugin.h',['../LoggerPlugin_8h.html',1,'']]], 7 | ['loggerutil',['LoggerUtil',['../classQMLLogger_1_1LoggerUtil.html',1,'QMLLogger']]], 8 | ['loggerutil_2ecpp',['LoggerUtil.cpp',['../LoggerUtil_8cpp.html',1,'']]], 9 | ['loggerutil_2eh',['LoggerUtil.h',['../LoggerUtil_8h.html',1,'']]], 10 | ['logmillis',['logMillis',['../classQMLLogger_1_1CSVLogger.html#a51bd24a4ac8e9e0e3779812ab76af333',1,'QMLLogger::CSVLogger::logMillis()'],['../classQMLLogger_1_1SimpleLogger.html#adbcd5344afe7a5ff58e762a4b34328a4',1,'QMLLogger::SimpleLogger::logMillis()']]], 11 | ['logtime',['logTime',['../classQMLLogger_1_1CSVLogger.html#a2850689779d0c326606f6506a27371a9',1,'QMLLogger::CSVLogger::logTime()'],['../classQMLLogger_1_1SimpleLogger.html#a3df298d037c9d5a5ffe39d8ded8b426d',1,'QMLLogger::SimpleLogger::logTime()']]] 12 | ]; 13 | -------------------------------------------------------------------------------- /doc/search/all_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/all_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['precision',['precision',['../classQMLLogger_1_1CSVLogger.html#a8f0273e02d9eb41699bc2e86d983f2bc',1,'QMLLogger::CSVLogger']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/all_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/all_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['qml_2dlogger',['qml-logger',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/all_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/all_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['simplelogger',['SimpleLogger',['../classQMLLogger_1_1SimpleLogger.html',1,'QMLLogger']]], 4 | ['simplelogger_2ecpp',['SimpleLogger.cpp',['../SimpleLogger_8cpp.html',1,'']]], 5 | ['simplelogger_2eh',['SimpleLogger.h',['../SimpleLogger_8h.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doc/search/all_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/all_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['toconsole',['toConsole',['../classQMLLogger_1_1CSVLogger.html#af599b63efe8319311d9a5655c3b75569',1,'QMLLogger::CSVLogger::toConsole()'],['../classQMLLogger_1_1SimpleLogger.html#a4aa4bab85434ff1a7ef8ca5556ba5351',1,'QMLLogger::SimpleLogger::toConsole()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/all_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/all_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['uniquedeviceid',['uniqueDeviceID',['../classQMLLogger_1_1LoggerUtil.html#a8492385c3b09756b44023881e9a9dcc6',1,'QMLLogger::LoggerUtil']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/classes_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/classes_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['csvlogger',['CSVLogger',['../classQMLLogger_1_1CSVLogger.html',1,'QMLLogger']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/classes_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/classes_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['loggerutil',['LoggerUtil',['../classQMLLogger_1_1LoggerUtil.html',1,'QMLLogger']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/classes_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/classes_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['simplelogger',['SimpleLogger',['../classQMLLogger_1_1SimpleLogger.html',1,'QMLLogger']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/search/close.png -------------------------------------------------------------------------------- /doc/search/files_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/files_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['csvlogger_2ecpp',['CSVLogger.cpp',['../CSVLogger_8cpp.html',1,'']]], 4 | ['csvlogger_2eh',['CSVLogger.h',['../CSVLogger_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/search/files_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/files_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['loggerplugin_2ecpp',['LoggerPlugin.cpp',['../LoggerPlugin_8cpp.html',1,'']]], 4 | ['loggerplugin_2eh',['LoggerPlugin.h',['../LoggerPlugin_8h.html',1,'']]], 5 | ['loggerutil_2ecpp',['LoggerUtil.cpp',['../LoggerUtil_8cpp.html',1,'']]], 6 | ['loggerutil_2eh',['LoggerUtil.h',['../LoggerUtil_8h.html',1,'']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /doc/search/files_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/files_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['simplelogger_2ecpp',['SimpleLogger.cpp',['../SimpleLogger_8cpp.html',1,'']]], 4 | ['simplelogger_2eh',['SimpleLogger.h',['../SimpleLogger_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/search/functions_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/functions_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['close',['close',['../classQMLLogger_1_1CSVLogger.html#a77f7a8148fd1556c6342c84ef45232c0',1,'QMLLogger::CSVLogger']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/functions_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/functions_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['log',['log',['../classQMLLogger_1_1CSVLogger.html#a73ea1e5c7366c5f0b0e4dd36aa8c973c',1,'QMLLogger::CSVLogger::log()'],['../classQMLLogger_1_1SimpleLogger.html#ab7ead4ea661f64090a3cd26ea2c89ece',1,'QMLLogger::SimpleLogger::log()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/search/mag_sel.png -------------------------------------------------------------------------------- /doc/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
    9 |
    No Matches
    10 |
    11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/search/pages_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/pages_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['qml_2dlogger',['qml-logger',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/properties_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/properties_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['filename',['filename',['../classQMLLogger_1_1CSVLogger.html#a9db30c672dff6b43760bbcb1811a8a91',1,'QMLLogger::CSVLogger::filename()'],['../classQMLLogger_1_1SimpleLogger.html#acb7d62bf0a704dd23b7d4a2c5f782c32',1,'QMLLogger::SimpleLogger::filename()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/properties_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/properties_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['header',['header',['../classQMLLogger_1_1CSVLogger.html#aeb90c315493d8fc581fdb40a61ca8867',1,'QMLLogger::CSVLogger']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/properties_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/properties_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['logdeviceinfo',['logDeviceInfo',['../classQMLLogger_1_1SimpleLogger.html#a580ca4d5c8d731506e29c78aab899f41',1,'QMLLogger::SimpleLogger']]], 4 | ['logmillis',['logMillis',['../classQMLLogger_1_1CSVLogger.html#a51bd24a4ac8e9e0e3779812ab76af333',1,'QMLLogger::CSVLogger::logMillis()'],['../classQMLLogger_1_1SimpleLogger.html#adbcd5344afe7a5ff58e762a4b34328a4',1,'QMLLogger::SimpleLogger::logMillis()']]], 5 | ['logtime',['logTime',['../classQMLLogger_1_1CSVLogger.html#a2850689779d0c326606f6506a27371a9',1,'QMLLogger::CSVLogger::logTime()'],['../classQMLLogger_1_1SimpleLogger.html#a3df298d037c9d5a5ffe39d8ded8b426d',1,'QMLLogger::SimpleLogger::logTime()']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doc/search/properties_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/properties_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['precision',['precision',['../classQMLLogger_1_1CSVLogger.html#a8f0273e02d9eb41699bc2e86d983f2bc',1,'QMLLogger::CSVLogger']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/properties_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/properties_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['toconsole',['toConsole',['../classQMLLogger_1_1CSVLogger.html#af599b63efe8319311d9a5655c3b75569',1,'QMLLogger::CSVLogger::toConsole()'],['../classQMLLogger_1_1SimpleLogger.html#a4aa4bab85434ff1a7ef8ca5556ba5351',1,'QMLLogger::SimpleLogger::toConsole()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/properties_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/search/properties_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['uniquedeviceid',['uniqueDeviceID',['../classQMLLogger_1_1LoggerUtil.html#a8492385c3b09756b44023881e9a9dcc6',1,'QMLLogger::LoggerUtil']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/search/search.css: -------------------------------------------------------------------------------- 1 | /*---------------- Search Box */ 2 | 3 | #FSearchBox { 4 | float: left; 5 | } 6 | 7 | #MSearchBox { 8 | white-space : nowrap; 9 | float: none; 10 | margin-top: 8px; 11 | right: 0px; 12 | width: 170px; 13 | height: 24px; 14 | z-index: 102; 15 | } 16 | 17 | #MSearchBox .left 18 | { 19 | display:block; 20 | position:absolute; 21 | left:10px; 22 | width:20px; 23 | height:19px; 24 | background:url('search_l.png') no-repeat; 25 | background-position:right; 26 | } 27 | 28 | #MSearchSelect { 29 | display:block; 30 | position:absolute; 31 | width:20px; 32 | height:19px; 33 | } 34 | 35 | .left #MSearchSelect { 36 | left:4px; 37 | } 38 | 39 | .right #MSearchSelect { 40 | right:5px; 41 | } 42 | 43 | #MSearchField { 44 | display:block; 45 | position:absolute; 46 | height:19px; 47 | background:url('search_m.png') repeat-x; 48 | border:none; 49 | width:115px; 50 | margin-left:20px; 51 | padding-left:4px; 52 | color: #909090; 53 | outline: none; 54 | font: 9pt Arial, Verdana, sans-serif; 55 | -webkit-border-radius: 0px; 56 | } 57 | 58 | #FSearchBox #MSearchField { 59 | margin-left:15px; 60 | } 61 | 62 | #MSearchBox .right { 63 | display:block; 64 | position:absolute; 65 | right:10px; 66 | top:8px; 67 | width:20px; 68 | height:19px; 69 | background:url('search_r.png') no-repeat; 70 | background-position:left; 71 | } 72 | 73 | #MSearchClose { 74 | display: none; 75 | position: absolute; 76 | top: 4px; 77 | background : none; 78 | border: none; 79 | margin: 0px 4px 0px 0px; 80 | padding: 0px 0px; 81 | outline: none; 82 | } 83 | 84 | .left #MSearchClose { 85 | left: 6px; 86 | } 87 | 88 | .right #MSearchClose { 89 | right: 2px; 90 | } 91 | 92 | .MSearchBoxActive #MSearchField { 93 | color: #000000; 94 | } 95 | 96 | /*---------------- Search filter selection */ 97 | 98 | #MSearchSelectWindow { 99 | display: none; 100 | position: absolute; 101 | left: 0; top: 0; 102 | border: 1px solid #90A5CE; 103 | background-color: #F9FAFC; 104 | z-index: 10001; 105 | padding-top: 4px; 106 | padding-bottom: 4px; 107 | -moz-border-radius: 4px; 108 | -webkit-border-top-left-radius: 4px; 109 | -webkit-border-top-right-radius: 4px; 110 | -webkit-border-bottom-left-radius: 4px; 111 | -webkit-border-bottom-right-radius: 4px; 112 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); 113 | } 114 | 115 | .SelectItem { 116 | font: 8pt Arial, Verdana, sans-serif; 117 | padding-left: 2px; 118 | padding-right: 12px; 119 | border: 0px; 120 | } 121 | 122 | span.SelectionMark { 123 | margin-right: 4px; 124 | font-family: monospace; 125 | outline-style: none; 126 | text-decoration: none; 127 | } 128 | 129 | a.SelectItem { 130 | display: block; 131 | outline-style: none; 132 | color: #000000; 133 | text-decoration: none; 134 | padding-left: 6px; 135 | padding-right: 12px; 136 | } 137 | 138 | a.SelectItem:focus, 139 | a.SelectItem:active { 140 | color: #000000; 141 | outline-style: none; 142 | text-decoration: none; 143 | } 144 | 145 | a.SelectItem:hover { 146 | color: #FFFFFF; 147 | background-color: #3D578C; 148 | outline-style: none; 149 | text-decoration: none; 150 | cursor: pointer; 151 | display: block; 152 | } 153 | 154 | /*---------------- Search results window */ 155 | 156 | iframe#MSearchResults { 157 | width: 60ex; 158 | height: 15em; 159 | } 160 | 161 | #MSearchResultsWindow { 162 | display: none; 163 | position: absolute; 164 | left: 0; top: 0; 165 | border: 1px solid #000; 166 | background-color: #EEF1F7; 167 | z-index:10000; 168 | } 169 | 170 | /* ----------------------------------- */ 171 | 172 | 173 | #SRIndex { 174 | clear:both; 175 | padding-bottom: 15px; 176 | } 177 | 178 | .SREntry { 179 | font-size: 10pt; 180 | padding-left: 1ex; 181 | } 182 | 183 | .SRPage .SREntry { 184 | font-size: 8pt; 185 | padding: 1px 5px; 186 | } 187 | 188 | body.SRPage { 189 | margin: 5px 2px; 190 | } 191 | 192 | .SRChildren { 193 | padding-left: 3ex; padding-bottom: .5em 194 | } 195 | 196 | .SRPage .SRChildren { 197 | display: none; 198 | } 199 | 200 | .SRSymbol { 201 | font-weight: bold; 202 | color: #425E97; 203 | font-family: Arial, Verdana, sans-serif; 204 | text-decoration: none; 205 | outline: none; 206 | } 207 | 208 | a.SRScope { 209 | display: block; 210 | color: #425E97; 211 | font-family: Arial, Verdana, sans-serif; 212 | text-decoration: none; 213 | outline: none; 214 | } 215 | 216 | a.SRSymbol:focus, a.SRSymbol:active, 217 | a.SRScope:focus, a.SRScope:active { 218 | text-decoration: underline; 219 | } 220 | 221 | span.SRScope { 222 | padding-left: 4px; 223 | } 224 | 225 | .SRPage .SRStatus { 226 | padding: 2px 5px; 227 | font-size: 8pt; 228 | font-style: italic; 229 | } 230 | 231 | .SRResult { 232 | display: none; 233 | } 234 | 235 | DIV.searchresults { 236 | margin-left: 10px; 237 | margin-right: 10px; 238 | } 239 | 240 | /*---------------- External search page results */ 241 | 242 | .searchresult { 243 | background-color: #F0F3F8; 244 | } 245 | 246 | .pages b { 247 | color: white; 248 | padding: 5px 5px 3px 5px; 249 | background-image: url("../tab_a.png"); 250 | background-repeat: repeat-x; 251 | text-shadow: 0 1px 1px #000000; 252 | } 253 | 254 | .pages { 255 | line-height: 17px; 256 | margin-left: 4px; 257 | text-decoration: none; 258 | } 259 | 260 | .hl { 261 | font-weight: bold; 262 | } 263 | 264 | #searchresults { 265 | margin-bottom: 20px; 266 | } 267 | 268 | .searchpages { 269 | margin-top: 10px; 270 | } 271 | 272 | -------------------------------------------------------------------------------- /doc/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/search/search_l.png -------------------------------------------------------------------------------- /doc/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/search/search_m.png -------------------------------------------------------------------------------- /doc/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/search/search_r.png -------------------------------------------------------------------------------- /doc/search/searchdata.js: -------------------------------------------------------------------------------- 1 | var indexSectionsWithContent = 2 | { 3 | 0: "cfhlpqstu", 4 | 1: "cls", 5 | 2: "cls", 6 | 3: "cl", 7 | 4: "fhlptu", 8 | 5: "q" 9 | }; 10 | 11 | var indexSectionNames = 12 | { 13 | 0: "all", 14 | 1: "classes", 15 | 2: "files", 16 | 3: "functions", 17 | 4: "properties", 18 | 5: "pages" 19 | }; 20 | 21 | var indexSectionLabels = 22 | { 23 | 0: "All", 24 | 1: "Classes", 25 | 2: "Files", 26 | 3: "Functions", 27 | 4: "Properties", 28 | 5: "Pages" 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /doc/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/splitbar.png -------------------------------------------------------------------------------- /doc/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/sync_off.png -------------------------------------------------------------------------------- /doc/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/sync_on.png -------------------------------------------------------------------------------- /doc/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/tab_a.png -------------------------------------------------------------------------------- /doc/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/tab_b.png -------------------------------------------------------------------------------- /doc/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/tab_h.png -------------------------------------------------------------------------------- /doc/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/doc/tab_s.png -------------------------------------------------------------------------------- /qml-logger.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = lib 2 | TARGET = loggerplugin 3 | 4 | CONFIG += qt plugin c++11 5 | CONFIG -= android_install 6 | 7 | QT += qml quick bluetooth 8 | android { QT += androidextras } 9 | 10 | unix { 11 | QMAKE_CXXFLAGS -= -O2 12 | QMAKE_CXXFLAGS_RELEASE -= -O2 13 | 14 | QMAKE_CXXFLAGS += -O3 15 | QMAKE_CXXFLAGS_RELEASE += -O3 16 | } 17 | 18 | TARGET = $$qtLibraryTarget($$TARGET) 19 | uri = Logger 20 | 21 | HEADERS += \ 22 | src/LoggerPlugin.h \ 23 | src/LoggerUtil.h \ 24 | src/SimpleLogger.h \ 25 | src/CSVLogger.h 26 | 27 | SOURCES += \ 28 | src/LoggerPlugin.cpp \ 29 | src/LoggerUtil.cpp \ 30 | src/SimpleLogger.cpp \ 31 | src/CSVLogger.cpp 32 | 33 | OTHER_FILES += qmldir 34 | 35 | #Install plugin library, qmldir 36 | qmldir.files = qmldir 37 | installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) 38 | qmldir.path = $$installPath 39 | target.path = $$installPath 40 | INSTALLS += target qmldir 41 | -------------------------------------------------------------------------------- /qmldir: -------------------------------------------------------------------------------- 1 | module Logger 2 | plugin loggerplugin 3 | -------------------------------------------------------------------------------- /samples/csv-logger-button/README.md: -------------------------------------------------------------------------------- 1 | csv-logger-button 2 | ================= 3 | 4 | Example use of `CSVLogger` in `qml-logger`. Follow the build instructions in [the 5 | qml-logger README](../../README.md) before trying to run this sample. It is tested with Qt 5.10.1 on the 6 | following: 7 | 8 | - Ubuntu 17.10 9 | - macOS 10.13.3 with Xcode 9.3 10 | - Windows 10 (UWP x64 (MSVC 2017)) with Visual Studio 2017 Community (with `Universal Windows Platform development` and `C++ Universal Windows Platform tools`) 11 | - Android 7.1.2 with Ubuntu 17.10 host with Android API 23, Android SDK Tools 25.2.5 and Android NDK r10e 12 | 13 | build & run [Ubuntu & macOS & Android] 14 | -------------------------------------- 15 | 16 | Load the project into QtCreator and press the Run button with the big green arrow. 17 | 18 | build & run [Windows] 19 | --------------------- 20 | 21 | - Load the project into QtCreator, select the `Release` build (and not the `Debug` and `Profile` build) 22 | - Press the Run button with the big green arrow once, this will install and launch the app (you may have to enable `Developer mode` in `Settings` -> `Update & Security` -> `For developers` -> `Use developer features`; this windows will pop up anyway if you haven't enabled it already) 23 | - For all subsequent launches, use the app launcher now installed in the Start Menu 24 | 25 | **Important note:** On Windows, the log file will be put under the local data directory of the app since access is not given 26 | to write to any other directory than this within WinRT sandboxing. This will typically be 27 | C:\Users\your-username\AppData\Local\Packages\app-uuid\LocalState. Be careful when using the Run button 28 | in QtCreator, as this will destroy this directory each time the app is launched, taking your potentially 29 | valuable data with it! Instead, launch your app from the Start Menu, which will preserve this directory. 30 | -------------------------------------------------------------------------------- /samples/csv-logger-button/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 37 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | 55 | 56 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /samples/csv-logger-button/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | jcenter() 4 | } 5 | 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:1.1.0' 8 | } 9 | } 10 | 11 | allprojects { 12 | repositories { 13 | jcenter() 14 | } 15 | } 16 | 17 | apply plugin: 'com.android.application' 18 | 19 | dependencies { 20 | compile fileTree(dir: 'libs', include: ['*.jar']) 21 | } 22 | 23 | android { 24 | /******************************************************* 25 | * The following variables: 26 | * - androidBuildToolsVersion, 27 | * - androidCompileSdkVersion 28 | * - qt5AndroidDir - holds the path to qt android files 29 | * needed to build any Qt application 30 | * on Android. 31 | * 32 | * are defined in gradle.properties file. This file is 33 | * updated by QtCreator and androiddeployqt tools. 34 | * Changing them manually might break the compilation! 35 | *******************************************************/ 36 | 37 | compileSdkVersion androidCompileSdkVersion.toInteger() 38 | 39 | buildToolsVersion androidBuildToolsVersion 40 | 41 | sourceSets { 42 | main { 43 | manifest.srcFile 'AndroidManifest.xml' 44 | java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java'] 45 | aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl'] 46 | res.srcDirs = [qt5AndroidDir + '/res', 'res'] 47 | resources.srcDirs = ['src'] 48 | renderscript.srcDirs = ['src'] 49 | assets.srcDirs = ['assets'] 50 | jniLibs.srcDirs = ['libs'] 51 | } 52 | } 53 | 54 | lintOptions { 55 | abortOnError false 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /samples/csv-logger-button/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/samples/csv-logger-button/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/csv-logger-button/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip 7 | -------------------------------------------------------------------------------- /samples/csv-logger-button/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /samples/csv-logger-button/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /samples/csv-logger-button/android/res/values/libs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | https://download.qt-project.org/ministro/android/qt5/qt-5.4 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /samples/csv-logger-button/csv-logger-button.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | 3 | QT += qml quick 4 | 5 | SOURCES += src/main.cpp 6 | 7 | RESOURCES += qml.qrc 8 | 9 | android { 10 | target.path = /libs/armeabi-v7a 11 | export(target.path) 12 | INSTALLS += target 13 | export(INSTALLS) 14 | } 15 | 16 | DISTFILES += \ 17 | android/AndroidManifest.xml \ 18 | android/gradle/wrapper/gradle-wrapper.jar \ 19 | android/gradlew.bat \ 20 | android/res/values/libs.xml \ 21 | android/build.gradle \ 22 | android/gradle/wrapper/gradle-wrapper.properties \ 23 | android/gradlew 24 | 25 | ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android 26 | -------------------------------------------------------------------------------- /samples/csv-logger-button/qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | src/main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /samples/csv-logger-button/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char *argv[]){ 5 | QGuiApplication app(argc, argv); 6 | QQmlApplicationEngine engine; 7 | engine.load(QUrl(QStringLiteral("qrc:///src/main.qml"))); 8 | return app.exec(); 9 | } 10 | -------------------------------------------------------------------------------- /samples/csv-logger-button/src/main.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.5 2 | import QtQuick.Window 2.1 3 | import QtQuick.Controls 1.4 4 | import Logger 1.0 5 | 6 | ApplicationWindow { 7 | visible: true 8 | 9 | CSVLogger{ 10 | id: logger 11 | enabled: enabledCheckbox.checked 12 | logTime: logTimeCheckBox.checked 13 | logMillis: logMillisCheckBox.checked 14 | filename: filenameInput.text 15 | header: headerInput.text === "" ? [] : headerInput.text.split("\n") 16 | toConsole: toConsoleCheckBox.checked 17 | } 18 | 19 | Column{ 20 | 21 | spacing: 5 22 | 23 | CheckBox{ 24 | id: enabledCheckbox 25 | text: "Enabled" 26 | checked: true 27 | } 28 | 29 | CheckBox{ 30 | id: logTimeCheckBox 31 | text: "Log time" 32 | checked: true 33 | } 34 | 35 | CheckBox{ 36 | id: logMillisCheckBox 37 | text: "Log milliseconds as well in time (needs time enabled)" 38 | checked: true 39 | } 40 | 41 | CheckBox{ 42 | id: toConsoleCheckBox 43 | text: "Log to console for debug" 44 | checked: false 45 | } 46 | 47 | TextField{ 48 | id: filenameInput 49 | text: "example.csv" 50 | placeholderText: "Filename" 51 | } 52 | 53 | Text{ 54 | text: "Header:" 55 | } 56 | 57 | TextArea{ 58 | id: headerInput 59 | text: "header1\nheader2\nheader3" 60 | } 61 | 62 | Text{ 63 | text: "Data:" 64 | } 65 | 66 | TextArea{ 67 | id: dataInput 68 | text: "data1\ndata2\ndata3" 69 | } 70 | 71 | Button{ 72 | text: "Log data" 73 | onClicked: logger.log(dataInput.text === "" ? [] : dataInput.text.split("\n")) 74 | } 75 | 76 | Button{ 77 | text: "Close log file" 78 | onClicked: logger.close() 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /samples/simple-logger-button/README.md: -------------------------------------------------------------------------------- 1 | simple-logger-button 2 | ==================== 3 | 4 | Example use of `SimpleLogger` in `qml-logger`. Follow the build instructions in [the 5 | qml-logger README](../../README.md) before trying to run this sample. It is tested with Qt 5.10.1 on the 6 | following: 7 | 8 | - Ubuntu 17.10 9 | - macOS 10.13.3 with Xcode 9.3 10 | - Windows 10 (UWP x64 (MSVC 2017)) with Visual Studio 2017 Community (with `Universal Windows Platform development` and `C++ Universal Windows Platform tools`) 11 | - Android 7.1.2 with Ubuntu 17.10 host with Android API 23, Android SDK Tools 25.2.5 and Android NDK r10e 12 | 13 | build & run [Ubuntu & macOS & Android] 14 | -------------------------------------- 15 | 16 | Load the project into QtCreator and press the Run button with the big green arrow. 17 | 18 | build & run [Windows] 19 | --------------------- 20 | 21 | - Load the project into QtCreator, select the `Release` build (and not the `Debug` and `Profile` build) 22 | - Press the Run button with the big green arrow once, this will install and launch the app (you may have to enable `Developer mode` in `Settings` -> `Update & Security` -> `For developers` -> `Use developer features`; this windows will pop up anyway if you haven't enabled it already) 23 | - For all subsequent launches, use the app launcher now installed in the Start Menu 24 | 25 | **Important note:** On Windows, the log file will be put under the local data directory of the app since access is not given 26 | to write to any other directory than this within WinRT sandboxing. This will typically be 27 | C:\Users\your-username\AppData\Local\Packages\app-uuid\LocalState. Be careful when using the Run button 28 | in QtCreator, as this will destroy this directory each time the app is launched, taking your potentially 29 | valuable data with it! Instead, launch your app from the Start Menu, which will preserve this directory. 30 | -------------------------------------------------------------------------------- /samples/simple-logger-button/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 37 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | 55 | 56 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /samples/simple-logger-button/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | jcenter() 4 | } 5 | 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:1.1.0' 8 | } 9 | } 10 | 11 | allprojects { 12 | repositories { 13 | jcenter() 14 | } 15 | } 16 | 17 | apply plugin: 'com.android.application' 18 | 19 | dependencies { 20 | compile fileTree(dir: 'libs', include: ['*.jar']) 21 | } 22 | 23 | android { 24 | /******************************************************* 25 | * The following variables: 26 | * - androidBuildToolsVersion, 27 | * - androidCompileSdkVersion 28 | * - qt5AndroidDir - holds the path to qt android files 29 | * needed to build any Qt application 30 | * on Android. 31 | * 32 | * are defined in gradle.properties file. This file is 33 | * updated by QtCreator and androiddeployqt tools. 34 | * Changing them manually might break the compilation! 35 | *******************************************************/ 36 | 37 | compileSdkVersion androidCompileSdkVersion.toInteger() 38 | 39 | buildToolsVersion androidBuildToolsVersion 40 | 41 | sourceSets { 42 | main { 43 | manifest.srcFile 'AndroidManifest.xml' 44 | java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java'] 45 | aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl'] 46 | res.srcDirs = [qt5AndroidDir + '/res', 'res'] 47 | resources.srcDirs = ['src'] 48 | renderscript.srcDirs = ['src'] 49 | assets.srcDirs = ['assets'] 50 | jniLibs.srcDirs = ['libs'] 51 | } 52 | } 53 | 54 | lintOptions { 55 | abortOnError false 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /samples/simple-logger-button/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/qml-logger/91d1dc4e3fee5b78ca9c70ef006a5cdbb4ab93b3/samples/simple-logger-button/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/simple-logger-button/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip 7 | -------------------------------------------------------------------------------- /samples/simple-logger-button/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /samples/simple-logger-button/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /samples/simple-logger-button/android/res/values/libs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | https://download.qt-project.org/ministro/android/qt5/qt-5.4 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /samples/simple-logger-button/qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | src/main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /samples/simple-logger-button/simple-logger-button.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | 3 | QT += qml quick 4 | 5 | SOURCES += src/main.cpp 6 | 7 | RESOURCES += qml.qrc 8 | 9 | android { 10 | target.path = /libs/armeabi-v7a 11 | export(target.path) 12 | INSTALLS += target 13 | export(INSTALLS) 14 | } 15 | 16 | DISTFILES += \ 17 | android/AndroidManifest.xml \ 18 | android/gradle/wrapper/gradle-wrapper.jar \ 19 | android/gradlew.bat \ 20 | android/res/values/libs.xml \ 21 | android/build.gradle \ 22 | android/gradle/wrapper/gradle-wrapper.properties \ 23 | android/gradlew 24 | 25 | ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android 26 | -------------------------------------------------------------------------------- /samples/simple-logger-button/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char *argv[]){ 5 | QGuiApplication app(argc, argv); 6 | QQmlApplicationEngine engine; 7 | engine.load(QUrl(QStringLiteral("qrc:///src/main.qml"))); 8 | return app.exec(); 9 | } 10 | -------------------------------------------------------------------------------- /samples/simple-logger-button/src/main.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.5 2 | import QtQuick.Window 2.1 3 | import QtQuick.Controls 1.4 4 | import Logger 1.0 5 | 6 | ApplicationWindow { 7 | visible: true 8 | 9 | SimpleLogger{ 10 | id: logger 11 | enabled: enabledCheckbox.checked 12 | logTime: logTimeCheckBox.checked 13 | logMillis: logMillisCheckBox.checked 14 | logDeviceInfo: logDeviceInfoCheckBox.checked 15 | filename: filenameInput.text 16 | toConsole: toConsoleCheckBox.checked 17 | } 18 | 19 | Column{ 20 | 21 | spacing: 5 22 | 23 | CheckBox{ 24 | id: enabledCheckbox 25 | text: "Enabled" 26 | checked: true 27 | } 28 | 29 | CheckBox{ 30 | id: logTimeCheckBox 31 | text: "Log time" 32 | checked: true 33 | } 34 | 35 | CheckBox{ 36 | id: logMillisCheckBox 37 | text: "Log milliseconds as well in time (needs time enabled)" 38 | checked: true 39 | } 40 | 41 | CheckBox{ 42 | id: logDeviceInfoCheckBox 43 | text: "Log local unique device ID" 44 | checked: true 45 | } 46 | 47 | CheckBox{ 48 | id: toConsoleCheckBox 49 | text: "Log to console for debug" 50 | checked: false 51 | } 52 | 53 | TextField{ 54 | id: filenameInput 55 | text: "example.log" 56 | placeholderText: "Filename" 57 | } 58 | 59 | Button{ 60 | text: "Log 'example_data'" 61 | onClicked: logger.log("example_data") 62 | } 63 | 64 | Button{ 65 | text: "Log 'another_example_data'" 66 | onClicked: logger.log("another_example_data") 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/LoggerPlugin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 EPFL 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see http://www.gnu.org/licenses/. 16 | */ 17 | 18 | /** 19 | * @file LoggerPlugin.cpp 20 | * @brief Implementation of the object that exposes the Logger plugin components as QML objects 21 | * @author Ayberk Özgür 22 | * @date 2016-06-15 23 | */ 24 | 25 | #include "LoggerPlugin.h" 26 | 27 | #include "LoggerUtil.h" 28 | #include "SimpleLogger.h" 29 | #include "CSVLogger.h" 30 | 31 | namespace QMLLogger{ 32 | 33 | void LoggerPlugin::registerTypes(const char* uri){ 34 | qmlRegisterSingletonType(uri, 1, 0, "LoggerUtil", 35 | [] (QQmlEngine* qmlEngine, QJSEngine* jsEngine)->QObject* { 36 | Q_UNUSED(qmlEngine) 37 | Q_UNUSED(jsEngine) 38 | return new LoggerUtil(); 39 | }); 40 | qmlRegisterType(uri, 1, 0, "SimpleLogger"); 41 | qmlRegisterType(uri, 1, 0, "CSVLogger"); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/LoggerPlugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 EPFL 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see http://www.gnu.org/licenses/. 16 | */ 17 | 18 | /** 19 | * @mainpage qml-logger 20 | * 21 | * qml-logger is a file logging plugin that enables logging data to given file from QML. See README.md for more information. 22 | */ 23 | 24 | /** 25 | * @file LoggerPlugin.h 26 | * @brief Object that exposes the Logger plugin components as QML objects 27 | * @author Ayberk Özgür 28 | * @date 2016-06-15 29 | */ 30 | 31 | #ifndef LOGGERPLUGIN_H 32 | #define LOGGERPLUGIN_H 33 | 34 | #include 35 | #include 36 | 37 | namespace QMLLogger{ 38 | 39 | /** @cond DO_NOT_DOCUMENT */ 40 | 41 | class LoggerPlugin : public QQmlExtensionPlugin { 42 | /* *INDENT-OFF* */ 43 | Q_OBJECT 44 | /* *INDENT-ON* */ 45 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 46 | 47 | public: 48 | void registerTypes(const char* uri); 49 | }; 50 | 51 | /** @endcond */ 52 | 53 | } 54 | 55 | #endif /* LOGGERPLUGIN_H */ 56 | -------------------------------------------------------------------------------- /src/LoggerUtil.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 EPFL 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see http://www.gnu.org/licenses/. 16 | */ 17 | 18 | /** 19 | * @file LoggerUtil.cpp 20 | * @brief Logger utilities header 21 | * @author Ayberk Özgür 22 | * @date 2016-11-14 23 | */ 24 | 25 | #include "LoggerUtil.h" 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #ifdef ANDROID 32 | #include 33 | #endif 34 | 35 | namespace QMLLogger{ 36 | 37 | LoggerUtil::LoggerUtil(QQuickItem* parent) : QQuickItem(parent){ } 38 | 39 | LoggerUtil::~LoggerUtil(){ } 40 | 41 | QString LoggerUtil::getUniqueDeviceID(){ 42 | QString deviceId = QSysInfo::prettyProductName(); 43 | 44 | QString macAddr(""); 45 | 46 | //Try Bluetooth first, it is more reliable than WiFi and Ethernet 47 | for(QBluetoothHostInfo const& info : QBluetoothLocalDevice::allDevices()){ 48 | QString hwAddr(info.address().toString()); 49 | if(hwAddr != "00:00:00:00:00:00" && hwAddr != "02:00:00:00:00:00"){ 50 | macAddr = hwAddr; 51 | break; 52 | } 53 | } 54 | 55 | //Try WiFi/Ethernet next 56 | if(macAddr == "") 57 | for(QNetworkInterface const& interface : QNetworkInterface::allInterfaces()) 58 | if(!(interface.flags() & QNetworkInterface::IsLoopBack)){ 59 | QString hwAddr = interface.hardwareAddress(); 60 | qDebug() << hwAddr; 61 | if(hwAddr != "00:00:00:00:00:00"){ 62 | macAddr = hwAddr; 63 | break; 64 | } 65 | } 66 | 67 | #ifdef ANDROID 68 | 69 | //Try /sys/class/net/wlan0/address for Android 6 70 | if(macAddr == ""){ 71 | QFile wifiMacAddressFile("/sys/class/net/wlan0/address"); 72 | if(wifiMacAddressFile.open(QIODevice::ReadOnly | QIODevice::Text)){ 73 | QString hwAddr = wifiMacAddressFile.readLine(); 74 | hwAddr = hwAddr.replace("\n",""); 75 | wifiMacAddressFile.close(); 76 | if(hwAddr != "00:00:00:00:00:00" && hwAddr != "02:00:00:00:00:00") 77 | macAddr = hwAddr; 78 | } 79 | } 80 | #endif 81 | 82 | if(macAddr != "") 83 | deviceId += " @ " + macAddr; 84 | else 85 | qWarning() << "LoggerUtil::uniqueDeviceID(): Couldn't get any MAC address of device, device ID won't be unique!"; 86 | 87 | deviceId.replace(" ", "_"); 88 | return deviceId; 89 | } 90 | 91 | bool LoggerUtil::androidSyncPermission(QString const& permission){ 92 | #ifdef ANDROID 93 | QtAndroid::PermissionResult permissionResult = QtAndroid::checkPermission(permission); 94 | if(permissionResult == QtAndroid::PermissionResult::Denied){ 95 | QtAndroid::requestPermissionsSync(QStringList() << permission); 96 | permissionResult = QtAndroid::checkPermission(permission); 97 | if(permissionResult == QtAndroid::PermissionResult::Denied){ 98 | qCritical() << "LoggerUtil::androidSyncPermission(): Could not get permission, logging will not work!"; 99 | return false; 100 | } 101 | } 102 | return true; 103 | #else 104 | Q_UNUSED(permission); 105 | return true; 106 | #endif 107 | } 108 | 109 | } 110 | -------------------------------------------------------------------------------- /src/LoggerUtil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 EPFL 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see http://www.gnu.org/licenses/. 16 | */ 17 | 18 | /** 19 | * @file LoggerUtil.h 20 | * @brief Logger utilities header 21 | * @author Ayberk Özgür 22 | * @date 2016-11-14 23 | */ 24 | 25 | #ifndef LOGGERUTIL_H 26 | #define LOGGERUTIL_H 27 | 28 | #include 29 | #include 30 | 31 | namespace QMLLogger{ 32 | 33 | /** 34 | * @brief Logger utilities 35 | * @singleton 36 | */ 37 | class LoggerUtil : public QQuickItem { 38 | /* *INDENT-OFF* */ 39 | Q_OBJECT 40 | /* *INDENT-ON* */ 41 | 42 | /** 43 | * @brief Constant, unique device ID (without spaces) if possible, non-unique ID if not 44 | */ 45 | Q_PROPERTY(QString uniqueDeviceID CONSTANT READ getUniqueDeviceID) 46 | 47 | public: 48 | 49 | /** @cond DO_NOT_DOCUMENT */ 50 | 51 | /** 52 | * @brief Creates a new LoggerUtil with the given QML parent 53 | * 54 | * @param parent The QML parent 55 | */ 56 | LoggerUtil(QQuickItem* parent = 0); 57 | 58 | /** 59 | * @brief Destroys this LoggerUtil 60 | */ 61 | ~LoggerUtil(); 62 | 63 | /** 64 | * @brief Checks and requests Android permission if not given yet 65 | * 66 | * @param permission Permission such as "android.permission.WRITE_EXTERNAL_STORAGE" 67 | * @return Whether successfully got the permission; true on non-Android platform 68 | */ 69 | static bool androidSyncPermission(QString const& permission); 70 | 71 | /** @endcond */ 72 | 73 | public slots: 74 | 75 | /** @cond DO_NOT_DOCUMENT */ 76 | 77 | /** 78 | * @brief Gets the unique device ID 79 | * 80 | * @return Unique device ID (without spaces) if possible, non-unique ID if not 81 | */ 82 | static QString getUniqueDeviceID(); 83 | 84 | /** @endcond */ 85 | 86 | }; 87 | 88 | } 89 | 90 | #endif /* LOGGERUTIL_H */ 91 | -------------------------------------------------------------------------------- /src/SimpleLogger.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 EPFL 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see http://www.gnu.org/licenses/. 16 | */ 17 | 18 | /** 19 | * @file SimpleLogger.cpp 20 | * @brief Source for a simple line-by-line logger 21 | * @author Ayberk Özgür 22 | * @date 2016-06-15 23 | */ 24 | 25 | #include "SimpleLogger.h" 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #include "LoggerUtil.h" 32 | 33 | namespace QMLLogger{ 34 | 35 | SimpleLogger::SimpleLogger(QQuickItem* parent) : QQuickItem(parent){ 36 | logTime = true; 37 | logMillis = true; 38 | logDeviceInfo = true; 39 | toConsole = false; 40 | 41 | fileNeedsReopen = false; 42 | appendDisabled=false; 43 | 44 | deviceId = "[" + LoggerUtil::getUniqueDeviceID() + "] "; 45 | 46 | LoggerUtil::androidSyncPermission("android.permission.WRITE_EXTERNAL_STORAGE"); 47 | LoggerUtil::androidSyncPermission("android.permission.READ_EXTERNAL_STORAGE"); 48 | } 49 | 50 | SimpleLogger::~SimpleLogger(){ 51 | writer.flush(); 52 | file.close(); 53 | } 54 | 55 | inline QString SimpleLogger::linePrefix(){ 56 | QString res = ""; 57 | if(logTime){ 58 | if(logMillis) 59 | res += "[" + QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss.zzz") + "] "; 60 | else 61 | res += "[" + QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss") + "] "; 62 | } 63 | if(logDeviceInfo) 64 | res += deviceId; 65 | return res; 66 | } 67 | 68 | void SimpleLogger::setFilename(const QString& filename){ 69 | if(this->filename != filename){ 70 | writer.flush(); 71 | file.close(); 72 | 73 | this->filename = filename; 74 | 75 | fileNeedsReopen = true; 76 | 77 | emit filenameChanged(); 78 | } 79 | } 80 | 81 | void SimpleLogger::log(const QString& data){ 82 | if(!isEnabled()) 83 | return; 84 | 85 | if(toConsole){ 86 | qDebug() << linePrefix() + data; 87 | return; 88 | } 89 | 90 | //File needs re-opening 91 | if(fileNeedsReopen){ 92 | QDir dir(filename); 93 | if(dir.isAbsolute()) 94 | qDebug() << "SimpleLogger::log(): Opening " + filename + " to log."; 95 | else{ 96 | filename = 97 | #if defined(Q_OS_WIN) 98 | QStandardPaths::writableLocation(QStandardPaths::StandardLocation::AppDataLocation) 99 | #else 100 | QStandardPaths::writableLocation(QStandardPaths::StandardLocation::DocumentsLocation) 101 | #endif 102 | + "/" + filename; 103 | qDebug() << "SimpleLogger::log(): Absolute path not given, opening " + filename + " to log."; 104 | emit filenameChanged(); 105 | } 106 | QDir::root().mkpath(QFileInfo(filename).absolutePath()); 107 | 108 | file.setFileName(filename); 109 | if(!file.open(QIODevice::WriteOnly | appendDisabled?QIODevice::WriteOnly:QIODevice::Append)){ 110 | qCritical() << "SimpleLogger::log(): Could not open file: " << file.errorString(); 111 | return; 112 | } 113 | else 114 | writer.setDevice(&file); 115 | 116 | fileNeedsReopen = false; 117 | } 118 | 119 | //Actual data logging 120 | if(file.isOpen()){ 121 | writer << linePrefix() << data << "\n"; 122 | writer.flush(); 123 | } 124 | else 125 | qCritical() << "SimpleLogger::log(): File is not open, valid filename must be provided beforehand."; 126 | } 127 | 128 | } 129 | -------------------------------------------------------------------------------- /src/SimpleLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 EPFL 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see http://www.gnu.org/licenses/. 16 | */ 17 | 18 | /** 19 | * @file SimpleLogger.h 20 | * @brief Header for a simple line-by-line logger 21 | * @author Ayberk Özgür 22 | * @date 2016-06-15 23 | */ 24 | 25 | #ifndef SIMPLELOGGER_H 26 | #define SIMPLELOGGER_H 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | namespace QMLLogger{ 33 | 34 | /** 35 | * @brief Utility to log strings line by line with optional timestamp and unique device ID. 36 | * 37 | * Unless given a full path, this will dump all log actions to the file with the given name under the Documents 38 | * directory of the current user, whatever this is configured as under the specific OS, except Windows. 39 | * 40 | * On Windows, the log file will be put under the local data directory of the app since access is not given 41 | * to write to any other directory than this within WinRT sandboxing. This will typically be 42 | * C:\Users\your-username\AppData\Local\Packages\app-uuid\LocalState. Be careful when using the Run button 43 | * in QtCreator, as this will destroy this directory each time the app is launched, taking your potentially 44 | * valuable data with it! Instead, launch your app from the Start Menu, which will preserve this directory. 45 | * 46 | * Every call to the `log(string data)` slot will result in a line as follows in the log file: 47 | * 48 | * ``` 49 | * [timestamp in yyyy-MM-dd HH:mm:ss.zzz format if enabled] [unique device ID if enabled] data 50 | * ``` 51 | */ 52 | class SimpleLogger : public QQuickItem { 53 | /* *INDENT-OFF* */ 54 | Q_OBJECT 55 | /* *INDENT-ON* */ 56 | 57 | /** @brief Desired log filename; if full path is not given, log file will be put in default documents directory */ 58 | Q_PROPERTY(QString filename WRITE setFilename READ getFilename NOTIFY filenameChanged) 59 | 60 | /** @brief Whether to include the timestamp in every log line, default true */ 61 | Q_PROPERTY(bool logTime MEMBER logTime) 62 | 63 | /** @brief Whether to include milliseconds in date and time, default true */ 64 | Q_PROPERTY(bool logMillis MEMBER logMillis) 65 | 66 | /** @brief Whether to include the local unique device info in every log line, default true */ 67 | Q_PROPERTY(bool logDeviceInfo MEMBER logDeviceInfo) 68 | 69 | /** @brief Whether to print the log lines to the console for debug purposes, default false */ 70 | Q_PROPERTY(bool toConsole MEMBER toConsole) 71 | 72 | /** @brief Whether to append the log lines to the existing file or create a new file, default false */ 73 | Q_PROPERTY(bool appendDisabled MEMBER appendDisabled) 74 | 75 | public: 76 | 77 | /** @cond DO_NOT_DOCUMENT */ 78 | 79 | /** 80 | * @brief Creates a new SimpleLogger with the given QML parent 81 | * 82 | * @param parent The QML parent 83 | */ 84 | SimpleLogger(QQuickItem* parent = 0); 85 | 86 | /** 87 | * @brief Dumps remaining logs to file and destroys this SimpleLogger 88 | */ 89 | ~SimpleLogger(); 90 | 91 | /** 92 | * @brief Sets the file name; puts file to home directory if full path is not given 93 | * 94 | * @param filename The new filename, or full path 95 | */ 96 | void setFilename(const QString& filename); 97 | 98 | /** 99 | * @brief Gets the filename 100 | * 101 | * @return The filename 102 | */ 103 | QString getFilename(){ return filename; } 104 | 105 | /** @endcond */ 106 | 107 | signals: 108 | 109 | /** @cond DO_NOT_DOCUMENT */ 110 | 111 | /** 112 | * @brief Emitted when filename changes 113 | */ 114 | void filenameChanged(); 115 | 116 | /** @endcond */ 117 | 118 | public slots: 119 | 120 | /** 121 | * @brief Logs given data as one line to file 122 | * 123 | * @param data Data to log 124 | */ 125 | void log(const QString& data); 126 | 127 | private: 128 | 129 | bool logTime; ///< Whether to include time when data is logged 130 | bool logMillis; ///< Whether to include milliseconds when logging time 131 | bool logDeviceInfo; ///< Whether to include local unique device info when data is logged 132 | QString filename; ///< Log's filename or full path 133 | bool fileNeedsReopen; ///< Filename changed and file needs reopening 134 | bool appendDisabled; ///< append option disabled 135 | 136 | QFile file; ///< Log file 137 | QTextStream writer; ///< Log file writer 138 | 139 | bool toConsole; ///< Log to console instead of file for debug purposes 140 | 141 | QString deviceId; ///< Unique device ID 142 | 143 | /** 144 | * @brief Builds the log line info prefix 145 | * 146 | * @return Log line info prefix 147 | */ 148 | QString linePrefix(); 149 | 150 | }; 151 | 152 | } 153 | 154 | #endif /* SIMPLELOGGER_H */ 155 | --------------------------------------------------------------------------------