Bindings for graphics lib QCustomPlot2 for PyQt5
Revisión | 71476315f767d868c5938479ae41bbdb716d4e14 (tree) |
---|---|
Tiempo | 2019-09-07 15:05:37 |
Autor | Sergey Salnikov <salsergey@gmai...> |
Commiter | Sergey Salnikov |
Updated README
@@ -1,20 +1,15 @@ | ||
1 | 1 | # QCustomPlot2-PyQt5 |
2 | 2 | |
3 | 3 | - [Design goals](#design-goals) |
4 | +- [Installing](#installing) | |
4 | 5 | - [Getting started](#getting-started) |
5 | 6 | - [Examples](#examples) |
6 | - - [Interactions](#interactions) | |
7 | - - [Plots](#plots) | |
8 | - - [QtQuick QML](#qtquick-qml) | |
9 | - - [Scrollbars](#scrollbars) | |
10 | - - [Text Document Integration](#text-document-integration) | |
11 | 7 | - [Supported compilers](#supported-compilers) |
12 | 8 | - [License](#license) |
13 | 9 | - [Contact](#contact) |
14 | 10 | - [Thanks](#thanks) |
15 | 11 | - [Used third-party tools](#used-third-party-tools) |
16 | 12 | - [Projects using](#projects-using) |
17 | -- [Notes](#notes) | |
18 | 13 | - [Building](#building) |
19 | 14 | |
20 | 15 | ## Design goals |
@@ -26,14 +21,23 @@ There are myriads of Python charting libraries out there, and each may even have | ||
26 | 21 | - **Flexibility**. QCustomPlot is one of the most customisable libraries available, with a wide range of supported graph types and full control over how the graph is rendered. |
27 | 22 | |
28 | 23 | |
29 | -## Getting started | |
24 | +## Installing | |
25 | + | |
26 | +### Linux | |
27 | + | |
28 | +You can find compiled packages for many Linux distributions at [OBS](https://software.opensuse.org//download.html?project=home%3Asergeyopensuse%3Agpxviewer&package=python-qcustomplot2). | |
29 | + | |
30 | +### Windows | |
30 | 31 | |
31 | -First install the package via our favourite package manager: | |
32 | +Install the package via our favourite package manager: | |
32 | 33 | |
33 | 34 | ```sh |
34 | 35 | $ pip install QCustomPlot2 |
35 | 36 | ``` |
36 | 37 | |
38 | + | |
39 | +## Getting started | |
40 | + | |
37 | 41 | Now let's take a look at some code: |
38 | 42 | |
39 | 43 | ```python |
@@ -84,15 +88,6 @@ The following compilers are known to work: | ||
84 | 88 | |
85 | 89 | I would be happy to learn about other compilers/versions. |
86 | 90 | |
87 | -Please note: | |
88 | - | |
89 | -The following compilers are currently used in continuous integration at [Travis](https://travis-ci.org/cjgdev/QCustomPlot2-PyQt5) and [AppVeyor](https://ci.appveyor.com/project/cjgdev/QCustomPlot2-PyQt5): | |
90 | - | |
91 | -| Compiler | Operating System | Version String | | |
92 | -|-----------------|------------------------------|----------------| | |
93 | -| GCC 4.8.5 | CentOS 7 | gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) | | |
94 | -| Clang Xcode 10.0 | OSX 10.13.3 | Apple LLVM version 10.0.0 (clang-1000.11.45.2) | | |
95 | - | |
96 | 91 | |
97 | 92 | ## License |
98 | 93 |
@@ -100,13 +95,13 @@ The following compilers are currently used in continuous integration at [Travis] | ||
100 | 95 | |
101 | 96 | This code is licensed under the [MIT License](http://opensource.org/licenses/MIT): |
102 | 97 | |
103 | -Copyright © 2017-2018 Dmitry Voronin and [Christopher Gilbert](https://github.com/cjgdev/) | |
98 | +Copyright © 2017-2019 Dmitry Voronin, Christopher Gilbert and [Sergey Salnikov](https://osdn.net/users/salsergey/pf/QCustomPlot2-PyQt5) | |
104 | 99 | |
105 | -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
100 | +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
106 | 101 | |
107 | 102 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
108 | 103 | |
109 | -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
104 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
110 | 105 | |
111 | 106 | * * * |
112 | 107 |
@@ -115,7 +110,7 @@ This project contains the [QCustomPlot](https://gitlab.com/DerManu/QCustomPlot) | ||
115 | 110 | |
116 | 111 | ## Contact |
117 | 112 | |
118 | -If you have questions regarding the library, I would like to invite you to [open an issue at GitHub](https://github.com/cjgdev/QCustomPlot2-PyQt5/issues/new). Please describe your request, problem, or question as detailed as possible, and also mention the version of the library you are using as well as the version of your compiler and operating system. Opening an issue at GitHub allows other users and contributors to this library to collaborate. | |
113 | +If you have questions regarding the library, I would like to invite you to [open an issue at OSDN](https://osdn.net/users/salsergey/pf/QCustomPlot2-PyQt5/ticket/new). Please describe your request, problem, or question as detailed as possible, and also mention the version of the library you are using as well as the version of your compiler and operating system. Opening an issue at GitHub allows other users and contributors to this library to collaborate. | |
119 | 114 | |
120 | 115 | |
121 | 116 | ## Thanks |
@@ -124,9 +119,9 @@ I deeply appreciate the help of the following people. | ||
124 | 119 | |
125 | 120 | - [DerManu](https://gitlab.com/DerManu) is the official author and maintainer of the excellent QCustomPlot library. |
126 | 121 | - [dimv36](https://github.com/dimv36) is the original author of the Python bindings for QCustomPlot 1.0.0, upon which this project is based. |
127 | -- [cowo78](https://github.com/cowo78) added support for the QCustomPlot 2.0.0 API. | |
122 | +- [cowo78](https://github.com/cowo78) and [cjgdev](https://github.com/cjgdev) added support for the QCustomPlot 2.0.0 API. | |
128 | 123 | |
129 | -Thanks a lot for helping out! Please [let me know](mailto:mail@nlohmann.me) if I forgot someone. | |
124 | +Thanks a lot for helping out! Please [let me know](mailto:salsergey@gmail.com) if I forgot someone. | |
130 | 125 | |
131 | 126 | |
132 | 127 | ## Used third-party tools |
@@ -138,63 +133,56 @@ This library is built, tested, documented, and whatnot using third-party tools a | ||
138 | 133 | |
139 | 134 | ## Projects using |
140 | 135 | |
141 | -If you are using QCustomPlot2-PyQt5 in a project and would like to share with the community, please let me know, or even better, raise a pull request. | |
142 | - | |
136 | +- [**GPX Viewer**](https://osdn.net/projects/gpxviewer/) --- an application for viewing GPX files as a list of points and tracks. | |
143 | 137 | |
144 | -## Notes | |
145 | - | |
146 | -None. | |
138 | +If you are using QCustomPlot2-PyQt5 in a project and would like to share with the community, please let me know, or even better, raise a pull request. | |
147 | 139 | |
148 | 140 | |
149 | -## Building | |
141 | +## Building from sources | |
150 | 142 | |
151 | -### Windows | |
143 | +### Linux | |
152 | 144 | |
153 | -Windows users may use [chocolatey](https://chocolatey.org/) and follow the instructions below for fetching the necessary packages needed to build the library, otherwise you will need to adapt the steps for your own environment. | |
145 | +Apt users (Debian, Ubuntu, etc) may follow the instructions below, users of other distributions may adapt the steps below for your own package manager. | |
154 | 146 | |
155 | -```PowerShell | |
147 | +```sh | |
156 | 148 | # Fetch the necessary development tools and libraries |
157 | -choco install visualstudio2017buildtools python3 git jom pyqt5 qt-sdk | |
158 | - | |
159 | -# Activate Qt 5.x tools and libraries | |
160 | -Push-Location | |
161 | -"C:\Qt\5.11.1\msvc2017_64\bin\qtenv2.bat" | |
162 | -Pop-Location | |
163 | - | |
164 | -# Activate Visual Studio build tools for x64 | |
165 | -"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
149 | +$ apt-get install build-essential python3-pyqt5 pyqt5-dev-tools qttools5-dev-tools | |
166 | 150 | |
167 | 151 | # Clone the repository and submodules |
168 | -git clone --recursive https://github.com/cjgdev/QCustomPlot2-PyQt5.git && cd QCustomPlot2-PyQt5 | |
152 | +$ git clone --recursive https://github.com/cjgdev/QCustomPlot2-PyQt5.git && cd QCustomPlot2-PyQt5 | |
169 | 153 | |
170 | 154 | # Build |
171 | -python setup.py build | |
155 | +$ CFLAGS=-std=c++11 CXXFLAGS=-std=c++11 python setup.py build | |
172 | 156 | |
173 | 157 | # Zzz.. |
174 | 158 | |
175 | 159 | # Install |
176 | -python setup.py install | |
160 | +$ python setup.py install | |
177 | 161 | ``` |
178 | 162 | |
179 | 163 | |
180 | -### Linux | |
164 | +### Windows | |
181 | 165 | |
182 | -Apt users (Debian, Ubuntu, etc) may follow the instructions below, users of other distributions may adapt the steps below for your own package manager. | |
166 | +Windows users should install [Qt tools](https://www.qt.io/), appropriate version of [VC compiler](https://visualstudio.microsoft.com/), [Python](https://www.python.org/), [PyQt5](https://www.riverbankcomputing.com/software/pyqt/download5) and [SIP](https://www.riverbankcomputing.com/software/sip/download). You may need to build SIP from sources to ensure you have all files necessary for building other software. Then follow the instructions below to build the library, otherwise you will need to adapt the steps for your own environment. | |
183 | 167 | |
184 | -```sh | |
185 | -# Fetch the necessary development tools and libraries | |
186 | -$ apt-get install build-essential python3-pyqt5 pyqt5-dev-tools qttools5-dev-tools | |
168 | +- Download QCustomPlot2 sources from [OSDN](https://osdn.net/users/salsergey/pf/QCustomPlot2-PyQt5). You can use git or download an archive. | |
169 | +- Launch Qt console and follow instructions there. It will ensure that you have all necessary tools in your PATH variable. Also be sure that python.exe binary is in your PATH. | |
170 | +- Then follow these instructions: | |
187 | 171 | |
188 | -# Clone the repository and submodules | |
189 | -$ git clone --recursive https://github.com/cjgdev/QCustomPlot2-PyQt5.git && cd QCustomPlot2-PyQt5 | |
172 | +```cmd | |
173 | +# Go to QCustomPlot2 folder | |
174 | +cd <<PATH_TO QCustomPlot2-PyQt5>> | |
175 | + | |
176 | +# Download submodules if you use git | |
177 | +git submodules update --init | |
190 | 178 | |
191 | 179 | # Build |
192 | -$ CFLAGS=-std=c++11 CXXFLAGS=-std=c++11 python setup.py build | |
180 | +python setup.py build | |
193 | 181 | |
194 | 182 | # Zzz.. |
195 | 183 | |
196 | 184 | # Install |
197 | -$ python setup.py install | |
185 | +python setup.py install | |
198 | 186 | ``` |
199 | 187 | |
200 | 188 |