├── .gitignore ├── CHANGELOG.md ├── CMakeLists.txt ├── LICENSE.md ├── README.md ├── changelog-official.txt └── lib ├── CMakeLists.txt ├── config.h.in ├── qcustomplot.cpp └── qcustomplot.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Globals 2 | build/ 3 | build_debug/ 4 | build_release/ 5 | .DS_Store 6 | 7 | # Prerequisites 8 | *.d 9 | 10 | # Compiled object files 11 | *.slo 12 | *.lo 13 | *.o 14 | *.obj 15 | 16 | # Precompiled Headers 17 | *.gch 18 | *.pch 19 | 20 | # Compiled Dynamic libraries 21 | *.so 22 | *.dylib 23 | *.dll 24 | 25 | # Compiled Static libraries 26 | *.lai 27 | *.la 28 | *.a 29 | *.lib 30 | 31 | # Fortran module files 32 | *.mod 33 | *.smod 34 | 35 | # Executables 36 | *.exe 37 | *.out 38 | *.app 39 | 40 | # Generated documentation 41 | html 42 | 43 | # Generate project properties 44 | config.h 45 | 46 | # User configuration 47 | *.user 48 | 49 | # Qt relative 50 | object_script.*.Release 51 | object_script.*.Debug 52 | *_plugin_import.cpp 53 | /.qmake.cache 54 | /.qmake.stash 55 | *.pro.user 56 | *.pro.user.* 57 | *.qbs.user 58 | *.qbs.user.* 59 | *.moc 60 | *.qmlc 61 | *.jsc 62 | *build-* 63 | *.qm 64 | *.prl 65 | 66 | # Qt unit tests 67 | target_wrapper.* 68 | 69 | # QtCreator 70 | *.autosave 71 | 72 | # QtCreator Qml 73 | *.qmlproject.user 74 | *.qmlproject.user.* 75 | 76 | # QtCreator 4.8< compilation database 77 | compile_commands.json 78 | 79 | # VsCode 80 | .vscode/ 81 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | The format is based on [Keep a Changelog] and this project adheres to [Semantic Versioning]. 5 | 6 | ## [next] - 2.1.1.2 7 | 8 | ## [2.1.1.1] - 2023-03-31 9 | ### Changed 10 | - Update upstream version from **2.1.0** to **2.1.1** 11 | 12 | ## [2.1.0.2] - 2022-01-10 13 | ### Fixed 14 | - Fix compilation issues with `Qt >= 6.2.0` (thanks to _miccs_ on thread forum [qt 6.2 patch][path-qt-6.2]) 15 | 16 | ## [2.1.0.1] - 2022-01-10 17 | 18 | Creation of the repository which provides : 19 | - **QCustomPlot** library compliant with _Cmake_ projects (`.pro` file has been replaced by `CMakeLists.txt`) 20 | - Hide _Qt dependencies_, callers no longer needed to add mandatory modules of the library in their own _CMakeLists_ project (like `printsupport` module for example) 21 | - Add a `config.h` file, generated at CMake step, in order to know which version of the library we are using from the caller project (multiple macros are defined, like `QCP_LIB_VERSION` for example). 22 | 23 | 24 | [keep a changelog]: https://keepachangelog.com/en/1.0.0/ 25 | [semantic versioning]: https://semver.org/spec/v2.0.0.html 26 | 27 | 28 | [next]: https://github.com/legerch/QCustomPlot-library/compare/2.1.1.1...dev 29 | 30 | [2.1.1.1]: https://github.com/legerch/QCustomPlot-library/compare/2.1.0.2...2.1.1.1 31 | [2.1.0.2]: https://github.com/legerch/QCustomPlot-library/compare/2.1.0.1...2.1.0.2 32 | [2.1.0.1]: https://github.com/legerch/QCustomPlot-library/releases/tag/2.1.0.1 33 | 34 | 35 | [path-qt-6.2]: https://www.qcustomplot.com/index.php/support/forum/2380 -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(qcustomplotroot LANGUAGES CXX) 3 | 4 | # Find architecture property 5 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 6 | set(PROJECT_ARCH_TARGET "amd64") # x64 7 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) 8 | set(PROJECT_ARCH_TARGET "i386") # x86 9 | else() 10 | message(FATAL_ERROR "Unkwnown architecture, CMake will exit.") 11 | endif() 12 | 13 | # Defines options of project 14 | # Ex : set(EXT_OPT_QCPLIB_XYZ 0) 15 | 16 | # Export generated binaries 17 | if(NOT PROJECT_BUILD_OUTPUT) 18 | set(PROJECT_BUILD_OUTPUT ${CMAKE_SOURCE_DIR}/build/output/${PROJECT_ARCH_TARGET}/${CMAKE_BUILD_TYPE}) 19 | 20 | SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BUILD_OUTPUT}/bin) 21 | SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BUILD_OUTPUT}/lib) 22 | SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BUILD_OUTPUT}/lib) 23 | SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BUILD_OUTPUT}/bin) 24 | endif() 25 | 26 | # Run subdirectory routine 27 | add_subdirectory(lib) 28 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **Table of contents :** 2 | - [1. Introduction](#1-introduction) 3 | - [2. Current version](#2-current-version) 4 | - [3. How to use](#3-how-to-use) 5 | - [4. License](#4-license) 6 | 7 | # 1. Introduction 8 | 9 | This repository allow to use [QCustomPlot][qcp-main] as a shared library compliant with [CMake][cmake] build system. 10 | Besides, this repository also provides _community patches_ available. 11 | 12 | # 2. Current version 13 | 14 | Official changelog of the library can be found at [official changelog][changelog-official] file. 15 | This repository also provide a [changelog][changelog-repo] in order to track change differencies with the official version (represented by **tweak** version property). 16 | 17 | | Library version | Qt compatibility | 18 | | :-: | :-: | 19 | | [2.1.1.1][tag-2.1.1.1] | `Qt 4.6.x` -> `Qt 6.4.x` | 20 | | [2.1.0.2][tag-2.1.0.2] | `Qt 5.8.x` -> `Qt 6.2.x` | 21 | | [2.1.0.1][tag-2.1.0.1] | `Qt 4.6.x` -> `Qt 6.0.0` | 22 | 23 | # 3. How to use 24 | 25 | This library can be use as an _embedded library_ in a subdirectory of your project (like a _git submodule_ for example) : 26 | 1. In the **root** CMakeLists, add instructions : 27 | ```cmake 28 | add_subdirectory(QCustomPlot-library) # Or if library is put in a folder "dependencies" : add_subdirectory(dependencies/QCustomPlot-library) 29 | ``` 30 | 31 | 2. In the **application/library** CMakeLists, add instructions : 32 | ```cmake 33 | # Link needed libraries 34 | # QCustomPlot library 35 | target_link_libraries(${PROJECT_NAME} PRIVATE qcustomplot) 36 | 37 | # Compile needed definitions 38 | target_compile_definitions(${PROJECT_NAME} PRIVATE QCUSTOMPLOT_USE_LIBRARY) 39 | ``` 40 | > Examples of how to use the library can be found in the associated repository [QCustomPlot-examples][repo-qcp-examples] 41 | 42 | # 4. License 43 | 44 | [QCustomPlot][qcp-main] is released under [GPL-3.0 License][license], so as this repository. 45 | 46 | 47 | [qcp-main]: https://www.qcustomplot.com/index.php/introduction 48 | [qcp-doc]: https://www.qcustomplot.com/documentation/index.html 49 | 50 | 51 | [cmake]: https://cmake.org/ 52 | 53 | 54 | [repo-qcp-examples]: https://github.com/legerch/QCustomPlot-examples 55 | 56 | 57 | [changelog-repo]: https://github.com/legerch/QCustomPlot-library/blob/dev/CHANGELOG.md 58 | [changelog-official]: https://github.com/legerch/QCustomPlot-library/blob/dev/changelog-official.txt 59 | [license]: https://github.com/legerch/QCustomPlot-library/blob/master/LICENSE.md 60 | 61 | [tag-2.1.1.1]: https://github.com/legerch/QCustomPlot-library/releases/tag/2.1.1.1 62 | [tag-2.1.0.2]: https://github.com/legerch/QCustomPlot-library/releases/tag/2.1.0.2 63 | [tag-2.1.0.1]: https://github.com/legerch/QCustomPlot-library/releases/tag/2.1.0.1 64 | -------------------------------------------------------------------------------- /changelog-official.txt: -------------------------------------------------------------------------------- 1 | #### Version 2.1.1 released on 06.11.22 #### 2 | 3 | Added features: 4 | - Qt6.4 Compatibility 5 | 6 | Bugfixes: 7 | - dynamically changing device pixel ratios (e.g. when moving between different DPI screens) is handled properly 8 | - bugfix Colormap autoscaling: recalculateDataBounds() if (0, 0) data point is NaN. 9 | - minor bugfix in getMantissa for certain values due to rounding errors 10 | - Graphs with line style lsImpulse properly ignore NaN data points 11 | - fixed issue where QCP wasn't greyed out together with the rest of the UI on embedded systems when a modal dialog is shown 12 | (QCustomPlot no longer has the Qt::WA_OpaquePaintEvent attribute enabled by default) 13 | 14 | Other: 15 | - in QCPAxisPainterPrivate::getTickLabelData, don't use fixed 'e', but locale aware character of parent plot locale 16 | - Axis rescaling now ignores +/- Inf in data values 17 | - slight performance improvements of QCPColorMap colorization and fills. 18 | 19 | #### Version 2.1.0 released on 29.03.21 #### 20 | 21 | Added features: 22 | - Compatibility up to Qt 6.0 23 | - Tech Preview: Radial Plots (see setupPolarPlotDemo in examples project) 24 | - QCPAxisTickerDateTime can now be configured with a QTimeZone for adjusting the label display to arbitrary time zones 25 | - QCPColorGradient (and thus also QCPColorMap) now has explicit configurable NaN handling (see QCPColorGradient::setNanHandling) 26 | - added timing/benchmarking method QCustomPlot::replotTime(bool average) which returns the milliseconds per replot 27 | - QCustomPlot::plottableAt has an optional output parameter dataIndex, providing the index of the data point at the probed position 28 | - QCustomPlot::plottableAt template method allows limiting the search to the specified QCPAbstractPlottable subclass T 29 | - QCustomPlot::itemAt template method allows limiting the search to the specified QCPAbstractItem subclass T 30 | - Added Interaction flag QCP::iSelectPlottablesBeyondAxisRect, allows selection of data points very close to (and beyond of) the axes 31 | - QCPAxisTickerDateTime::dateTimeToKey(QDate &) now also takes a TimeSpec to specify the interpretation of the start-of-day 32 | - QCPAxisTickerLog now switches to linear ticks if zoomed in beyond where logarithmic ticks are reasonable 33 | - Added QCustomPlot::afterLayout signal, for user code that crucially depends on layout sizes/positions, right before the draw step during a replot 34 | 35 | Bugfixes: 36 | - Fixed bug where QCPLayer::replot wouldn't issue full replot even though invalidated buffers existed 37 | - Fixed QCPCurve bug causing rendering artifacts when using keys/values smaller than about 1e-12 in some constellations 38 | - Fixed getValueRange when used with explicit keyRange, now doesn't use key range expanded by one point to each side anymore 39 | - Fixed bug of QCPAxis tick label font size change only propagating to the layout after second call to replot 40 | - Fixed bug of QCPTextElement not respecting the configured text alignment flag (setTextFlags) 41 | - Various documentation typos and improvements 42 | 43 | Other: 44 | - QCP Now requires C++11. However, Qt4.6 compatibility is maintained in the QCP 2.x release series 45 | - QCPColorScale is now initialized with gpCold gradient preset, which prevents color maps turning black when linking them to a default-created color scale without explicitly setting a gradient 46 | - QCPLegend::clearItems is now faster in case of many legend items (>1000) 47 | - Modernized expressions and thereby avoided some warnings (e.g. nullptr and casts) 48 | - Switched to foreach (Qt macro) where possible (in preparation for switch to range-based for (C++11), soonest at next major release) 49 | - Work around Qt bug, drawing lines with pen width 1 as slow as with pen widths > 1 (polyfill instead of line algorithm, also on Normal-DPI), by using pen width 0 in such cases. 50 | - Added QCP::Interaction flag iNone=0x000 to allow explicitly specifying no interaction (Avoids QFlags::zero, which was deprecated in Qt5.14) 51 | - QCP is now compatible with defines QT_USE_QSTRINGBUILDER, QT_USE_FAST_CONCATENATION (Qt<4.8), QT_USE_FAST_OPERATOR_PLUS (Qt<4.8) 52 | 53 | #### Version 2.0.1 released on 25.06.18 #### 54 | 55 | Bugfixes: 56 | - Default filling order of QCPLayoutGrid is now foColumnsFirst instead of foRowsFirst, as intended and consistent with QCP1. 57 | Note that this also changes the indexing order of e.g. QCustomPlot::axisRect(int index), compared with 2.0.0. You can change 58 | the filling and thus indexing order yourself by calling QCPLayoutGrid::setFillOrder. 59 | - fixed bug in QCPColorMap, when using alpha in the gradient color stops. Used to draw falsely black data points when the associated data value is exactly 60 | on the first or last color stop. 61 | - QCPDataSelection::enforceType(stDataRange) would erroneously add an empty data range to the selection, if the selection was already empty. 62 | This in turn would cause isEmpty() to erroneously return false. 63 | - fixed hypothetical crash when selectTest is called on a QCPItemCurve which has all of its points at the same position 64 | 65 | Other: 66 | - Various documentation improvements and clarifications 67 | - Prevent conflict with windows.h min/max macros if user forgets to define NOMINMAX 68 | - compiling QCP shared libraries with static Qt is now easier 69 | - added defines QCUSTOMPLOT_VERSION and QCUSTOMPLOT_VERSION_STR (the same way Qt does) to provide the used QCP version number 70 | - added missing Q_DECL_OVERRIDE declarations, thus preventing warnings some compiler settings 71 | - QCPAxisTicker and subclasses are no longer copyable by value, as intended 72 | - QCPBarsGroup constructor is now explicit, as intended 73 | - Qt 5.11 compatibility 74 | 75 | #### Version 2.0.0 released on 04.09.17 #### 76 | 77 | Added major features: 78 | - Axis tick and tick label generation was completely refactored and is now handled in the QCPAxisTicker class (also see QCPAxis::setTicker). Available ticker subclasses for special uses cases: 79 | QCPAxisTicker, QCPAxisTickerFixed, QCPAxisTickerLog, QCPAxisTickerPi, QCPAxisTickerTime, QCPAxisTickerDateTime, QCPAxisTickerText 80 | - Data container is now based on QCPDataContainer template for unified data interface and significantly improved memory footprint and better performance for common use-cases, especially data adding/removing. 81 | - New data selection mechanism allows selection of single data points and data ranges for plottables. See special documentation page "data selection mechanism". 82 | - Rubber band/selection rect for data point selection and axis zooming is now available, see documentation of QCustomPlot::setSelectionRectMode and QCPSelectionRect. For this purpose, the new default 83 | layer "overlay" was introduced, which is now the top layer, and holds the QCustomPlot's QCPSelectionRect instance. 84 | - Data sharing between plottables of the same type (see setData methods taking a QSharedPointer) 85 | - OpenGL hardware acceleration is now available across all Qt versions (including Qt4) in a unified, simple interface, with QCustomPlot::setOpenGl (experimental) 86 | - QCPStatisticalBox can now display a series of statistical boxes instead of only a single one 87 | - New QCPErrorBars plottable allows attaching error bars to any one-dimensional plottable (QCPGraph has thus lost its own error-bar capability) 88 | - QCPColorMap now supports transparency via alpha in its color gradient stops, and via a dedicated cell-wise alpha map (see QCPColorMapData::setAlpha) 89 | - Layers may now be individually replotted (QCPLayer::replot), if the mode (QCPLayer::setMode) is set to lmBuffered. Mutually adjacent lmLogical layers share a single paint buffer to save resources. 90 | By default, the new topmost "overlay" layer which contains the selection rect is an lmBuffered layer. Updating the selection rect is thus very fast, independent of the plot contents. 91 | - QCPLayerable (and thus practically all objects in QCP) now have virtual methods to receive mouse press/move/release/doubleclick/wheel events. Before, only QCPLayoutElement provided them. 92 | this makes it much easier to subclass e.g. items and plottables to provide custom mouse interactions that were cumbersome and awkward with the simpler signal-based interface 93 | 94 | Added minor features: 95 | - High-DPI support for Qt versions 5.0 and up, using device pixel ratio detected by Qt (can be changed manually via QCustomPlot::setBufferDevicePixelRatio). 96 | - QCPGraph and QCPCurve can now be configured to only display every n'th scatter symbol, see ::setScatterSkip() method 97 | - QCPFinancial allows to define bar width in absolute pixels and axis rect ratio, instead of only in plot key coordinates (see QCPFinancial::setWidthType) 98 | - Range dragging/zooming can now be configured to affect more than one axis per orientation (see new overloads of QCPAxisRect::setRangeDragAxes/setRangeZoomAxes) 99 | - Added QCPTextElement (replaces QCPPlotTitle) for general texts in layouts. Provides clicked and doubleClicked signals, as replacement for the removed QCustomPlot::titleClicked/titleDoubleClicked 100 | - Export functions (QCustomPlot::savePng etc.) now support specifying the resolution that will be written to the image file header. This improves operability with other tools which respect metadata. 101 | - Replots can now be queued to the next event loop iteration with replot(QCP::rpQueuedReplot). This way you can successively ask for a replot at multiple code locations without causing redundant replots 102 | - QCPAxisRect::zoom(...) allows to zoom to a specific rectangular region given in pixel coordinates, either affecting all axes or a specified subset of axes. 103 | - QCPRange::bounded returns a bounded range, trying to preserve its size. Works with rangeChanged signal to limit the allowed range (see rangeChanged doc) 104 | - Plottable rescaleValueAxis method (and getValueRange) now take parameter inKeyRange, which allows rescaling of the value axis only with respect to data in the currently visible key range 105 | - plottableClick and plottableDoubleClick signals now carry the clicked data point index as second parameter 106 | - Added QCPAxis::scaleRange overload without "center" argument, which scales around the current axis range center 107 | - Added QCPRange::expand/expanded overloads which take only one double parameter 108 | - Plottables addToLegend/removeFromLegend methods now have overloads that take any QCPLegend, to make working with non-default legends easier (legends that are not QCustomPlot::legend) 109 | - Added QCPStatisticalBox::setWhiskerAntialiased to allow controlling antialiasing state of whiskers independently of quartile box/median line 110 | - The virtual method QCPLayoutElement::layoutChanged() now allows subclasses to react on a move of the layout element between logical positions in the parent layout, or between layouts 111 | - QCPMarginGroup::commonMargin is now virtual, to facilitate subclassing of QCPMarginGroup 112 | - QCPGraph::getPreparedData is now virtual, and thus allows subclasses to easily generate own plotted data, e.g. on-the-fly. 113 | - Added QCPRange qDebug stream operator 114 | - QCPLayoutGrid (and thus QCPLegend) can now wrap rows or columns at specified row/column counts, see setFillOrder, setWrap and the new addElement overload which doesn't have row/column index 115 | Added minor features after beta: 116 | - QCPGraph fill now renders separate fill segments when there are gaps in the graph data (created by inserting NaN values) 117 | - fractional device pixel ratios are now used, if Qt version >= 5.6 118 | - Axes may now be dragged/zoomed individually by starting the drag/zoom on top of the axis (previously, this required additional code) 119 | - Manual minimum and maximum layout element sizes (setMinimumSize/setMaximumSize) can now affect the inner or the outer rect, see QCPLayoutElement::setSizeConstraintRect 120 | 121 | Bugfixes [Also backported to 1.3.2]: 122 | - Fixed possible crash when having a QCPGraph with scatters only and a non-transparent main/fill brush of the graph 123 | - Fixed QCPItemPixmap not updating internally cached scaled pixmap if new pixmap set with same scaled dimensions 124 | - When using log axis scale and zooming out as far as possible (~1e-280..1e280), axis doesn't end up in (via mouse) unrecoverable range with strange axis ticks anymore 125 | - Axis tick label algorithm for beautifully typeset powers now checks whether "e" in tick label is actually part of a number before converting the exponent to superscript 126 | - Fixed QCustomPlot::moveLayer performing incorrect move and possible crash in certain situations 127 | - Fixed possible crash on QCustomPlot destruction due to wrong QObject-hierarchy. Only occurs if a QCPAxisRect is removed from the normal QCustomPlot destruction hierarchy by taking it out of its layout 128 | - Fixed possible freeze when data values become infinity after coord-to-pixel transformation (e.g. maximally zoomed out log axis), and line style is not solid (e.g. dashed) or phFastPolylines is disabled 129 | - Fixed a few missing enums in meta type system, by unifying usage of Q_ENUMS, Q_FLAGS and Q_DECLARE_METATYPE 130 | Bugfixes [Not in 1.3.2]: 131 | - Fixed QCPItemLine/QCPItemStraightLine not being selectable when defining coords are many orders of magnitude (>1e8) larger than currently viewed range 132 | - Fixed/worked around crash due to bug in QPainter::drawPixmap with very large negative x/y pixel coordinates, when drawing sparse pixmap scatters 133 | - Fixed possible (but unlikely) int overflow in adaptive sampling algorithm, that could cause plot artifacts when using extremely sparse data (with respect to current key axis range). 134 | - Fixed QCPBarsGroup bug which caused stPlotCoords spacing to be wrong with vertical key axes 135 | - A QCPBars axis rescale in the main window constructor (i.e. without well-defined plot size) now falls back to a datapoint-tight rescaling instead of doing nothing (because bar width can't be determined) 136 | - Improved QCPBars stacking when using bars with very large keys and key separation at limit of double precision 137 | Bugfixes after beta: 138 | - fixed QCPCurve vertex optimization algorithm not handling log axes correctly 139 | - upon removing the inner most axis, the offset of the new inner most axis (previously second axis) is now set to the value of the removed axis, instead of leaving a gap 140 | - QCPColorMap now has a default gradient (gpCold) again, instead of an empty and thus black gradient 141 | - doc: black QCPColorMap/QCPColorGradient documentation images fixed 142 | - scatter styles ssDiamond, ssTriangle and ssTriangleInverted now get proper filling with the specified brush 143 | - fixed click signals of plottable/axes/etc. not being emitted properly 144 | - fixed uninitialized scatterSkip on QCPCurve, leading to irregular default appearance of scatter skips 145 | - fixed device pixel ratio not being implemented correctly in cached tick labels 146 | - QCPLayoutElement::setMaximum/setMinimum now is with respect to the inner rect as intended (and documented), instead of the outer rect (and this can now be changed via setSizeConstraintRect) 147 | - fixed dllimport issue on template classes when compiling as shared library with MSVC 148 | 149 | 150 | Summary of backward incompatible changes: 151 | Plottable related: 152 | - Removed QCustomPlot::addPlottable, not needed anymore as plottables now automatically register in their constructor 153 | - Removed QCustomPlot::addItem, not needed anymore as items now automatically register in their constructor 154 | - QCPAbstractPlottable::addToLegend/removeFromLegend are not virtual anymore. If your plottable requires a custom legend item, add it to the legend manually. 155 | - setData/addData method overloads of plottables have changed to facilitate data sharing and new data container (see documentation) 156 | - plottableClick and plottableDoubleClick signals now carry the clicked data point index as second parameter, and the QMouseEvent parameter has moved to third. 157 | Check all your usages of those signals, because Qt's connect method only reports problems during runtime! 158 | - setSelectable now not only limits what can be selected by the user, but limits also any programmatic selection changes via setSelected. 159 | - enum QCPAbstractPlottable::SignDomain has changed namespace to QCP::SignDomain 160 | Axis related: 161 | - Removed QCPAxis::setAutoTicks, setAutoTickCount, setAutoTickLabels, setAutoTickStep, setAutoSubTicks, setTickLabelType, setDateTimeFormat, setDateTimeSpec, 162 | setTickStep, setTickVector, setTickVectorLabels, setSubTickCount in favor of new QCPAxisTicker-based interface 163 | - Added QCPAxis::setSubTicks to enable/disable subticks (manually controlling the subtick count needs subclassing of QCPAxisTicker, e.g. QCPAxisTickerText and QCPAxisTickerLog provide setSubTickCount) 164 | Item related: 165 | - Renamed QCPAbstractItem::rectSelectTest to rectDistance, to prevent confusion with new QCPAbstractPlottable1D::selectTestRect 166 | - Renamed QCPItemAnchor::pixelPoint to QCPItemAnchor::pixelPosition (also affects subclass QCPItemPosition) 167 | General: 168 | - Renamed QCustomPlot::RefreshPriority enums (parameter of the replot() method): rpImmediate to rpImmediateRefresh, rpQueued to rpQueuedRefresh, rpHint to rpRefreshHint 169 | - Renamed QCustomPlot::PlottingHint enum phForceRepaint to phImmediateRefresh 170 | - Removed QCPPlotTitle layout element (See new QCPTextElement for almost drop-in replacement) 171 | - Removed signals QCustomPlot::titleClicked/titleDoubleClicked, replaced by QCPTextElement signals clicked/doubleClicked. 172 | - QCustomPlot::savePdf has changed parameters from (fileName, bool noCosmeticPen, width, height,...) to (fileName, width, height, QCP::ExportPen exportPen,...) 173 | - Virtual methods QCPLayoutElement::mouseMoveEvent/mouseReleaseEvent (which are now introduced already in the superclass QCPLayerable) have gained an additional parameter const QPointF &startPos. 174 | If you have reimplemented these methods, make sure to update your function signatures, otherwise your reimplementations will likely be ignored by the compiler without warning 175 | - Creating a new QCPColorGradient without supplying a preset parameter in the constructor now creates an empty gradient, instead of loading the gpCold preset 176 | 177 | Other: 178 | - Replaced usage of Qt's QVector2D with own QCPVector2D which uses double precision and offers some convenience functions 179 | - Extended relative range to which QCPItemLine/QCPItemStraightLine can be zoomed before vanishing from ~1e9 to ~1e16 180 | - Removed QCPItemStraightLine::distToStraightLine (replaced by QCPVector2D::distanceToStraightLine) 181 | - Removed QCPAbstractPlottable::distSqrToLine and QCPAbstractItem::distSqrToLine (replaced by QCPVector2D::distanceSquaredToLine) 182 | - Qt5.5 compatibility (If you use PDF export, test your outputs, as output dimensions might change when switching Qt versions -- QCP does not try to emulate previous Qt version behaviour here) 183 | - QCP now includes instead of just because some users had problems with the latter. Please report if you now experience issues due to the new include. 184 | - QCPGraph can now use a brush (filled polygon under the graph data) without having a graph line (line style lsNone) 185 | - QCPFinancial is now two-colored (setTwoColored(true)) by default, and has green/red as default two-colored brushes and pens 186 | - Plottable pixelsToCoords/coordsToPixels methods are now public, and offer transformations from pixel to plot coordinates and vice versa, using the plottable's axes 187 | - Plottable getKeyRange/getValueRange methods are now public 188 | - QCPBarsGroup now always places the QCPBars that was added to the group first towards lower keys, independent of axis orientation or direction (the ordering used to flip with axis orientation) 189 | - Default focus policy for QCustomPlot is now Qt::ClickFocus, instead of Qt::NoFocus. 190 | - tweaked QCPLegend and QCPAbstractLegendItem margins: The items have by default zero own margins, and QCPLegend row- and column spacing was increased to compensate. Legend was made slightly denser by default. 191 | - Used doxygen version is now 1.8.12, and documentation/postprocessing-scripts were adapted accordingly. Expect minor issues and some warnings when using older doxygen. 192 | Other after beta: 193 | - Integrated OpenGL support (QCustomPlot::setOpenGl) is experimental for now, due the strong dependency on the system/graphics driver of the current implementation 194 | - fixed some plot title font sizes in the example projects that were too small due to switch to QCPTextElement 195 | - added missing override specifiers on reimplemented virtual methods 196 | - changed to more intuitive defaults for QCPSelectionDecorator scatter style (now doesn't define an own scatter pen by default) 197 | 198 | #### Version 1.3.2 released on 22.12.15 #### 199 | 200 | Bugfixes [Backported from 2.0.0 branch]: 201 | - Fixed possible crash when having a QCPGraph with scatters only and a non-transparent main/fill brush of the graph 202 | - Fixed QCPItemPixmap not updating internally cached scaled pixmap if new pixmap set with same scaled dimensions 203 | - When using log axis scale and zooming out as far as possible (~1e-280..1e280), axis doesn't end up in (via mouse) unrecoverable range with strange axis ticks anymore 204 | - Axis tick label algorithm for beautifully typeset powers now checks whether "e" in tick label is actually part of a number before converting the exponent to superscript 205 | - Fixed QCustomPlot::moveLayer performing incorrect move and possible crash in certain situations 206 | - Fixed possible crash on QCustomPlot destruction due to wrong QObject-hierarchy. Only occurs if a QCPAxisRect is removed from the normal QCustomPlot destruction hierarchy by taking it out of its layout 207 | - Fixed possible freeze when data values become infinity after coord-to-pixel transformation (e.g. maximally zoomed out log axis), and line style is not solid (e.g. dashed) or phFastPolylines is disabled 208 | 209 | Other [Backported from 2.0.0 branch]: 210 | - A few documentation fixes/improvements 211 | - Qt5.5 compatibility (If you use PDF export, test your outputs, as output dimensions might change when switching Qt versions -- QCP does not try to emulate previous Qt version behaviour here) 212 | - QCP now includes instead of just because some users had problems with the latter. Please report if you now experience issues due to the new include. 213 | 214 | #### Version 1.3.1 released on 25.04.15 #### 215 | 216 | Bugfixes: 217 | - Fixed bug that prevented automatic axis rescaling when some graphs/curves had only NaN data points 218 | - Improved QCPItemBracket selection boundaries, especially bsCurly and bsCalligraphic 219 | - Fixed bug of axis rect and colorscale background shifted downward by one logical pixel (visible in scaled png and pdf export) 220 | - Replot upon mouse release is now only performed if a selection change has actually happened (improves responsivity on particularly complex plots) 221 | - Fixed bug that allowed scatter-only graphs to be selected by clicking the non-existent line between scatters 222 | - Fixed crash when trying to select a scatter-only QCPGraph whose only points in the visible key range are at identical key coordinates and vertically off-screen, with adaptive sampling enabled 223 | - Fixed pdf export of QCPColorMap with enabled interpolation (didn't appear interpolated in pdf) 224 | - Reduced QCPColorMap jitter of internal cell boundaries for small sized maps when viewed with high zoom, by applying oversampling factors dependant on map size 225 | - Fixed bug of QCPColorMap::fill() not causing the buffered internal image map to be updated, and thus the change didn't become visible immediately 226 | - Axis labels with size set in pixels (setPixelSize) instead of points now correctly calculate the exponent's font size if beautifully typeset powers are enabled 227 | - Fixed QCPColorMap appearing at the wrong position for logarithmic axes and color map spanning larger ranges 228 | 229 | Other: 230 | - Pdf export used to embed entire QCPColorMaps, potentially leading to large files. Now only the visible portion of the map is embedded in the pdf 231 | - Many documentation fixes and extensions, style modernization 232 | - Reduced documentation file size (and thus full package size) by automatically reducing image palettes during package build 233 | - Fixed MSVC warning message (at warning level 4) due to temporary QLists in some foreach statements 234 | 235 | #### Version 1.3.0 released on 27.12.14 #### 236 | 237 | Added features: 238 | - New plottable class QCPFinancial allows display of candlestick/ohlc data 239 | - New class QCPBarsGroup allows horizontal grouping of multiple QCPBars plottables 240 | - Added QCPBars feature allowing non-zero base values (see property QCPBars::setBaseValue) 241 | - Added QCPBars width type, for more flexible bar widths (see property QCPBars::setWidthType) 242 | - New QCPCurve optimization algorithm, fixes bug which caused line flicker at deep zoom into curve segment 243 | - Item positions can now have different position types and anchors for their x and y coordinates (QCPItemPosition::setTypeX/Y, setParentAnchorX/Y) 244 | - QCPGraph and QCPCurve can now display gaps in their lines, when inserting quiet NaNs as values (std::numeric_limits::quiet_NaN()) 245 | - QCPAxis now supports placing the tick labels inside the axis rect, for particularly space saving plots (QCPAxis::setTickLabelSide) 246 | Added features after beta: 247 | - Made code compatible with QT_NO_CAST_FROM_ASCII, QT_NO_CAST_TO_ASCII 248 | - Added compatibility with QT_NO_KEYWORDS after sending code files through a simple reg-ex script 249 | - Added possibility to inject own QCPAxis(-subclasses) via second, optional QCPAxisRect::addAxis parameter 250 | - Added parameter to QCPItemPixmap::setScaled to specify transformation mode 251 | 252 | Bugfixes: 253 | - Fixed bug in QCPCurve rendering of very zoomed-in curves (via new optimization algorithm) 254 | - Fixed conflict with MSVC-specific keyword "interface" in text-document-integration example 255 | - Fixed QCPScatterStyle bug ignoring the specified pen in the custom scatter shape constructor 256 | - Fixed bug (possible crash) during QCustomPlot teardown, when a QCPLegend that has no parent layout (i.e. was removed from layout manually) gets deleted 257 | Bugfixes after beta: 258 | - Fixed bug of QCPColorMap/QCPColorGradient colors being off by one color sampling step (only noticeable in special cases) 259 | - Fixed bug of QCPGraph adaptive sampling on vertical key axis, causing staggered look 260 | - Fixed low (float) precision in QCPCurve optimization algorithm, by not using QVector2D anymore 261 | 262 | Other: 263 | - Qt 5.3 and Qt 5.4 compatibility 264 | 265 | #### Version 1.2.1 released on 07.04.14 #### 266 | 267 | Bugfixes: 268 | - Fixed regression which garbled date-time tick labels on axes, if setTickLabelType is ltDateTime and setNumberFormat contains the "b" option 269 | 270 | #### Version 1.2.0 released on 14.03.14 #### 271 | 272 | Added features: 273 | - Adaptive Sampling for QCPGraph greatly improves performance for high data densities (see QCPGraph::setAdaptiveSampling) 274 | - QCPColorMap plottable with QCPColorScale layout element allows plotting of 2D color maps 275 | - QCustomPlot::savePdf now has additional optional parameters pdfCreator and pdfTitle to set according PDF metadata fields 276 | - QCustomPlot::replot now allows specifying whether the widget update is immediate (repaint) or queued (update) 277 | - QCPRange operators +, -, *, / with double operand for range shifting and scaling, and ==, != for range comparison 278 | - Layers now have a visibility property (QCPLayer::setVisible) 279 | - static functions QCPAxis::opposite and QCPAxis::orientation now offer more convenience when handling axis types 280 | - added notification signals for selectability change (selectableChanged) on all objects that have a selected/selectable property 281 | - added notification signal for QCPAxis scaleType property 282 | - added notification signal QCPLayerable::layerChanged 283 | 284 | Bugfixes: 285 | - Fixed assert halt, when QCPAxis auto tick labels not disabled but nevertheless a custom non-number tick label ending in "e" given 286 | - Fixed painting glitches when QCustomPlot resized inside a QMdiArea or under certain conditions inside a QLayout 287 | - If changing QCPAxis::scaleType and thus causing range sanitizing and a range modification, rangeChanged wouldn't be emitted 288 | - Fixed documentation bug that caused indentation to be lost in code examples 289 | Bugfixes after beta: 290 | - Fixed bug that caused crash if clicked-on legend item is removed in mousePressEvent. 291 | - On some systems, font size defaults to -1, which used to cause a debug output in QCPAxisPainterPrivate::TickLabelDataQCP. Now it's checked before setting values based on the default font size. 292 | - When using multiple axes on one side, setting one to invisible didn't properly compress the freed space. 293 | - Fixed bug that allowed selection of plottables when clicking in the bottom or top margin of a QCPAxisRect (outside the inner rect) 294 | 295 | Other: 296 | - In method QCPAbstractPlottable::getKeyRange/getValueRange, renamed parameter "validRange" to "foundRange", to better reflect its meaning (and contrast it from QCPRange::validRange) 297 | - QCPAxis low-level axis painting methods exported to QCPAxisPainterPrivate 298 | 299 | #### Version 1.1.1 released on 09.12.13 #### 300 | 301 | Bugfixes: 302 | - Fixed bug causing legends blocking input events from reaching underlying axis rect even if legend is invisible 303 | - Added missing Q_PROPERTY for QCPAxis::setDateTimeSpec 304 | - Fixed behaviour of QCPAxisRect::setupFullAxesBox (now transfers more properties from bottom/left to top/right axes and sets visibility of bottom/left axes to true) 305 | - Made sure PDF export doesn't default to grayscale output on some systems 306 | 307 | Other: 308 | - Plotting hint QCP::phForceRepaint is now enabled on all systems (and not only on windows) by default 309 | - Documentation improvements 310 | 311 | #### Version 1.1.0 released on 04.11.13 #### 312 | 313 | Added features: 314 | - Added QCPRange::expand and QCPRange::expanded 315 | - Added QCPAxis::rescale to rescale axis to all associated plottables 316 | - Added QCPAxis::setDateTimeSpec/dateTimeSpec to allow axis labels either in UTC or local time 317 | - QCPAxis now additionally emits a rangeChanged signal overload that provides the old range as second parameter 318 | 319 | Bugfixes: 320 | - Fixed QCustomPlot::rescaleAxes not rescaling properly if first plottable has an empty range 321 | - QCPGraph::rescaleAxes/rescaleKeyAxis/rescaleValueAxis are no longer virtual (never were in base class, was a mistake) 322 | - Fixed bugs in QCPAxis::items and QCPAxisRect::items not properly returning associated items and potentially stalling 323 | 324 | Other: 325 | - Internal change from QWeakPointer to QPointer, thus got rid of deprecated Qt functionality 326 | - Qt5.1 and Qt5.2 (beta1) compatibility 327 | - Release packages now extract to single subdirectory and don't place multiple files in current working directory 328 | 329 | #### Version 1.0.1 released on 05.09.13 #### 330 | 331 | Bugfixes: 332 | - using define flag QCUSTOMPLOT_CHECK_DATA caused debug output when data was correct, instead of invalid (fixed QCP::isInvalidData) 333 | - documentation images are now properly shown when viewed with Qt Assistant 334 | - fixed various documentation mistakes 335 | 336 | Other: 337 | - Adapted documentation style sheet to better match Qt5 documentation 338 | 339 | #### Version 1.0.0 released on 01.08.13 #### 340 | 341 | Quick Summary: 342 | - Layout system for multiple axis rects in one plot 343 | - Multiple axes per side 344 | - Qt5 compatibility 345 | - More flexible and consistent scatter configuration with QCPScatterStyle 346 | - Various interface cleanups/refactoring 347 | - Pixmap-cached axis labels for improved replot performance 348 | 349 | Changes that break backward compatibility: 350 | - QCustomPlot::axisRect() changed meaning due to the extensive changes to how axes and axis rects are handled 351 | it now returns a pointer to a QCPAxisRect and takes an integer index as parameter. 352 | - QCPAxis constructor changed to now take QCPAxisRect* as parent 353 | - setAutoMargin, setMarginLeft/Right/Top/Bottom removed due to the axis rect changes (see QCPAxisRect::setMargins/setAutoMargins) 354 | - setAxisRect removed due to the axis rect changes 355 | - setAxisBackground(-Scaled/-ScaledMode) now moved to QCPAxisRect as setBackground(-Scaled/ScaledMode) (access via QCustomPlot::axisRects()) 356 | - QCPLegend now is a QCPLayoutElement 357 | - QCPAbstractPlottable::drawLegendIcon parameter "rect" changed from QRect to QRectF 358 | - QCPAbstractLegendItem::draw second parameter removed (position/size now handled via QCPLayoutElement base class) 359 | - removed QCPLegend::setMargin/setMarginLeft/Right/Top/Bottom (now inherits the capability from QCPLayoutElement::setMargins) 360 | - removed QCPLegend::setMinimumSize (now inherits the capability from QCPLayoutElement::setMinimumSize) 361 | - removed enum QCPLegend::PositionStyle, QCPLegend::positionStyle/setPositionStyle/position/setPosition (replaced by capabilities of QCPLayoutInset) 362 | - QCPLegend transformed to work with new layout system (almost everything changed) 363 | - removed entire title interface: QCustomPlot::setTitle/setTitleFont/setTitleColor/setTitleSelected/setTitleSelectedFont/setTitleSelectedColor and 364 | the QCustomPlot::iSelectTitle interaction flag (all functionality is now given by the layout element "QCPPlotTitle" which can be added to the plot layout) 365 | - selectTest functions now take two additional parameters: bool onlySelectable and QVariant *details=0 366 | - selectTest functions now ignores visibility of objects and (if parameter onlySelectable is true) does not anymore ignore selectability of the object 367 | - moved QCustomPlot::Interaction/Interactions to QCP namespace as QCP::Interaction/Interactions 368 | - moved QCustomPlot::setupFullAxesBox() to QCPAxisRect::setupFullAxesBox. Now also accepts parameter to decide whether to connect opposite axis ranges 369 | - moved range dragging/zooming interface from QCustomPlot to QCPAxisRect (setRangeDrag, setRangeZoom, setRangeDragAxes, setRangeZoomAxes,...) 370 | - rangeDrag/Zoom is now set to Qt::Horizontal|Qt::Vertical instead of 0 by default, on the other hand, iRangeDrag/Zoom is unset in interactions by 371 | default (this makes enabling dragging/zooming easier by just adding the interaction flags) 372 | - QCPScatterStyle takes over everything related to handling scatters in all plottables 373 | - removed setScatterPen/Size on QCPGraph and QCPCurve, removed setOutlierPen/Size on QCPStatisticalBox (now handled via QCPScatterStyle) 374 | - modified setScatterStyle on QCPGraph and QCPCurve, and setOutlierStyle on QCPStatisticalBox, to take QCPScatterStyle 375 | - axis grid and subgrid are now reachable via the QCPGrid *QCPAxis::grid() method. (e.g. instead of xAxis->setGrid(true), write xAxis->grid()->setVisible(true)) 376 | 377 | Added features: 378 | - Axis tick labels are now pixmap-cached, thus increasing replot performance (in usual setups by about 24%). See plotting hint phCacheLabels which is set by default 379 | - Advanced layout system, including the classes QCPLayoutElement, QCPLayout, QCPLayoutGrid, QCPLayoutInset, QCPAxisRect 380 | - QCustomPlot::axisRects() returns all the axis rects in the QCustomPlot. 381 | - QCustomPlot::plotLayout() returns the top level layout (initially a QCPLayoutGrid with one QCPAxisRect inside) 382 | - QCPAxis now may have an offset to the axis rect (setOffset) 383 | - Multiple axes per QCPAxisRect side are now supported (see QCPAxisRect::addAxis) 384 | - QCustomPlot::toPixmap renders the plot into a pixmap and returns it 385 | - When setting tick label rotation to +90 or -90 degrees on a vertical axis, the labels are now centered vertically on the tick height 386 | (This allows space saving vertical tick labels by having the text direction parallel to the axis) 387 | - Substantially increased replot performance when using very large manual tick vectors (> 10000 ticks) via QCPAxis::setTickVector 388 | - QCPAxis and QCPAxisRect now allow easy access to all plottables(), graphs() and items() that are associated with them 389 | - Added QCustomPlot::hasItem method for consistency with plottable interface, hasPlottable 390 | - Added QCPAxisRect::setMinimumMargins as replacement for hardcoded minimum axis margin (15 px) when auto margin is enabled 391 | - Added Flags type QCPAxis::AxisTypes (from QCPAxis::AxisType), used in QCPAxisRect interface 392 | - Automatic margin calculation can now be enabled/disabled on a per-side basis, see QCPAxisRect::setAutoMargins 393 | - QCPAxisRect margins of multiple axis rects can be coupled via QCPMarginGroup 394 | - Added new default layers "background" and "legend" (QCPAxisRect draws its background on the "background" layer, QCPLegend is on the "legend" layer by default) 395 | - Custom scatter style via QCP::ssCustom and respective setCustomScatter functions that take a QPainterPath 396 | - Filled scatters via QCPScatterStyle::setBrush 397 | Added features after beta: 398 | - Added QCustomPlot::toPainter method, to allow rendering with existing painter 399 | - QCPItemEllipse now provides a center anchor 400 | 401 | Bugfixes: 402 | - Fixed compile error on ARM 403 | - Wrong legend icons were displayed if using pixmaps for scatters that are smaller than the legend icon rect 404 | - Fixed clipping inaccuracy for rotated tick labels (were hidden too early, because the non-rotated bounding box was used) 405 | - Fixed bug that caused wrong clipping of axis ticks and subticks when the ticks were given manually by QCPAxis::setTickVector 406 | - Fixed Qt5 crash when dragging graph out of view (iterator out of bounds in QCPGraph::getVisibleDataBounds) 407 | - Fixed QCPItemText not scaling properly when using scaled raster export 408 | Bugfixes after beta: 409 | - Fixed bug that clipped the rightmost pixel column of tick labels when caching activated (only visible on windows for superscript exponents) 410 | - Restored compatibility to Qt4.6 411 | - Restored support for -no-RTTI compilation 412 | - Empty manual tick labels are handled more gracefully (no QPainter qDebug messages anymore) 413 | - Fixed type ambiguity in QCPLineEnding::draw causing compile error on ARM 414 | - Fixed bug of grid layouts not propagating the minimum size from their child elements to the parent layout correctly 415 | - Fixed bug of child elements (e.g. axis rects) of inset layouts not properly receiving mouse events 416 | 417 | Other: 418 | - Opened up non-amalgamated project structure to public via git repository 419 | 420 | #### Version released on 09.06.12 #### 421 | 422 | Quick Summary: 423 | - Items (arrows, text,...) 424 | - Layers (easier control over rendering order) 425 | - New antialiasing system (Each objects controls own antialiasing with setAntialiased) 426 | - Performance Improvements 427 | - improved pixel-precise drawing 428 | - easier shared library creation/usage 429 | 430 | Changes that (might) break backward compatibility: 431 | - enum QCPGraph::ScatterSymbol was moved to QCP namespace (now QCP::ScatterSymbol). 432 | This replace should fix your code: "QCPGraph::ss" -> "QCP::ss" 433 | - enum QCustomPlot::AntialiasedElement and flag QCustomPlot::AntialiasedElements was moved to QCP namespace 434 | This replace should fix your code: "QCustomPlot::ae" -> "QCP::ae" 435 | - the meaning of QCustomPlot::setAntialiasedElements has changed slightly: It is now an override to force elements to be antialiased. If you want to force 436 | elements to not be drawn antialiased, use the new setNotAntialiasedElements. If an element is mentioned in neither of those functions, it now controls 437 | its antialiasing itself via its "setAntialiased" function(s). (e.g. QCPAxis::setAntialiased(bool), QCPAbstractPlottable::setAntialiased(bool), 438 | QCPAbstractPlottable::setAntialiasedScatters(bool), etc.) 439 | - QCPAxis::setTickVector and QCPAxis::setTickVectorLabels no longer take a pointer but a const reference of the respective QVector as parameter. 440 | (handing over a pointer didn't give any noticeable performance benefits but was inconsistent with the rest of the interface) 441 | - Equally QCPAxis::tickVector and QCPAxis::tickVectorLabels don't return by pointer but by value now 442 | - QCustomPlot::savePngScaled was removed, its purpose is now included as optional parameter "scale" of savePng. 443 | - If you have derived from QCPAbstractPlottable: all selectTest functions now consistently take the argument "const QPointF &pos" which is the test point in pixel coordinates. 444 | (the argument there was "double key, double value" in plot coordinates, before). 445 | - QCPAbstractPlottable, QCPAxis and QCPLegend now inherit from QCPLayerable 446 | - If you have derived from QCPAbstractPlottable: the draw method signature has changed from "draw (..) const" to "draw (..)", i.e. the method 447 | is not const anymore. This allows the draw function of your plottable to perform buffering/caching operations, if necessary. 448 | 449 | Added features: 450 | - Item system: QCPAbstractItem, QCPItemAnchor, QCPItemPosition, QCPLineEnding. Allows placing of lines, arrows, text, pixmaps etc. 451 | - New Items: QCPItemStraightLine, QCPItemLine, QCPItemCurve, QCPItemEllipse, QCPItemRect, QCPItemPixmap, QCPItemText, QCPItemBracket, QCPItemTracer 452 | - QCustomPlot::addItem/itemCount/item/removeItem/selectedItems 453 | - signals QCustomPlot::itemClicked/itemDoubleClicked 454 | - the QCustomPlot interactions property now includes iSelectItems (for selection of QCPAbstractItem) 455 | - QCPLineEnding. Represents the different styles a line/curve can end (e.g. different arrows, circle, square, bar, etc.), see e.g. QCPItemCurve::setHead 456 | - Layer system: QCPLayerable, QCPLayer. Allows more sophisticated control over drawing order and a kind of grouping. 457 | - QCPAbstractPlottable, QCPAbstractItem, QCPAxis, QCPGrid, QCPLegend are layerables and derive from QCPLayerable 458 | - QCustomPlot::addLayer/moveLayer/removeLayer/setCurrentLayer/layer/currentLayer/layerCount 459 | - Initially there are three layers: "grid", "main", and "axes". The "main" layer is initially empty and set as current layer, so new plottables/items are put there. 460 | - QCustomPlot::viewport now makes the previously inaccessible viewport rect read-only-accessible (needed that for item-interface) 461 | - PNG export now allows transparent background by calling QCustomPlot::setColor(Qt::transparent) before savePng 462 | - QCPStatisticalBox outlier symbols may now be all scatter symbols, not only hardcoded circles. 463 | - perfect precision of scatter symbol/error bar drawing and clipping in both antialiased and non-antialiased mode, by introducing QCPPainter 464 | that works around some QPainter bugs/inconveniences. Further, more complex symbols like ssCrossSquare used to look crooked, now they look good. 465 | - new antialiasing control system: Each drawing element now has its own "setAntialiased" function to control whether it is drawn antialiased. 466 | - QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements can be used to override the individual settings. 467 | - Subclasses of QCPAbstractPlottable can now use the convenience functions like applyFillAntialiasingHint or applyScattersAntialiasingHint to 468 | easily make their drawing code comply with the overall antialiasing system. 469 | - QCustomPlot::setNoAntialiasingOnDrag allows greatly improved performance and responsiveness by temporarily disabling all antialiasing while 470 | the user is dragging axis ranges 471 | - QCPGraph can now show scatter symbols at data points and hide its line (see QCPGraph::setScatterStyle, setScatterSize, setScatterPixmap, setLineStyle) 472 | - Grid drawing code was sourced out from QCPAxis to QCPGrid. QCPGrid is mainly an internal class and every QCPAxis owns one. The grid interface still 473 | works through QCPAxis and hasn't changed. The separation allows the grid to be drawn on a different layer as the axes, such that e.g. a graph can 474 | be above the grid but below the axes. 475 | - QCustomPlot::hasPlottable(plottable), returns whether the QCustomPlot contains the plottable 476 | - QCustomPlot::setPlottingHint/setPlottingHints, plotting hints control details about the plotting quality/speed 477 | - export to jpg and bmp added (QCustomPlot::saveJpg/saveBmp), as well as control over compression quality for png and jpg 478 | - multi-select-modifier may now be specified with QCustomPlot::setMultiSelectModifier and is not fixed to Ctrl anymore 479 | 480 | Bugfixes: 481 | - fixed QCustomPlot ignores replot after it had size (0,0) even if size becomes valid again 482 | - on Windows, a repaint used to be delayed during dragging/zooming of a complex plot, until the drag operation was done. 483 | This was fixed, i.e. repaints are forced after a replot() call. See QCP::phForceRepaint and setPlottingHints. 484 | - when using the raster paintengine and exporting to scaled PNG, pen widths are now scaled correctly (QPainter bug workaround via QCPPainter) 485 | - PDF export now respects QCustomPlot background color (QCustomPlot::setColor), also Qt::transparent 486 | - fixed a bug on QCPBars and QCPStatisticalBox where auto-rescaling of axis would fail when all data is very small (< 1e-11) 487 | - fixed mouse event propagation bug that prevented range dragging from working on KDE (GNU/Linux) 488 | - fixed a compiler warning on 64-bit systems due to pointer cast to int instead of quintptr in a qDebug output 489 | 490 | Other: 491 | - Added support for easier shared library creation (including examples for compiling and using QCustomPlot as shared library) 492 | - QCustomPlot now has the Qt::WA_OpaquePaintEvent widget attribute (gives slightly improved performance). 493 | - QCP::aeGraphs (enum QCP::AntialiasedElement, previously QCustomPlot::aeGraphs) has been marked deprecated since version 02.02.12 and 494 | was now removed. Use QCP::aePlottables instead. 495 | - optional performance-quality-tradeoff for solid graph lines (see QCustomPlot::setPlottingHints). 496 | - marked data classes and QCPRange as Q_MOVABLE_TYPE 497 | - replaced usage of own macro FUNCNAME with Qt macro Q_FUNC_INFO 498 | - QCustomPlot now returns a minimum size hint of 50*50 499 | 500 | #### Version released on 31.03.12 #### 501 | 502 | Changes that (might) break backward compatibility: 503 | - QCPAbstractLegendItem now inherits from QObject 504 | - mousePress, mouseMove and mouseRelease signals are now emitted before and not after any QCustomPlot processing (range dragging, selecting, etc.) 505 | 506 | Added features: 507 | - Interaction system: now allows selecting of objects like plottables, axes, legend and plot title, see QCustomPlot::setInteractions documentation 508 | - Interaction system for plottables: 509 | - setSelectable, setSelected, setSelectedPen, setSelectedBrush, selectTest on QCPAbstractPlottable and all derived plottables 510 | - setSelectionTolerance on QCustomPlot 511 | - selectedPlottables and selectedGraphs on QCustomPlot (returns the list of currently selected plottables/graphs) 512 | - Interaction system for axes: 513 | - setSelectable, setSelected, setSelectedBasePen, setSelectedTickPen, setSelectedSubTickPen, setSelectedLabelFont, setSelectedTickLabelFont, 514 | setSelectedLabelColor, setSelectedTickLabelColor, selectTest on QCPAxis 515 | - selectedAxes on QCustomPlot (returns a list of the axes that currently have selected parts) 516 | - Interaction system for legend: 517 | - setSelectable, setSelected, setSelectedBorderPen, setSelectedIconBorderPen, setSelectedBrush, setSelectedFont, setSelectedTextColor, selectedItems on QCPLegend 518 | - setSelectedFont, setSelectedTextColor, setSelectable, setSelected on QCPAbstractLegendItem 519 | - selectedLegends on QCustomPlot 520 | - Interaction system for title: 521 | - setSelectedTitleFont, setSelectedTitleColor, setTitleSelected on QCustomPlot 522 | - new signals in accordance with the interaction system: 523 | - selectionChangedByUser on QCustomPlot 524 | - selectionChanged on QCPAbstractPlottable 525 | - selectionChanged on QCPAxis 526 | - selectionChanged on QCPLegend and QCPAbstractLegendItem 527 | - plottableClick, legendClick, axisClick, titleClick, plottableDoubleClick, legendDoubleClick, axisDoubleClick, titleDoubleClick on QCustomPlot 528 | - QCustomPlot::deselectAll (deselects everything, i.e. axes and plottables) 529 | - QCPAbstractPlottable::pixelsToCoords (inverse function to the already existing coordsToPixels function) 530 | - QCPRange::contains(double value) 531 | - QCPAxis::setLabelColor and setTickLabelColor 532 | - QCustomPlot::setTitleColor 533 | - QCustomPlot now emits beforeReplot and afterReplot signals. Note that it is safe to make two customPlots mutually call eachothers replot functions 534 | in one of these slots, it will not cause an infinite loop. (usefull for synchronizing axes ranges between two customPlots, because setRange alone doesn't replot) 535 | - If the Qt version is 4.7 or greater, the tick label strings in date-time-mode now support sub-second accuracy (e.g. with format like "hh:mm:ss.zzz"). 536 | 537 | Bugfixes: 538 | - tick labels/margins should no longer oscillate by one pixel when dragging range or replotting repeatedly while changing e.g. data. This 539 | was caused by a bug in Qt's QFontMetrics::boundingRect function when the font has an integer point size (probably some rounding problem). 540 | The fix hence consists of creating a temporary font (only for bounding-box calculation) which is 0.05pt larger and thus avoiding the 541 | jittering rounding outcome. 542 | - tick label, axis label and plot title colors used to be undefined. This was fixed by providing explicit color properties. 543 | 544 | Other: 545 | - fixed some glitches in the documentation 546 | - QCustomPlot::replot and QCustomPlot::rescaleAxes are now slots 547 | 548 | #### Version released on 02.02.12 #### 549 | 550 | Changes that break backward compatibility: 551 | - renamed all secondary classes from QCustomPlot[...] to QCP[...]: 552 | QCustomPlotAxis -> QCPAxis 553 | QCustomPlotGraph -> QCPGraph 554 | QCustomPlotRange -> QCPRange 555 | QCustomPlotData -> QCPData 556 | QCustomPlotDataMap -> QCPDataMap 557 | QCustomPlotLegend -> QCPLegend 558 | QCustomPlotDataMapIterator -> QCPDataMapIterator 559 | QCustomPlotDataMutableMapIterator -> QCPDataMutableMapIterator 560 | A simple search and replace on all code files should make your code run again, e.g. consider the regex "QCustomPlot(?=[AGRDL])" -> "QCP". 561 | Make sure not to just replace "QCustomPlot" with "QCP" because the main class QCustomPlot hasn't changed to QCP. 562 | This change was necessary because class names became unhandy, pardon my bad naming decision in the beginning. 563 | - QCPAxis::tickLength() and QCPAxis::subTickLength() now each split into two functions for inward and outward ticks (tickLengthIn/tickLengthOut). 564 | - QCPLegend now uses QCPAbstractLegendItem to carry item data (before, the legend was passed QCPGraphs directly) 565 | - QCustomPlot::addGraph() now doesn't return the index of the created graph anymore, but a pointer to the created QCPGraph. 566 | - QCustomPlot::setAutoAddGraphToLegend is replaced by setAutoAddPlottableToLegend 567 | 568 | Added features: 569 | - Reversed axis range with QCPAxis::setRangeReversed(bool) 570 | - Tick labels are now only drawn if not clipped by the viewport (widget border) on the sides (e.g. left and right on a horizontal axis). 571 | - Zerolines. Like grid lines only with a separate pen (QCPAxis::setZeroLinePen), at tick position zero. 572 | - Outward ticks. QCPAxis::setTickLength/setSubTickLength now accepts two arguments for inward and outward tick length. This doesn't break 573 | backward compatibility because the second argument (outward) has default value zero and thereby a call with one argument hasn't changed its meaning. 574 | - QCPGraph now inherits from QCPAbstractPlottable 575 | - QCustomPlot::addPlottable/plottable/removePlottable/clearPlottables added to interface with the new QCPAbstractPlottable-based system. The simpler interface 576 | which only acts on QCPGraphs (addGraph, graph, removeGraph, etc.) was adapted internally and is kept for backward compatibility and ease of use. 577 | - QCPLegend items for plottables (e.g. graphs) can automatically wrap their texts to fit the widths, see QCPLegend::setMinimumSize and QCPPlottableLegendItem::setTextWrap. 578 | - QCustomPlot::rescaleAxes. Adapts axis ranges to show all plottables/graphs, by calling QCPAbstractPlottable::rescaleAxes on all plottables in the plot. 579 | - QCPCurve. For plotting of parametric curves. 580 | - QCPBars. For plotting of bar charts. 581 | - QCPStatisticalBox. For statistical box plots. 582 | 583 | Bugfixes: 584 | - Fixed QCustomPlot::removeGraph(int) not being able to remove graph index 0 585 | - made QCustomPlot::replot() abort painting when painter initialization fails (e.g. because width/height of QCustomPlot is zero) 586 | - The distance of the axis label from the axis ignored the tick label padding, this could have caused overlapping axis labels and tick labels 587 | - fixed memory leak in QCustomPlot (dtor didn't delete legend) 588 | - fixed bug that prevented QCPAxis::setRangeLower/Upper from setting the value to exactly 0. 589 | 590 | Other: 591 | - Changed default error bar handle size (QCustomPlotGraph::setErrorBarSize) from 4 to 6. 592 | - Removed QCustomPlotDataFetcher. Was deprecated and not used class. 593 | - Extended documentation, especially class descriptions. 594 | 595 | #### Version released on 15.01.12 #### 596 | 597 | Changes that (might) break backward compatibility: 598 | - QCustomPlotGraph now inherits from QObject 599 | 600 | Added features: 601 | - Added axis background pixmap (QCustomPlot::setAxisBackground, setAxisBackgroundScaled, setAxisBackgroundScaledMode) 602 | - Added width and height parameter on PDF export function QCustomPlot::savePdf(). This now allows PDF export to 603 | have arbitrary dimensions, independent of the current geometry of the QCustomPlot. 604 | - Added overload of QCustomPlot::removeGraph that takes QCustomPlotGraph* as parameter, instead the index of the graph 605 | - Added all enums to the Qt meta system via Q_ENUMS(). The enums can now be transformed 606 | to QString values easily with the Qt meta system, which makes saving state e.g. as XML 607 | significantly nicer. 608 | - added typedef QMapIterator QCustomPlotDataMapIterator 609 | and typedef QMutableMapIterator QCustomPlotDataMutableMapIterator 610 | for improved information hiding, when using iterators outside QCustomPlot code 611 | 612 | Bugfixes: 613 | - Fixed savePngScaled. Axis/label drawing functions used to reset the painter transform 614 | and thereby break savePngScaled. Now they buffer the current transform and restore it afterwards. 615 | - Fixed some glitches in the doxygen comments (affects documentation only) 616 | 617 | Other: 618 | - Changed the default tickLabelPadding of top axis from 3 to 6 pixels. Looks better. 619 | - Changed the default QCustomPlot::setAntialiasedElements setting: Graph fills are now antialiased 620 | by default. That's a bit slower, but makes fill borders look better. 621 | 622 | #### Version released on 19.11.11 #### 623 | 624 | Changes that break backward compatibility: 625 | - QCustomPlotAxis: tickFont and setTickFont renamed to tickLabelFont and setTickLabelFont (for naming consistency) 626 | 627 | Other: 628 | - QCustomPlotAxis: Added rotated tick labels, see setTickLabelRotation 629 | 630 | -------------------------------------------------------------------------------- /lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | 3 | # Set project properties 4 | set(PROJECT_NAME qcustomplot) 5 | set(PROJECT_VERSION_SEMANTIC 2.1.1.1) 6 | set(PROJECT_VERSION_CPP_MIN 11) 7 | 8 | # Set project options 9 | # Options availables for external project start with "EXT_OPT_QCPLIB_", those options can be use in top CMakeFiles. 10 | # All options are disabled by default. 11 | # List of available options : 12 | # - Currently no options available 13 | 14 | # Check for target architecture 15 | if(NOT PROJECT_ARCH_TARGET) 16 | message(FATAL_ERROR "Cmake variable \"PROJECT_ARCH_TARGET\" is undefined, please set it in your root CMakelist.") 17 | endif() 18 | 19 | # Set project configuration 20 | project(${PROJECT_NAME} LANGUAGES CXX) 21 | project(${PROJECT_NAME} VERSION "${PROJECT_VERSION_SEMANTIC}") 22 | 23 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 24 | 25 | set(CMAKE_AUTOUIC ON) # Specific to Qt 26 | set(CMAKE_AUTOMOC ON) # Specific to Qt 27 | set(CMAKE_AUTORCC ON) # Specific to Qt 28 | 29 | # Set C++ standard to use 30 | if(DEFINED CMAKE_CXX_STANDARD) 31 | if(${CMAKE_CXX_STANDARD} LESS ${PROJECT_VERSION_CPP_MIN}) 32 | message(FATAL_ERROR "Project ${PROJECT_NAME} require at least C++ standard ${PROJECT_VERSION_CPP_MIN}") 33 | endif() 34 | else() 35 | set(CMAKE_CXX_STANDARD ${PROJECT_VERSION_CPP_MIN}) 36 | endif() 37 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 38 | message(STATUS "Project \"${PROJECT_NAME}\" compiled with C++ standard ${CMAKE_CXX_STANDARD}") 39 | 40 | # Configure file project - File containing macro that can be used in project 41 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/config.h") 42 | 43 | # Find Qt packages 44 | find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) 45 | find_package(QT NAMES Qt6 Qt5 COMPONENTS PrintSupport REQUIRED) 46 | 47 | find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED) 48 | find_package(Qt${QT_VERSION_MAJOR} COMPONENTS PrintSupport REQUIRED) 49 | 50 | # Manage library files 51 | set(PROJECT_HEADERS 52 | config.h 53 | 54 | qcustomplot.h 55 | ) 56 | 57 | set(PROJECT_SOURCES 58 | qcustomplot.cpp 59 | ) 60 | 61 | set(PROJECT_UI 62 | 63 | ) 64 | 65 | set(PROJECT_RSC 66 | 67 | ) 68 | 69 | set(PROJECT_FILES ${PROJECT_HEADERS} ${PROJECT_SOURCES} ${PROJECT_UI} ${PROJECT_RSC}) 70 | 71 | # Platform dependant stuff 72 | # Windows (for both x86/x64) 73 | if(WIN32) 74 | 75 | endif() 76 | 77 | # MacOS (for both x86/x64) 78 | if(UNIX AND APPLE) 79 | 80 | endif() 81 | 82 | # Linux, BSD, Solaris, Minix (for both x86/x64) 83 | if(UNIX AND NOT APPLE) 84 | 85 | endif() 86 | 87 | # Add files to the library 88 | add_library(${PROJECT_NAME} SHARED ${PROJECT_FILES}) 89 | 90 | # Set version of library 91 | set_target_properties(${PROJECT_NAME} PROPERTIES 92 | VERSION ${PROJECT_VERSION} 93 | SOVERSION ${PROJECT_VERSION_MAJOR}) 94 | 95 | # Link needed libraries 96 | # Qt Library 97 | target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core) 98 | target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::PrintSupport) 99 | 100 | # Compile needed definitions 101 | target_compile_definitions(${PROJECT_NAME} PRIVATE QCUSTOMPLOT_COMPILE_LIBRARY) 102 | 103 | # Definition which depends on options 104 | # Ex : 105 | # if(EXT_OPT_QCPLIB_XYZ) 106 | # target_compile_definitions(${PROJECT_NAME} PRIVATE QCPLIB_ENABLE_XYZ) 107 | # endif() 108 | 109 | # Directories to includes 110 | target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) 111 | -------------------------------------------------------------------------------- /lib/config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef QCP_LIB_CONFIG_H 2 | #define QCP_LIB_CONFIG_H 3 | 4 | #define QCP_LIB_VERSION "@PROJECT_VERSION@" 5 | #define QCP_LIB_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@" 6 | #define QCP_LIB_VERSION_MINOR "@PROJECT_VERSION_MINOR@" 7 | #define QCP_LIB_VERSION_PATCH "@PROJECT_VERSION_PATCH@" 8 | #define QCP_LIB_VERSION_TWEAK "@PROJECT_VERSION_TWEAK@" 9 | 10 | #endif // QCP_LIB_CONFIG_H --------------------------------------------------------------------------------