diff --git a/.clang-format b/.clang-format index c78c302e..2599f8ad 100644 --- a/.clang-format +++ b/.clang-format @@ -18,5 +18,5 @@ AlignTrailingComments: true AllowAllArgumentsOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false BreakBeforeBraces: Stroustrup - +SortIncludes: false # google-readability-braces-around-statements \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index a5923d0a..2e3248f6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "request": "launch", "program": "${workspaceFolder}/build/vscp-works-qt", "args": [], - "preLaunchTask": "build", + "preLaunchTask": "CMake: build", }, { "name": "(gdb) Launch X", diff --git a/.vscode/settings.json b/.vscode/settings.json index b913ad69..58e588e4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -118,7 +118,7 @@ ], "cmake.clearOutputBeforeBuild": false, "cmake.configureEnvironment": { - "CMAKE_PREFIX_PATH": "~/Qt/6.7.2/gcc_64" + "CMAKE_PREFIX_PATH": "~/Qt/6.8.0/gcc_64" }, "vcpkg.general.enable": true, "vcpkg.target.hostTriplet": "x64-windows", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 797fe2cb..bcbd5893 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,49 +7,9 @@ "targets": [ "all" ], - "group": "build", - "problemMatcher": [], - "detail": "CMake template build task", - "isDefault": true - }, - { - "taskName": "make", - "label": "build", - "type": "shell", - "command": "cd build; make -j4 -Wall ", - "args": [], - "group": "build", - "problemMatcher": "$gcc" - }, - { - "taskName": "clean & build all", - "type": "shell", - "command": "cd build; make clean; cmake -DCMAKE_BUILD_TYPE=Debug .. ; make -j4 -Wall", - "args": [], - "group": "build", - "problemMatcher": { - "owner": "cpp", - "fileLocation": [ - "relative", - "${workspaceFolder}" - ], - "pattern": { - "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "message": 5 - } + "group": { + "kind": "build" }, - "label": "clean & build all" - }, - { - "taskName": "Clean & build all 6.8.0", - "type": "shell", - "command": "rm -rf build; mkdir build; cd build; export CMAKE_PREFIX_PATH=~/Qt/6.8.0/gcc_64:$CMAKE_PREFIX_PATH; cmake -DCMAKE_BUILD_TYPE=Debug -DQt6_DIR=~/Qt/6.8.0/gcc_64 .. ; make -j4 -Wall", - "args": [], - "group": "build", "problemMatcher": { "owner": "cpp", "fileLocation": [ @@ -65,13 +25,15 @@ "message": 5 } }, - "label": "Clean & build all 6.8.0" - }, + "detail": "CMake template build task" + }, { - "taskName": "Clean & build all 6.7.3", - "type": "shell", - "command": "rm -rf build; mkdir build; cd build; export CMAKE_PREFIX_PATH=~/Qt/6.7.3/gcc_64:$CMAKE_PREFIX_PATH; cmake -DCMAKE_BUILD_TYPE=Debug -DQt6_DIR=~/Qt/7.3.0/gcc_64 .. ; make -j4 -Wall", - "args": [], + "type": "cmake", + "label": "CMake: clean rebuild", + "command": "cleanRebuild", + "targets": [ + "all" + ], "group": "build", "problemMatcher": { "owner": "cpp", @@ -88,31 +50,18 @@ "message": 5 } }, - "label": "Clean & build all 6.7.3" + "detail": "CMake template clean rebuild task" }, { - "taskName": "Clean & build all 6.5.3", "type": "shell", - "command": "rm -rf build; mkdir build; cd build; export CMAKE_PREFIX_PATH=~/Qt/6.5.3/gcc_64:$CMAKE_PREFIX_PATH; cmake -DCMAKE_BUILD_TYPE=Debug -DQt6_DIR=~/Qt/6.5.3/gcc_64 .. ; make -j4 -Wall", - "args": [], - "group": "build", - "problemMatcher": { - "owner": "cpp", - "fileLocation": [ - "relative", - "${workspaceFolder}" - ], - "pattern": { - "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "message": 5 - } + "label": "Update submodules", + "command": "git submodule update --recursive --remote", + "group": { + "kind": "build", + "isDefault": false }, - "label": "Clean & build all 6.5.3" - }, + "detail": "Update submodules" + } { "type": "shell", "label": "g++ build active file", @@ -129,4 +78,4 @@ } ], "version": "2.0.0" -} \ No newline at end of file +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 3fb4f841..e9f5ff57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -545,64 +545,64 @@ qt_add_executable(${PROJECT_NAME} src/cdlgselectbootalgorithm.h src/cdlgselectbootalgorithm.cpp - $ENV{VSCP_ROOT}/src/vscp/common/version.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp.h - $ENV{VSCP_ROOT}/src/vscp/common/vscpremotetcpif.h - $ENV{VSCP_ROOT}/src/vscp/common/vscpremotetcpif.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscpdatetime.h - $ENV{VSCP_ROOT}/src/vscp/common/vscpdatetime.cpp - $ENV{VSCP_ROOT}/src/vscp/common/guid.h - $ENV{VSCP_ROOT}/src/vscp/common/guid.cpp - $ENV{VSCP_ROOT}/src/vscp/common/mdf.h - $ENV{VSCP_ROOT}/src/vscp/common/mdf.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscphelper.h - $ENV{VSCP_ROOT}/src/vscp/common/vscphelper.cpp - $ENV{VSCP_ROOT}/src/vscp/common/canal.h - $ENV{VSCP_ROOT}/src/vscp/common/canaldlldef.h - $ENV{VSCP_ROOT}/src/vscp/common/vscpcanaldeviceif.h - $ENV{VSCP_ROOT}/src/vscp/common/vscpcanaldeviceif.cpp - $ENV{VSCP_ROOT}/src/vscp/common/canal-xmlconfig.h - $ENV{VSCP_ROOT}/src/vscp/common/canal-xmlconfig.cpp - $ENV{VSCP_ROOT}/src/vscp/common/register.h - $ENV{VSCP_ROOT}/src/vscp/common/register.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-base.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-base.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-canal.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-canal.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-mqtt.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-mqtt.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-tcp.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-tcp.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-socketcan.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-socketcan.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-ws1.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-ws1.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-ws2.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-ws2.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-udp.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-udp.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-multicast.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-client-multicast.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-bootdevice.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-bootdevice.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-bootdevice-pic1.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-bootdevice-pic1.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscp-bootdevice-vscp.h - $ENV{VSCP_ROOT}/src/vscp/common/vscp-bootdevice-vscp.cpp - $ENV{VSCP_ROOT}/src/vscp/common/vscpunit.h - $ENV{VSCP_ROOT}/src/vscp/common/vscpunit.cpp - $ENV{VSCP_ROOT}/src/common/sockettcp.h - $ENV{VSCP_ROOT}/src/common/sockettcp.c - $ENV{VSCP_ROOT}/src/common/vscpbase64.h - $ENV{VSCP_ROOT}/src/common/vscpbase64.c - $ENV{VSCP_ROOT}/src/common/vscp-aes.h - $ENV{VSCP_ROOT}/src/common/vscp-aes.c - $ENV{VSCP_ROOT}/src/common/crc.h - $ENV{VSCP_ROOT}/src/common/crc.c - $ENV{VSCP_ROOT}/src/common/crc8.h - $ENV{VSCP_ROOT}/src/common/crc8.c - $ENV{VSCP_ROOT}/src/common/vscpmd5.h - $ENV{VSCP_ROOT}/src/common/vscpmd5.c + ./third_party/vscp/src/vscp/common/version.h + ./third_party/vscp/src/vscp/common/vscp.h + ./third_party/vscp/src/vscp/common/vscpremotetcpif.h + ./third_party/vscp/src/vscp/common/vscpremotetcpif.cpp + ./third_party/vscp/src/vscp/common/vscpdatetime.h + ./third_party/vscp/src/vscp/common/vscpdatetime.cpp + ./third_party/vscp/src/vscp/common/guid.h + ./third_party/vscp/src/vscp/common/guid.cpp + ./third_party/vscp/src/vscp/common/mdf.h + ./third_party/vscp/src/vscp/common/mdf.cpp + ./third_party/vscp/src/vscp/common/vscphelper.h + ./third_party/vscp/src/vscp/common/vscphelper.cpp + ./third_party/vscp/src/vscp/common/canal.h + ./third_party/vscp/src/vscp/common/canaldlldef.h + ./third_party/vscp/src/vscp/common/vscpcanaldeviceif.h + ./third_party/vscp/src/vscp/common/vscpcanaldeviceif.cpp + ./third_party/vscp/src/vscp/common/canal-xmlconfig.h + ./third_party/vscp/src/vscp/common/canal-xmlconfig.cpp + ./third_party/vscp/src/vscp/common/register.h + ./third_party/vscp/src/vscp/common/register.cpp + ./third_party/vscp/src/vscp/common/vscp-client-base.h + ./third_party/vscp/src/vscp/common/vscp-client-base.cpp + ./third_party/vscp/src/vscp/common/vscp-client-canal.h + ./third_party/vscp/src/vscp/common/vscp-client-canal.cpp + ./third_party/vscp/src/vscp/common/vscp-client-mqtt.h + ./third_party/vscp/src/vscp/common/vscp-client-mqtt.cpp + ./third_party/vscp/src/vscp/common/vscp-client-tcp.h + ./third_party/vscp/src/vscp/common/vscp-client-tcp.cpp + ./third_party/vscp/src/vscp/common/vscp-client-socketcan.h + ./third_party/vscp/src/vscp/common/vscp-client-socketcan.cpp + ./third_party/vscp/src/vscp/common/vscp-client-ws1.h + ./third_party/vscp/src/vscp/common/vscp-client-ws1.cpp + ./third_party/vscp/src/vscp/common/vscp-client-ws2.h + ./third_party/vscp/src/vscp/common/vscp-client-ws2.cpp + ./third_party/vscp/src/vscp/common/vscp-client-udp.h + ./third_party/vscp/src/vscp/common/vscp-client-udp.cpp + ./third_party/vscp/src/vscp/common/vscp-client-multicast.h + ./third_party/vscp/src/vscp/common/vscp-client-multicast.cpp + ./third_party/vscp/src/vscp/common/vscp-bootdevice.h + ./third_party/vscp/src/vscp/common/vscp-bootdevice.cpp + ./third_party/vscp/src/vscp/common/vscp-bootdevice-pic1.h + ./third_party/vscp/src/vscp/common/vscp-bootdevice-pic1.cpp + ./third_party/vscp/src/vscp/common/vscp-bootdevice-vscp.h + ./third_party/vscp/src/vscp/common/vscp-bootdevice-vscp.cpp + ./third_party/vscp/src/vscp/common/vscpunit.h + ./third_party/vscp/src/vscp/common/vscpunit.cpp + ./third_party/vscp/src/common/sockettcp.h + ./third_party/vscp/src/common/sockettcp.c + ./third_party/vscp/src/common/vscpbase64.h + ./third_party/vscp/src/common/vscpbase64.c + ./third_party/vscp/src/common/vscp-aes.h + ./third_party/vscp/src/common/vscp-aes.c + ./third_party/vscp/src/common/crc.h + ./third_party/vscp/src/common/crc.c + ./third_party/vscp/src/common/crc8.h + ./third_party/vscp/src/common/crc8.c + ./third_party/vscp/src/common/vscpmd5.h + ./third_party/vscp/src/common/vscpmd5.c ./third_party/mustache/mustache.hpp ./third_party/spdlog/include/ ./third_party/crypto-algorithms/sha256.h @@ -620,8 +620,8 @@ if (MSVC) ./src ./build ./ui - $ENV{VSCP_ROOT}/src/vscp/common/ - $ENV{VSCP_ROOT}/src/common + ./third_party/vscp/src/vscp/common/ + ./third_party/vscp/src/common ./third_party ./third_party/nlohmann/include/ ./third_party/spdlog/include/ @@ -644,10 +644,10 @@ else() ./src ./build ./ui - third_party/mqtt - third_party/mqtt/clib - $ENV{VSCP_ROOT}/src/vscp/common/ - $ENV{VSCP_ROOT}/src/common + ./third_party/mqtt + ./third_party/mqtt/clib + ./third_party/vscp/src/vscp/common/ + ./third_party/vscp/src/common ./third_party ./third_party/nlohmann/include/ ./third_party/spdlog/include/ diff --git a/README.md b/README.md index 1b9aa168..078fba9b 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ If you still want to build this project ### Install Qt. -Go to the qt site and download qt using the [Qt Online Installer](https://www.qt.io/download-open-source). Any version above 5.15 should work. +Go to the qt site and download qt using the [Qt Online Installer](https://www.qt.io/download-open-source). Any version 6.x should work. ### Install other needed libs @@ -141,13 +141,11 @@ vcpkg integrate install Install the required libs ```bash -vcpkg install qt5:x64-windows vcpkg install pthread:x64-windows vcpkg install dlfcn-win32:x64-windows vcpkg install expat:x64-windows vcpkg install openssl:x64-windows vcpkg install paho-mqtt:x64-windows -vcpkg install qtcharts:x64-windows ``` The Qt installation may take some time @@ -308,10 +306,7 @@ cmake .. ## Linux - * Need to install libqt5serialport5-dev - sudo apt-get install libqt5serialport5 - sudo apt-get install libqt5serialport5-dev ## Enable debug diff --git a/src/bootloaderwizard.cpp b/src/bootloaderwizard.cpp index 5ff5329e..e4b10663 100644 --- a/src/bootloaderwizard.cpp +++ b/src/bootloaderwizard.cpp @@ -60,6 +60,7 @@ #include "cdlgknownguid.h" #include "version.h" #include "vscp-bootdevice-pic1.h" +#include "vscp-bootdevice-vscp.h" #include @@ -116,7 +117,7 @@ CWizardPageNickname::initializePage(void) "to set node id\n\n")); label->setWordWrap(true); - QString str = QString::number(m_nickname); + QString str = QString::number(m_nickname); QLineEdit* pNodeId = new QLineEdit(QString("0x%1").arg(m_nickname, 2, 16, QLatin1Char('0'))); QCheckBox* pSetInBootMode = new QCheckBox("Remote device is already in bootmode"); pNodeId->setMaximumWidth(100); @@ -150,11 +151,11 @@ CWizardPageNickname::initializePage(void) registerField("boot.firmware.version.minor", new QSpinBox(0)); registerField("boot.firmware.version.sub", new QSpinBox(0)); - // Boot loader algorith device expect + // Boot loader algorithm device expect registerField("boot.firmware.bootloader.algorithm", new QSpinBox(0)); // Firmware device code of current firmware - registerField("boot.firmware.device.code", new QSpinBox(0)); + registerField("boot.firmware.code", new QSpinBox(0)); // Path to local firmware file registerField("boot.firmware.path", new QLineEdit("")); @@ -274,7 +275,7 @@ CWizardPageInterface::initializePage(void) QLabel* label = new QLabel(tr("The communication method you have selected may be able to connect to several " "interfaces. Interfaces are defined by GUID's which " "have zeros in the two lowest bytes. This is just a method " - "used to talk to level I devicess over a level II connection\n\n")); + "used to talk to level I devices over a level II connection\n\n")); label->setWordWrap(true); m_pInterface = new QLineEdit(""); @@ -403,7 +404,7 @@ CWizardPageGuid::initializePage(void) { setTitle("Set GUID"); - QLabel* label = new QLabel(tr("The device you want to update is indentified by a full GUID. " + QLabel* label = new QLabel(tr("The device you want to update is identified by a full GUID. " "Please set or select this GUID here. \n\n" "For 16-bit nickname id's use full GUID with nickname set in the two" "LSB's\n\n")); @@ -519,7 +520,7 @@ CWizardPageLoadMdf::initializePage(void) "will be connected to and boot loader information will be " "fetched from the device and the MDF will be downloaded and parsed\n\n" - "Alternativly if you select the 'use local MDF' you will be asked to" + "Alternatively if you select the 'use local MDF' you will be asked to" "provide a path to a local MDF file\n\n")); label->setWordWrap(true); @@ -577,7 +578,6 @@ CWizardPageLoadMdf::validatePage(void) switch (m_vscpClient->getType()) { case CVscpClient::connType::TCPIP: - break; case CVscpClient::connType::CANAL: { @@ -617,7 +617,7 @@ CWizardPageLoadMdf::validatePage(void) QMessageBox::Ok); return false; } - + QApplication::restoreOverrideCursor(); setField("boot.firmware.guid", stdregs.getGUIDStr().c_str()); @@ -627,11 +627,11 @@ CWizardPageLoadMdf::validatePage(void) setField("boot.firmware.version.minor", stdregs.getFirmwareMinorVersion()); setField("boot.firmware.version.sub", stdregs.getFirmwareSubMinorVersion()); - // Boot loader algorith device expect + // Boot loader algorithm device expect setField("boot.firmware.bootloader.algorithm", stdregs.getBootloaderAlgorithm()); // Firmware device code of current firmware - setField("boot.firmware.device.code", stdregs.getFirmwareDeviceCode()); + setField("boot.firmware.code", stdregs.getFirmwareDeviceCode()); // * * * Download MDF * * * @@ -645,7 +645,7 @@ CWizardPageLoadMdf::validatePage(void) int rv = mdf.parseMDF(path.toStdString()); if (VSCP_ERROR_SUCCESS != rv) { // if (nullptr != statusCallback) { - // statusCallback(80, "Faild to parse MDF"); + // statusCallback(80, "Failed to parse MDF"); // } spdlog::error("Failed to parse MDF {0} rv={1}", path.toStdString(), rv); return false; @@ -686,7 +686,7 @@ CWizardPageLoadMdf::validatePage(void) case CVscpClient::connType::MULTICAST: case CVscpClient::connType::WS1: case CVscpClient::connType::WS2: - defult: + default: spdlog::error("No bootloader wizard (yet!?) for this type of " "communication interface - {}", static_cast(m_vscpClient->getType())); @@ -739,21 +739,21 @@ CWizardPageFirmware::initializePage(void) "the firmware you intend to upload.\n"); label->setWordWrap(true); - QLabel* labelDeviceName = new QLabel("Device name: " + field("boot.firmware.devicename").toString()); - QLabel* labelGUID = new QLabel("Current firmware GUID: " + field("boot.firmware.guid").toString()); - QLabel* labelVer = new QLabel("Current firmware version: " + + QLabel* labelDeviceName = new QLabel("Device name: " + field("boot.firmware.devicename").toString()); + QLabel* labelGUID = new QLabel("Device GUID: " + field("boot.firmware.guid").toString()); + QLabel* labelVer = new QLabel("Device firmware version: " + field("boot.firmware.version.major").toString() + "." + field("boot.firmware.version.minor").toString() + "." + field("boot.firmware.version.sub").toString()); - QLabel* labelBootloadAlgorithm = new QLabel("Current firmware bootload algorithm: " + + QLabel* labelBootloadAlgorithm = new QLabel("Device firmware bootload algorithm: " + field("boot.firmware.bootloader.algorithm").toString() + " - " + vscp_getBootLoaderDescription(field("boot.firmware.bootloader.algorithm").toInt())); - QLabel* labelBootloadDeviceCode = new QLabel("Current firmware device code: " + - field("boot.firmware.device.code").toString()); + QLabel* labelBootloadDeviceCode = new QLabel("Device firmware code: " + + field("boot.firmware.code").toString()); m_chkLocalFile = new QCheckBox("Use local firmware file"); m_chkLocalFile->setStyleSheet("color: rgb(129, 61, 156);"); - m_btnSelectFirmware = new QPushButton("Select firmware file"); - m_editFirmwareFile = new QLineEdit("No firmware file selected"); + m_btnSelectFirmware = new QPushButton("Select firmware file"); + m_editFirmwareFile = new QLineEdit("No firmware file selected"); QVBoxLayout* layout = new QVBoxLayout; layout->addWidget(label); @@ -1040,7 +1040,7 @@ CWizardPageFlash::initializePage(void) m_infomsg = new QTextEdit(); m_infomsg->setReadOnly(true); - m_infomsg->setStyleSheet("background-color:lightgrey;"); + m_infomsg->setStyleSheet("background-color:rgb(252, 250, 210);"); QPushButton* btnFlash = new QPushButton(tr("Flash device")); btnFlash->setMaximumWidth(200); @@ -1063,15 +1063,20 @@ CWizardPageFlash::initializePage(void) void CWizardPageFlash::statusCallback(int progress, const char* str) -{ - spdlog::trace("Flashing {0} {1}\n", progress, str); +{ if (-1 != progress) { m_progress->setValue(progress); + spdlog::trace("Status {0} {1}\n", progress, str); + } + else { + spdlog::trace("Status {0}\n", str); } if (strlen(str)) { addStatusMessage(str); } + + QApplication::processEvents(); } /////////////////////////////////////////////////////////////////////////////// @@ -1090,135 +1095,362 @@ CWizardPageFlash::addStatusMessage(const QString& str) } /////////////////////////////////////////////////////////////////////////////// -// flashDevice +// flashDeviceVSCP // void -CWizardPageFlash::flashDevice(void) +CWizardPageFlash::flashDeviceVSCP(void) { int rv; + cguid guid; vscpworks* pworks = (vscpworks*)QCoreApplication::instance(); - // Lets rock'n roll - spdlog::info("Starting flash device process."); - addStatusMessage("Starting flash device process."); + addStatusMessage("VSCP Bootloader."); + guid.setNicknameID(vscp_readStringValue(field("boot.nickname").toString().toStdString())); + using namespace std::placeholders; + + // auto callback = std::bind(&CWizardPageLoadMdf::statusCallback, this, _1, _2); + // lambda version for reference + auto callback = [this](auto a, auto b) { this->statusCallback(a, b); }; + + CBootDevice_VSCP boot(m_vscpClient, vscp_readStringValue(field("boot.nickname").toString().toStdString()), callback); + + addStatusMessage("Downloaded Hex file path: " + field("boot.firmware.path").toString()); + boot.loadIntelHexFile(field("boot.firmware.path").toString().toStdString()); + + uint32_t min, max; + rv = boot.getMinMaxForRange(CBootDevice_VSCP::MEM_CODE_START, CBootDevice_VSCP::MEM_CODE_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("Flash code range: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("Flash code range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No flash memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } - m_infomsg->clear(); + rv = boot.getMinMaxForRange(CBootDevice_VSCP::MEM_RAM_START, CBootDevice_VSCP::MEM_RAM_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("Ram code range: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("Ram code range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No ram memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } - // Set remote device in boot mode - spdlog::info("Bootloading algorithm: {}", field("boot.firmware.bootloader.algorithm").toInt()); - switch (field("boot.firmware.bootloader.algorithm").toInt()) { + rv = boot.getMinMaxForRange(CBootDevice_VSCP::MEM_USERID_START, CBootDevice_VSCP::MEM_USERID_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("User id: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("User id range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No user id memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } - case VSCP_BOOTLOADER_VSCP: { - addStatusMessage("VSCP Bootloader."); - } break; + rv = boot.getMinMaxForRange(CBootDevice_VSCP::MEM_CONFIG_START, CBootDevice_VSCP::MEM_CONFIG_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("Config: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("Config range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No config memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } - case VSCP_BOOTLOADER_PIC1: { - cguid guid; - addStatusMessage("Microchip PIC1 Bootloader."); - guid.setNicknameID(vscp_readStringValue(field("boot.nickname").toString().toStdString())); - using namespace std::placeholders; - // auto callback = std::bind(&CWizardPageLoadMdf::statusCallback, this, _1, _2); - // lambda version for reference - auto callback = [this](auto a, auto b) { this->statusCallback(a, b); }; - CBootDevice_PIC1 boot(m_vscpClient, vscp_readStringValue(field("boot.nickname").toString().toStdString()), callback); - addStatusMessage("Hex file path: " + field("boot.firmware.path").toString()); - boot.loadIntelHexFile(field("boot.firmware.path").toString().toStdString()); - - uint32_t min, max; - rv = boot.getMinMaxForRange(CBootDevice_PIC1::MEM_CODE_START, CBootDevice_PIC1::MEM_CODE_END, &min, &max); - if (VSCP_ERROR_SUCCESS == rv) { - spdlog::info("Flash code range: {0:X}. {1:X}", min, max); - addStatusMessage(QString("Flash code range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); - } - else { - spdlog::error("getMinMaxForRange: failed rv={0}", rv); - } + rv = boot.getMinMaxForRange(CBootDevice_VSCP::MEM_EEPROM_START, CBootDevice_VSCP::MEM_EEPROM_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("EEPROM: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("EEPROM range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No EEPROM memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } - rv = boot.getMinMaxForRange(CBootDevice_PIC1::MEM_USERID_START, CBootDevice_PIC1::MEM_USERID_END, &min, &max); - if (VSCP_ERROR_SUCCESS == rv) { - spdlog::info("User id: {0:X}. {1:X}", min, max); - addStatusMessage(QString("User id range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); - } - else { - spdlog::error("getMinMaxForRange: failed rv={0}", rv); - } + rv = boot.getMinMaxForRange(CBootDevice_VSCP::MEM_USER0_START, CBootDevice_VSCP::MEM_USER0_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("User 0: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("User 0 range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No user 0 memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } - rv = boot.getMinMaxForRange(CBootDevice_PIC1::MEM_CONFIG_START, CBootDevice_PIC1::MEM_CONFIG_END, &min, &max); - if (VSCP_ERROR_SUCCESS == rv) { - spdlog::info("Config: {0:X}. {1:X}", min, max); - addStatusMessage(QString("Config range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); - } - else { - spdlog::error("getMinMaxForRange: failed rv={0}", rv); - } + rv = boot.getMinMaxForRange(CBootDevice_VSCP::MEM_USER1_START, CBootDevice_VSCP::MEM_USER1_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("User 1: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("User 1 range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No user 1 memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } - rv = boot.getMinMaxForRange(CBootDevice_PIC1::MEM_EEPROM_START, CBootDevice_PIC1::MEM_EEPROM_END, &min, &max); - if (VSCP_ERROR_SUCCESS == rv) { - spdlog::info("EEPROM: {0:X}. {1:X}", min, max); - addStatusMessage(QString("EEPROM range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); - } - else { - spdlog::error("getMinMaxForRange: failed rv={0}", rv); - } + rv = boot.getMinMaxForRange(CBootDevice_VSCP::MEM_USER2_START, CBootDevice_VSCP::MEM_USER2_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("User 2: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("User 2 range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No user 2 memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } - spdlog::info("Init remote device"); - addStatusMessage("Init remote device."); - QApplication::setOverrideCursor(Qt::WaitCursor); - cguid our_guid; - if (VSCP_ERROR_SUCCESS != (rv = boot.deviceInit(our_guid, 0, pworks->m_firmware_devicecode_required))) { - QApplication::restoreOverrideCursor(); - spdlog::error("Failed to set device into boot mode rv={}", rv); - addStatusMessage(QString("Failed to init remote device: rv = {%0}.").arg(rv)); - QMessageBox::critical(this, - tr(APPNAME), - tr("Failed to set the device in boot mode"), - QMessageBox::Ok); - return; - } - addStatusMessage("Remote device initiated."); + spdlog::info("Init remote device"); + addStatusMessage("Init remote device."); + QApplication::setOverrideCursor(Qt::WaitCursor); + cguid our_guid; + if (VSCP_ERROR_SUCCESS != (rv = boot.deviceInit(our_guid, 0, pworks->m_firmware_devicecode_required))) { + QApplication::restoreOverrideCursor(); + spdlog::error("Failed to set device into boot mode rv={}", rv); + addStatusMessage(QString("Failed to init remote device: rv = {%0}.").arg(rv)); + QMessageBox::critical(this, + tr(APPNAME), + tr("Failed to set the device in boot mode"), + QMessageBox::Ok); + return; + } + addStatusMessage("Remote device initiated and in bootmode."); + + spdlog::info("Load firmware to remote device"); + addStatusMessage("Load firmware to remote device."); + if (VSCP_ERROR_SUCCESS != (rv = boot.deviceLoad())) { + QApplication::restoreOverrideCursor(); + spdlog::error("Failed to load firmware to device rv={}", rv); + addStatusMessage(QString("Failed to load firmware to device: rv = {%0}.").arg(rv)); + QMessageBox::critical(this, + tr(APPNAME), + tr("Failed to load firmware to device"), + QMessageBox::Ok); + return; + } + addStatusMessage("Firmware loaded to remote device."); + +/* + spdlog::info("Restart remote device"); + addStatusMessage("Restart remote device."); + if (VSCP_ERROR_SUCCESS != (rv = boot.deviceRestart())) { + spdlog::warn("Failed to confirm restart of device. (Usually not indicating an error) rv={}", rv); + addStatusMessage(QString("Failed to confirm restart of device. (Usually not indicating an error): rv = {%0}.").arg(rv)); + } + addStatusMessage("Remote device restarted."); + + spdlog::info("Reboot remote device"); + addStatusMessage("Reboot remote device."); + if (VSCP_ERROR_SUCCESS != (rv = boot.deviceReboot())) { + QApplication::restoreOverrideCursor(); + spdlog::error("Failed to confirm reboot of device rv={}", rv); + addStatusMessage(QString("Failed to confirm reboot of device: rv = {%0}.").arg(rv)); + QMessageBox::information(this, + tr(APPNAME), + tr("Failed to reboot remote device"), + QMessageBox::Ok); + return; + } + addStatusMessage("Remote device rebooted.");*/ - spdlog::info("Load firmware to remote device"); - addStatusMessage("Load firmware to remote device."); - if (VSCP_ERROR_SUCCESS != (rv = boot.deviceLoad())) { - QApplication::restoreOverrideCursor(); - spdlog::error("Failed to load firmare to device rv={}", rv); - addStatusMessage(QString("Failed to load firmare to device: rv = {%0}.").arg(rv)); - QMessageBox::critical(this, - tr(APPNAME), - tr("Failed to load firmware to device"), - QMessageBox::Ok); - return; - } - addStatusMessage("Firmware loaded to remote device."); + m_progress->setValue(100); + addStatusMessage(QString("Success.")); + QApplication::restoreOverrideCursor(); +} - spdlog::info("Restart remote device"); - addStatusMessage("Restart remote device."); - if (VSCP_ERROR_SUCCESS != (rv = boot.deviceRestart())) { - spdlog::warn("Failed to confirm restart of device. (Usually not indicating an error) rv={}", rv); - addStatusMessage(QString("Failed to confirm restart of device. (Usually not indicating an error): rv = {%0}.").arg(rv)); - } - addStatusMessage("Remote device restarted."); +/////////////////////////////////////////////////////////////////////////////// +// flashDevicePIC1 +// - spdlog::info("Reboot remote device"); - addStatusMessage("Reboot remote device."); - if (VSCP_ERROR_SUCCESS != (rv = boot.deviceReboot())) { - QApplication::restoreOverrideCursor(); - spdlog::error("Failed to confirm reboot of device rv={}", rv); - addStatusMessage(QString("Failed to confirm reboot of device: rv = {%0}.").arg(rv)); - QMessageBox::information(this, - tr(APPNAME), - tr("Failed to reboot remote device"), - QMessageBox::Ok); - return; - } - addStatusMessage("Remote device rebooted."); +void +CWizardPageFlash::flashDevicePIC1(void) +{ + int rv; + cguid guid; + vscpworks* pworks = (vscpworks*)QCoreApplication::instance(); - m_progress->setValue(100); - addStatusMessage(QString("Success.")); - QApplication::restoreOverrideCursor(); + addStatusMessage("Microchip PIC1 Bootloader."); + guid.setNicknameID(vscp_readStringValue(field("boot.nickname").toString().toStdString())); + using namespace std::placeholders; + // auto callback = std::bind(&CWizardPageLoadMdf::statusCallback, this, _1, _2); + // lambda version for reference + auto callback = [this](auto a, auto b) { this->statusCallback(a, b); }; + CBootDevice_PIC1 boot(m_vscpClient, vscp_readStringValue(field("boot.nickname").toString().toStdString()), callback); + addStatusMessage("Hex file path: " + field("boot.firmware.path").toString()); + boot.loadIntelHexFile(field("boot.firmware.path").toString().toStdString()); + + uint32_t min, max; + rv = boot.getMinMaxForRange(CBootDevice_PIC1::MEM_CODE_START, CBootDevice_PIC1::MEM_CODE_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("Flash code range: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("Flash code range: 0x%0. 0x%1").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No flash memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } - } break; + rv = boot.getMinMaxForRange(CBootDevice_PIC1::MEM_USERID_START, CBootDevice_PIC1::MEM_USERID_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("User id: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("User id range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No user id memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } + + rv = boot.getMinMaxForRange(CBootDevice_PIC1::MEM_CONFIG_START, CBootDevice_PIC1::MEM_CONFIG_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("Config: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("Config range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No config memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } + + rv = boot.getMinMaxForRange(CBootDevice_PIC1::MEM_EEPROM_START, CBootDevice_PIC1::MEM_EEPROM_END, &min, &max); + if (VSCP_ERROR_SUCCESS == rv) { + spdlog::info("EEPROM: {0:X}. {1:X}", min, max); + if (min || max) { + addStatusMessage(QString("EEPROM range: 0x{%0}. 0x{%1}").arg(min, 8, 16, QChar('0')).arg(max, 8, 16, QChar('0'))); + } + else { + addStatusMessage(QString("No EEPROM memory")); + } + } + else { + spdlog::error("getMinMaxForRange: failed rv={0}", rv); + } + + spdlog::info("Init remote device"); + addStatusMessage("Init remote device."); + QApplication::setOverrideCursor(Qt::WaitCursor); + cguid our_guid; + if (VSCP_ERROR_SUCCESS != (rv = boot.deviceInit(our_guid, 0, pworks->m_firmware_devicecode_required))) { + QApplication::restoreOverrideCursor(); + spdlog::error("Failed to set device into boot mode rv={}", rv); + addStatusMessage(QString("Failed to init remote device: rv = {%0}.").arg(rv)); + QMessageBox::critical(this, + tr(APPNAME), + tr("Failed to set the device in boot mode"), + QMessageBox::Ok); + return; + } + addStatusMessage("Remote device initiated."); + + spdlog::info("Load firmware to remote device"); + addStatusMessage("Load firmware to remote device."); + if (VSCP_ERROR_SUCCESS != (rv = boot.deviceLoad())) { + QApplication::restoreOverrideCursor(); + spdlog::error("Bootloader wizard: Failed to load firmware to device rv={}", rv); + addStatusMessage(QString("Bootloader wizard: Failed to load firmware to device: rv = {%0}.").arg(rv)); + QMessageBox::critical(this, + tr(APPNAME), + tr("Bootloader wizard: Failed to load firmware to device"), + QMessageBox::Ok); + return; + } + addStatusMessage("Bootloader wizard: Firmware loaded to remote device."); + + spdlog::info("Restart remote device"); + addStatusMessage("Restart remote device."); + if (VSCP_ERROR_SUCCESS != (rv = boot.deviceRestart())) { + spdlog::warn("Failed to confirm restart of device. (Usually not indicating an error) rv={}", rv); + addStatusMessage(QString("Failed to confirm restart of device. (Usually not indicating an error): rv = {%0}.").arg(rv)); + } + addStatusMessage("Remote device restarted."); + + spdlog::info("Reboot remote device"); + addStatusMessage("Reboot remote device."); + if (VSCP_ERROR_SUCCESS != (rv = boot.deviceReboot())) { + QApplication::restoreOverrideCursor(); + spdlog::error("Failed to confirm reboot of device rv={}", rv); + addStatusMessage(QString("Failed to confirm reboot of device: rv = {%0}.").arg(rv)); + QMessageBox::information(this, + tr(APPNAME), + tr("Failed to reboot remote device"), + QMessageBox::Ok); + return; + } + addStatusMessage("Remote device rebooted."); + + m_progress->setValue(100); + addStatusMessage(QString("Success.")); + QApplication::restoreOverrideCursor(); +} + +/////////////////////////////////////////////////////////////////////////////// +// flashDevice +// + +void +CWizardPageFlash::flashDevice(void) +{ + int rv; + vscpworks* pworks = (vscpworks*)QCoreApplication::instance(); + + // Lets rock'n roll + spdlog::info("Starting flash device process."); + addStatusMessage("Starting flash device process."); + + m_infomsg->clear(); + + // Set remote device in boot mode + spdlog::info("Bootloading algorithm: {}", field("boot.firmware.bootloader.algorithm").toInt()); + switch (field("boot.firmware.bootloader.algorithm").toInt()) { + + case VSCP_BOOTLOADER_VSCP: + flashDeviceVSCP(); + break; + + case VSCP_BOOTLOADER_PIC1: + flashDevicePIC1(); + break; case VSCP_BOOTLOADER_NONE0: case VSCP_BOOTLOADER_NONE1: @@ -1561,7 +1793,7 @@ CBootLoadWizard::initBootLoaderWizard(void) case CVscpClient::connType::MULTICAST: case CVscpClient::connType::WS1: case CVscpClient::connType::WS2: - defult: + default: spdlog::error("No bootloader wizard (yet!?) for this type of " "communication interface - {}", static_cast(m_vscpConnType)); diff --git a/src/bootloaderwizard.h b/src/bootloaderwizard.h index ebf39992..8f8dc5a3 100644 --- a/src/bootloaderwizard.h +++ b/src/bootloaderwizard.h @@ -89,6 +89,8 @@ class CWizardPageNickname : public QWizardPage { /// Set initial nickname void setNickname(uint16_t nickname) { m_nickname = nickname; } + + private: /// A pointer to a VSCP Client CVscpClient* m_vscpClient; @@ -361,6 +363,12 @@ class CWizardPageFlash : public QWizardPage { */ void statusCallback(int progress, const char* str); + /// Flash device using PIC1 algorithm + void flashDevicePIC1(void); + + /// Flash device using VSCP algorithm + void flashDeviceVSCP(void); + public slots: /// Flash the device diff --git a/third_party/mongoose b/third_party/mongoose index 2df53c3d..4389ef1e 160000 --- a/third_party/mongoose +++ b/third_party/mongoose @@ -1 +1 @@ -Subproject commit 2df53c3d27b9ae54b1c08b6c3c3cc660a49fa4a2 +Subproject commit 4389ef1e77fda8a9ad4bb95e43124d9ba5cf8228 diff --git a/third_party/nlohmann b/third_party/nlohmann index 378e0917..a97041a9 160000 --- a/third_party/nlohmann +++ b/third_party/nlohmann @@ -1 +1 @@ -Subproject commit 378e091795a70fced276cd882bd8a6a428668fe5 +Subproject commit a97041a98fc7436cda3b28fb6e353071829d3f02 diff --git a/third_party/qcustomplot/GPL.txt b/third_party/qcustomplot/GPL.txt deleted file mode 100755 index 94a9ed02..00000000 --- a/third_party/qcustomplot/GPL.txt +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/third_party/qcustomplot/changelog.txt b/third_party/qcustomplot/changelog.txt deleted file mode 100755 index de330e75..00000000 --- a/third_party/qcustomplot/changelog.txt +++ /dev/null @@ -1,629 +0,0 @@ -#### Version 2.1.1 released on 06.11.22 #### - -Added features: - - Qt6.4 Compatibility - -Bugfixes: - - dynamically changing device pixel ratios (e.g. when moving between different DPI screens) is handled properly - - bugfix Colormap autoscaling: recalculateDataBounds() if (0, 0) data point is NaN. - - minor bugfix in getMantissa for certain values due to rounding errors - - Graphs with line style lsImpulse properly ignore NaN data points - - fixed issue where QCP wasn't greyed out together with the rest of the UI on embedded systems when a modal dialog is shown - (QCustomPlot no longer has the Qt::WA_OpaquePaintEvent attribute enabled by default) - -Other: - - in QCPAxisPainterPrivate::getTickLabelData, don't use fixed 'e', but locale aware character of parent plot locale - - Axis rescaling now ignores +/- Inf in data values - - slight performance improvements of QCPColorMap colorization and fills. - -#### Version 2.1.0 released on 29.03.21 #### - -Added features: - - Compatibility up to Qt 6.0 - - Tech Preview: Radial Plots (see setupPolarPlotDemo in examples project) - - QCPAxisTickerDateTime can now be configured with a QTimeZone for adjusting the label display to arbitrary time zones - - QCPColorGradient (and thus also QCPColorMap) now has explicit configurable NaN handling (see QCPColorGradient::setNanHandling) - - added timing/benchmarking method QCustomPlot::replotTime(bool average) which returns the milliseconds per replot - - QCustomPlot::plottableAt has an optional output parameter dataIndex, providing the index of the data point at the probed position - - QCustomPlot::plottableAt template method allows limiting the search to the specified QCPAbstractPlottable subclass T - - QCustomPlot::itemAt template method allows limiting the search to the specified QCPAbstractItem subclass T - - Added Interaction flag QCP::iSelectPlottablesBeyondAxisRect, allows selection of data points very close to (and beyond of) the axes - - QCPAxisTickerDateTime::dateTimeToKey(QDate &) now also takes a TimeSpec to specify the interpretation of the start-of-day - - QCPAxisTickerLog now switches to linear ticks if zoomed in beyond where logarithmic ticks are reasonable - - Added QCustomPlot::afterLayout signal, for user code that crucially depends on layout sizes/positions, right before the draw step during a replot - -Bugfixes: - - Fixed bug where QCPLayer::replot wouldn't issue full replot even though invalidated buffers existed - - Fixed QCPCurve bug causing rendering artifacts when using keys/values smaller than about 1e-12 in some constellations - - Fixed getValueRange when used with explicit keyRange, now doesn't use key range expanded by one point to each side anymore - - Fixed bug of QCPAxis tick label font size change only propagating to the layout after second call to replot - - Fixed bug of QCPTextElement not respecting the configured text alignment flag (setTextFlags) - - Various documentation typos and improvements - -Other: - - QCP Now requires C++11. However, Qt4.6 compatibility is maintained in the QCP 2.x release series - - 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 - - QCPLegend::clearItems is now faster in case of many legend items (>1000) - - Modernized expressions and thereby avoided some warnings (e.g. nullptr and casts) - - Switched to foreach (Qt macro) where possible (in preparation for switch to range-based for (C++11), soonest at next major release) - - 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. - - Added QCP::Interaction flag iNone=0x000 to allow explicitly specifying no interaction (Avoids QFlags::zero, which was deprecated in Qt5.14) - - QCP is now compatible with defines QT_USE_QSTRINGBUILDER, QT_USE_FAST_CONCATENATION (Qt<4.8), QT_USE_FAST_OPERATOR_PLUS (Qt<4.8) - -#### Version 2.0.1 released on 25.06.18 #### - -Bugfixes: - - Default filling order of QCPLayoutGrid is now foColumnsFirst instead of foRowsFirst, as intended and consistent with QCP1. - Note that this also changes the indexing order of e.g. QCustomPlot::axisRect(int index), compared with 2.0.0. You can change - the filling and thus indexing order yourself by calling QCPLayoutGrid::setFillOrder. - - 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 - on the first or last color stop. - - QCPDataSelection::enforceType(stDataRange) would erroneously add an empty data range to the selection, if the selection was already empty. - This in turn would cause isEmpty() to erroneously return false. - - fixed hypothetical crash when selectTest is called on a QCPItemCurve which has all of its points at the same position - -Other: - - Various documentation improvements and clarifications - - Prevent conflict with windows.h min/max macros if user forgets to define NOMINMAX - - compiling QCP shared libraries with static Qt is now easier - - added defines QCUSTOMPLOT_VERSION and QCUSTOMPLOT_VERSION_STR (the same way Qt does) to provide the used QCP version number - - added missing Q_DECL_OVERRIDE declarations, thus preventing warnings some compiler settings - - QCPAxisTicker and subclasses are no longer copyable by value, as intended - - QCPBarsGroup constructor is now explicit, as intended - - Qt 5.11 compatibility - -#### Version 2.0.0 released on 04.09.17 #### - -Added major features: - - 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: - QCPAxisTicker, QCPAxisTickerFixed, QCPAxisTickerLog, QCPAxisTickerPi, QCPAxisTickerTime, QCPAxisTickerDateTime, QCPAxisTickerText - - 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. - - New data selection mechanism allows selection of single data points and data ranges for plottables. See special documentation page "data selection mechanism". - - 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 - layer "overlay" was introduced, which is now the top layer, and holds the QCustomPlot's QCPSelectionRect instance. - - Data sharing between plottables of the same type (see setData methods taking a QSharedPointer) - - OpenGL hardware acceleration is now available across all Qt versions (including Qt4) in a unified, simple interface, with QCustomPlot::setOpenGl (experimental) - - QCPStatisticalBox can now display a series of statistical boxes instead of only a single one - - New QCPErrorBars plottable allows attaching error bars to any one-dimensional plottable (QCPGraph has thus lost its own error-bar capability) - - QCPColorMap now supports transparency via alpha in its color gradient stops, and via a dedicated cell-wise alpha map (see QCPColorMapData::setAlpha) - - 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. - 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. - - 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. - 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 - -Added minor features: - - High-DPI support for Qt versions 5.0 and up, using device pixel ratio detected by Qt (can be changed manually via QCustomPlot::setBufferDevicePixelRatio). - - QCPGraph and QCPCurve can now be configured to only display every n'th scatter symbol, see ::setScatterSkip() method - - QCPFinancial allows to define bar width in absolute pixels and axis rect ratio, instead of only in plot key coordinates (see QCPFinancial::setWidthType) - - Range dragging/zooming can now be configured to affect more than one axis per orientation (see new overloads of QCPAxisRect::setRangeDragAxes/setRangeZoomAxes) - - Added QCPTextElement (replaces QCPPlotTitle) for general texts in layouts. Provides clicked and doubleClicked signals, as replacement for the removed QCustomPlot::titleClicked/titleDoubleClicked - - 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. - - 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 - - QCPAxisRect::zoom(...) allows to zoom to a specific rectangular region given in pixel coordinates, either affecting all axes or a specified subset of axes. - - QCPRange::bounded returns a bounded range, trying to preserve its size. Works with rangeChanged signal to limit the allowed range (see rangeChanged doc) - - 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 - - plottableClick and plottableDoubleClick signals now carry the clicked data point index as second parameter - - Added QCPAxis::scaleRange overload without "center" argument, which scales around the current axis range center - - Added QCPRange::expand/expanded overloads which take only one double parameter - - 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) - - Added QCPStatisticalBox::setWhiskerAntialiased to allow controlling antialiasing state of whiskers independently of quartile box/median line - - 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 - - QCPMarginGroup::commonMargin is now virtual, to facilitate subclassing of QCPMarginGroup - - QCPGraph::getPreparedData is now virtual, and thus allows subclasses to easily generate own plotted data, e.g. on-the-fly. - - Added QCPRange qDebug stream operator - - 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 -Added minor features after beta: - - QCPGraph fill now renders separate fill segments when there are gaps in the graph data (created by inserting NaN values) - - fractional device pixel ratios are now used, if Qt version >= 5.6 - - Axes may now be dragged/zoomed individually by starting the drag/zoom on top of the axis (previously, this required additional code) - - Manual minimum and maximum layout element sizes (setMinimumSize/setMaximumSize) can now affect the inner or the outer rect, see QCPLayoutElement::setSizeConstraintRect - -Bugfixes [Also backported to 1.3.2]: - - Fixed possible crash when having a QCPGraph with scatters only and a non-transparent main/fill brush of the graph - - Fixed QCPItemPixmap not updating internally cached scaled pixmap if new pixmap set with same scaled dimensions - - 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 - - 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 - - Fixed QCustomPlot::moveLayer performing incorrect move and possible crash in certain situations - - 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 - - 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 - - Fixed a few missing enums in meta type system, by unifying usage of Q_ENUMS, Q_FLAGS and Q_DECLARE_METATYPE -Bugfixes [Not in 1.3.2]: - - Fixed QCPItemLine/QCPItemStraightLine not being selectable when defining coords are many orders of magnitude (>1e8) larger than currently viewed range - - Fixed/worked around crash due to bug in QPainter::drawPixmap with very large negative x/y pixel coordinates, when drawing sparse pixmap scatters - - 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). - - Fixed QCPBarsGroup bug which caused stPlotCoords spacing to be wrong with vertical key axes - - 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) - - Improved QCPBars stacking when using bars with very large keys and key separation at limit of double precision -Bugfixes after beta: - - fixed QCPCurve vertex optimization algorithm not handling log axes correctly - - 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 - - QCPColorMap now has a default gradient (gpCold) again, instead of an empty and thus black gradient - - doc: black QCPColorMap/QCPColorGradient documentation images fixed - - scatter styles ssDiamond, ssTriangle and ssTriangleInverted now get proper filling with the specified brush - - fixed click signals of plottable/axes/etc. not being emitted properly - - fixed uninitialized scatterSkip on QCPCurve, leading to irregular default appearance of scatter skips - - fixed device pixel ratio not being implemented correctly in cached tick labels - - 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) - - fixed dllimport issue on template classes when compiling as shared library with MSVC - - -Summary of backward incompatible changes: - Plottable related: - - Removed QCustomPlot::addPlottable, not needed anymore as plottables now automatically register in their constructor - - Removed QCustomPlot::addItem, not needed anymore as items now automatically register in their constructor - - QCPAbstractPlottable::addToLegend/removeFromLegend are not virtual anymore. If your plottable requires a custom legend item, add it to the legend manually. - - setData/addData method overloads of plottables have changed to facilitate data sharing and new data container (see documentation) - - plottableClick and plottableDoubleClick signals now carry the clicked data point index as second parameter, and the QMouseEvent parameter has moved to third. - Check all your usages of those signals, because Qt's connect method only reports problems during runtime! - - setSelectable now not only limits what can be selected by the user, but limits also any programmatic selection changes via setSelected. - - enum QCPAbstractPlottable::SignDomain has changed namespace to QCP::SignDomain - Axis related: - - Removed QCPAxis::setAutoTicks, setAutoTickCount, setAutoTickLabels, setAutoTickStep, setAutoSubTicks, setTickLabelType, setDateTimeFormat, setDateTimeSpec, - setTickStep, setTickVector, setTickVectorLabels, setSubTickCount in favor of new QCPAxisTicker-based interface - - Added QCPAxis::setSubTicks to enable/disable subticks (manually controlling the subtick count needs subclassing of QCPAxisTicker, e.g. QCPAxisTickerText and QCPAxisTickerLog provide setSubTickCount) - Item related: - - Renamed QCPAbstractItem::rectSelectTest to rectDistance, to prevent confusion with new QCPAbstractPlottable1D::selectTestRect - - Renamed QCPItemAnchor::pixelPoint to QCPItemAnchor::pixelPosition (also affects subclass QCPItemPosition) - General: - - Renamed QCustomPlot::RefreshPriority enums (parameter of the replot() method): rpImmediate to rpImmediateRefresh, rpQueued to rpQueuedRefresh, rpHint to rpRefreshHint - - Renamed QCustomPlot::PlottingHint enum phForceRepaint to phImmediateRefresh - - Removed QCPPlotTitle layout element (See new QCPTextElement for almost drop-in replacement) - - Removed signals QCustomPlot::titleClicked/titleDoubleClicked, replaced by QCPTextElement signals clicked/doubleClicked. - - QCustomPlot::savePdf has changed parameters from (fileName, bool noCosmeticPen, width, height,...) to (fileName, width, height, QCP::ExportPen exportPen,...) - - Virtual methods QCPLayoutElement::mouseMoveEvent/mouseReleaseEvent (which are now introduced already in the superclass QCPLayerable) have gained an additional parameter const QPointF &startPos. - 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 - - Creating a new QCPColorGradient without supplying a preset parameter in the constructor now creates an empty gradient, instead of loading the gpCold preset - -Other: - - Replaced usage of Qt's QVector2D with own QCPVector2D which uses double precision and offers some convenience functions - - Extended relative range to which QCPItemLine/QCPItemStraightLine can be zoomed before vanishing from ~1e9 to ~1e16 - - Removed QCPItemStraightLine::distToStraightLine (replaced by QCPVector2D::distanceToStraightLine) - - Removed QCPAbstractPlottable::distSqrToLine and QCPAbstractItem::distSqrToLine (replaced by QCPVector2D::distanceSquaredToLine) - - 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) - - 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. - - QCPGraph can now use a brush (filled polygon under the graph data) without having a graph line (line style lsNone) - - QCPFinancial is now two-colored (setTwoColored(true)) by default, and has green/red as default two-colored brushes and pens - - Plottable pixelsToCoords/coordsToPixels methods are now public, and offer transformations from pixel to plot coordinates and vice versa, using the plottable's axes - - Plottable getKeyRange/getValueRange methods are now public - - 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) - - Default focus policy for QCustomPlot is now Qt::ClickFocus, instead of Qt::NoFocus. - - 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. - - 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. -Other after beta: - - Integrated OpenGL support (QCustomPlot::setOpenGl) is experimental for now, due the strong dependency on the system/graphics driver of the current implementation - - fixed some plot title font sizes in the example projects that were too small due to switch to QCPTextElement - - added missing override specifiers on reimplemented virtual methods - - changed to more intuitive defaults for QCPSelectionDecorator scatter style (now doesn't define an own scatter pen by default) - -#### Version 1.3.2 released on 22.12.15 #### - - Bugfixes [Backported from 2.0.0 branch]: - - Fixed possible crash when having a QCPGraph with scatters only and a non-transparent main/fill brush of the graph - - Fixed QCPItemPixmap not updating internally cached scaled pixmap if new pixmap set with same scaled dimensions - - 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 - - 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 - - Fixed QCustomPlot::moveLayer performing incorrect move and possible crash in certain situations - - 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 - - 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 - - Other [Backported from 2.0.0 branch]: - - A few documentation fixes/improvements - - 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) - - 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. - -#### Version 1.3.1 released on 25.04.15 #### - - Bugfixes: - - Fixed bug that prevented automatic axis rescaling when some graphs/curves had only NaN data points - - Improved QCPItemBracket selection boundaries, especially bsCurly and bsCalligraphic - - Fixed bug of axis rect and colorscale background shifted downward by one logical pixel (visible in scaled png and pdf export) - - Replot upon mouse release is now only performed if a selection change has actually happened (improves responsivity on particularly complex plots) - - Fixed bug that allowed scatter-only graphs to be selected by clicking the non-existent line between scatters - - 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 - - Fixed pdf export of QCPColorMap with enabled interpolation (didn't appear interpolated in pdf) - - Reduced QCPColorMap jitter of internal cell boundaries for small sized maps when viewed with high zoom, by applying oversampling factors dependant on map size - - Fixed bug of QCPColorMap::fill() not causing the buffered internal image map to be updated, and thus the change didn't become visible immediately - - 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 - - Fixed QCPColorMap appearing at the wrong position for logarithmic axes and color map spanning larger ranges - - Other: - - 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 - - Many documentation fixes and extensions, style modernization - - Reduced documentation file size (and thus full package size) by automatically reducing image palettes during package build - - Fixed MSVC warning message (at warning level 4) due to temporary QLists in some foreach statements - -#### Version 1.3.0 released on 27.12.14 #### - - Added features: - - New plottable class QCPFinancial allows display of candlestick/ohlc data - - New class QCPBarsGroup allows horizontal grouping of multiple QCPBars plottables - - Added QCPBars feature allowing non-zero base values (see property QCPBars::setBaseValue) - - Added QCPBars width type, for more flexible bar widths (see property QCPBars::setWidthType) - - New QCPCurve optimization algorithm, fixes bug which caused line flicker at deep zoom into curve segment - - Item positions can now have different position types and anchors for their x and y coordinates (QCPItemPosition::setTypeX/Y, setParentAnchorX/Y) - - QCPGraph and QCPCurve can now display gaps in their lines, when inserting quiet NaNs as values (std::numeric_limits::quiet_NaN()) - - QCPAxis now supports placing the tick labels inside the axis rect, for particularly space saving plots (QCPAxis::setTickLabelSide) - Added features after beta: - - Made code compatible with QT_NO_CAST_FROM_ASCII, QT_NO_CAST_TO_ASCII - - Added compatibility with QT_NO_KEYWORDS after sending code files through a simple reg-ex script - - Added possibility to inject own QCPAxis(-subclasses) via second, optional QCPAxisRect::addAxis parameter - - Added parameter to QCPItemPixmap::setScaled to specify transformation mode - - Bugfixes: - - Fixed bug in QCPCurve rendering of very zoomed-in curves (via new optimization algorithm) - - Fixed conflict with MSVC-specific keyword "interface" in text-document-integration example - - Fixed QCPScatterStyle bug ignoring the specified pen in the custom scatter shape constructor - - Fixed bug (possible crash) during QCustomPlot teardown, when a QCPLegend that has no parent layout (i.e. was removed from layout manually) gets deleted - Bugfixes after beta: - - Fixed bug of QCPColorMap/QCPColorGradient colors being off by one color sampling step (only noticeable in special cases) - - Fixed bug of QCPGraph adaptive sampling on vertical key axis, causing staggered look - - Fixed low (float) precision in QCPCurve optimization algorithm, by not using QVector2D anymore - - Other: - - Qt 5.3 and Qt 5.4 compatibility - -#### Version 1.2.1 released on 07.04.14 #### - - Bugfixes: - - Fixed regression which garbled date-time tick labels on axes, if setTickLabelType is ltDateTime and setNumberFormat contains the "b" option - -#### Version 1.2.0 released on 14.03.14 #### - - Added features: - - Adaptive Sampling for QCPGraph greatly improves performance for high data densities (see QCPGraph::setAdaptiveSampling) - - QCPColorMap plottable with QCPColorScale layout element allows plotting of 2D color maps - - QCustomPlot::savePdf now has additional optional parameters pdfCreator and pdfTitle to set according PDF metadata fields - - QCustomPlot::replot now allows specifying whether the widget update is immediate (repaint) or queued (update) - - QCPRange operators +, -, *, / with double operand for range shifting and scaling, and ==, != for range comparison - - Layers now have a visibility property (QCPLayer::setVisible) - - static functions QCPAxis::opposite and QCPAxis::orientation now offer more convenience when handling axis types - - added notification signals for selectability change (selectableChanged) on all objects that have a selected/selectable property - - added notification signal for QCPAxis scaleType property - - added notification signal QCPLayerable::layerChanged - - Bugfixes: - - Fixed assert halt, when QCPAxis auto tick labels not disabled but nevertheless a custom non-number tick label ending in "e" given - - Fixed painting glitches when QCustomPlot resized inside a QMdiArea or under certain conditions inside a QLayout - - If changing QCPAxis::scaleType and thus causing range sanitizing and a range modification, rangeChanged wouldn't be emitted - - Fixed documentation bug that caused indentation to be lost in code examples - Bugfixes after beta: - - Fixed bug that caused crash if clicked-on legend item is removed in mousePressEvent. - - 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. - - When using multiple axes on one side, setting one to invisible didn't properly compress the freed space. - - Fixed bug that allowed selection of plottables when clicking in the bottom or top margin of a QCPAxisRect (outside the inner rect) - - Other: - - In method QCPAbstractPlottable::getKeyRange/getValueRange, renamed parameter "validRange" to "foundRange", to better reflect its meaning (and contrast it from QCPRange::validRange) - - QCPAxis low-level axis painting methods exported to QCPAxisPainterPrivate - -#### Version 1.1.1 released on 09.12.13 #### - - Bugfixes: - - Fixed bug causing legends blocking input events from reaching underlying axis rect even if legend is invisible - - Added missing Q_PROPERTY for QCPAxis::setDateTimeSpec - - 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) - - Made sure PDF export doesn't default to grayscale output on some systems - - Other: - - Plotting hint QCP::phForceRepaint is now enabled on all systems (and not only on windows) by default - - Documentation improvements - -#### Version 1.1.0 released on 04.11.13 #### - - Added features: - - Added QCPRange::expand and QCPRange::expanded - - Added QCPAxis::rescale to rescale axis to all associated plottables - - Added QCPAxis::setDateTimeSpec/dateTimeSpec to allow axis labels either in UTC or local time - - QCPAxis now additionally emits a rangeChanged signal overload that provides the old range as second parameter - - Bugfixes: - - Fixed QCustomPlot::rescaleAxes not rescaling properly if first plottable has an empty range - - QCPGraph::rescaleAxes/rescaleKeyAxis/rescaleValueAxis are no longer virtual (never were in base class, was a mistake) - - Fixed bugs in QCPAxis::items and QCPAxisRect::items not properly returning associated items and potentially stalling - - Other: - - Internal change from QWeakPointer to QPointer, thus got rid of deprecated Qt functionality - - Qt5.1 and Qt5.2 (beta1) compatibility - - Release packages now extract to single subdirectory and don't place multiple files in current working directory - -#### Version 1.0.1 released on 05.09.13 #### - - Bugfixes: - - using define flag QCUSTOMPLOT_CHECK_DATA caused debug output when data was correct, instead of invalid (fixed QCP::isInvalidData) - - documentation images are now properly shown when viewed with Qt Assistant - - fixed various documentation mistakes - - Other: - - Adapted documentation style sheet to better match Qt5 documentation - -#### Version 1.0.0 released on 01.08.13 #### - - Quick Summary: - - Layout system for multiple axis rects in one plot - - Multiple axes per side - - Qt5 compatibility - - More flexible and consistent scatter configuration with QCPScatterStyle - - Various interface cleanups/refactoring - - Pixmap-cached axis labels for improved replot performance - - Changes that break backward compatibility: - - QCustomPlot::axisRect() changed meaning due to the extensive changes to how axes and axis rects are handled - it now returns a pointer to a QCPAxisRect and takes an integer index as parameter. - - QCPAxis constructor changed to now take QCPAxisRect* as parent - - setAutoMargin, setMarginLeft/Right/Top/Bottom removed due to the axis rect changes (see QCPAxisRect::setMargins/setAutoMargins) - - setAxisRect removed due to the axis rect changes - - setAxisBackground(-Scaled/-ScaledMode) now moved to QCPAxisRect as setBackground(-Scaled/ScaledMode) (access via QCustomPlot::axisRects()) - - QCPLegend now is a QCPLayoutElement - - QCPAbstractPlottable::drawLegendIcon parameter "rect" changed from QRect to QRectF - - QCPAbstractLegendItem::draw second parameter removed (position/size now handled via QCPLayoutElement base class) - - removed QCPLegend::setMargin/setMarginLeft/Right/Top/Bottom (now inherits the capability from QCPLayoutElement::setMargins) - - removed QCPLegend::setMinimumSize (now inherits the capability from QCPLayoutElement::setMinimumSize) - - removed enum QCPLegend::PositionStyle, QCPLegend::positionStyle/setPositionStyle/position/setPosition (replaced by capabilities of QCPLayoutInset) - - QCPLegend transformed to work with new layout system (almost everything changed) - - removed entire title interface: QCustomPlot::setTitle/setTitleFont/setTitleColor/setTitleSelected/setTitleSelectedFont/setTitleSelectedColor and - the QCustomPlot::iSelectTitle interaction flag (all functionality is now given by the layout element "QCPPlotTitle" which can be added to the plot layout) - - selectTest functions now take two additional parameters: bool onlySelectable and QVariant *details=0 - - selectTest functions now ignores visibility of objects and (if parameter onlySelectable is true) does not anymore ignore selectability of the object - - moved QCustomPlot::Interaction/Interactions to QCP namespace as QCP::Interaction/Interactions - - moved QCustomPlot::setupFullAxesBox() to QCPAxisRect::setupFullAxesBox. Now also accepts parameter to decide whether to connect opposite axis ranges - - moved range dragging/zooming interface from QCustomPlot to QCPAxisRect (setRangeDrag, setRangeZoom, setRangeDragAxes, setRangeZoomAxes,...) - - 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 - default (this makes enabling dragging/zooming easier by just adding the interaction flags) - - QCPScatterStyle takes over everything related to handling scatters in all plottables - - removed setScatterPen/Size on QCPGraph and QCPCurve, removed setOutlierPen/Size on QCPStatisticalBox (now handled via QCPScatterStyle) - - modified setScatterStyle on QCPGraph and QCPCurve, and setOutlierStyle on QCPStatisticalBox, to take QCPScatterStyle - - 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)) - - Added features: - - 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 - - Advanced layout system, including the classes QCPLayoutElement, QCPLayout, QCPLayoutGrid, QCPLayoutInset, QCPAxisRect - - QCustomPlot::axisRects() returns all the axis rects in the QCustomPlot. - - QCustomPlot::plotLayout() returns the top level layout (initially a QCPLayoutGrid with one QCPAxisRect inside) - - QCPAxis now may have an offset to the axis rect (setOffset) - - Multiple axes per QCPAxisRect side are now supported (see QCPAxisRect::addAxis) - - QCustomPlot::toPixmap renders the plot into a pixmap and returns it - - When setting tick label rotation to +90 or -90 degrees on a vertical axis, the labels are now centered vertically on the tick height - (This allows space saving vertical tick labels by having the text direction parallel to the axis) - - Substantially increased replot performance when using very large manual tick vectors (> 10000 ticks) via QCPAxis::setTickVector - - QCPAxis and QCPAxisRect now allow easy access to all plottables(), graphs() and items() that are associated with them - - Added QCustomPlot::hasItem method for consistency with plottable interface, hasPlottable - - Added QCPAxisRect::setMinimumMargins as replacement for hardcoded minimum axis margin (15 px) when auto margin is enabled - - Added Flags type QCPAxis::AxisTypes (from QCPAxis::AxisType), used in QCPAxisRect interface - - Automatic margin calculation can now be enabled/disabled on a per-side basis, see QCPAxisRect::setAutoMargins - - QCPAxisRect margins of multiple axis rects can be coupled via QCPMarginGroup - - Added new default layers "background" and "legend" (QCPAxisRect draws its background on the "background" layer, QCPLegend is on the "legend" layer by default) - - Custom scatter style via QCP::ssCustom and respective setCustomScatter functions that take a QPainterPath - - Filled scatters via QCPScatterStyle::setBrush - Added features after beta: - - Added QCustomPlot::toPainter method, to allow rendering with existing painter - - QCPItemEllipse now provides a center anchor - - Bugfixes: - - Fixed compile error on ARM - - Wrong legend icons were displayed if using pixmaps for scatters that are smaller than the legend icon rect - - Fixed clipping inaccuracy for rotated tick labels (were hidden too early, because the non-rotated bounding box was used) - - Fixed bug that caused wrong clipping of axis ticks and subticks when the ticks were given manually by QCPAxis::setTickVector - - Fixed Qt5 crash when dragging graph out of view (iterator out of bounds in QCPGraph::getVisibleDataBounds) - - Fixed QCPItemText not scaling properly when using scaled raster export - Bugfixes after beta: - - Fixed bug that clipped the rightmost pixel column of tick labels when caching activated (only visible on windows for superscript exponents) - - Restored compatibility to Qt4.6 - - Restored support for -no-RTTI compilation - - Empty manual tick labels are handled more gracefully (no QPainter qDebug messages anymore) - - Fixed type ambiguity in QCPLineEnding::draw causing compile error on ARM - - Fixed bug of grid layouts not propagating the minimum size from their child elements to the parent layout correctly - - Fixed bug of child elements (e.g. axis rects) of inset layouts not properly receiving mouse events - - Other: - - Opened up non-amalgamated project structure to public via git repository - -#### Version released on 09.06.12 #### - - Quick Summary: - - Items (arrows, text,...) - - Layers (easier control over rendering order) - - New antialiasing system (Each objects controls own antialiasing with setAntialiased) - - Performance Improvements - - improved pixel-precise drawing - - easier shared library creation/usage - - Changes that (might) break backward compatibility: - - enum QCPGraph::ScatterSymbol was moved to QCP namespace (now QCP::ScatterSymbol). - This replace should fix your code: "QCPGraph::ss" -> "QCP::ss" - - enum QCustomPlot::AntialiasedElement and flag QCustomPlot::AntialiasedElements was moved to QCP namespace - This replace should fix your code: "QCustomPlot::ae" -> "QCP::ae" - - the meaning of QCustomPlot::setAntialiasedElements has changed slightly: It is now an override to force elements to be antialiased. If you want to force - elements to not be drawn antialiased, use the new setNotAntialiasedElements. If an element is mentioned in neither of those functions, it now controls - its antialiasing itself via its "setAntialiased" function(s). (e.g. QCPAxis::setAntialiased(bool), QCPAbstractPlottable::setAntialiased(bool), - QCPAbstractPlottable::setAntialiasedScatters(bool), etc.) - - QCPAxis::setTickVector and QCPAxis::setTickVectorLabels no longer take a pointer but a const reference of the respective QVector as parameter. - (handing over a pointer didn't give any noticeable performance benefits but was inconsistent with the rest of the interface) - - Equally QCPAxis::tickVector and QCPAxis::tickVectorLabels don't return by pointer but by value now - - QCustomPlot::savePngScaled was removed, its purpose is now included as optional parameter "scale" of savePng. - - 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. - (the argument there was "double key, double value" in plot coordinates, before). - - QCPAbstractPlottable, QCPAxis and QCPLegend now inherit from QCPLayerable - - If you have derived from QCPAbstractPlottable: the draw method signature has changed from "draw (..) const" to "draw (..)", i.e. the method - is not const anymore. This allows the draw function of your plottable to perform buffering/caching operations, if necessary. - - Added features: - - Item system: QCPAbstractItem, QCPItemAnchor, QCPItemPosition, QCPLineEnding. Allows placing of lines, arrows, text, pixmaps etc. - - New Items: QCPItemStraightLine, QCPItemLine, QCPItemCurve, QCPItemEllipse, QCPItemRect, QCPItemPixmap, QCPItemText, QCPItemBracket, QCPItemTracer - - QCustomPlot::addItem/itemCount/item/removeItem/selectedItems - - signals QCustomPlot::itemClicked/itemDoubleClicked - - the QCustomPlot interactions property now includes iSelectItems (for selection of QCPAbstractItem) - - QCPLineEnding. Represents the different styles a line/curve can end (e.g. different arrows, circle, square, bar, etc.), see e.g. QCPItemCurve::setHead - - Layer system: QCPLayerable, QCPLayer. Allows more sophisticated control over drawing order and a kind of grouping. - - QCPAbstractPlottable, QCPAbstractItem, QCPAxis, QCPGrid, QCPLegend are layerables and derive from QCPLayerable - - QCustomPlot::addLayer/moveLayer/removeLayer/setCurrentLayer/layer/currentLayer/layerCount - - 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. - - QCustomPlot::viewport now makes the previously inaccessible viewport rect read-only-accessible (needed that for item-interface) - - PNG export now allows transparent background by calling QCustomPlot::setColor(Qt::transparent) before savePng - - QCPStatisticalBox outlier symbols may now be all scatter symbols, not only hardcoded circles. - - perfect precision of scatter symbol/error bar drawing and clipping in both antialiased and non-antialiased mode, by introducing QCPPainter - that works around some QPainter bugs/inconveniences. Further, more complex symbols like ssCrossSquare used to look crooked, now they look good. - - new antialiasing control system: Each drawing element now has its own "setAntialiased" function to control whether it is drawn antialiased. - - QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements can be used to override the individual settings. - - Subclasses of QCPAbstractPlottable can now use the convenience functions like applyFillAntialiasingHint or applyScattersAntialiasingHint to - easily make their drawing code comply with the overall antialiasing system. - - QCustomPlot::setNoAntialiasingOnDrag allows greatly improved performance and responsiveness by temporarily disabling all antialiasing while - the user is dragging axis ranges - - QCPGraph can now show scatter symbols at data points and hide its line (see QCPGraph::setScatterStyle, setScatterSize, setScatterPixmap, setLineStyle) - - 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 - 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 - be above the grid but below the axes. - - QCustomPlot::hasPlottable(plottable), returns whether the QCustomPlot contains the plottable - - QCustomPlot::setPlottingHint/setPlottingHints, plotting hints control details about the plotting quality/speed - - export to jpg and bmp added (QCustomPlot::saveJpg/saveBmp), as well as control over compression quality for png and jpg - - multi-select-modifier may now be specified with QCustomPlot::setMultiSelectModifier and is not fixed to Ctrl anymore - - Bugfixes: - - fixed QCustomPlot ignores replot after it had size (0,0) even if size becomes valid again - - on Windows, a repaint used to be delayed during dragging/zooming of a complex plot, until the drag operation was done. - This was fixed, i.e. repaints are forced after a replot() call. See QCP::phForceRepaint and setPlottingHints. - - when using the raster paintengine and exporting to scaled PNG, pen widths are now scaled correctly (QPainter bug workaround via QCPPainter) - - PDF export now respects QCustomPlot background color (QCustomPlot::setColor), also Qt::transparent - - fixed a bug on QCPBars and QCPStatisticalBox where auto-rescaling of axis would fail when all data is very small (< 1e-11) - - fixed mouse event propagation bug that prevented range dragging from working on KDE (GNU/Linux) - - fixed a compiler warning on 64-bit systems due to pointer cast to int instead of quintptr in a qDebug output - - Other: - - Added support for easier shared library creation (including examples for compiling and using QCustomPlot as shared library) - - QCustomPlot now has the Qt::WA_OpaquePaintEvent widget attribute (gives slightly improved performance). - - QCP::aeGraphs (enum QCP::AntialiasedElement, previously QCustomPlot::aeGraphs) has been marked deprecated since version 02.02.12 and - was now removed. Use QCP::aePlottables instead. - - optional performance-quality-tradeoff for solid graph lines (see QCustomPlot::setPlottingHints). - - marked data classes and QCPRange as Q_MOVABLE_TYPE - - replaced usage of own macro FUNCNAME with Qt macro Q_FUNC_INFO - - QCustomPlot now returns a minimum size hint of 50*50 - -#### Version released on 31.03.12 #### - - Changes that (might) break backward compatibility: - - QCPAbstractLegendItem now inherits from QObject - - mousePress, mouseMove and mouseRelease signals are now emitted before and not after any QCustomPlot processing (range dragging, selecting, etc.) - - Added features: - - Interaction system: now allows selecting of objects like plottables, axes, legend and plot title, see QCustomPlot::setInteractions documentation - - Interaction system for plottables: - - setSelectable, setSelected, setSelectedPen, setSelectedBrush, selectTest on QCPAbstractPlottable and all derived plottables - - setSelectionTolerance on QCustomPlot - - selectedPlottables and selectedGraphs on QCustomPlot (returns the list of currently selected plottables/graphs) - - Interaction system for axes: - - setSelectable, setSelected, setSelectedBasePen, setSelectedTickPen, setSelectedSubTickPen, setSelectedLabelFont, setSelectedTickLabelFont, - setSelectedLabelColor, setSelectedTickLabelColor, selectTest on QCPAxis - - selectedAxes on QCustomPlot (returns a list of the axes that currently have selected parts) - - Interaction system for legend: - - setSelectable, setSelected, setSelectedBorderPen, setSelectedIconBorderPen, setSelectedBrush, setSelectedFont, setSelectedTextColor, selectedItems on QCPLegend - - setSelectedFont, setSelectedTextColor, setSelectable, setSelected on QCPAbstractLegendItem - - selectedLegends on QCustomPlot - - Interaction system for title: - - setSelectedTitleFont, setSelectedTitleColor, setTitleSelected on QCustomPlot - - new signals in accordance with the interaction system: - - selectionChangedByUser on QCustomPlot - - selectionChanged on QCPAbstractPlottable - - selectionChanged on QCPAxis - - selectionChanged on QCPLegend and QCPAbstractLegendItem - - plottableClick, legendClick, axisClick, titleClick, plottableDoubleClick, legendDoubleClick, axisDoubleClick, titleDoubleClick on QCustomPlot - - QCustomPlot::deselectAll (deselects everything, i.e. axes and plottables) - - QCPAbstractPlottable::pixelsToCoords (inverse function to the already existing coordsToPixels function) - - QCPRange::contains(double value) - - QCPAxis::setLabelColor and setTickLabelColor - - QCustomPlot::setTitleColor - - QCustomPlot now emits beforeReplot and afterReplot signals. Note that it is safe to make two customPlots mutually call eachothers replot functions - 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) - - 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"). - - Bugfixes: - - tick labels/margins should no longer oscillate by one pixel when dragging range or replotting repeatedly while changing e.g. data. This - was caused by a bug in Qt's QFontMetrics::boundingRect function when the font has an integer point size (probably some rounding problem). - The fix hence consists of creating a temporary font (only for bounding-box calculation) which is 0.05pt larger and thus avoiding the - jittering rounding outcome. - - tick label, axis label and plot title colors used to be undefined. This was fixed by providing explicit color properties. - - Other: - - fixed some glitches in the documentation - - QCustomPlot::replot and QCustomPlot::rescaleAxes are now slots - -#### Version released on 02.02.12 #### - - Changes that break backward compatibility: - - renamed all secondary classes from QCustomPlot[...] to QCP[...]: - QCustomPlotAxis -> QCPAxis - QCustomPlotGraph -> QCPGraph - QCustomPlotRange -> QCPRange - QCustomPlotData -> QCPData - QCustomPlotDataMap -> QCPDataMap - QCustomPlotLegend -> QCPLegend - QCustomPlotDataMapIterator -> QCPDataMapIterator - QCustomPlotDataMutableMapIterator -> QCPDataMutableMapIterator - A simple search and replace on all code files should make your code run again, e.g. consider the regex "QCustomPlot(?=[AGRDL])" -> "QCP". - Make sure not to just replace "QCustomPlot" with "QCP" because the main class QCustomPlot hasn't changed to QCP. - This change was necessary because class names became unhandy, pardon my bad naming decision in the beginning. - - QCPAxis::tickLength() and QCPAxis::subTickLength() now each split into two functions for inward and outward ticks (tickLengthIn/tickLengthOut). - - QCPLegend now uses QCPAbstractLegendItem to carry item data (before, the legend was passed QCPGraphs directly) - - QCustomPlot::addGraph() now doesn't return the index of the created graph anymore, but a pointer to the created QCPGraph. - - QCustomPlot::setAutoAddGraphToLegend is replaced by setAutoAddPlottableToLegend - - Added features: - - Reversed axis range with QCPAxis::setRangeReversed(bool) - - 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). - - Zerolines. Like grid lines only with a separate pen (QCPAxis::setZeroLinePen), at tick position zero. - - Outward ticks. QCPAxis::setTickLength/setSubTickLength now accepts two arguments for inward and outward tick length. This doesn't break - backward compatibility because the second argument (outward) has default value zero and thereby a call with one argument hasn't changed its meaning. - - QCPGraph now inherits from QCPAbstractPlottable - - QCustomPlot::addPlottable/plottable/removePlottable/clearPlottables added to interface with the new QCPAbstractPlottable-based system. The simpler interface - which only acts on QCPGraphs (addGraph, graph, removeGraph, etc.) was adapted internally and is kept for backward compatibility and ease of use. - - QCPLegend items for plottables (e.g. graphs) can automatically wrap their texts to fit the widths, see QCPLegend::setMinimumSize and QCPPlottableLegendItem::setTextWrap. - - QCustomPlot::rescaleAxes. Adapts axis ranges to show all plottables/graphs, by calling QCPAbstractPlottable::rescaleAxes on all plottables in the plot. - - QCPCurve. For plotting of parametric curves. - - QCPBars. For plotting of bar charts. - - QCPStatisticalBox. For statistical box plots. - - Bugfixes: - - Fixed QCustomPlot::removeGraph(int) not being able to remove graph index 0 - - made QCustomPlot::replot() abort painting when painter initialization fails (e.g. because width/height of QCustomPlot is zero) - - The distance of the axis label from the axis ignored the tick label padding, this could have caused overlapping axis labels and tick labels - - fixed memory leak in QCustomPlot (dtor didn't delete legend) - - fixed bug that prevented QCPAxis::setRangeLower/Upper from setting the value to exactly 0. - - Other: - - Changed default error bar handle size (QCustomPlotGraph::setErrorBarSize) from 4 to 6. - - Removed QCustomPlotDataFetcher. Was deprecated and not used class. - - Extended documentation, especially class descriptions. - -#### Version released on 15.01.12 #### - - Changes that (might) break backward compatibility: - - QCustomPlotGraph now inherits from QObject - - Added features: - - Added axis background pixmap (QCustomPlot::setAxisBackground, setAxisBackgroundScaled, setAxisBackgroundScaledMode) - - Added width and height parameter on PDF export function QCustomPlot::savePdf(). This now allows PDF export to - have arbitrary dimensions, independent of the current geometry of the QCustomPlot. - - Added overload of QCustomPlot::removeGraph that takes QCustomPlotGraph* as parameter, instead the index of the graph - - Added all enums to the Qt meta system via Q_ENUMS(). The enums can now be transformed - to QString values easily with the Qt meta system, which makes saving state e.g. as XML - significantly nicer. - - added typedef QMapIterator QCustomPlotDataMapIterator - and typedef QMutableMapIterator QCustomPlotDataMutableMapIterator - for improved information hiding, when using iterators outside QCustomPlot code - - Bugfixes: - - Fixed savePngScaled. Axis/label drawing functions used to reset the painter transform - and thereby break savePngScaled. Now they buffer the current transform and restore it afterwards. - - Fixed some glitches in the doxygen comments (affects documentation only) - - Other: - - Changed the default tickLabelPadding of top axis from 3 to 6 pixels. Looks better. - - Changed the default QCustomPlot::setAntialiasedElements setting: Graph fills are now antialiased - by default. That's a bit slower, but makes fill borders look better. - -#### Version released on 19.11.11 #### - - Changes that break backward compatibility: - - QCustomPlotAxis: tickFont and setTickFont renamed to tickLabelFont and setTickLabelFont (for naming consistency) - - Other: - - QCustomPlotAxis: Added rotated tick labels, see setTickLabelRotation - diff --git a/third_party/qcustomplot/documentation/html/AxisNamesOverview.png b/third_party/qcustomplot/documentation/html/AxisNamesOverview.png deleted file mode 100644 index 01de5adf..00000000 Binary files a/third_party/qcustomplot/documentation/html/AxisNamesOverview.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/AxisRectSpacingOverview.png b/third_party/qcustomplot/documentation/html/AxisRectSpacingOverview.png deleted file mode 100644 index 4f5c27ff..00000000 Binary files a/third_party/qcustomplot/documentation/html/AxisRectSpacingOverview.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/InheritanceOverview.png b/third_party/qcustomplot/documentation/html/InheritanceOverview.png deleted file mode 100644 index 1384b4ed..00000000 Binary files a/third_party/qcustomplot/documentation/html/InheritanceOverview.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/LayoutsystemSketch.png b/third_party/qcustomplot/documentation/html/LayoutsystemSketch.png deleted file mode 100644 index 825c17dc..00000000 Binary files a/third_party/qcustomplot/documentation/html/LayoutsystemSketch.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPBars.png b/third_party/qcustomplot/documentation/html/QCPBars.png deleted file mode 100644 index 23da884a..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPBars.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPBarsGroup.png b/third_party/qcustomplot/documentation/html/QCPBarsGroup.png deleted file mode 100644 index 0b0c7352..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPBarsGroup.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPColorGradient-levelcount.png b/third_party/qcustomplot/documentation/html/QCPColorGradient-levelcount.png deleted file mode 100644 index 41d510fe..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPColorGradient-levelcount.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPColorGradient-periodic.png b/third_party/qcustomplot/documentation/html/QCPColorGradient-periodic.png deleted file mode 100644 index 2937458d..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPColorGradient-periodic.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPColorGradient.png b/third_party/qcustomplot/documentation/html/QCPColorGradient.png deleted file mode 100644 index 45d859ef..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPColorGradient.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPColorMap-interpolate.png b/third_party/qcustomplot/documentation/html/QCPColorMap-interpolate.png deleted file mode 100644 index 4e4b1327..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPColorMap-interpolate.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPColorMap-tightboundary.png b/third_party/qcustomplot/documentation/html/QCPColorMap-tightboundary.png deleted file mode 100644 index 87c47f39..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPColorMap-tightboundary.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPColorMap.png b/third_party/qcustomplot/documentation/html/QCPColorMap.png deleted file mode 100644 index 04c234e5..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPColorMap.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPColorScale.png b/third_party/qcustomplot/documentation/html/QCPColorScale.png deleted file mode 100644 index 365c15d1..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPColorScale.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPCurve.png b/third_party/qcustomplot/documentation/html/QCPCurve.png deleted file mode 100644 index b405767b..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPCurve.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPErrorBars.png b/third_party/qcustomplot/documentation/html/QCPErrorBars.png deleted file mode 100644 index c553757f..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPErrorBars.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPFinancial.png b/third_party/qcustomplot/documentation/html/QCPFinancial.png deleted file mode 100644 index 855753e6..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPFinancial.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPGraph.png b/third_party/qcustomplot/documentation/html/QCPGraph.png deleted file mode 100644 index 4de186f4..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPGraph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPItemBracket-length.png b/third_party/qcustomplot/documentation/html/QCPItemBracket-length.png deleted file mode 100644 index 46fbefbe..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPItemBracket-length.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPItemBracket.png b/third_party/qcustomplot/documentation/html/QCPItemBracket.png deleted file mode 100644 index ed8fc5c4..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPItemBracket.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPItemCurve.png b/third_party/qcustomplot/documentation/html/QCPItemCurve.png deleted file mode 100644 index 288f98dd..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPItemCurve.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPItemEllipse.png b/third_party/qcustomplot/documentation/html/QCPItemEllipse.png deleted file mode 100644 index 0819572f..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPItemEllipse.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPItemLine.png b/third_party/qcustomplot/documentation/html/QCPItemLine.png deleted file mode 100644 index c9ddf988..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPItemLine.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPItemPixmap.png b/third_party/qcustomplot/documentation/html/QCPItemPixmap.png deleted file mode 100644 index 2c288ac2..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPItemPixmap.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPItemRect.png b/third_party/qcustomplot/documentation/html/QCPItemRect.png deleted file mode 100644 index 7fe7add3..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPItemRect.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPItemStraightLine.png b/third_party/qcustomplot/documentation/html/QCPItemStraightLine.png deleted file mode 100644 index b05cd6a4..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPItemStraightLine.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPItemText.png b/third_party/qcustomplot/documentation/html/QCPItemText.png deleted file mode 100644 index 8f545efe..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPItemText.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPItemTracer.png b/third_party/qcustomplot/documentation/html/QCPItemTracer.png deleted file mode 100644 index a97c06cc..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPItemTracer.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPLineEnding.png b/third_party/qcustomplot/documentation/html/QCPLineEnding.png deleted file mode 100644 index 211b7d49..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPLineEnding.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPMarginGroup.png b/third_party/qcustomplot/documentation/html/QCPMarginGroup.png deleted file mode 100644 index 6db93bf0..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPMarginGroup.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/QCPStatisticalBox.png b/third_party/qcustomplot/documentation/html/QCPStatisticalBox.png deleted file mode 100644 index 9ecb7268..00000000 Binary files a/third_party/qcustomplot/documentation/html/QCPStatisticalBox.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/RelationOverview.png b/third_party/qcustomplot/documentation/html/RelationOverview.png deleted file mode 100644 index f1271f3c..00000000 Binary files a/third_party/qcustomplot/documentation/html/RelationOverview.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/adaptive-sampling-line.png b/third_party/qcustomplot/documentation/html/adaptive-sampling-line.png deleted file mode 100644 index 7812ff29..00000000 Binary files a/third_party/qcustomplot/documentation/html/adaptive-sampling-line.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/adaptive-sampling-scatter.png b/third_party/qcustomplot/documentation/html/adaptive-sampling-scatter.png deleted file mode 100644 index 7cc5430a..00000000 Binary files a/third_party/qcustomplot/documentation/html/adaptive-sampling-scatter.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/annotated.html b/third_party/qcustomplot/documentation/html/annotated.html deleted file mode 100644 index 9bf1481a..00000000 --- a/third_party/qcustomplot/documentation/html/annotated.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - -Data Structures - - - - -
-
-
Data Structures
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 CQCPAbstractItemThe abstract base class for all items in a plot
 CQCPAbstractLegendItemThe abstract base class for all entries in a QCPLegend
 CQCPAbstractPaintBufferThe abstract base class for paint buffers, which define the rendering backend
 CQCPAbstractPlottableThe abstract base class for all data representing objects in a plot
 CQCPAbstractPlottable1DA template base class for plottables with one-dimensional data
 CQCPAxisManages a single axis inside a QCustomPlot
 CQCPAxisRectHolds multiple axes and arranges them in a rectangular shape
 CQCPAxisTickerThe base class tick generator used by QCPAxis to create tick positions and tick labels
 CQCPAxisTickerDateTimeSpecialized axis ticker for calendar dates and times as axis ticks
 CQCPAxisTickerFixedSpecialized axis ticker with a fixed tick step
 CQCPAxisTickerLogSpecialized axis ticker suited for logarithmic axes
 CQCPAxisTickerPiSpecialized axis ticker to display ticks in units of an arbitrary constant, for example pi
 CQCPAxisTickerTextSpecialized axis ticker which allows arbitrary labels at specified coordinates
 CQCPAxisTickerTimeSpecialized axis ticker for time spans in units of milliseconds to days
 CQCPBarsA plottable representing a bar chart in a plot
 CQCPBarsDataHolds the data of one single data point (one bar) for QCPBars
 CQCPBarsGroupGroups multiple QCPBars together so they appear side by side
 CQCPColorGradientDefines a color gradient for use with e.g. QCPColorMap
 CQCPColorMapA plottable representing a two-dimensional color map in a plot
 CQCPColorMapDataHolds the two-dimensional data of a QCPColorMap plottable
 CQCPColorScaleA color scale for use with color coding data such as QCPColorMap
 CQCPCurveA plottable representing a parametric curve in a plot
 CQCPCurveDataHolds the data of one single data point for QCPCurve
 CQCPDataContainerThe generic data container for one-dimensional plottables
 CQCPDataRangeDescribes a data range given by begin and end index
 CQCPDataSelectionDescribes a data set by holding multiple QCPDataRange instances
 CQCPErrorBarsA plottable that adds a set of error bars to other plottables
 CQCPErrorBarsDataHolds the data of one single error bar for QCPErrorBars
 CQCPFinancialA plottable representing a financial stock chart
 CQCPFinancialDataHolds the data of one single data point for QCPFinancial
 CQCPGraphA plottable representing a graph in a plot
 CQCPGraphDataHolds the data of one single data point for QCPGraph
 CQCPGridResponsible for drawing the grid of a QCPAxis
 CQCPItemAnchorAn anchor of an item to which positions can be attached to
 CQCPItemBracketA bracket for referencing/highlighting certain parts in the plot
 CQCPItemCurveA curved line from one point to another
 CQCPItemEllipseAn ellipse
 CQCPItemLineA line from one point to another
 CQCPItemPixmapAn arbitrary pixmap
 CQCPItemPositionManages the position of an item
 CQCPItemRectA rectangle
 CQCPItemStraightLineA straight line that spans infinitely in both directions
 CQCPItemTextA text label
 CQCPItemTracerItem that sticks to QCPGraph data points
 CQCPLayerA layer that may contain objects, to control the rendering order
 CQCPLayerableBase class for all drawable objects
 CQCPLayoutThe abstract base class for layouts
 CQCPLayoutElementThe abstract base class for all objects that form the layout system
 CQCPLayoutGridA layout that arranges child elements in a grid
 CQCPLayoutInsetA layout that places child elements aligned to the border or arbitrarily positioned
 CQCPLegendManages a legend inside a QCustomPlot
 CQCPLineEndingHandles the different ending decorations for line-like items
 CQCPMarginGroupA margin group allows synchronization of margin sides if working with multiple layout elements
 CQCPPaintBufferGlFboA paint buffer based on OpenGL frame buffers objects, using hardware accelerated rendering
 CQCPPaintBufferGlPbufferA paint buffer based on OpenGL pixel buffers, using hardware accelerated rendering
 CQCPPaintBufferPixmapA paint buffer based on QPixmap, using software raster rendering
 CQCPPainterQPainter subclass used internally
 CQCPPlottableInterface1DDefines an abstract interface for one-dimensional plottables
 CQCPPlottableLegendItemA legend item representing a plottable with an icon and the plottable name
 CQCPPolarAxisAngularThe main container for polar plots, representing the angular axis as a circle
 CQCPPolarAxisRadialThe radial axis inside a radial plot
 CQCPPolarGraphA radial graph used to display data in polar plots
 CQCPPolarGridThe grid in both angular and radial dimensions for polar plots
 CQCPPolarLegendItemA legend item for polar plots
 CQCPRangeRepresents the range an axis is encompassing
 CQCPScatterStyleRepresents the visual appearance of scatter points
 CQCPSelectionDecoratorControls how a plottable's data selection is drawn
 CQCPSelectionDecoratorBracketA selection decorator which draws brackets around each selected data segment
 CQCPSelectionRectProvides rect/rubber-band data selection and range zoom interaction
 CQCPStatisticalBoxA plottable representing a single statistical box in a plot
 CQCPStatisticalBoxDataHolds the data of one single data point for QCPStatisticalBox
 CQCPTextElementA layout element displaying a text
 CQCPVector2DRepresents two doubles as a mathematical 2D vector
 CQCustomPlotThe central class of the library. This is the QWidget which displays the plot and interacts with the user
-
-
- - diff --git a/third_party/qcustomplot/documentation/html/axisticker-datetime.png b/third_party/qcustomplot/documentation/html/axisticker-datetime.png deleted file mode 100644 index d330a535..00000000 Binary files a/third_party/qcustomplot/documentation/html/axisticker-datetime.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/axisticker-fixed.png b/third_party/qcustomplot/documentation/html/axisticker-fixed.png deleted file mode 100644 index 3bec4ba1..00000000 Binary files a/third_party/qcustomplot/documentation/html/axisticker-fixed.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/axisticker-log-powers.png b/third_party/qcustomplot/documentation/html/axisticker-log-powers.png deleted file mode 100644 index 13bc4fa1..00000000 Binary files a/third_party/qcustomplot/documentation/html/axisticker-log-powers.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/axisticker-log.png b/third_party/qcustomplot/documentation/html/axisticker-log.png deleted file mode 100644 index 08540446..00000000 Binary files a/third_party/qcustomplot/documentation/html/axisticker-log.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/axisticker-pi.png b/third_party/qcustomplot/documentation/html/axisticker-pi.png deleted file mode 100644 index e510cf85..00000000 Binary files a/third_party/qcustomplot/documentation/html/axisticker-pi.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/axisticker-text.png b/third_party/qcustomplot/documentation/html/axisticker-text.png deleted file mode 100644 index 77de38bd..00000000 Binary files a/third_party/qcustomplot/documentation/html/axisticker-text.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/axisticker-time.png b/third_party/qcustomplot/documentation/html/axisticker-time.png deleted file mode 100644 index 5a9b3369..00000000 Binary files a/third_party/qcustomplot/documentation/html/axisticker-time.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/axisticker-time2.png b/third_party/qcustomplot/documentation/html/axisticker-time2.png deleted file mode 100644 index af77afef..00000000 Binary files a/third_party/qcustomplot/documentation/html/axisticker-time2.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/bc_s.png b/third_party/qcustomplot/documentation/html/bc_s.png deleted file mode 100644 index c46b13c4..00000000 Binary files a/third_party/qcustomplot/documentation/html/bc_s.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/bdwn.png b/third_party/qcustomplot/documentation/html/bdwn.png deleted file mode 100644 index c229d9cc..00000000 Binary files a/third_party/qcustomplot/documentation/html/bdwn.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAbstractItem.html b/third_party/qcustomplot/documentation/html/classQCPAbstractItem.html deleted file mode 100644 index b50a38f9..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAbstractItem.html +++ /dev/null @@ -1,897 +0,0 @@ - - - - - - -QCPAbstractItem Class Reference - - - - -
- -
-
QCPAbstractItem Class Referenceabstract
-
-
- -

The abstract base class for all items in a plot. - More...

-
-Inheritance diagram for QCPAbstractItem:
-
-
Inheritance graph
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAbstractItem (QCustomPlot *parentPlot)
 
-bool clipToAxisRect () const
 
-QCPAxisRectclipAxisRect () const
 
-bool selectable () const
 
-bool selected () const
 
void setClipToAxisRect (bool clip)
 
void setClipAxisRect (QCPAxisRect *rect)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const =0
 
QList< QCPItemPosition * > positions () const
 
QList< QCPItemAnchor * > anchors () const
 
QCPItemPositionposition (const QString &name) const
 
QCPItemAnchoranchor (const QString &name) const
 
bool hasAnchor (const QString &name) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - -

-Signals

void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)=0
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual QPointF anchorPixelPosition (int anchorId) const
 
double rectDistance (const QRectF &rect, const QPointF &pos, bool filledRect) const
 
QCPItemPositioncreatePosition (const QString &name)
 
QCPItemAnchorcreateAnchor (const QString &name, int anchorId)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
-

Detailed Description

-

The abstract base class for all items in a plot.

-

In QCustomPlot, items are supplemental graphical elements that are neither plottables (QCPAbstractPlottable) nor axes (QCPAxis). While plottables are always tied to two axes and thus plot coordinates, items can also be placed in absolute coordinates independent of any axes. Each specific item has at least one QCPItemPosition member which controls the positioning. Some items are defined by more than one coordinate and thus have two or more QCPItemPosition members (For example, QCPItemRect has topLeft and bottomRight).

-

This abstract base class defines a very basic interface like visibility and clipping. Since this class is abstract, it can't be instantiated. Use one of the subclasses or create a subclass yourself to create new items.

-

The built-in items are:

- - - - - - - - - - - - - - - - - - -
QCPItemLineA line defined by a start and an end point. May have different ending styles on each side (e.g. arrows).
QCPItemStraightLineA straight line defined by a start and a direction point. Unlike QCPItemLine, the straight line is infinitely long and has no endings.
QCPItemCurveA curve defined by start, end and two intermediate control points. May have different ending styles on each side (e.g. arrows).
QCPItemRectA rectangle
QCPItemEllipseAn ellipse
QCPItemPixmapAn arbitrary pixmap
QCPItemTextA text label
QCPItemBracketA bracket which may be used to reference/highlight certain parts in the plot.
QCPItemTracerAn item that can be attached to a QCPGraph and sticks to its data points, given a key coordinate.
-

-Clipping

-

Items are by default clipped to the main axis rect (they are only visible inside the axis rect). To make an item visible outside that axis rect, disable clipping via setClipToAxisRect(false).

-

On the other hand if you want the item to be clipped to a different axis rect, specify it via setClipAxisRect. This clipAxisRect property of an item is only used for clipping behaviour, and in principle is independent of the coordinate axes the item might be tied to via its position members (QCPItemPosition::setAxes). However, it is common that the axis rect for clipping also contains the axes used for the item positions.

-

-Using items

-

First you instantiate the item you want to use and add it to the plot:

QCPItemLine *line = new QCPItemLine(customPlot);

by default, the positions of the item are bound to the x- and y-Axis of the plot. So we can just set the plot coordinates where the line should start/end:

line->start->setCoords(-0.1, 0.8);
line->end->setCoords(1.1, 0.2);

If we don't want the line to be positioned in plot coordinates but a different coordinate system, e.g. absolute pixel positions on the QCustomPlot surface, we need to change the position type like this:

Then we can set the coordinates, this time in pixels:

line->start->setCoords(100, 200);
line->end->setCoords(450, 320);

and make the line visible on the entire QCustomPlot, by disabling clipping to the axis rect:

line->setClipToAxisRect(false);

For more advanced plots, it is even possible to set different types and parent anchors per X/Y coordinate of an item position, using for example QCPItemPosition::setTypeX or QCPItemPosition::setParentAnchorX. For details, see the documentation of QCPItemPosition.

-

-Creating own items

-

To create an own item, you implement a subclass of QCPAbstractItem. These are the pure virtual functions, you must implement:

-

See the documentation of those functions for what they need to do.

-

-Allowing the item to be positioned

-

As mentioned, item positions are represented by QCPItemPosition members. Let's assume the new item shall have only one point as its position (as opposed to two like a rect or multiple like a polygon). You then add a public member of type QCPItemPosition like so:

-
QCPItemPosition * const myPosition;

the const makes sure the pointer itself can't be modified from the user of your new item (the QCPItemPosition instance it points to, can be modified, of course). The initialization of this pointer is made easy with the createPosition function. Just assign the return value of this function to each QCPItemPosition in the constructor of your item. createPosition takes a string which is the name of the position, typically this is identical to the variable name. For example, the constructor of QCPItemExample could look like this:

-
QCPItemExample::QCPItemExample(QCustomPlot *parentPlot) :
QCPAbstractItem(parentPlot),
myPosition(createPosition("myPosition"))
{
// other constructor code
}

-The draw function

-

To give your item a visual representation, reimplement the draw function and use the passed QCPPainter to draw the item. You can retrieve the item position in pixel coordinates from the position member(s) via QCPItemPosition::pixelPosition.

-

To optimize performance you should calculate a bounding rect first (don't forget to take the pen width into account), check whether it intersects the clipRect, and only draw the item at all if this is the case.

-

-The selectTest function

-

Your implementation of the selectTest function may use the helpers QCPVector2D::distanceSquaredToLine and rectDistance. With these, the implementation of the selection test becomes significantly simpler for most items. See the documentation of selectTest for what the function parameters mean and what the function should return.

-

-Providing anchors

-

Providing anchors (QCPItemAnchor) starts off like adding a position. First you create a public member, e.g.

-
QCPItemAnchor * const bottom;

and create it in the constructor with the createAnchor function, assigning it a name and an anchor id (an integer enumerating all anchors on the item, you may create an own enum for this). Since anchors can be placed anywhere, relative to the item's position(s), your item needs to provide the position of every anchor with the reimplementation of the anchorPixelPosition(int anchorId) function.

-

In essence the QCPItemAnchor is merely an intermediary that itself asks your item for the pixel position when anything attached to the anchor needs to know the coordinates.

-

Constructor & Destructor Documentation

- -

§ QCPAbstractItem()

- -
-
- - - - - -
- - - - - - - - -
QCPAbstractItem::QCPAbstractItem (QCustomPlotparentPlot)
-
-explicit
-
-

Base class constructor which initializes base class members.

- -
-
-

Member Function Documentation

- -

§ setClipToAxisRect()

- -
-
- - - - - - - - -
void QCPAbstractItem::setClipToAxisRect (bool clip)
-
-

Sets whether the item shall be clipped to an axis rect or whether it shall be visible on the entire QCustomPlot. The axis rect can be set with setClipAxisRect.

-
See also
setClipAxisRect
- -
-
- -

§ setClipAxisRect()

- -
-
- - - - - - - - -
void QCPAbstractItem::setClipAxisRect (QCPAxisRectrect)
-
-

Sets the clip axis rect. It defines the rect that will be used to clip the item when setClipToAxisRect is set to true.

-
See also
setClipToAxisRect
- -
-
- -

§ setSelectable()

- -
-
- - - - - - - - -
void QCPAbstractItem::setSelectable (bool selectable)
-
-

Sets whether the user can (de-)select this item by clicking on the QCustomPlot surface. (When QCustomPlot::setInteractions contains QCustomPlot::iSelectItems.)

-

However, even when selectable was set to false, it is possible to set the selection manually, by calling setSelected.

-
See also
QCustomPlot::setInteractions, setSelected
- -
-
- -

§ setSelected()

- -
-
- - - - - - - - -
void QCPAbstractItem::setSelected (bool selected)
-
-

Sets whether this item is selected or not. When selected, it might use a different visual appearance (e.g. pen and brush), this depends on the specific item though.

-

The entire selection mechanism for items is handled automatically when QCustomPlot::setInteractions contains QCustomPlot::iSelectItems. You only need to call this function when you wish to change the selection state manually.

-

This function can change the selection state even when setSelectable was set to false.

-

emits the selectionChanged signal when selected is different from the previous selection state.

-
See also
setSelectable, selectTest
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
virtual double QCPAbstractItem::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-pure virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Reimplemented from QCPLayerable.

- -

Implemented in QCPItemTracer, QCPItemText, QCPItemBracket, QCPItemPixmap, QCPItemCurve, QCPItemLine, QCPItemEllipse, QCPItemRect, and QCPItemStraightLine.

- -
-
- -

§ positions()

- -
-
- - - - - -
- - - - - - - -
QList< QCPItemPosition * > QCPAbstractItem::positions () const
-
-inline
-
-

Returns all positions of the item in a list.

-
See also
anchors, position
- -
-
- -

§ anchors()

- -
-
- - - - - -
- - - - - - - -
QList< QCPItemAnchor * > QCPAbstractItem::anchors () const
-
-inline
-
-

Returns all anchors of the item in a list. Note that since a position (QCPItemPosition) is always also an anchor, the list will also contain the positions of this item.

-
See also
positions, anchor
- -
-
- -

§ position()

- -
-
- - - - - - - - -
QCPItemPosition * QCPAbstractItem::position (const QString & name) const
-
-

Returns the QCPItemPosition with the specified name. If this item doesn't have a position by that name, returns nullptr.

-

This function provides an alternative way to access item positions. Normally, you access positions direcly by their member pointers (which typically have the same variable name as name).

-
See also
positions, anchor
- -
-
- -

§ anchor()

- -
-
- - - - - - - - -
QCPItemAnchor * QCPAbstractItem::anchor (const QString & name) const
-
-

Returns the QCPItemAnchor with the specified name. If this item doesn't have an anchor by that name, returns nullptr.

-

This function provides an alternative way to access item anchors. Normally, you access anchors direcly by their member pointers (which typically have the same variable name as name).

-
See also
anchors, position
- -
-
- -

§ hasAnchor()

- -
-
- - - - - - - - -
bool QCPAbstractItem::hasAnchor (const QString & name) const
-
-

Returns whether this item has an anchor with the specified name.

-

Note that you can check for positions with this function, too. This is because every position is also an anchor (QCPItemPosition inherits from QCPItemAnchor).

-
See also
anchor, position
- -
-
- -

§ selectionChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractItem::selectionChanged (bool selected)
-
-signal
-
-

This signal is emitted when the selection state of this item has changed, either by user interaction or by a direct call to setSelected.

- -
-
- -

§ selectionCategory()

- -
-
- - - - - -
- - - - - - - -
QCP::Interaction QCPAbstractItem::selectionCategory () const
-
-protectedvirtual
-
-

Returns the selection category this layerable shall belong to. The selection category is used in conjunction with QCustomPlot::setInteractions to control which objects are selectable and which aren't.

-

Subclasses that don't fit any of the normal QCP::Interaction values can use QCP::iSelectOther. This is what the default implementation returns.

-
See also
QCustomPlot::setInteractions
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ clipRect()

- -
-
- - - - - -
- - - - - - - -
QRect QCPAbstractItem::clipRect () const
-
-protectedvirtual
-
-

Returns the rect the visual representation of this item is clipped to. This depends on the current setting of setClipToAxisRect as well as the axis rect set with setClipAxisRect.

-

If the item is not clipped to an axis rect, QCustomPlot's viewport rect is returned.

-
See also
draw
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractItem::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

A convenience function to easily set the QPainter::Antialiased hint on the provided painter before drawing item lines.

-

This is the antialiasing state the painter passed to the draw method is in by default.

-

This function takes into account the local setting of the antialiasing flag as well as the overrides set with QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

-
See also
setAntialiased
- -

Implements QCPLayerable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractItem::draw (QCPPainterpainter)
-
-protectedpure virtual
-
-

Draws this item with the provided painter.

-

The cliprect of the provided painter is set to the rect returned by clipRect before this function is called. The clipRect depends on the clipping settings defined by setClipToAxisRect and setClipAxisRect.

- -

Implements QCPLayerable.

- -

Implemented in QCPItemText, QCPItemTracer, QCPItemPixmap, QCPItemBracket, QCPItemEllipse, QCPItemRect, QCPItemCurve, QCPItemLine, and QCPItemStraightLine.

- -
-
- -

§ selectEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAbstractItem::selectEvent (QMouseEvent * event,
bool additive,
const QVariant & details,
bool * selectionStateChanged 
)
-
-protectedvirtual
-
-

This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing.

-

event is the mouse event that caused the selection. additive indicates, whether the user was holding the multi-select-modifier while performing the selection (see QCustomPlot::setMultiSelectModifier). if additive is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected).

-

Every selectEvent is preceded by a call to selectTest, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent QCustomPlot). The details data you output from selectTest is fed back via details here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually details is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like QCPAxis). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked.

-

selectionStateChanged is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if additive is true, selectionStateChanged must also be set to true, because the selection toggles. If additive is false, selectionStateChanged is only set to true, if the layerable was previously unselected and now is switched to the selected state.

-
See also
selectTest, deselectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ deselectEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractItem::deselectEvent (bool * selectionStateChanged)
-
-protectedvirtual
-
-

This event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to QCustomPlot::deselectAll. Subclasses should react to it by unsetting their selection appropriately.

-

just as in selectEvent, the output parameter selectionStateChanged (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively.

-
See also
selectTest, selectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ anchorPixelPosition()

- -
-
- - - - - -
- - - - - - - - -
QPointF QCPAbstractItem::anchorPixelPosition (int anchorId) const
-
-protectedvirtual
-
-

Returns the pixel position of the anchor with Id anchorId. This function must be reimplemented in item subclasses if they want to provide anchors (QCPItemAnchor).

-

For example, if the item has two anchors with id 0 and 1, this function takes one of these anchor ids and returns the respective pixel points of the specified anchor.

-
See also
createAnchor
- -

Reimplemented in QCPItemText, QCPItemPixmap, QCPItemBracket, QCPItemEllipse, and QCPItemRect.

- -
-
- -

§ rectDistance()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPAbstractItem::rectDistance (const QRectF & rect,
const QPointF & pos,
bool filledRect 
) const
-
-protected
-
-

A convenience function which returns the selectTest value for a specified rect and a specified click position pos. filledRect defines whether a click inside the rect should also be considered a hit or whether only the rect border is sensitive to hits.

-

This function may be used to help with the implementation of the selectTest function for specific items.

-

For example, if your item consists of four rects, call this function four times, once for each rect, in your selectTest reimplementation. Finally, return the minimum (non -1) of all four returned values.

- -
-
- -

§ createPosition()

- -
-
- - - - - -
- - - - - - - - -
QCPItemPosition * QCPAbstractItem::createPosition (const QString & name)
-
-protected
-
-

Creates a QCPItemPosition, registers it with this item and returns a pointer to it. The specified name must be a unique string that is usually identical to the variable name of the position member (This is needed to provide the name-based position access to positions).

-

Don't delete positions created by this function manually, as the item will take care of it.

-

Use this function in the constructor (initialization list) of the specific item subclass to create each position member. Don't create QCPItemPositions with new yourself, because they won't be registered with the item properly.

-
See also
createAnchor
- -
-
- -

§ createAnchor()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPItemAnchor * QCPAbstractItem::createAnchor (const QString & name,
int anchorId 
)
-
-protected
-
-

Creates a QCPItemAnchor, registers it with this item and returns a pointer to it. The specified name must be a unique string that is usually identical to the variable name of the anchor member (This is needed to provide the name based anchor access to anchors).

-

The anchorId must be a number identifying the created anchor. It is recommended to create an enum (e.g. "AnchorIndex") for this on each item that uses anchors. This id is used by the anchor to identify itself when it calls QCPAbstractItem::anchorPixelPosition. That function then returns the correct pixel coordinates for the passed anchor id.

-

Don't delete anchors created by this function manually, as the item will take care of it.

-

Use this function in the constructor (initialization list) of the specific item subclass to create each anchor member. Don't create QCPItemAnchors with new yourself, because then they won't be registered with the item properly.

-
See also
createPosition
- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/item.h
  • -
  • src/item.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAbstractItem__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAbstractItem__inherit__graph.png deleted file mode 100644 index d5c266f9..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAbstractItem__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAbstractLegendItem.html b/third_party/qcustomplot/documentation/html/classQCPAbstractLegendItem.html deleted file mode 100644 index 1ed1f823..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAbstractLegendItem.html +++ /dev/null @@ -1,682 +0,0 @@ - - - - - - -QCPAbstractLegendItem Class Reference - - - - -
- -
-
QCPAbstractLegendItem Class Referenceabstract
-
-
- -

The abstract base class for all entries in a QCPLegend. - More...

-
-Inheritance diagram for QCPAbstractLegendItem:
-
-
Inheritance graph
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAbstractLegendItem (QCPLegend *parent)
 
-QCPLegendparentLegend () const
 
-QFont font () const
 
-QColor textColor () const
 
-QFont selectedFont () const
 
-QColor selectedTextColor () const
 
-bool selectable () const
 
-bool selected () const
 
void setFont (const QFont &font)
 
void setTextColor (const QColor &color)
 
void setSelectedFont (const QFont &font)
 
void setSelectedTextColor (const QColor &color)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
virtual void update (UpdatePhase phase)
 
virtual QSize minimumOuterSizeHint () const
 
virtual QSize maximumOuterSizeHint () const
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - -

-Signals

void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual QCP::Interaction selectionCategory () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual QRect clipRect () const
 
virtual void draw (QCPPainter *painter)=0
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
- Protected Functions inherited from QCPLayoutElement
virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
- Protected Functions inherited from QCPLayerable
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - -

-Additional Inherited Members

- Public Types inherited from QCPLayoutElement
enum  UpdatePhase
 
enum  SizeConstraintRect
 
-

Detailed Description

-

The abstract base class for all entries in a QCPLegend.

-

It defines a very basic interface for entries in a QCPLegend. For representing plottables in the legend, the subclass QCPPlottableLegendItem is more suitable.

-

Only derive directly from this class when you need absolute freedom (e.g. a custom legend entry that's not even associated with a plottable).

-

You must implement the following pure virtual functions:

-

You inherit the following members you may use:

- - - - -
QCPLegend *mParentLegend A pointer to the parent QCPLegend.
QFont mFont The generic font of the item. You should use this font for all or at least the most prominent text of the item.
-

Constructor & Destructor Documentation

- -

§ QCPAbstractLegendItem()

- -
-
- - - - - -
- - - - - - - - -
QCPAbstractLegendItem::QCPAbstractLegendItem (QCPLegendparent)
-
-explicit
-
-

Constructs a QCPAbstractLegendItem and associates it with the QCPLegend parent. This does not cause the item to be added to parent, so QCPLegend::addItem must be called separately.

- -
-
-

Member Function Documentation

- -

§ setFont()

- -
-
- - - - - - - - -
void QCPAbstractLegendItem::setFont (const QFont & font)
-
-

Sets the default font of this specific legend item to font.

-
See also
setTextColor, QCPLegend::setFont
- -
-
- -

§ setTextColor()

- -
-
- - - - - - - - -
void QCPAbstractLegendItem::setTextColor (const QColor & color)
-
-

Sets the default text color of this specific legend item to color.

-
See also
setFont, QCPLegend::setTextColor
- -
-
- -

§ setSelectedFont()

- -
-
- - - - - - - - -
void QCPAbstractLegendItem::setSelectedFont (const QFont & font)
-
-

When this legend item is selected, font is used to draw generic text, instead of the normal font set with setFont.

-
See also
setFont, QCPLegend::setSelectedFont
- -
-
- -

§ setSelectedTextColor()

- -
-
- - - - - - - - -
void QCPAbstractLegendItem::setSelectedTextColor (const QColor & color)
-
-

When this legend item is selected, color is used to draw generic text, instead of the normal color set with setTextColor.

-
See also
setTextColor, QCPLegend::setSelectedTextColor
- -
-
- -

§ setSelectable()

- -
-
- - - - - - - - -
void QCPAbstractLegendItem::setSelectable (bool selectable)
-
-

Sets whether this specific legend item is selectable.

-
See also
setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelected()

- -
-
- - - - - - - - -
void QCPAbstractLegendItem::setSelected (bool selected)
-
-

Sets whether this specific legend item is selected.

-

It is possible to set the selection state of this item by calling this function directly, even if setSelectable is set to false.

-
See also
setSelectableParts, QCustomPlot::setInteractions
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPAbstractLegendItem::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

Layout elements are sensitive to events inside their outer rect. If pos is within the outer rect, this method returns a value corresponding to 0.99 times the parent plot's selection tolerance. However, layout elements are not selectable by default. So if onlySelectable is true, -1.0 is returned.

-

See QCPLayerable::selectTest for a general explanation of this virtual method.

-

QCPLayoutElement subclasses may reimplement this method to provide more specific selection test behaviour.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ selectionChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractLegendItem::selectionChanged (bool selected)
-
-signal
-
-

This signal is emitted when the selection state of this legend item has changed, either by user interaction or by a direct call to setSelected.

- -
-
- -

§ selectionCategory()

- -
-
- - - - - -
- - - - - - - -
QCP::Interaction QCPAbstractLegendItem::selectionCategory () const
-
-protectedvirtual
-
-

Returns the selection category this layerable shall belong to. The selection category is used in conjunction with QCustomPlot::setInteractions to control which objects are selectable and which aren't.

-

Subclasses that don't fit any of the normal QCP::Interaction values can use QCP::iSelectOther. This is what the default implementation returns.

-
See also
QCustomPlot::setInteractions
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractLegendItem::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

This function applies the default antialiasing setting to the specified painter, using the function applyAntialiasingHint. It is the antialiasing state the painter is put in, when draw is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the draw function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.

-

First example: QCPGraph has multiple entities that have an antialiasing setting: The graph line, fills and scatters. Those can be configured via QCPGraph::setAntialiased, QCPGraph::setAntialiasedFill and QCPGraph::setAntialiasedScatters. Consequently, there isn't only the QCPGraph::applyDefaultAntialiasingHint function (which corresponds to the graph line's antialiasing), but specialized ones like QCPGraph::applyFillAntialiasingHint and QCPGraph::applyScattersAntialiasingHint. So before drawing one of those entities, QCPGraph::draw calls the respective specialized applyAntialiasingHint function.

-

Second example: QCPItemLine consists only of a line so there is only one antialiasing setting which can be controlled with QCPItemLine::setAntialiased. (This function is inherited by all layerables. The specialized functions, as seen on QCPGraph, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal QCPItemLine::applyDefaultAntialiasingHint. The QCPItemLine::draw function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the draw function is called, and that's the state it wants to draw the line with.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ clipRect()

- -
-
- - - - - -
- - - - - - - -
QRect QCPAbstractLegendItem::clipRect () const
-
-protectedvirtual
-
-

Returns the clipping rectangle of this layerable object. By default, this is the viewport of the parent QCustomPlot. Specific subclasses may reimplement this function to provide different clipping rects.

-

The returned clipping rect is set on the painter before the draw function of the respective object is called.

- -

Reimplemented from QCPLayerable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
virtual void QCPAbstractLegendItem::draw (QCPPainterpainter)
-
-protectedpure virtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Reimplemented from QCPLayoutElement.

- -

Implemented in QCPPlottableLegendItem, and QCPPolarLegendItem.

- -
-
- -

§ selectEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAbstractLegendItem::selectEvent (QMouseEvent * event,
bool additive,
const QVariant & details,
bool * selectionStateChanged 
)
-
-protectedvirtual
-
-

This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing.

-

event is the mouse event that caused the selection. additive indicates, whether the user was holding the multi-select-modifier while performing the selection (see QCustomPlot::setMultiSelectModifier). if additive is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected).

-

Every selectEvent is preceded by a call to selectTest, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent QCustomPlot). The details data you output from selectTest is fed back via details here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually details is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like QCPAxis). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked.

-

selectionStateChanged is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if additive is true, selectionStateChanged must also be set to true, because the selection toggles. If additive is false, selectionStateChanged is only set to true, if the layerable was previously unselected and now is switched to the selected state.

-
See also
selectTest, deselectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ deselectEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractLegendItem::deselectEvent (bool * selectionStateChanged)
-
-protectedvirtual
-
-

This event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to QCustomPlot::deselectAll. Subclasses should react to it by unsetting their selection appropriately.

-

just as in selectEvent, the output parameter selectionStateChanged (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively.

-
See also
selectTest, selectEvent
- -

Reimplemented from QCPLayerable.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layoutelements/layoutelement-legend.h
  • -
  • src/layoutelements/layoutelement-legend.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAbstractLegendItem__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAbstractLegendItem__inherit__graph.png deleted file mode 100644 index 84f62194..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAbstractLegendItem__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAbstractPaintBuffer.html b/third_party/qcustomplot/documentation/html/classQCPAbstractPaintBuffer.html deleted file mode 100644 index f26439e3..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAbstractPaintBuffer.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - -QCPAbstractPaintBuffer Class Reference - - - - -
- -
-
QCPAbstractPaintBuffer Class Referenceabstract
-
-
- -

The abstract base class for paint buffers, which define the rendering backend. - More...

-
-Inheritance diagram for QCPAbstractPaintBuffer:
-
-
Inheritance graph
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAbstractPaintBuffer (const QSize &size, double devicePixelRatio)
 
-QSize size () const
 
-bool invalidated () const
 
-double devicePixelRatio () const
 
void setSize (const QSize &size)
 
void setInvalidated (bool invalidated=true)
 
void setDevicePixelRatio (double ratio)
 
virtual QCPPainterstartPainting ()=0
 
virtual void donePainting ()
 
virtual void draw (QCPPainter *painter) const =0
 
virtual void clear (const QColor &color)=0
 
- - - -

-Protected Functions

virtual void reallocateBuffer ()=0
 
-

Detailed Description

-

The abstract base class for paint buffers, which define the rendering backend.

-

This abstract base class defines the basic interface that a paint buffer needs to provide in order to be usable by QCustomPlot.

-

A paint buffer manages both a surface to draw onto, and the matching paint device. The size of the surface can be changed via setSize. External classes (QCustomPlot and QCPLayer) request a painter via startPainting and then perform the draw calls. Once the painting is complete, donePainting is called, so the paint buffer implementation can do clean up if necessary. Before rendering a frame, each paint buffer is usually filled with a color using clear (usually the color is Qt::transparent), to remove the contents of the previous frame.

-

The simplest paint buffer implementation is QCPPaintBufferPixmap which allows regular software rendering via the raster engine. Hardware accelerated rendering via pixel buffers and frame buffer objects is provided by QCPPaintBufferGlPbuffer and QCPPaintBufferGlFbo. They are used automatically if QCustomPlot::setOpenGl is enabled.

-

Constructor & Destructor Documentation

- -

§ QCPAbstractPaintBuffer()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPAbstractPaintBuffer::QCPAbstractPaintBuffer (const QSize & size,
double devicePixelRatio 
)
-
-explicit
-
-

Creates a paint buffer and initializes it with the provided size and devicePixelRatio.

-

Subclasses must call their reallocateBuffer implementation in their respective constructors.

- -
-
-

Member Function Documentation

- -

§ setSize()

- -
-
- - - - - - - - -
void QCPAbstractPaintBuffer::setSize (const QSize & size)
-
-

Sets the paint buffer size.

-

The buffer is reallocated (by calling reallocateBuffer), so any painters that were obtained by startPainting are invalidated and must not be used after calling this method.

-

If size is already the current buffer size, this method does nothing.

- -
-
- -

§ setInvalidated()

- -
-
- - - - - - - - -
void QCPAbstractPaintBuffer::setInvalidated (bool invalidated = true)
-
-

Sets the invalidated flag to invalidated.

-

This mechanism is used internally in conjunction with isolated replotting of QCPLayer instances (in QCPLayer::lmBuffered mode). If QCPLayer::replot is called on a buffered layer, i.e. an isolated repaint of only that layer (and its dedicated paint buffer) is requested, QCustomPlot will decide depending on the invalidated flags of other paint buffers whether it also replots them, instead of only the layer on which the replot was called.

-

The invalidated flag is set to true when QCPLayer association has changed, i.e. if layers were added or removed from this buffer, or if they were reordered. It is set to false as soon as all associated QCPLayer instances are drawn onto the buffer.

-

Under normal circumstances, it is not necessary to manually call this method.

- -
-
- -

§ setDevicePixelRatio()

- -
-
- - - - - - - - -
void QCPAbstractPaintBuffer::setDevicePixelRatio (double ratio)
-
-

Sets the device pixel ratio to ratio. This is useful to render on high-DPI output devices. The ratio is automatically set to the device pixel ratio used by the parent QCustomPlot instance.

-

The buffer is reallocated (by calling reallocateBuffer), so any painters that were obtained by startPainting are invalidated and must not be used after calling this method.

-
Note
This method is only available for Qt versions 5.4 and higher.
- -
-
- -

§ startPainting()

- -
-
- - - - - -
- - - - - - - -
QCPPainter * QCPAbstractPaintBuffer::startPainting ()
-
-pure virtual
-
-

Returns a QCPPainter which is ready to draw to this buffer. The ownership and thus the responsibility to delete the painter after the painting operations are complete is given to the caller of this method.

-

Once you are done using the painter, delete the painter and call donePainting.

-

While a painter generated with this method is active, you must not call setSize, setDevicePixelRatio or clear.

-

This method may return 0, if a painter couldn't be activated on the buffer. This usually indicates a problem with the respective painting backend.

- -

Implemented in QCPPaintBufferGlFbo, QCPPaintBufferGlPbuffer, and QCPPaintBufferPixmap.

- -
-
- -

§ donePainting()

- -
-
- - - - - -
- - - - - - - -
void QCPAbstractPaintBuffer::donePainting ()
-
-inlinevirtual
-
-

If you have acquired a QCPPainter to paint onto this paint buffer via startPainting, call this method as soon as you are done with the painting operations and have deleted the painter.

-

paint buffer subclasses may use this method to perform any type of cleanup that is necessary. The default implementation does nothing.

- -

Reimplemented in QCPPaintBufferGlFbo.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractPaintBuffer::draw (QCPPainterpainter) const
-
-pure virtual
-
-

Draws the contents of this buffer with the provided painter. This is the method that is used to finally join all paint buffers and draw them onto the screen.

- -

Implemented in QCPPaintBufferGlFbo, QCPPaintBufferGlPbuffer, and QCPPaintBufferPixmap.

- -
-
- -

§ clear()

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractPaintBuffer::clear (const QColor & color)
-
-pure virtual
-
-

Fills the entire buffer with the provided color. To have an empty transparent buffer, use the named color Qt::transparent.

-

This method must not be called if there is currently a painter (acquired with startPainting) active.

- -

Implemented in QCPPaintBufferGlFbo, QCPPaintBufferGlPbuffer, and QCPPaintBufferPixmap.

- -
-
- -

§ reallocateBuffer()

- -
-
- - - - - -
- - - - - - - -
void QCPAbstractPaintBuffer::reallocateBuffer ()
-
-protectedpure virtual
-
-

Reallocates the internal buffer with the currently configured size (setSize) and device pixel ratio, if applicable (setDevicePixelRatio). It is called as soon as any of those properties are changed on this paint buffer.

-
Note
Subclasses of QCPAbstractPaintBuffer must call their reimplementation of this method in their constructor, to perform the first allocation (this can not be done by the base class because calling pure virtual methods in base class constructors is not possible).
- -

Implemented in QCPPaintBufferGlFbo, QCPPaintBufferGlPbuffer, and QCPPaintBufferPixmap.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/paintbuffer.h
  • -
  • src/paintbuffer.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAbstractPaintBuffer__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAbstractPaintBuffer__inherit__graph.png deleted file mode 100644 index 5f5af2ab..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAbstractPaintBuffer__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable.html b/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable.html deleted file mode 100644 index 2c1ea45b..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable.html +++ /dev/null @@ -1,1461 +0,0 @@ - - - - - - -QCPAbstractPlottable Class Reference - - - - -
- -
-
QCPAbstractPlottable Class Referenceabstract
-
-
- -

The abstract base class for all data representing objects in a plot. - More...

-
-Inheritance diagram for QCPAbstractPlottable:
-
-
Inheritance graph
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
-QString name () const
 
-bool antialiasedFill () const
 
-bool antialiasedScatters () const
 
-QPen pen () const
 
-QBrush brush () const
 
-QCPAxiskeyAxis () const
 
-QCPAxisvalueAxis () const
 
-QCP::SelectionType selectable () const
 
bool selected () const
 
QCPDataSelection selection () const
 
QCPSelectionDecoratorselectionDecorator () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (QCP::SelectionType selectable)
 
Q_SLOT void setSelection (QCPDataSelection selection)
 
void setSelectionDecorator (QCPSelectionDecorator *decorator)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const =0
 
virtual QCPPlottableInterface1Dinterface1D ()
 
virtual QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const =0
 
virtual QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const =0
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false, bool inKeyRange=false) const
 
bool addToLegend (QCPLegend *legend)
 
bool addToLegend ()
 
bool removeFromLegend (QCPLegend *legend) const
 
bool removeFromLegend () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - -

-Signals

void selectionChanged (bool selected)
 
void selectionChanged (const QCPDataSelection &selection)
 
void selectableChanged (QCP::SelectionType selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual QRect clipRect () const
 
virtual void draw (QCPPainter *painter)=0
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const =0
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
-

Detailed Description

-

The abstract base class for all data representing objects in a plot.

-

It defines a very basic interface like name, pen, brush, visibility etc. Since this class is abstract, it can't be instantiated. Use one of the subclasses or create a subclass yourself to create new ways of displaying data (see "Creating own plottables" below). Plottables that display one-dimensional data (i.e. data points have a single key dimension and one or multiple values at each key) are based off of the template subclass QCPAbstractPlottable1D, see details there.

-

All further specifics are in the subclasses, for example:

-

-Creating own plottables

-

Subclassing directly from QCPAbstractPlottable is only recommended if you wish to display two-dimensional data like QCPColorMap, i.e. two logical key dimensions and one (or more) data dimensions. If you want to display data with only one logical key dimension, you should rather derive from QCPAbstractPlottable1D.

-

If subclassing QCPAbstractPlottable directly, these are the pure virtual functions you must implement:

-

See the documentation of those functions for what they need to do.

-

For drawing your plot, you can use the coordsToPixels functions to translate a point in plot coordinates to pixel coordinates. This function is quite convenient, because it takes the orientation of the key and value axes into account for you (x and y are swapped when the key axis is vertical and the value axis horizontal). If you are worried about performance (i.e. you need to translate many points in a loop like QCPGraph), you can directly use QCPAxis::coordToPixel. However, you must then take care about the orientation of the axis yourself.

-

Here are some important members you inherit from QCPAbstractPlottable:

- - - - - - - - - - - - - - - - -
QCustomPlot *mParentPlot A pointer to the parent QCustomPlot instance. The parent plot is inferred from the axes that are passed in the constructor.
QString mName The name of the plottable.
QPen mPen The generic pen of the plottable. You should use this pen for the most prominent data representing lines in the plottable (e.g QCPGraph uses this pen for its graph lines and scatters)
QBrush mBrush The generic brush of the plottable. You should use this brush for the most prominent fillable structures in the plottable (e.g. QCPGraph uses this brush to control filling under the graph)
QPointer<QCPAxis> mKeyAxis, mValueAxis The key and value axes this plottable is attached to. Call their QCPAxis::coordToPixel functions to translate coordinates to pixels in either the key or value dimension. Make sure to check whether the pointer is nullptr before using it. If one of the axes is null, don't draw the plottable.
QCPSelectionDecorator mSelectionDecorator The currently set selection decorator which specifies how selected data of the plottable shall be drawn and decorated. When drawing your data, you must consult this decorator for the appropriate pen/brush before drawing unselected/selected data segments. Finally, you should call its QCPSelectionDecorator::drawDecoration method at the end of your draw implementation.
QCP::SelectionType mSelectable In which composition, if at all, this plottable's data may be selected. Enforcing this setting on the data selection is done by QCPAbstractPlottable automatically.
QCPDataSelection mSelection Holds the current selection state of the plottable's data, i.e. the selected data ranges (QCPDataRange).
-

Constructor & Destructor Documentation

- -

§ QCPAbstractPlottable()

- -
-
- - - - - - - - - - - - - - - - - - -
QCPAbstractPlottable::QCPAbstractPlottable (QCPAxiskeyAxis,
QCPAxisvalueAxis 
)
-
-

Constructs an abstract plottable which uses keyAxis as its key axis ("x") and valueAxis as its value axis ("y"). keyAxis and valueAxis must reside in the same QCustomPlot instance and have perpendicular orientations. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though.

-

Since QCPAbstractPlottable is an abstract class that defines the basic interface to plottables, it can't be directly instantiated.

-

You probably want one of the subclasses like QCPGraph or QCPCurve instead.

- -
-
-

Member Function Documentation

- -

§ selected()

- -
-
- - - - - -
- - - - - - - -
bool QCPAbstractPlottable::selected () const
-
-inline
-
-

Returns true if there are any data points of the plottable currently selected. Use selection to retrieve the current QCPDataSelection.

- -
-
- -

§ selection()

- -
-
- - - - - -
- - - - - - - -
QCPDataSelection QCPAbstractPlottable::selection () const
-
-inline
-
-

Returns a QCPDataSelection encompassing all the data points that are currently selected on this plottable.

-
See also
selected, setSelection, setSelectable
- -
-
- -

§ selectionDecorator()

- -
-
- - - - - -
- - - - - - - -
QCPSelectionDecorator * QCPAbstractPlottable::selectionDecorator () const
-
-inline
-
-

Provides access to the selection decorator of this plottable. The selection decorator controls how selected data ranges are drawn (e.g. their pen color and fill), see QCPSelectionDecorator for details.

-

If you wish to use an own QCPSelectionDecorator subclass, pass an instance of it to setSelectionDecorator.

- -
-
- -

§ setName()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::setName (const QString & name)
-
-

The name is the textual representation of this plottable as it is displayed in the legend (QCPLegend). It may contain any UTF-8 characters, including newlines.

- -
-
- -

§ setAntialiasedFill()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::setAntialiasedFill (bool enabled)
-
-

Sets whether fills of this plottable are drawn antialiased or not.

-

Note that this setting may be overridden by QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

- -
-
- -

§ setAntialiasedScatters()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::setAntialiasedScatters (bool enabled)
-
-

Sets whether the scatter symbols of this plottable are drawn antialiased or not.

-

Note that this setting may be overridden by QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

- -
-
- -

§ setPen()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::setPen (const QPen & pen)
-
-

The pen is used to draw basic lines that make up the plottable representation in the plot.

-

For example, the QCPGraph subclass draws its graph lines with this pen.

-
See also
setBrush
- -
-
- -

§ setBrush()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::setBrush (const QBrush & brush)
-
-

The brush is used to draw basic fills of the plottable representation in the plot. The Fill can be a color, gradient or texture, see the usage of QBrush.

-

For example, the QCPGraph subclass draws the fill under the graph with this brush, when it's not set to Qt::NoBrush.

-
See also
setPen
- -
-
- -

§ setKeyAxis()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::setKeyAxis (QCPAxisaxis)
-
-

The key axis of a plottable can be set to any axis of a QCustomPlot, as long as it is orthogonal to the plottable's value axis. This function performs no checks to make sure this is the case. The typical mathematical choice is to use the x-axis (QCustomPlot::xAxis) as key axis and the y-axis (QCustomPlot::yAxis) as value axis.

-

Normally, the key and value axes are set in the constructor of the plottable (or QCustomPlot::addGraph when working with QCPGraphs through the dedicated graph interface).

-
See also
setValueAxis
- -
-
- -

§ setValueAxis()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::setValueAxis (QCPAxisaxis)
-
-

The value axis of a plottable can be set to any axis of a QCustomPlot, as long as it is orthogonal to the plottable's key axis. This function performs no checks to make sure this is the case. The typical mathematical choice is to use the x-axis (QCustomPlot::xAxis) as key axis and the y-axis (QCustomPlot::yAxis) as value axis.

-

Normally, the key and value axes are set in the constructor of the plottable (or QCustomPlot::addGraph when working with QCPGraphs through the dedicated graph interface).

-
See also
setKeyAxis
- -
-
- -

§ setSelectable()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::setSelectable (QCP::SelectionType selectable)
-
-

Sets whether and to which granularity this plottable can be selected.

-

A selection can happen by clicking on the QCustomPlot surface (When QCustomPlot::setInteractions contains QCP::iSelectPlottables), by dragging a selection rect (When QCustomPlot::setSelectionRectMode is QCP::srmSelect), or programmatically by calling setSelection.

-
See also
setSelection, QCP::SelectionType
- -
-
- -

§ setSelection()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::setSelection (QCPDataSelection selection)
-
-

Sets which data ranges of this plottable are selected. Selected data ranges are drawn differently (e.g. color) in the plot. This can be controlled via the selection decorator (see selectionDecorator).

-

The entire selection mechanism for plottables is handled automatically when QCustomPlot::setInteractions contains iSelectPlottables. You only need to call this function when you wish to change the selection state programmatically.

-

Using setSelectable you can further specify for each plottable whether and to which granularity it is selectable. If selection is not compatible with the current QCP::SelectionType set via setSelectable, the resulting selection will be adjusted accordingly (see QCPDataSelection::enforceType).

-

emits the selectionChanged signal when selected is different from the previous selection state.

-
See also
setSelectable, selectTest
- -
-
- -

§ setSelectionDecorator()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::setSelectionDecorator (QCPSelectionDecoratordecorator)
-
-

Use this method to set an own QCPSelectionDecorator (subclass) instance. This allows you to customize the visual representation of selected data ranges further than by using the default QCPSelectionDecorator.

-

The plottable takes ownership of the decorator.

-

The currently set decorator can be accessed via selectionDecorator.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
virtual double QCPAbstractPlottable::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-pure virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Reimplemented from QCPLayerable.

- -

Implemented in QCPBars, QCPFinancial, QCPColorMap, QCPErrorBars, QCPGraph, QCPStatisticalBox, QCPCurve, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, and QCPAbstractPlottable1D< QCPCurveData >.

- -
-
- -

§ interface1D()

- -
-
- - - - - -
- - - - - - - -
QCPPlottableInterface1D * QCPAbstractPlottable::interface1D ()
-
-inlinevirtual
-
-

If this plottable is a one-dimensional plottable, i.e. it implements the QCPPlottableInterface1D, returns the this pointer with that type. Otherwise (e.g. in the case of a QCPColorMap) returns zero.

-

You can use this method to gain read access to data coordinates while holding a pointer to the abstract base class only.

- -

Reimplemented in QCPErrorBars, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, and QCPAbstractPlottable1D< QCPCurveData >.

- -
-
- -

§ getKeyRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPRange QCPAbstractPlottable::getKeyRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth 
) const
-
-pure virtual
-
-

Returns the coordinate range that all data in this plottable span in the key axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getValueRange
- -

Implemented in QCPBars, QCPErrorBars, QCPFinancial, QCPColorMap, QCPGraph, QCPStatisticalBox, and QCPCurve.

- -
-
- -

§ getValueRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPRange QCPAbstractPlottable::getValueRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth,
const QCPRangeinKeyRange = QCPRange() 
) const
-
-pure virtual
-
-

Returns the coordinate range that the data points in the specified key range (inKeyRange) span in the value axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

If inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys.

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getKeyRange
- -

Implemented in QCPBars, QCPErrorBars, QCPFinancial, QCPColorMap, QCPGraph, QCPStatisticalBox, and QCPCurve.

- -
-
- -

§ coordsToPixels() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAbstractPlottable::coordsToPixels (double key,
double value,
double & x,
double & y 
) const
-
-

Convenience function for transforming a key/value pair to pixels on the QCustomPlot surface, taking the orientations of the axes associated with this plottable into account (e.g. whether key represents x or y).

-

key and value are transformed to the coodinates in pixels and are written to x and y.

-
See also
pixelsToCoords, QCPAxis::coordToPixel
- -
-
- -

§ coordsToPixels() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
const QPointF QCPAbstractPlottable::coordsToPixels (double key,
double value 
) const
-
-

This is an overloaded function.

-

Transforms the given key and value to pixel coordinates and returns them in a QPointF.

- -
-
- -

§ pixelsToCoords() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAbstractPlottable::pixelsToCoords (double x,
double y,
double & key,
double & value 
) const
-
-

Convenience function for transforming a x/y pixel pair on the QCustomPlot surface to plot coordinates, taking the orientations of the axes associated with this plottable into account (e.g. whether key represents x or y).

-

x and y are transformed to the plot coodinates and are written to key and value.

-
See also
coordsToPixels, QCPAxis::coordToPixel
- -
-
- -

§ pixelsToCoords() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAbstractPlottable::pixelsToCoords (const QPointF & pixelPos,
double & key,
double & value 
) const
-
-

This is an overloaded function.

-

Returns the pixel input pixelPos as plot coordinates key and value.

- -
-
- -

§ rescaleAxes()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::rescaleAxes (bool onlyEnlarge = false) const
-
-

Rescales the key and value axes associated with this plottable to contain all displayed data, so the whole plottable is visible. If the scaling of an axis is logarithmic, rescaleAxes will make sure not to rescale to an illegal range i.e. a range containing different signs and/or zero. Instead it will stay in the current sign domain and ignore all parts of the plottable that lie outside of that domain.

-

onlyEnlarge makes sure the ranges are only expanded, never reduced. So it's possible to show multiple plottables in their entirety by multiple calls to rescaleAxes where the first call has onlyEnlarge set to false (the default), and all subsequent set to true.

-
See also
rescaleKeyAxis, rescaleValueAxis, QCustomPlot::rescaleAxes, QCPAxis::rescale
- -
-
- -

§ rescaleKeyAxis()

- -
-
- - - - - - - - -
void QCPAbstractPlottable::rescaleKeyAxis (bool onlyEnlarge = false) const
-
-

Rescales the key axis of the plottable so the whole plottable is visible.

-

See rescaleAxes for detailed behaviour.

- -
-
- -

§ rescaleValueAxis()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAbstractPlottable::rescaleValueAxis (bool onlyEnlarge = false,
bool inKeyRange = false 
) const
-
-

Rescales the value axis of the plottable so the whole plottable is visible. If inKeyRange is set to true, only the data points which are in the currently visible key axis range are considered.

-

Returns true if the axis was actually scaled. This might not be the case if this plottable has an invalid range, e.g. because it has no data points.

-

See rescaleAxes for detailed behaviour.

- -
-
- -

§ addToLegend() [1/2]

- -
-
- - - - - - - - -
bool QCPAbstractPlottable::addToLegend (QCPLegendlegend)
-
-

This is an overloaded function.

-

Adds this plottable to the specified legend.

-

Creates a QCPPlottableLegendItem which is inserted into the legend. Returns true on success, i.e. when the legend exists and a legend item associated with this plottable isn't already in the legend.

-

If the plottable needs a more specialized representation in the legend, you can create a corresponding subclass of QCPPlottableLegendItem and add it to the legend manually instead of calling this method.

-
See also
removeFromLegend, QCPLegend::addItem
- -
-
- -

§ addToLegend() [2/2]

- -
-
- - - - - - - -
bool QCPAbstractPlottable::addToLegend ()
-
-

This is an overloaded function.

-

Adds this plottable to the legend of the parent QCustomPlot (QCustomPlot::legend).

-
See also
removeFromLegend
- -
-
- -

§ removeFromLegend() [1/2]

- -
-
- - - - - - - - -
bool QCPAbstractPlottable::removeFromLegend (QCPLegendlegend) const
-
-

This is an overloaded function.

-

Removes the plottable from the specifed legend. This means the QCPPlottableLegendItem that is associated with this plottable is removed.

-

Returns true on success, i.e. if the legend exists and a legend item associated with this plottable was found and removed.

-
See also
addToLegend, QCPLegend::removeItem
- -
-
- -

§ removeFromLegend() [2/2]

- -
-
- - - - - - - -
bool QCPAbstractPlottable::removeFromLegend () const
-
-

This is an overloaded function.

-

Removes the plottable from the legend of the parent QCustomPlot.

-
See also
addToLegend
- -
-
- -

§ selectionChanged [1/2]

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractPlottable::selectionChanged (bool selected)
-
-signal
-
-

This signal is emitted when the selection state of this plottable has changed, either by user interaction or by a direct call to setSelection. The parameter selected indicates whether there are any points selected or not.

-
See also
selectionChanged(const QCPDataSelection &selection)
- -
-
- -

§ selectionChanged [2/2]

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractPlottable::selectionChanged (const QCPDataSelectionselection)
-
-signal
-
-

This signal is emitted when the selection state of this plottable has changed, either by user interaction or by a direct call to setSelection. The parameter selection holds the currently selected data ranges.

-
See also
selectionChanged(bool selected)
- -
-
- -

§ selectableChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractPlottable::selectableChanged (QCP::SelectionType selectable)
-
-signal
-
-

This signal is emitted when the selectability of this plottable has changed.

-
See also
setSelectable
- -
-
- -

§ clipRect()

- -
-
- - - - - -
- - - - - - - -
QRect QCPAbstractPlottable::clipRect () const
-
-protectedvirtual
-
-

Returns the clipping rectangle of this layerable object. By default, this is the viewport of the parent QCustomPlot. Specific subclasses may reimplement this function to provide different clipping rects.

-

The returned clipping rect is set on the painter before the draw function of the respective object is called.

- -

Reimplemented from QCPLayerable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
virtual void QCPAbstractPlottable::draw (QCPPainterpainter)
-
-protectedpure virtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implements QCPLayerable.

- -

Implemented in QCPBars, QCPColorMap, QCPFinancial, QCPErrorBars, QCPGraph, QCPStatisticalBox, and QCPCurve.

- -
-
- -

§ selectionCategory()

- -
-
- - - - - -
- - - - - - - -
QCP::Interaction QCPAbstractPlottable::selectionCategory () const
-
-protectedvirtual
-
-

Returns the selection category this layerable shall belong to. The selection category is used in conjunction with QCustomPlot::setInteractions to control which objects are selectable and which aren't.

-

Subclasses that don't fit any of the normal QCP::Interaction values can use QCP::iSelectOther. This is what the default implementation returns.

-
See also
QCustomPlot::setInteractions
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractPlottable::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

A convenience function to easily set the QPainter::Antialiased hint on the provided painter before drawing plottable lines.

-

This is the antialiasing state the painter passed to the draw method is in by default.

-

This function takes into account the local setting of the antialiasing flag as well as the overrides set with QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

-

For general information about this virtual method, see the base class implementation.

-
See also
setAntialiased, applyFillAntialiasingHint, applyScattersAntialiasingHint
- -

Implements QCPLayerable.

- -
-
- -

§ selectEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAbstractPlottable::selectEvent (QMouseEvent * event,
bool additive,
const QVariant & details,
bool * selectionStateChanged 
)
-
-protectedvirtual
-
-

This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing.

-

event is the mouse event that caused the selection. additive indicates, whether the user was holding the multi-select-modifier while performing the selection (see QCustomPlot::setMultiSelectModifier). if additive is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected).

-

Every selectEvent is preceded by a call to selectTest, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent QCustomPlot). The details data you output from selectTest is fed back via details here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually details is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like QCPAxis). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked.

-

selectionStateChanged is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if additive is true, selectionStateChanged must also be set to true, because the selection toggles. If additive is false, selectionStateChanged is only set to true, if the layerable was previously unselected and now is switched to the selected state.

-
See also
selectTest, deselectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ deselectEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractPlottable::deselectEvent (bool * selectionStateChanged)
-
-protectedvirtual
-
-

This event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to QCustomPlot::deselectAll. Subclasses should react to it by unsetting their selection appropriately.

-

just as in selectEvent, the output parameter selectionStateChanged (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively.

-
See also
selectTest, selectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ drawLegendIcon()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPAbstractPlottable::drawLegendIcon (QCPPainterpainter,
const QRectF & rect 
) const
-
-protectedpure virtual
-
-

called by QCPLegend::draw (via QCPPlottableLegendItem::draw) to create a graphical representation of this plottable inside rect, next to the plottable name.

-

The passed painter has its cliprect set to rect, so painting outside of rect won't appear outside the legend icon border.

- -

Implemented in QCPBars, QCPColorMap, QCPFinancial, QCPErrorBars, QCPGraph, QCPStatisticalBox, and QCPCurve.

- -
-
- -

§ applyFillAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractPlottable::applyFillAntialiasingHint (QCPPainterpainter) const
-
-protected
-
-

A convenience function to easily set the QPainter::Antialiased hint on the provided painter before drawing plottable fills.

-

This function takes into account the local setting of the antialiasing flag as well as the overrides set with QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

-
See also
setAntialiased, applyDefaultAntialiasingHint, applyScattersAntialiasingHint
- -
-
- -

§ applyScattersAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPAbstractPlottable::applyScattersAntialiasingHint (QCPPainterpainter) const
-
-protected
-
-

A convenience function to easily set the QPainter::Antialiased hint on the provided painter before drawing plottable scatter points.

-

This function takes into account the local setting of the antialiasing flag as well as the overrides set with QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

-
See also
setAntialiased, applyFillAntialiasingHint, applyDefaultAntialiasingHint
- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/plottable.h
  • -
  • src/plottable.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable1D.html b/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable1D.html deleted file mode 100644 index 1f9dc75c..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable1D.html +++ /dev/null @@ -1,821 +0,0 @@ - - - - - - -QCPAbstractPlottable1D< DataType > Class Template Reference - - - - -
- -
-
QCPAbstractPlottable1D< DataType > Class Template Reference
-
-
- -

A template base class for plottables with one-dimensional data. - More...

-
-Inheritance diagram for QCPAbstractPlottable1D< DataType >:
-
-
Inheritance graph
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAbstractPlottable1D (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
virtual int dataCount () const
 
virtual double dataMainKey (int index) const
 
virtual double dataSortKey (int index) const
 
virtual double dataMainValue (int index) const
 
virtual QCPRange dataValueRange (int index) const
 
virtual QPointF dataPixelPosition (int index) const
 
virtual bool sortKeyIsMainKey () const
 
virtual QCPDataSelection selectTestRect (const QRectF &rect, bool onlySelectable) const
 
virtual int findBegin (double sortKey, bool expandedRange=true) const
 
virtual int findEnd (double sortKey, bool expandedRange=true) const
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
virtual QCPPlottableInterface1Dinterface1D ()
 
- Public Functions inherited from QCPAbstractPlottable
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
-QString name () const
 
-bool antialiasedFill () const
 
-bool antialiasedScatters () const
 
-QPen pen () const
 
-QBrush brush () const
 
-QCPAxiskeyAxis () const
 
-QCPAxisvalueAxis () const
 
-QCP::SelectionType selectable () const
 
bool selected () const
 
QCPDataSelection selection () const
 
QCPSelectionDecoratorselectionDecorator () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (QCP::SelectionType selectable)
 
Q_SLOT void setSelection (QCPDataSelection selection)
 
void setSelectionDecorator (QCPSelectionDecorator *decorator)
 
virtual QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const =0
 
virtual QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const =0
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false, bool inKeyRange=false) const
 
bool addToLegend (QCPLegend *legend)
 
bool addToLegend ()
 
bool removeFromLegend (QCPLegend *legend) const
 
bool removeFromLegend () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

void getDataSegments (QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
 
void drawPolyline (QCPPainter *painter, const QVector< QPointF > &lineData) const
 
- Protected Functions inherited from QCPAbstractPlottable
virtual QRect clipRect () const
 
virtual void draw (QCPPainter *painter)=0
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const =0
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractPlottable
void selectionChanged (bool selected)
 
void selectionChanged (const QCPDataSelection &selection)
 
void selectableChanged (QCP::SelectionType selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

template<class DataType>
-class QCPAbstractPlottable1D< DataType >

- -

A template base class for plottables with one-dimensional data.

-

This template class derives from QCPAbstractPlottable and from the abstract interface QCPPlottableInterface1D. It serves as a base class for all one-dimensional data (i.e. data with one key dimension), such as QCPGraph and QCPCurve.

-

The template parameter DataType is the type of the data points of this plottable (e.g. QCPGraphData or QCPCurveData). The main purpose of this base class is to provide the member mDataContainer (a shared pointer to a QCPDataContainer<DataType>) and implement the according virtual methods of the QCPPlottableInterface1D, such that most subclassed plottables don't need to worry about this anymore.

-

Further, it provides a convenience method for retrieving selected/unselected data segments via getDataSegments. This is useful when subclasses implement their draw method and need to draw selected segments with a different pen/brush than unselected segments (also see QCPSelectionDecorator).

-

This class implements basic functionality of QCPAbstractPlottable::selectTest and QCPPlottableInterface1D::selectTestRect, assuming point-like data points, based on the 1D data interface. In spite of that, most plottable subclasses will want to reimplement those methods again, to provide a more accurate hit test based on their specific data visualization geometry.

-

Constructor & Destructor Documentation

- -

§ QCPAbstractPlottable1D()

- -
-
-
-template<class DataType >
- - - - - - - - - - - - - - - - - - -
QCPAbstractPlottable1D< DataType >::QCPAbstractPlottable1D (QCPAxiskeyAxis,
QCPAxisvalueAxis 
)
-
-

Forwards keyAxis and valueAxis to the QCPAbstractPlottable constructor and allocates the mDataContainer.

- -
-
-

Member Function Documentation

- -

§ dataCount()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - -
int QCPAbstractPlottable1D< DataType >::dataCount () const
-
-virtual
-
- -

-

Returns the number of data points of the plottable.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ dataMainKey()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - -
double QCPAbstractPlottable1D< DataType >::dataMainKey (int index) const
-
-virtual
-
- -

-

Returns the main key of the data point at the given index.

-

What the main key is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ dataSortKey()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - -
double QCPAbstractPlottable1D< DataType >::dataSortKey (int index) const
-
-virtual
-
- -

-

Returns the sort key of the data point at the given index.

-

What the sort key is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ dataMainValue()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - -
double QCPAbstractPlottable1D< DataType >::dataMainValue (int index) const
-
-virtual
-
- -

-

Returns the main value of the data point at the given index.

-

What the main value is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ dataValueRange()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - -
QCPRange QCPAbstractPlottable1D< DataType >::dataValueRange (int index) const
-
-virtual
-
- -

-

Returns the value range of the data point at the given index.

-

What the value range is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ dataPixelPosition()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - -
QPointF QCPAbstractPlottable1D< DataType >::dataPixelPosition (int index) const
-
-virtual
-
- -

-

Returns the pixel position on the widget surface at which the data point at the given index appears.

-

Usually this corresponds to the point of dataMainKey/dataMainValue, in pixel coordinates. However, depending on the plottable, this might be a different apparent position than just a coord-to-pixel transform of those values. For example, QCPBars apparent data values can be shifted depending on their stacking, bar grouping or configured base value.

- -

Implements QCPPlottableInterface1D.

- -

Reimplemented in QCPBars.

- -
-
- -

§ sortKeyIsMainKey()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - -
bool QCPAbstractPlottable1D< DataType >::sortKeyIsMainKey () const
-
-virtual
-
- -

-

Returns whether the sort key (dataSortKey) is identical to the main key (dataMainKey).

-

What the sort and main keys are, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ selectTestRect()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPDataSelection QCPAbstractPlottable1D< DataType >::selectTestRect (const QRectF & rect,
bool onlySelectable 
) const
-
-virtual
-
-

Implements a rect-selection algorithm assuming the data (accessed via the 1D data interface) is point-like. Most subclasses will want to reimplement this method again, to provide a more accurate hit test based on the true data visualization geometry.

-

For general information about this virtual method, see the base class implementation.

- -

Implements QCPPlottableInterface1D.

- -

Reimplemented in QCPBars, QCPFinancial, and QCPStatisticalBox.

- -
-
- -

§ findBegin()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - - - - - - - - - - - -
int QCPAbstractPlottable1D< DataType >::findBegin (double sortKey,
bool expandedRange = true 
) const
-
-virtual
-
- -

-

Returns the index of the data point with a (sort-)key that is equal to, just below, or just above sortKey. If expandedRange is true, the data point just below sortKey will be considered, otherwise the one just above.

-

This can be used in conjunction with findEnd to iterate over data points within a given key range, including or excluding the bounding data points that are just beyond the specified range.

-

If expandedRange is true but there are no data points below sortKey, 0 is returned.

-

If the container is empty, returns 0 (in that case, findEnd will also return 0, so a loop using these methods will not iterate over the index 0).

-
See also
findEnd, QCPDataContainer::findBegin
- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ findEnd()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - - - - - - - - - - - -
int QCPAbstractPlottable1D< DataType >::findEnd (double sortKey,
bool expandedRange = true 
) const
-
-virtual
-
- -

-

Returns the index one after the data point with a (sort-)key that is equal to, just above, or just below sortKey. If expandedRange is true, the data point just above sortKey will be considered, otherwise the one just below.

-

This can be used in conjunction with findBegin to iterate over data points within a given key range, including the bounding data points that are just below and above the specified range.

-

If expandedRange is true but there are no data points above sortKey, the index just above the highest data point is returned.

-

If the container is empty, returns 0.

-
See also
findBegin, QCPDataContainer::findEnd
- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ selectTest()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPAbstractPlottable1D< DataType >::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

Implements a point-selection algorithm assuming the data (accessed via the 1D data interface) is point-like. Most subclasses will want to reimplement this method again, to provide a more accurate hit test based on the true data visualization geometry.

-

If details is not 0, it will be set to a QCPDataSelection, describing the closest data point to pos.

-

For general information about this virtual method, see the base class implementation.

- -

Implements QCPAbstractPlottable.

- -

Reimplemented in QCPBars, QCPFinancial, QCPGraph, QCPStatisticalBox, and QCPCurve.

- -
-
- -

§ interface1D()

- -
-
-
-template<class DataType>
- - - - - -
- - - - - - - -
QCPPlottableInterface1D * QCPAbstractPlottable1D< DataType >::interface1D ()
-
-inlinevirtual
-
-

Returns a QCPPlottableInterface1D pointer to this plottable, providing access to its 1D interface.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAbstractPlottable.

- -
-
- -

§ getDataSegments()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPAbstractPlottable1D< DataType >::getDataSegments (QList< QCPDataRange > & selectedSegments,
QList< QCPDataRange > & unselectedSegments 
) const
-
-protected
-
-

Splits all data into selected and unselected segments and outputs them via selectedSegments and unselectedSegments, respectively.

-

This is useful when subclasses implement their draw method and need to draw selected segments with a different pen/brush than unselected segments (also see QCPSelectionDecorator).

-
See also
setSelection
- -
-
- -

§ drawPolyline()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPAbstractPlottable1D< DataType >::drawPolyline (QCPPainterpainter,
const QVector< QPointF > & lineData 
) const
-
-protected
-
-

A helper method which draws a line with the passed painter, according to the pixel data in lineData. NaN points create gaps in the line, as expected from QCustomPlot's plottables (this is the main difference to QPainter's regular drawPolyline, which handles NaNs by lagging or crashing).

-

Further it uses a faster line drawing technique based on QCPPainter::drawLine rather than QPainter::drawPolyline if the configured QCustomPlot::setPlottingHints() and painter style allows.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • src/plottable1d.h
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable1D__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable1D__inherit__graph.png deleted file mode 100644 index d4491101..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable1D__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable__inherit__graph.png deleted file mode 100644 index 7bd2c49a..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAbstractPlottable__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAxis.html b/third_party/qcustomplot/documentation/html/classQCPAxis.html deleted file mode 100644 index ba89554f..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAxis.html +++ /dev/null @@ -1,2712 +0,0 @@ - - - - - - -QCPAxis Class Reference - - - - - -
- -

Manages a single axis inside a QCustomPlot. - More...

-
-Inheritance diagram for QCPAxis:
-
-
Inheritance graph
- - - -
- - - - - - - - - - -

-Public Types

enum  AxisType
 
enum  LabelSide
 
enum  ScaleType
 
enum  SelectablePart
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAxis (QCPAxisRect *parent, AxisType type)
 
-AxisType axisType () const
 
-QCPAxisRectaxisRect () const
 
-ScaleType scaleType () const
 
-const QCPRange range () const
 
-bool rangeReversed () const
 
QSharedPointer< QCPAxisTickerticker () const
 
-bool ticks () const
 
-bool tickLabels () const
 
-int tickLabelPadding () const
 
-QFont tickLabelFont () const
 
-QColor tickLabelColor () const
 
-double tickLabelRotation () const
 
-LabelSide tickLabelSide () const
 
-QString numberFormat () const
 
-int numberPrecision () const
 
-QVector< double > tickVector () const
 
-QVector< QString > tickVectorLabels () const
 
-int tickLengthIn () const
 
-int tickLengthOut () const
 
-bool subTicks () const
 
-int subTickLengthIn () const
 
-int subTickLengthOut () const
 
-QPen basePen () const
 
-QPen tickPen () const
 
-QPen subTickPen () const
 
-QFont labelFont () const
 
-QColor labelColor () const
 
-QString label () const
 
-int labelPadding () const
 
-int padding () const
 
-int offset () const
 
-SelectableParts selectedParts () const
 
-SelectableParts selectableParts () const
 
-QFont selectedTickLabelFont () const
 
-QFont selectedLabelFont () const
 
-QColor selectedTickLabelColor () const
 
-QColor selectedLabelColor () const
 
-QPen selectedBasePen () const
 
-QPen selectedTickPen () const
 
-QPen selectedSubTickPen () const
 
-QCPLineEnding lowerEnding () const
 
-QCPLineEnding upperEnding () const
 
QCPGridgrid () const
 
Q_SLOT void setScaleType (QCPAxis::ScaleType type)
 
Q_SLOT void setRange (const QCPRange &range)
 
void setRange (double lower, double upper)
 
void setRange (double position, double size, Qt::AlignmentFlag alignment)
 
void setRangeLower (double lower)
 
void setRangeUpper (double upper)
 
void setRangeReversed (bool reversed)
 
void setTicker (QSharedPointer< QCPAxisTicker > ticker)
 
void setTicks (bool show)
 
void setTickLabels (bool show)
 
void setTickLabelPadding (int padding)
 
void setTickLabelFont (const QFont &font)
 
void setTickLabelColor (const QColor &color)
 
void setTickLabelRotation (double degrees)
 
void setTickLabelSide (LabelSide side)
 
void setNumberFormat (const QString &formatCode)
 
void setNumberPrecision (int precision)
 
void setTickLength (int inside, int outside=0)
 
void setTickLengthIn (int inside)
 
void setTickLengthOut (int outside)
 
void setSubTicks (bool show)
 
void setSubTickLength (int inside, int outside=0)
 
void setSubTickLengthIn (int inside)
 
void setSubTickLengthOut (int outside)
 
void setBasePen (const QPen &pen)
 
void setTickPen (const QPen &pen)
 
void setSubTickPen (const QPen &pen)
 
void setLabelFont (const QFont &font)
 
void setLabelColor (const QColor &color)
 
void setLabel (const QString &str)
 
void setLabelPadding (int padding)
 
void setPadding (int padding)
 
void setOffset (int offset)
 
void setSelectedTickLabelFont (const QFont &font)
 
void setSelectedLabelFont (const QFont &font)
 
void setSelectedTickLabelColor (const QColor &color)
 
void setSelectedLabelColor (const QColor &color)
 
void setSelectedBasePen (const QPen &pen)
 
void setSelectedTickPen (const QPen &pen)
 
void setSelectedSubTickPen (const QPen &pen)
 
Q_SLOT void setSelectableParts (const QCPAxis::SelectableParts &selectableParts)
 
Q_SLOT void setSelectedParts (const QCPAxis::SelectableParts &selectedParts)
 
void setLowerEnding (const QCPLineEnding &ending)
 
void setUpperEnding (const QCPLineEnding &ending)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
Qt::Orientation orientation () const
 
int pixelOrientation () const
 
void moveRange (double diff)
 
void scaleRange (double factor)
 
void scaleRange (double factor, double center)
 
void setScaleRatio (const QCPAxis *otherAxis, double ratio=1.0)
 
void rescale (bool onlyVisiblePlottables=false)
 
double pixelToCoord (double value) const
 
double coordToPixel (double value) const
 
SelectablePart getPartAt (const QPointF &pos) const
 
QList< QCPAbstractPlottable * > plottables () const
 
QList< QCPGraph * > graphs () const
 
QList< QCPAbstractItem * > items () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - -

-Signals

void rangeChanged (const QCPRange &newRange)
 
void rangeChanged (const QCPRange &newRange, const QCPRange &oldRange)
 
void scaleTypeChanged (QCPAxis::ScaleType scaleType)
 
void selectionChanged (const QCPAxis::SelectableParts &parts)
 
void selectableChanged (const QCPAxis::SelectableParts &parts)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - -

-Static Public Functions

static AxisType marginSideToAxisType (QCP::MarginSide side)
 
static Qt::Orientation orientation (AxisType type)
 
static AxisType opposite (AxisType type)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual int calculateMargin ()
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
virtual QCP::Interaction selectionCategory () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void wheelEvent (QWheelEvent *event)
 
void setupTickVectors ()
 
QPen getBasePen () const
 
QPen getTickPen () const
 
QPen getSubTickPen () const
 
QFont getTickLabelFont () const
 
QFont getLabelFont () const
 
QColor getTickLabelColor () const
 
QColor getLabelColor () const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual QRect clipRect () const
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
-

Detailed Description

-

Manages a single axis inside a QCustomPlot.

-

Usually doesn't need to be instantiated externally. Access QCustomPlot's default four axes via QCustomPlot::xAxis (bottom), QCustomPlot::yAxis (left), QCustomPlot::xAxis2 (top) and QCustomPlot::yAxis2 (right).

-

Axes are always part of an axis rect, see QCPAxisRect.

-AxisNamesOverview.png -
-
Naming convention of axis parts


-

-AxisRectSpacingOverview.png -
-
Overview of the spacings and paddings that define the geometry of an axis. The dashed gray line on the left represents the QCustomPlot widget border.

Each axis holds an instance of QCPAxisTicker which is used to generate the tick coordinates and tick labels. You can access the currently installed ticker or set a new one (possibly one of the specialized subclasses, or your own subclass) via setTicker. For details, see the documentation of QCPAxisTicker.

-

Member Enumeration Documentation

- -

§ AxisType

- -
-
- - - - -
enum QCPAxis::AxisType
-
-

Defines at which side of the axis rect the axis will appear. This also affects how the tick marks are drawn, on which side the labels are placed etc.

- - - - - -
Enumerator
atLeft 

0x01 Axis is vertical and on the left side of the axis rect

-
atRight 

0x02 Axis is vertical and on the right side of the axis rect

-
atTop 

0x04 Axis is horizontal and on the top side of the axis rect

-
atBottom 

0x08 Axis is horizontal and on the bottom side of the axis rect

-
- -
-
- -

§ LabelSide

- -
-
- - - - -
enum QCPAxis::LabelSide
-
-

Defines on which side of the axis the tick labels (numbers) shall appear.

-
See also
setTickLabelSide
- - - -
Enumerator
lsInside 

Tick labels will be displayed inside the axis rect and clipped to the inner axis rect.

-
lsOutside 

Tick labels will be displayed outside the axis rect.

-
- -
-
- -

§ ScaleType

- -
-
- - - - -
enum QCPAxis::ScaleType
-
-

Defines the scale of an axis.

See also
setScaleType
- - - -
Enumerator
stLinear 

Linear scaling.

-
stLogarithmic 

Logarithmic scaling with correspondingly transformed axis coordinates (possibly also setTicker to a QCPAxisTickerLog instance).

-
- -
-
- -

§ SelectablePart

- -
-
- - - - -
enum QCPAxis::SelectablePart
-
-

Defines the selectable parts of an axis.

See also
setSelectableParts, setSelectedParts
- - - - - -
Enumerator
spNone 

None of the selectable parts.

-
spAxis 

The axis backbone and tick marks.

-
spTickLabels 

Tick labels (numbers) of this axis (as a whole, not individually)

-
spAxisLabel 

The axis label.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPAxis()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPAxis::QCPAxis (QCPAxisRectparent,
AxisType type 
)
-
-explicit
-
-

Constructs an Axis instance of Type type for the axis rect parent.

-

Usually it isn't necessary to instantiate axes directly, because you can let QCustomPlot create them for you with QCPAxisRect::addAxis. If you want to use own QCPAxis-subclasses however, create them manually and then inject them also via QCPAxisRect::addAxis.

- -
-
-

Member Function Documentation

- -

§ ticker()

- -
-
- - - - - -
- - - - - - - -
QSharedPointer< QCPAxisTicker > QCPAxis::ticker () const
-
-inline
-
-

Returns a modifiable shared pointer to the currently installed axis ticker. The axis ticker is responsible for generating the tick positions and tick labels of this axis. You can access the QCPAxisTicker with this method and modify basic properties such as the approximate tick count (QCPAxisTicker::setTickCount).

-

You can gain more control over the axis ticks by setting a different QCPAxisTicker subclass, see the documentation there. A new axis ticker can be set with setTicker.

-

Since the ticker is stored in the axis as a shared pointer, multiple axes may share the same axis ticker simply by passing the same shared pointer to multiple axes.

-
See also
setTicker
- -
-
- -

§ grid()

- -
-
- - - - - -
- - - - - - - -
QCPGrid * QCPAxis::grid () const
-
-inline
-
-

Returns the QCPGrid instance belonging to this axis. Access it to set details about the way the grid is displayed.

- -
-
- -

§ setScaleType()

- -
-
- - - - - - - - -
void QCPAxis::setScaleType (QCPAxis::ScaleType type)
-
-

Sets whether the axis uses a linear scale or a logarithmic scale.

-

Note that this method controls the coordinate transformation. For logarithmic scales, you will likely also want to use a logarithmic tick spacing and labeling, which can be achieved by setting the axis ticker to an instance of QCPAxisTickerLog :

-
customPlot->xAxis->setScaleType(QCPAxis::stLogarithmic);
customPlot->xAxis->setTicker(QSharedPointer<QCPAxisTickerLog>(new QCPAxisTickerLog));

See the documentation of QCPAxisTickerLog about the details of logarithmic axis tick creation.

-

setNumberPrecision

- -
-
- -

§ setRange() [1/3]

- -
-
- - - - - - - - -
void QCPAxis::setRange (const QCPRangerange)
-
-

Sets the range of the axis.

-

This slot may be connected with the rangeChanged signal of another axis so this axis is always synchronized with the other axis range, when it changes.

-

To invert the direction of an axis, use setRangeReversed.

- -
-
- -

§ setRange() [2/3]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxis::setRange (double lower,
double upper 
)
-
-

This is an overloaded function.

-

Sets the lower and upper bound of the axis range.

-

To invert the direction of an axis, use setRangeReversed.

-

There is also a slot to set a range, see setRange(const QCPRange &range).

- -
-
- -

§ setRange() [3/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAxis::setRange (double position,
double size,
Qt::AlignmentFlag alignment 
)
-
-

This is an overloaded function.

-

Sets the range of the axis.

-

The position coordinate indicates together with the alignment parameter, where the new range will be positioned. size defines the size of the new axis range. alignment may be Qt::AlignLeft, Qt::AlignRight or Qt::AlignCenter. This will cause the left border, right border, or center of the range to be aligned with position. Any other values of alignment will default to Qt::AlignCenter.

- -
-
- -

§ setRangeLower()

- -
-
- - - - - - - - -
void QCPAxis::setRangeLower (double lower)
-
-

Sets the lower bound of the axis range. The upper bound is not changed.

See also
setRange
- -
-
- -

§ setRangeUpper()

- -
-
- - - - - - - - -
void QCPAxis::setRangeUpper (double upper)
-
-

Sets the upper bound of the axis range. The lower bound is not changed.

See also
setRange
- -
-
- -

§ setRangeReversed()

- -
-
- - - - - - - - -
void QCPAxis::setRangeReversed (bool reversed)
-
-

Sets whether the axis range (direction) is displayed reversed. Normally, the values on horizontal axes increase left to right, on vertical axes bottom to top. When reversed is set to true, the direction of increasing values is inverted.

-

Note that the range and data interface stays the same for reversed axes, e.g. the lower part of the setRange interface will still reference the mathematically smaller number than the upper part.

- -
-
- -

§ setTicker()

- -
-
- - - - - - - - -
void QCPAxis::setTicker (QSharedPointer< QCPAxisTickerticker)
-
-

The axis ticker is responsible for generating the tick positions and tick labels. See the documentation of QCPAxisTicker for details on how to work with axis tickers.

-

You can change the tick positioning/labeling behaviour of this axis by setting a different QCPAxisTicker subclass using this method. If you only wish to modify the currently installed axis ticker, access it via ticker.

-

Since the ticker is stored in the axis as a shared pointer, multiple axes may share the same axis ticker simply by passing the same shared pointer to multiple axes.

-
See also
ticker
- -
-
- -

§ setTicks()

- -
-
- - - - - - - - -
void QCPAxis::setTicks (bool show)
-
-

Sets whether tick marks are displayed.

-

Note that setting show to false does not imply that tick labels are invisible, too. To achieve that, see setTickLabels.

-
See also
setSubTicks
- -
-
- -

§ setTickLabels()

- -
-
- - - - - - - - -
void QCPAxis::setTickLabels (bool show)
-
-

Sets whether tick labels are displayed. Tick labels are the numbers drawn next to tick marks.

- -
-
- -

§ setTickLabelPadding()

- -
-
- - - - - - - - -
void QCPAxis::setTickLabelPadding (int padding)
-
-

Sets the distance between the axis base line (including any outward ticks) and the tick labels.

See also
setLabelPadding, setPadding
- -
-
- -

§ setTickLabelFont()

- -
-
- - - - - - - - -
void QCPAxis::setTickLabelFont (const QFont & font)
-
-

Sets the font of the tick labels.

-
See also
setTickLabels, setTickLabelColor
- -
-
- -

§ setTickLabelColor()

- -
-
- - - - - - - - -
void QCPAxis::setTickLabelColor (const QColor & color)
-
-

Sets the color of the tick labels.

-
See also
setTickLabels, setTickLabelFont
- -
-
- -

§ setTickLabelRotation()

- -
-
- - - - - - - - -
void QCPAxis::setTickLabelRotation (double degrees)
-
-

Sets the rotation of the tick labels. If degrees is zero, the labels are drawn normally. Else, the tick labels are drawn rotated by degrees clockwise. The specified angle is bound to values from -90 to 90 degrees.

-

If degrees is exactly -90, 0 or 90, the tick labels are centered on the tick coordinate. For other angles, the label is drawn with an offset such that it seems to point toward or away from the tick mark.

- -
-
- -

§ setTickLabelSide()

- -
-
- - - - - - - - -
void QCPAxis::setTickLabelSide (LabelSide side)
-
-

Sets whether the tick labels (numbers) shall appear inside or outside the axis rect.

-

The usual and default setting is lsOutside. Very compact plots sometimes require tick labels to be inside the axis rect, to save space. If side is set to lsInside, the tick labels appear on the inside are additionally clipped to the axis rect.

- -
-
- -

§ setNumberFormat()

- -
-
- - - - - - - - -
void QCPAxis::setNumberFormat (const QString & formatCode)
-
-

Sets the number format for the numbers in tick labels. This formatCode is an extended version of the format code used e.g. by QString::number() and QLocale::toString(). For reference about that, see the "Argument Formats" section in the detailed description of the QString class.

-

formatCode is a string of one, two or three characters.

-

The first character is identical to the normal format code used by Qt. In short, this means: 'e'/'E' scientific format, 'f' fixed format, 'g'/'G' scientific or fixed, whichever is shorter. For the 'e', 'E', and 'f' formats, the precision set by setNumberPrecision represents the number of digits after the decimal point. For the 'g' and 'G' formats, the precision represents the maximum number of significant digits, trailing zeroes are omitted.

-

The second and third characters are optional and specific to QCustomPlot:
-If the first char was 'e' or 'g', numbers are/might be displayed in the scientific format, e.g. "5.5e9", which is ugly in a plot. So when the second char of formatCode is set to 'b' (for "beautiful"), those exponential numbers are formatted in a more natural way, i.e. "5.5 -[multiplication sign] 10 [superscript] 9". By default, the multiplication sign is a centered dot. If instead a cross should be shown (as is usual in the USA), the third char of formatCode can be set to 'c'. The inserted multiplication signs are the UTF-8 characters 215 (0xD7) for the cross and 183 (0xB7) for the dot.

-

Examples for formatCode:

    -
  • g normal format code behaviour. If number is small, fixed format is used, if number is large, normal scientific format is used
  • -
  • gb If number is small, fixed format is used, if number is large, scientific format is used with beautifully typeset decimal powers and a dot as multiplication sign
  • -
  • ebc All numbers are in scientific format with beautifully typeset decimal power and a cross as multiplication sign
  • -
  • fb illegal format code, since fixed format doesn't support (or need) beautifully typeset decimal powers. Format code will be reduced to 'f'.
  • -
  • hello illegal format code, since first char is not 'e', 'E', 'f', 'g' or 'G'. Current format code will not be changed.
  • -
- -
-
- -

§ setNumberPrecision()

- -
-
- - - - - - - - -
void QCPAxis::setNumberPrecision (int precision)
-
-

Sets the precision of the tick label numbers. See QLocale::toString(double i, char f, int prec) for details. The effect of precisions are most notably for number Formats starting with 'e', see setNumberFormat

- -
-
- -

§ setTickLength()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxis::setTickLength (int inside,
int outside = 0 
)
-
-

Sets the length of the ticks in pixels. inside is the length the ticks will reach inside the plot and outside is the length they will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setSubTickLength, setTickLengthIn, setTickLengthOut
- -
-
- -

§ setTickLengthIn()

- -
-
- - - - - - - - -
void QCPAxis::setTickLengthIn (int inside)
-
-

Sets the length of the inward ticks in pixels. inside is the length the ticks will reach inside the plot.

-
See also
setTickLengthOut, setTickLength, setSubTickLength
- -
-
- -

§ setTickLengthOut()

- -
-
- - - - - - - - -
void QCPAxis::setTickLengthOut (int outside)
-
-

Sets the length of the outward ticks in pixels. outside is the length the ticks will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setTickLengthIn, setTickLength, setSubTickLength
- -
-
- -

§ setSubTicks()

- -
-
- - - - - - - - -
void QCPAxis::setSubTicks (bool show)
-
-

Sets whether sub tick marks are displayed.

-

Sub ticks are only potentially visible if (major) ticks are also visible (see setTicks)

-
See also
setTicks
- -
-
- -

§ setSubTickLength()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxis::setSubTickLength (int inside,
int outside = 0 
)
-
-

Sets the length of the subticks in pixels. inside is the length the subticks will reach inside the plot and outside is the length they will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setTickLength, setSubTickLengthIn, setSubTickLengthOut
- -
-
- -

§ setSubTickLengthIn()

- -
-
- - - - - - - - -
void QCPAxis::setSubTickLengthIn (int inside)
-
-

Sets the length of the inward subticks in pixels. inside is the length the subticks will reach inside the plot.

-
See also
setSubTickLengthOut, setSubTickLength, setTickLength
- -
-
- -

§ setSubTickLengthOut()

- -
-
- - - - - - - - -
void QCPAxis::setSubTickLengthOut (int outside)
-
-

Sets the length of the outward subticks in pixels. outside is the length the subticks will reach outside the plot. If outside is greater than zero, the tick labels will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setSubTickLengthIn, setSubTickLength, setTickLength
- -
-
- -

§ setBasePen()

- -
-
- - - - - - - - -
void QCPAxis::setBasePen (const QPen & pen)
-
-

Sets the pen, the axis base line is drawn with.

-
See also
setTickPen, setSubTickPen
- -
-
- -

§ setTickPen()

- -
-
- - - - - - - - -
void QCPAxis::setTickPen (const QPen & pen)
-
-

Sets the pen, tick marks will be drawn with.

-
See also
setTickLength, setBasePen
- -
-
- -

§ setSubTickPen()

- -
-
- - - - - - - - -
void QCPAxis::setSubTickPen (const QPen & pen)
-
-

Sets the pen, subtick marks will be drawn with.

-
See also
setSubTickCount, setSubTickLength, setBasePen
- -
-
- -

§ setLabelFont()

- -
-
- - - - - - - - -
void QCPAxis::setLabelFont (const QFont & font)
-
-

Sets the font of the axis label.

-
See also
setLabelColor
- -
-
- -

§ setLabelColor()

- -
-
- - - - - - - - -
void QCPAxis::setLabelColor (const QColor & color)
-
-

Sets the color of the axis label.

-
See also
setLabelFont
- -
-
- -

§ setLabel()

- -
-
- - - - - - - - -
void QCPAxis::setLabel (const QString & str)
-
-

Sets the text of the axis label that will be shown below/above or next to the axis, depending on its orientation. To disable axis labels, pass an empty string as str.

- -
-
- -

§ setLabelPadding()

- -
-
- - - - - - - - -
void QCPAxis::setLabelPadding (int padding)
-
-

Sets the distance between the tick labels and the axis label.

-
See also
setTickLabelPadding, setPadding
- -
-
- -

§ setPadding()

- -
-
- - - - - - - - -
void QCPAxis::setPadding (int padding)
-
-

Sets the padding of the axis.

-

When QCPAxisRect::setAutoMargins is enabled, the padding is the additional outer most space, that is left blank.

-

The axis padding has no meaning if QCPAxisRect::setAutoMargins is disabled.

-
See also
setLabelPadding, setTickLabelPadding
- -
-
- -

§ setOffset()

- -
-
- - - - - - - - -
void QCPAxis::setOffset (int offset)
-
-

Sets the offset the axis has to its axis rect side.

-

If an axis rect side has multiple axes and automatic margin calculation is enabled for that side, only the offset of the inner most axis has meaning (even if it is set to be invisible). The offset of the other, outer axes is controlled automatically, to place them at appropriate positions.

- -
-
- -

§ setSelectedTickLabelFont()

- -
-
- - - - - - - - -
void QCPAxis::setSelectedTickLabelFont (const QFont & font)
-
-

Sets the font that is used for tick labels when they are selected.

-
See also
setTickLabelFont, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedLabelFont()

- -
-
- - - - - - - - -
void QCPAxis::setSelectedLabelFont (const QFont & font)
-
-

Sets the font that is used for the axis label when it is selected.

-
See also
setLabelFont, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedTickLabelColor()

- -
-
- - - - - - - - -
void QCPAxis::setSelectedTickLabelColor (const QColor & color)
-
-

Sets the color that is used for tick labels when they are selected.

-
See also
setTickLabelColor, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedLabelColor()

- -
-
- - - - - - - - -
void QCPAxis::setSelectedLabelColor (const QColor & color)
-
-

Sets the color that is used for the axis label when it is selected.

-
See also
setLabelColor, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedBasePen()

- -
-
- - - - - - - - -
void QCPAxis::setSelectedBasePen (const QPen & pen)
-
-

Sets the pen that is used to draw the axis base line when selected.

-
See also
setBasePen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedTickPen()

- -
-
- - - - - - - - -
void QCPAxis::setSelectedTickPen (const QPen & pen)
-
-

Sets the pen that is used to draw the (major) ticks when selected.

-
See also
setTickPen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedSubTickPen()

- -
-
- - - - - - - - -
void QCPAxis::setSelectedSubTickPen (const QPen & pen)
-
-

Sets the pen that is used to draw the subticks when selected.

-
See also
setSubTickPen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectableParts()

- -
-
- - - - - - - - -
void QCPAxis::setSelectableParts (const QCPAxis::SelectableParts & selectableParts)
-
-

Sets whether the user can (de-)select the parts in selectable by clicking on the QCustomPlot surface. (When QCustomPlot::setInteractions contains iSelectAxes.)

-

However, even when selectable is set to a value not allowing the selection of a specific part, it is still possible to set the selection of this part manually, by calling setSelectedParts directly.

-
See also
SelectablePart, setSelectedParts
- -
-
- -

§ setSelectedParts()

- -
-
- - - - - - - - -
void QCPAxis::setSelectedParts (const QCPAxis::SelectableParts & selectedParts)
-
-

Sets the selected state of the respective axis parts described by SelectablePart. When a part is selected, it uses a different pen/font.

-

The entire selection mechanism for axes is handled automatically when QCustomPlot::setInteractions contains iSelectAxes. You only need to call this function when you wish to change the selection state manually.

-

This function can change the selection state of a part, independent of the setSelectableParts setting.

-

emits the selectionChanged signal when selected is different from the previous selection state.

-
See also
SelectablePart, setSelectableParts, selectTest, setSelectedBasePen, setSelectedTickPen, setSelectedSubTickPen, setSelectedTickLabelFont, setSelectedLabelFont, setSelectedTickLabelColor, setSelectedLabelColor
- -
-
- -

§ setLowerEnding()

- -
-
- - - - - - - - -
void QCPAxis::setLowerEnding (const QCPLineEndingending)
-
-

Sets the style for the lower axis ending. See the documentation of QCPLineEnding for available styles.

-

For horizontal axes, this method refers to the left ending, for vertical axes the bottom ending. Note that this meaning does not change when the axis range is reversed with setRangeReversed.

-
See also
setUpperEnding
- -
-
- -

§ setUpperEnding()

- -
-
- - - - - - - - -
void QCPAxis::setUpperEnding (const QCPLineEndingending)
-
-

Sets the style for the upper axis ending. See the documentation of QCPLineEnding for available styles.

-

For horizontal axes, this method refers to the right ending, for vertical axes the top ending. Note that this meaning does not change when the axis range is reversed with setRangeReversed.

-
See also
setLowerEnding
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPAxis::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ orientation() [1/2]

- -
-
- - - - - -
- - - - - - - -
Qt::Orientation QCPAxis::orientation () const
-
-inline
-
-

Returns the orientation of this axis. The axis orientation (horizontal or vertical) is deduced from the axis type (left, top, right or bottom).

-
See also
orientation(AxisType type), pixelOrientation
- -
-
- -

§ pixelOrientation()

- -
-
- - - - - -
- - - - - - - -
int QCPAxis::pixelOrientation () const
-
-inline
-
-

Returns which direction points towards higher coordinate values/keys, in pixel space.

-

This method returns either 1 or -1. If it returns 1, then going in the positive direction along the orientation of the axis in pixels corresponds to going from lower to higher axis coordinates. On the other hand, if this method returns -1, going to smaller pixel values corresponds to going from lower to higher axis coordinates.

-

For example, this is useful to easily shift axis coordinates by a certain amount given in pixels, without having to care about reversed or vertically aligned axes:

-
double newKey = keyAxis->pixelToCoord(keyAxis->coordToPixel(oldKey)+10*keyAxis->pixelOrientation());

newKey will then contain a key that is ten pixels towards higher keys, starting from oldKey.

- -
-
- -

§ moveRange()

- -
-
- - - - - - - - -
void QCPAxis::moveRange (double diff)
-
-

If the scale type (setScaleType) is stLinear, diff is added to the lower and upper bounds of the range. The range is simply moved by diff.

-

If the scale type is stLogarithmic, the range bounds are multiplied by diff. This corresponds to an apparent "linear" move in logarithmic scaling by a distance of log(diff).

- -
-
- -

§ scaleRange() [1/2]

- -
-
- - - - - - - - -
void QCPAxis::scaleRange (double factor)
-
-

Scales the range of this axis by factor around the center of the current axis range. For example, if factor is 2.0, then the axis range will double its size, and the point at the axis range center won't have changed its position in the QCustomPlot widget (i.e. coordinates around the center will have moved symmetrically closer).

-

If you wish to scale around a different coordinate than the current axis range center, use the overload scaleRange(double factor, double center).

- -
-
- -

§ scaleRange() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxis::scaleRange (double factor,
double center 
)
-
-

This is an overloaded function.

-

Scales the range of this axis by factor around the coordinate center. For example, if factor is 2.0, center is 1.0, then the axis range will double its size, and the point at coordinate 1.0 won't have changed its position in the QCustomPlot widget (i.e. coordinates around 1.0 will have moved symmetrically closer to 1.0).

-
See also
scaleRange(double factor)
- -
-
- -

§ setScaleRatio()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxis::setScaleRatio (const QCPAxisotherAxis,
double ratio = 1.0 
)
-
-

Scales the range of this axis to have a certain scale ratio to otherAxis. The scaling will be done around the center of the current axis range.

-

For example, if ratio is 1, this axis is the yAxis and otherAxis is xAxis, graphs plotted with those axes will appear in a 1:1 aspect ratio, independent of the aspect ratio the axis rect has.

-

This is an operation that changes the range of this axis once, it doesn't fix the scale ratio indefinitely. Note that calling this function in the constructor of the QCustomPlot's parent won't have the desired effect, since the widget dimensions aren't defined yet, and a resizeEvent will follow.

- -
-
- -

§ rescale()

- -
-
- - - - - - - - -
void QCPAxis::rescale (bool onlyVisiblePlottables = false)
-
-

Changes the axis range such that all plottables associated with this axis are fully visible in that dimension.

-
See also
QCPAbstractPlottable::rescaleAxes, QCustomPlot::rescaleAxes
- -
-
- -

§ pixelToCoord()

- -
-
- - - - - - - - -
double QCPAxis::pixelToCoord (double value) const
-
-

Transforms value, in pixel coordinates of the QCustomPlot widget, to axis coordinates.

- -
-
- -

§ coordToPixel()

- -
-
- - - - - - - - -
double QCPAxis::coordToPixel (double value) const
-
-

Transforms value, in coordinates of the axis, to pixel coordinates of the QCustomPlot widget.

- -
-
- -

§ getPartAt()

- -
-
- - - - - - - - -
QCPAxis::SelectablePart QCPAxis::getPartAt (const QPointF & pos) const
-
-

Returns the part of the axis that is hit by pos (in pixels). The return value of this function is independent of the user-selectable parts defined with setSelectableParts. Further, this function does not change the current selection state of the axis.

-

If the axis is not visible (setVisible), this function always returns spNone.

-
See also
setSelectedParts, setSelectableParts, QCustomPlot::setInteractions
- -
-
- -

§ plottables()

- -
-
- - - - - - - -
QList< QCPAbstractPlottable * > QCPAxis::plottables () const
-
-

Returns a list of all the plottables that have this axis as key or value axis.

-

If you are only interested in plottables of type QCPGraph, see graphs.

-
See also
graphs, items
- -
-
- -

§ graphs()

- -
-
- - - - - - - -
QList< QCPGraph * > QCPAxis::graphs () const
-
-

Returns a list of all the graphs that have this axis as key or value axis.

-
See also
plottables, items
- -
-
- -

§ items()

- -
-
- - - - - - - -
QList< QCPAbstractItem * > QCPAxis::items () const
-
-

Returns a list of all the items that are associated with this axis. An item is considered associated with an axis if at least one of its positions uses the axis as key or value axis.

-
See also
plottables, graphs
- -
-
- -

§ marginSideToAxisType()

- -
-
- - - - - -
- - - - - - - - -
QCPAxis::AxisType QCPAxis::marginSideToAxisType (QCP::MarginSide side)
-
-static
-
-

Transforms a margin side to the logically corresponding axis type. (QCP::msLeft to QCPAxis::atLeft, QCP::msRight to QCPAxis::atRight, etc.)

- -
-
- -

§ orientation() [2/2]

- -
-
- - - - - -
- - - - - - - - -
static Qt::Orientation QCPAxis::orientation (AxisType type)
-
-inlinestatic
-
-

Returns the orientation of the specified axis type

-
See also
orientation(), pixelOrientation
- -
-
- -

§ opposite()

- -
-
- - - - - -
- - - - - - - - -
QCPAxis::AxisType QCPAxis::opposite (QCPAxis::AxisType type)
-
-static
-
-

Returns the axis type that describes the opposite axis of an axis with the specified type.

- -
-
- -

§ rangeChanged [1/2]

- -
-
- - - - - -
- - - - - - - - -
void QCPAxis::rangeChanged (const QCPRangenewRange)
-
-signal
-
-

This signal is emitted when the range of this axis has changed. You can connect it to the setRange slot of another axis to communicate the new range to the other axis, in order for it to be synchronized.

-

You may also manipulate/correct the range with setRange in a slot connected to this signal. This is useful if for example a maximum range span shall not be exceeded, or if the lower/upper range shouldn't go beyond certain values (see QCPRange::bounded). For example, the following slot would limit the x axis to ranges between 0 and 10:

customPlot->xAxis->setRange(newRange.bounded(0, 10))
-
-
- -

§ rangeChanged [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPAxis::rangeChanged (const QCPRangenewRange,
const QCPRangeoldRange 
)
-
-signal
-
-

This is an overloaded function.

-

Additionally to the new range, this signal also provides the previous range held by the axis as oldRange.

- -
-
- -

§ scaleTypeChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPAxis::scaleTypeChanged (QCPAxis::ScaleType scaleType)
-
-signal
-
-

This signal is emitted when the scale type changes, by calls to setScaleType

- -
-
- -

§ selectionChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPAxis::selectionChanged (const QCPAxis::SelectableParts & parts)
-
-signal
-
-

This signal is emitted when the selection state of this axis has changed, either by user interaction or by a direct call to setSelectedParts.

- -
-
- -

§ selectableChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPAxis::selectableChanged (const QCPAxis::SelectableParts & parts)
-
-signal
-
-

This signal is emitted when the selectability changes, by calls to setSelectableParts

- -
-
- -

§ calculateMargin()

- -
-
- - - - - -
- - - - - - - -
int QCPAxis::calculateMargin ()
-
-protectedvirtual
-
-

Returns the appropriate outward margin for this axis. It is needed if QCPAxisRect::setAutoMargins is set to true on the parent axis rect. An axis with axis type atLeft will return an appropriate left margin, atBottom will return an appropriate bottom margin and so forth. For the calculation, this function goes through similar steps as draw, so changing one function likely requires the modification of the other one as well.

-

The margin consists of the outward tick length, tick label padding, tick label size, label padding, label size, and padding.

-

The margin is cached internally, so repeated calls while leaving the axis range, fonts, etc. unchanged are very fast.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPAxis::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

A convenience function to easily set the QPainter::Antialiased hint on the provided painter before drawing axis lines.

-

This is the antialiasing state the painter passed to the draw method is in by default.

-

This function takes into account the local setting of the antialiasing flag as well as the overrides set with QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

-

For general information about this virtual method, see the base class implementation.

-
See also
setAntialiased
- -

Implements QCPLayerable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPAxis::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws the axis with the specified painter, using the internal QCPAxisPainterPrivate instance.

-

For general information about this virtual method, see the base class implementation.

- -

Implements QCPLayerable.

- -
-
- -

§ selectionCategory()

- -
-
- - - - - -
- - - - - - - -
QCP::Interaction QCPAxis::selectionCategory () const
-
-protectedvirtual
-
-

Returns the selection category this layerable shall belong to. The selection category is used in conjunction with QCustomPlot::setInteractions to control which objects are selectable and which aren't.

-

Subclasses that don't fit any of the normal QCP::Interaction values can use QCP::iSelectOther. This is what the default implementation returns.

-
See also
QCustomPlot::setInteractions
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ selectEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAxis::selectEvent (QMouseEvent * event,
bool additive,
const QVariant & details,
bool * selectionStateChanged 
)
-
-protectedvirtual
-
-

This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing.

-

event is the mouse event that caused the selection. additive indicates, whether the user was holding the multi-select-modifier while performing the selection (see QCustomPlot::setMultiSelectModifier). if additive is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected).

-

Every selectEvent is preceded by a call to selectTest, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent QCustomPlot). The details data you output from selectTest is fed back via details here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually details is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like QCPAxis). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked.

-

selectionStateChanged is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if additive is true, selectionStateChanged must also be set to true, because the selection toggles. If additive is false, selectionStateChanged is only set to true, if the layerable was previously unselected and now is switched to the selected state.

-
See also
selectTest, deselectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ deselectEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPAxis::deselectEvent (bool * selectionStateChanged)
-
-protectedvirtual
-
-

This event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to QCustomPlot::deselectAll. Subclasses should react to it by unsetting their selection appropriately.

-

just as in selectEvent, the output parameter selectionStateChanged (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively.

-
See also
selectTest, selectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mousePressEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPAxis::mousePressEvent (QMouseEvent * event,
const QVariant & details 
)
-
-protectedvirtual
-
-

This mouse event reimplementation provides the functionality to let the user drag individual axes exclusively, by startig the drag on top of the axis.

-

For the axis to accept this event and perform the single axis drag, the parent QCPAxisRect must be configured accordingly, i.e. it must allow range dragging in the orientation of this axis (QCPAxisRect::setRangeDrag) and this axis must be a draggable axis (QCPAxisRect::setRangeDragAxes)

-

For general information about this virtual method, see the base class implementation.

-
Note
The dragging of possibly multiple axes at once by starting the drag anywhere in the axis rect is handled by the axis rect's mouse event, e.g. QCPAxisRect::mousePressEvent.
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseMoveEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPAxis::mouseMoveEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

This mouse event reimplementation provides the functionality to let the user drag individual axes exclusively, by startig the drag on top of the axis.

-

For general information about this virtual method, see the base class implementation.

-
Note
The dragging of possibly multiple axes at once by starting the drag anywhere in the axis rect is handled by the axis rect's mouse event, e.g. QCPAxisRect::mousePressEvent.
-
See also
QCPAxis::mousePressEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseReleaseEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPAxis::mouseReleaseEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

This mouse event reimplementation provides the functionality to let the user drag individual axes exclusively, by startig the drag on top of the axis.

-

For general information about this virtual method, see the base class implementation.

-
Note
The dragging of possibly multiple axes at once by starting the drag anywhere in the axis rect is handled by the axis rect's mouse event, e.g. QCPAxisRect::mousePressEvent.
-
See also
QCPAxis::mousePressEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ wheelEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPAxis::wheelEvent (QWheelEvent * event)
-
-protectedvirtual
-
-

This mouse event reimplementation provides the functionality to let the user zoom individual axes exclusively, by performing the wheel event on top of the axis.

-

For the axis to accept this event and perform the single axis zoom, the parent QCPAxisRect must be configured accordingly, i.e. it must allow range zooming in the orientation of this axis (QCPAxisRect::setRangeZoom) and this axis must be a zoomable axis (QCPAxisRect::setRangeZoomAxes)

-

For general information about this virtual method, see the base class implementation.

-
Note
The zooming of possibly multiple axes at once by performing the wheel event anywhere in the axis rect is handled by the axis rect's mouse event, e.g. QCPAxisRect::wheelEvent.
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ setupTickVectors()

- -
-
- - - - - -
- - - - - - - -
void QCPAxis::setupTickVectors ()
-
-protected
-
-

Prepares the internal tick vector, sub tick vector and tick label vector. This is done by calling QCPAxisTicker::generate on the currently installed ticker.

-

If a change in the label text/count is detected, the cached axis margin is invalidated to make sure the next margin calculation recalculates the label sizes and returns an up-to-date value.

- -
-
- -

§ getBasePen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPAxis::getBasePen () const
-
-protected
-
-

Returns the pen that is used to draw the axis base line. Depending on the selection state, this is either mSelectedBasePen or mBasePen.

- -
-
- -

§ getTickPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPAxis::getTickPen () const
-
-protected
-
-

Returns the pen that is used to draw the (major) ticks. Depending on the selection state, this is either mSelectedTickPen or mTickPen.

- -
-
- -

§ getSubTickPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPAxis::getSubTickPen () const
-
-protected
-
-

Returns the pen that is used to draw the subticks. Depending on the selection state, this is either mSelectedSubTickPen or mSubTickPen.

- -
-
- -

§ getTickLabelFont()

- -
-
- - - - - -
- - - - - - - -
QFont QCPAxis::getTickLabelFont () const
-
-protected
-
-

Returns the font that is used to draw the tick labels. Depending on the selection state, this is either mSelectedTickLabelFont or mTickLabelFont.

- -
-
- -

§ getLabelFont()

- -
-
- - - - - -
- - - - - - - -
QFont QCPAxis::getLabelFont () const
-
-protected
-
-

Returns the font that is used to draw the axis label. Depending on the selection state, this is either mSelectedLabelFont or mLabelFont.

- -
-
- -

§ getTickLabelColor()

- -
-
- - - - - -
- - - - - - - -
QColor QCPAxis::getTickLabelColor () const
-
-protected
-
-

Returns the color that is used to draw the tick labels. Depending on the selection state, this is either mSelectedTickLabelColor or mTickLabelColor.

- -
-
- -

§ getLabelColor()

- -
-
- - - - - -
- - - - - - - -
QColor QCPAxis::getLabelColor () const
-
-protected
-
-

Returns the color that is used to draw the axis label. Depending on the selection state, this is either mSelectedLabelColor or mLabelColor.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/axis/axis.h
  • -
  • src/axis/axis.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisRect.html b/third_party/qcustomplot/documentation/html/classQCPAxisRect.html deleted file mode 100644 index 0283d811..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAxisRect.html +++ /dev/null @@ -1,1880 +0,0 @@ - - - - - - -QCPAxisRect Class Reference - - - - -
- -
-
QCPAxisRect Class Reference
-
-
- -

Holds multiple axes and arranges them in a rectangular shape. - More...

-
-Inheritance diagram for QCPAxisRect:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAxisRect (QCustomPlot *parentPlot, bool setupDefaultAxes=true)
 
-QPixmap background () const
 
-QBrush backgroundBrush () const
 
-bool backgroundScaled () const
 
-Qt::AspectRatioMode backgroundScaledMode () const
 
-Qt::Orientations rangeDrag () const
 
-Qt::Orientations rangeZoom () const
 
QCPAxisrangeDragAxis (Qt::Orientation orientation)
 
QCPAxisrangeZoomAxis (Qt::Orientation orientation)
 
QList< QCPAxis * > rangeDragAxes (Qt::Orientation orientation)
 
QList< QCPAxis * > rangeZoomAxes (Qt::Orientation orientation)
 
double rangeZoomFactor (Qt::Orientation orientation)
 
void setBackground (const QPixmap &pm)
 
void setBackground (const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding)
 
void setBackground (const QBrush &brush)
 
void setBackgroundScaled (bool scaled)
 
void setBackgroundScaledMode (Qt::AspectRatioMode mode)
 
void setRangeDrag (Qt::Orientations orientations)
 
void setRangeZoom (Qt::Orientations orientations)
 
void setRangeDragAxes (QCPAxis *horizontal, QCPAxis *vertical)
 
void setRangeDragAxes (QList< QCPAxis *> axes)
 
void setRangeDragAxes (QList< QCPAxis *> horizontal, QList< QCPAxis *> vertical)
 
void setRangeZoomAxes (QCPAxis *horizontal, QCPAxis *vertical)
 
void setRangeZoomAxes (QList< QCPAxis *> axes)
 
void setRangeZoomAxes (QList< QCPAxis *> horizontal, QList< QCPAxis *> vertical)
 
void setRangeZoomFactor (double horizontalFactor, double verticalFactor)
 
void setRangeZoomFactor (double factor)
 
int axisCount (QCPAxis::AxisType type) const
 
QCPAxisaxis (QCPAxis::AxisType type, int index=0) const
 
QList< QCPAxis * > axes (QCPAxis::AxisTypes types) const
 
QList< QCPAxis * > axes () const
 
QCPAxisaddAxis (QCPAxis::AxisType type, QCPAxis *axis=nullptr)
 
QList< QCPAxis * > addAxes (QCPAxis::AxisTypes types)
 
bool removeAxis (QCPAxis *axis)
 
QCPLayoutInsetinsetLayout () const
 
void zoom (const QRectF &pixelRect)
 
void zoom (const QRectF &pixelRect, const QList< QCPAxis *> &affectedAxes)
 
void setupFullAxesBox (bool connectRanges=false)
 
QList< QCPAbstractPlottable * > plottables () const
 
QList< QCPGraph * > graphs () const
 
QList< QCPAbstractItem * > items () const
 
int left () const
 
int right () const
 
int top () const
 
int bottom () const
 
int width () const
 
int height () const
 
QSize size () const
 
QPoint topLeft () const
 
QPoint topRight () const
 
QPoint bottomLeft () const
 
QPoint bottomRight () const
 
QPoint center () const
 
virtual void update (UpdatePhase phase)
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
- Public Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
virtual QSize minimumOuterSizeHint () const
 
virtual QSize maximumOuterSizeHint () const
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void wheelEvent (QWheelEvent *event)
 
void drawBackground (QCPPainter *painter)
 
void updateAxesOffset (QCPAxis::AxisType type)
 
- Protected Functions inherited from QCPLayoutElement
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
- Protected Functions inherited from QCPLayerable
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from QCPLayoutElement
enum  UpdatePhase
 
enum  SizeConstraintRect
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

Holds multiple axes and arranges them in a rectangular shape.

-

This class represents an axis rect, a rectangular area that is bounded on all sides with an arbitrary number of axes.

-

Initially QCustomPlot has one axis rect, accessible via QCustomPlot::axisRect(). However, the layout system allows to have multiple axis rects, e.g. arranged in a grid layout (QCustomPlot::plotLayout).

-

By default, QCPAxisRect comes with four axes, at bottom, top, left and right. They can be accessed via axis by providing the respective axis type (QCPAxis::AxisType) and index. If you need all axes in the axis rect, use axes. The top and right axes are set to be invisible initially (QCPAxis::setVisible). To add more axes to a side, use addAxis or addAxes. To remove an axis, use removeAxis.

-

The axis rect layerable itself only draws a background pixmap or color, if specified (setBackground). It is placed on the "background" layer initially (see QCPLayer for an explanation of the QCustomPlot layer system). The axes that are held by the axis rect can be placed on other layers, independently of the axis rect.

-

Every axis rect has a child layout of type QCPLayoutInset. It is accessible via insetLayout and can be used to have other layout elements (or even other layouts with multiple elements) hovering inside the axis rect.

-

If an axis rect is clicked and dragged, it processes this by moving certain axis ranges. The behaviour can be controlled with setRangeDrag and setRangeDragAxes. If the mouse wheel is scrolled while the cursor is on the axis rect, certain axes are scaled. This is controllable via setRangeZoom, setRangeZoomAxes and setRangeZoomFactor. These interactions are only enabled if QCustomPlot::setInteractions contains QCP::iRangeDrag and QCP::iRangeZoom.

-
-AxisRectSpacingOverview.png -
-
Overview of the spacings and paddings that define the geometry of an axis. The dashed line on the far left indicates the viewport/widget border.

Constructor & Destructor Documentation

- -

§ QCPAxisRect()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPAxisRect::QCPAxisRect (QCustomPlotparentPlot,
bool setupDefaultAxes = true 
)
-
-explicit
-
-

Creates a QCPAxisRect instance and sets default values. An axis is added for each of the four sides, the top and right axes are set invisible initially.

- -
-
-

Member Function Documentation

- -

§ rangeDragAxis()

- -
-
- - - - - - - - -
QCPAxis * QCPAxisRect::rangeDragAxis (Qt::Orientation orientation)
-
-

Returns the range drag axis of the orientation provided. If multiple axes were set, returns the first one (use rangeDragAxes to retrieve a list with all set axes).

-
See also
setRangeDragAxes
- -
-
- -

§ rangeZoomAxis()

- -
-
- - - - - - - - -
QCPAxis * QCPAxisRect::rangeZoomAxis (Qt::Orientation orientation)
-
-

Returns the range zoom axis of the orientation provided. If multiple axes were set, returns the first one (use rangeZoomAxes to retrieve a list with all set axes).

-
See also
setRangeZoomAxes
- -
-
- -

§ rangeDragAxes()

- -
-
- - - - - - - - -
QList< QCPAxis * > QCPAxisRect::rangeDragAxes (Qt::Orientation orientation)
-
-

Returns all range drag axes of the orientation provided.

-
See also
rangeZoomAxis, setRangeZoomAxes
- -
-
- -

§ rangeZoomAxes()

- -
-
- - - - - - - - -
QList< QCPAxis * > QCPAxisRect::rangeZoomAxes (Qt::Orientation orientation)
-
-

Returns all range zoom axes of the orientation provided.

-
See also
rangeDragAxis, setRangeDragAxes
- -
-
- -

§ rangeZoomFactor()

- -
-
- - - - - - - - -
double QCPAxisRect::rangeZoomFactor (Qt::Orientation orientation)
-
-

Returns the range zoom factor of the orientation provided.

-
See also
setRangeZoomFactor
- -
-
- -

§ setBackground() [1/3]

- -
-
- - - - - - - - -
void QCPAxisRect::setBackground (const QPixmap & pm)
-
-

Sets pm as the axis background pixmap. The axis background pixmap will be drawn inside the axis rect. Since axis rects place themselves on the "background" layer by default, the axis rect backgrounds are usually drawn below everything else.

-

For cases where the provided pixmap doesn't have the same size as the axis rect, scaling can be enabled with setBackgroundScaled and the scaling mode (i.e. whether and how the aspect ratio is preserved) can be set with setBackgroundScaledMode. To set all these options in one call, consider using the overloaded version of this function.

-

Below the pixmap, the axis rect may be optionally filled with a brush, if specified with setBackground(const QBrush &brush).

-
See also
setBackgroundScaled, setBackgroundScaledMode, setBackground(const QBrush &brush)
- -
-
- -

§ setBackground() [2/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAxisRect::setBackground (const QPixmap & pm,
bool scaled,
Qt::AspectRatioMode mode = Qt::KeepAspectRatioByExpanding 
)
-
-

This is an overloaded function.

-

Allows setting the background pixmap of the axis rect, whether it shall be scaled and how it shall be scaled in one call.

-
See also
setBackground(const QPixmap &pm), setBackgroundScaled, setBackgroundScaledMode
- -
-
- -

§ setBackground() [3/3]

- -
-
- - - - - - - - -
void QCPAxisRect::setBackground (const QBrush & brush)
-
-

This is an overloaded function.

-

Sets brush as the background brush. The axis rect background will be filled with this brush. Since axis rects place themselves on the "background" layer by default, the axis rect backgrounds are usually drawn below everything else.

-

The brush will be drawn before (under) any background pixmap, which may be specified with setBackground(const QPixmap &pm).

-

To disable drawing of a background brush, set brush to Qt::NoBrush.

-
See also
setBackground(const QPixmap &pm)
- -
-
- -

§ setBackgroundScaled()

- -
-
- - - - - - - - -
void QCPAxisRect::setBackgroundScaled (bool scaled)
-
-

Sets whether the axis background pixmap shall be scaled to fit the axis rect or not. If scaled is set to true, you may control whether and how the aspect ratio of the original pixmap is preserved with setBackgroundScaledMode.

-

Note that the scaled version of the original pixmap is buffered, so there is no performance penalty on replots. (Except when the axis rect dimensions are changed continuously.)

-
See also
setBackground, setBackgroundScaledMode
- -
-
- -

§ setBackgroundScaledMode()

- -
-
- - - - - - - - -
void QCPAxisRect::setBackgroundScaledMode (Qt::AspectRatioMode mode)
-
-

If scaling of the axis background pixmap is enabled (setBackgroundScaled), use this function to define whether and how the aspect ratio of the original pixmap passed to setBackground is preserved.

See also
setBackground, setBackgroundScaled
- -
-
- -

§ setRangeDrag()

- -
-
- - - - - - - - -
void QCPAxisRect::setRangeDrag (Qt::Orientations orientations)
-
-

Sets which axis orientation may be range dragged by the user with mouse interaction. What orientation corresponds to which specific axis can be set with setRangeDragAxes(QCPAxis *horizontal, QCPAxis *vertical). By default, the horizontal axis is the bottom axis (xAxis) and the vertical axis is the left axis (yAxis).

-

To disable range dragging entirely, pass nullptr as orientations or remove QCP::iRangeDrag from QCustomPlot::setInteractions. To enable range dragging for both directions, pass Qt::Horizontal | Qt::Vertical as orientations.

-

In addition to setting orientations to a non-zero value, make sure QCustomPlot::setInteractions contains QCP::iRangeDrag to enable the range dragging interaction.

-
See also
setRangeZoom, setRangeDragAxes, QCustomPlot::setNoAntialiasingOnDrag
- -
-
- -

§ setRangeZoom()

- -
-
- - - - - - - - -
void QCPAxisRect::setRangeZoom (Qt::Orientations orientations)
-
-

Sets which axis orientation may be zoomed by the user with the mouse wheel. What orientation corresponds to which specific axis can be set with setRangeZoomAxes(QCPAxis *horizontal, QCPAxis *vertical). By default, the horizontal axis is the bottom axis (xAxis) and the vertical axis is the left axis (yAxis).

-

To disable range zooming entirely, pass nullptr as orientations or remove QCP::iRangeZoom from QCustomPlot::setInteractions. To enable range zooming for both directions, pass Qt::Horizontal | Qt::Vertical as orientations.

-

In addition to setting orientations to a non-zero value, make sure QCustomPlot::setInteractions contains QCP::iRangeZoom to enable the range zooming interaction.

-
See also
setRangeZoomFactor, setRangeZoomAxes, setRangeDrag
- -
-
- -

§ setRangeDragAxes() [1/3]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxisRect::setRangeDragAxes (QCPAxishorizontal,
QCPAxisvertical 
)
-
-

This is an overloaded function.

-

Sets the axes whose range will be dragged when setRangeDrag enables mouse range dragging on the QCustomPlot widget. Pass nullptr if no axis shall be dragged in the respective orientation.

-

Use the overload taking a list of axes, if multiple axes (more than one per orientation) shall react to dragging interactions.

-
See also
setRangeZoomAxes
- -
-
- -

§ setRangeDragAxes() [2/3]

- -
-
- - - - - - - - -
void QCPAxisRect::setRangeDragAxes (QList< QCPAxis *> axes)
-
-

This is an overloaded function.

-

This method allows to set up multiple axes to react to horizontal and vertical dragging. The drag orientation that the respective axis will react to is deduced from its orientation (QCPAxis::orientation).

-

In the unusual case that you wish to e.g. drag a vertically oriented axis with a horizontal drag motion, use the overload taking two separate lists for horizontal and vertical dragging.

- -
-
- -

§ setRangeDragAxes() [3/3]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxisRect::setRangeDragAxes (QList< QCPAxis *> horizontal,
QList< QCPAxis *> vertical 
)
-
-

This is an overloaded function.

-

This method allows to set multiple axes up to react to horizontal and vertical dragging, and define specifically which axis reacts to which drag orientation (irrespective of the axis orientation).

- -
-
- -

§ setRangeZoomAxes() [1/3]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxisRect::setRangeZoomAxes (QCPAxishorizontal,
QCPAxisvertical 
)
-
-

Sets the axes whose range will be zoomed when setRangeZoom enables mouse wheel zooming on the QCustomPlot widget. Pass nullptr if no axis shall be zoomed in the respective orientation.

-

The two axes can be zoomed with different strengths, when different factors are passed to setRangeZoomFactor(double horizontalFactor, double verticalFactor).

-

Use the overload taking a list of axes, if multiple axes (more than one per orientation) shall react to zooming interactions.

-
See also
setRangeDragAxes
- -
-
- -

§ setRangeZoomAxes() [2/3]

- -
-
- - - - - - - - -
void QCPAxisRect::setRangeZoomAxes (QList< QCPAxis *> axes)
-
-

This is an overloaded function.

-

This method allows to set up multiple axes to react to horizontal and vertical range zooming. The zoom orientation that the respective axis will react to is deduced from its orientation (QCPAxis::orientation).

-

In the unusual case that you wish to e.g. zoom a vertically oriented axis with a horizontal zoom interaction, use the overload taking two separate lists for horizontal and vertical zooming.

- -
-
- -

§ setRangeZoomAxes() [3/3]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxisRect::setRangeZoomAxes (QList< QCPAxis *> horizontal,
QList< QCPAxis *> vertical 
)
-
-

This is an overloaded function.

-

This method allows to set multiple axes up to react to horizontal and vertical zooming, and define specifically which axis reacts to which zoom orientation (irrespective of the axis orientation).

- -
-
- -

§ setRangeZoomFactor() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxisRect::setRangeZoomFactor (double horizontalFactor,
double verticalFactor 
)
-
-

Sets how strong one rotation step of the mouse wheel zooms, when range zoom was activated with setRangeZoom. The two parameters horizontalFactor and verticalFactor provide a way to let the horizontal axis zoom at different rates than the vertical axis. Which axis is horizontal and which is vertical, can be set with setRangeZoomAxes.

-

When the zoom factor is greater than one, scrolling the mouse wheel backwards (towards the user) will zoom in (make the currently visible range smaller). For zoom factors smaller than one, the same scrolling direction will zoom out.

- -
-
- -

§ setRangeZoomFactor() [2/2]

- -
-
- - - - - - - - -
void QCPAxisRect::setRangeZoomFactor (double factor)
-
-

This is an overloaded function.

-

Sets both the horizontal and vertical zoom factor.

- -
-
- -

§ axisCount()

- -
-
- - - - - - - - -
int QCPAxisRect::axisCount (QCPAxis::AxisType type) const
-
-

Returns the number of axes on the axis rect side specified with type.

-
See also
axis
- -
-
- -

§ axis()

- -
-
- - - - - - - - - - - - - - - - - - -
QCPAxis * QCPAxisRect::axis (QCPAxis::AxisType type,
int index = 0 
) const
-
-

Returns the axis with the given index on the axis rect side specified with type.

-
See also
axisCount, axes
- -
-
- -

§ axes() [1/2]

- -
-
- - - - - - - - -
QList< QCPAxis * > QCPAxisRect::axes (QCPAxis::AxisTypes types) const
-
-

Returns all axes on the axis rect sides specified with types.

-

types may be a single QCPAxis::AxisType or an or-combination, to get the axes of multiple sides.

-
See also
axis
- -
-
- -

§ axes() [2/2]

- -
-
- - - - - - - -
QList< QCPAxis * > QCPAxisRect::axes () const
-
-

This is an overloaded function.

-

Returns all axes of this axis rect.

- -
-
- -

§ addAxis()

- -
-
- - - - - - - - - - - - - - - - - - -
QCPAxis * QCPAxisRect::addAxis (QCPAxis::AxisType type,
QCPAxisaxis = nullptr 
)
-
-

Adds a new axis to the axis rect side specified with type, and returns it. If axis is 0, a new QCPAxis instance is created internally. QCustomPlot owns the returned axis, so if you want to remove an axis, use removeAxis instead of deleting it manually.

-

You may inject QCPAxis instances (or subclasses of QCPAxis) by setting axis to an axis that was previously created outside QCustomPlot. It is important to note that QCustomPlot takes ownership of the axis, so you may not delete it afterwards. Further, the axis must have been created with this axis rect as parent and with the same axis type as specified in type. If this is not the case, a debug output is generated, the axis is not added, and the method returns nullptr.

-

This method can not be used to move axis between axis rects. The same axis instance must not be added multiple times to the same or different axis rects.

-

If an axis rect side already contains one or more axes, the lower and upper endings of the new axis (QCPAxis::setLowerEnding, QCPAxis::setUpperEnding) are set to QCPLineEnding::esHalfBar.

-
See also
addAxes, setupFullAxesBox
- -
-
- -

§ addAxes()

- -
-
- - - - - - - - -
QList< QCPAxis * > QCPAxisRect::addAxes (QCPAxis::AxisTypes types)
-
-

Adds a new axis with addAxis to each axis rect side specified in types. This may be an or-combination of QCPAxis::AxisType, so axes can be added to multiple sides at once.

-

Returns a list of the added axes.

-
See also
addAxis, setupFullAxesBox
- -
-
- -

§ removeAxis()

- -
-
- - - - - - - - -
bool QCPAxisRect::removeAxis (QCPAxisaxis)
-
-

Removes the specified axis from the axis rect and deletes it.

-

Returns true on success, i.e. if axis was a valid axis in this axis rect.

-
See also
addAxis
- -
-
- -

§ insetLayout()

- -
-
- - - - - -
- - - - - - - -
QCPLayoutInset * QCPAxisRect::insetLayout () const
-
-inline
-
-

Returns the inset layout of this axis rect. It can be used to place other layout elements (or even layouts with multiple other elements) inside/on top of an axis rect.

-
See also
QCPLayoutInset
- -
-
- -

§ zoom() [1/2]

- -
-
- - - - - - - - -
void QCPAxisRect::zoom (const QRectF & pixelRect)
-
-

Zooms in (or out) to the passed rectangular region pixelRect, given in pixel coordinates.

-

All axes of this axis rect will have their range zoomed accordingly. If you only wish to zoom specific axes, use the overloaded version of this method.

-
See also
QCustomPlot::setSelectionRectMode
- -
-
- -

§ zoom() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxisRect::zoom (const QRectF & pixelRect,
const QList< QCPAxis *> & affectedAxes 
)
-
-

This is an overloaded function.

-

Zooms in (or out) to the passed rectangular region pixelRect, given in pixel coordinates.

-

Only the axes passed in affectedAxes will have their ranges zoomed accordingly.

-
See also
QCustomPlot::setSelectionRectMode
- -
-
- -

§ setupFullAxesBox()

- -
-
- - - - - - - - -
void QCPAxisRect::setupFullAxesBox (bool connectRanges = false)
-
-

Convenience function to create an axis on each side that doesn't have any axes yet and set their visibility to true. Further, the top/right axes are assigned the following properties of the bottom/left axes:

- -

Tick label visibility (QCPAxis::setTickLabels) of the right and top axes are set to false.

-

If connectRanges is true, the rangeChanged signals of the bottom and left axes are connected to the QCPAxis::setRange slots of the top and right axes.

- -
-
- -

§ plottables()

- -
-
- - - - - - - -
QList< QCPAbstractPlottable * > QCPAxisRect::plottables () const
-
-

Returns a list of all the plottables that are associated with this axis rect.

-

A plottable is considered associated with an axis rect if its key or value axis (or both) is in this axis rect.

-
See also
graphs, items
- -
-
- -

§ graphs()

- -
-
- - - - - - - -
QList< QCPGraph * > QCPAxisRect::graphs () const
-
-

Returns a list of all the graphs that are associated with this axis rect.

-

A graph is considered associated with an axis rect if its key or value axis (or both) is in this axis rect.

-
See also
plottables, items
- -
-
- -

§ items()

- -
-
- - - - - - - -
QList< QCPAbstractItem * > QCPAxisRect::items () const
-
-

Returns a list of all the items that are associated with this axis rect.

-

An item is considered associated with an axis rect if any of its positions has key or value axis set to an axis that is in this axis rect, or if any of its positions has QCPItemPosition::setAxisRect set to the axis rect, or if the clip axis rect (QCPAbstractItem::setClipAxisRect) is set to this axis rect.

-
See also
plottables, graphs
- -
-
- -

§ left()

- -
-
- - - - - -
- - - - - - - -
int QCPAxisRect::left () const
-
-inline
-
-

Returns the pixel position of the left border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ right()

- -
-
- - - - - -
- - - - - - - -
int QCPAxisRect::right () const
-
-inline
-
-

Returns the pixel position of the right border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ top()

- -
-
- - - - - -
- - - - - - - -
int QCPAxisRect::top () const
-
-inline
-
-

Returns the pixel position of the top border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ bottom()

- -
-
- - - - - -
- - - - - - - -
int QCPAxisRect::bottom () const
-
-inline
-
-

Returns the pixel position of the bottom border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ width()

- -
-
- - - - - -
- - - - - - - -
int QCPAxisRect::width () const
-
-inline
-
-

Returns the pixel width of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ height()

- -
-
- - - - - -
- - - - - - - -
int QCPAxisRect::height () const
-
-inline
-
-

Returns the pixel height of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ size()

- -
-
- - - - - -
- - - - - - - -
QSize QCPAxisRect::size () const
-
-inline
-
-

Returns the pixel size of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ topLeft()

- -
-
- - - - - -
- - - - - - - -
QPoint QCPAxisRect::topLeft () const
-
-inline
-
-

Returns the top left corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ topRight()

- -
-
- - - - - -
- - - - - - - -
QPoint QCPAxisRect::topRight () const
-
-inline
-
-

Returns the top right corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ bottomLeft()

- -
-
- - - - - -
- - - - - - - -
QPoint QCPAxisRect::bottomLeft () const
-
-inline
-
-

Returns the bottom left corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ bottomRight()

- -
-
- - - - - -
- - - - - - - -
QPoint QCPAxisRect::bottomRight () const
-
-inline
-
-

Returns the bottom right corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ center()

- -
-
- - - - - -
- - - - - - - -
QPoint QCPAxisRect::center () const
-
-inline
-
-

Returns the center of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ update()

- -
-
- - - - - -
- - - - - - - - -
void QCPAxisRect::update (UpdatePhase phase)
-
-virtual
-
-

This method is called automatically upon replot and doesn't need to be called by users of QCPAxisRect.

-

Calls the base class implementation to update the margins (see QCPLayoutElement::update), and finally passes the rect to the inset layout (insetLayout) and calls its QCPInsetLayout::update function.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ elements()

- -
-
- - - - - -
- - - - - - - - -
QList< QCPLayoutElement * > QCPAxisRect::elements (bool recursive) const
-
-virtual
-
-

Returns a list of all child elements in this layout element. If recursive is true, all sub-child elements are included in the list, too.

-
Warning
There may be nullptr entries in the returned list. For example, QCPLayoutGrid may have empty cells which yield nullptr at the respective index.
- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPAxisRect::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

This function applies the default antialiasing setting to the specified painter, using the function applyAntialiasingHint. It is the antialiasing state the painter is put in, when draw is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the draw function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.

-

First example: QCPGraph has multiple entities that have an antialiasing setting: The graph line, fills and scatters. Those can be configured via QCPGraph::setAntialiased, QCPGraph::setAntialiasedFill and QCPGraph::setAntialiasedScatters. Consequently, there isn't only the QCPGraph::applyDefaultAntialiasingHint function (which corresponds to the graph line's antialiasing), but specialized ones like QCPGraph::applyFillAntialiasingHint and QCPGraph::applyScattersAntialiasingHint. So before drawing one of those entities, QCPGraph::draw calls the respective specialized applyAntialiasingHint function.

-

Second example: QCPItemLine consists only of a line so there is only one antialiasing setting which can be controlled with QCPItemLine::setAntialiased. (This function is inherited by all layerables. The specialized functions, as seen on QCPGraph, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal QCPItemLine::applyDefaultAntialiasingHint. The QCPItemLine::draw function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the draw function is called, and that's the state it wants to draw the line with.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPAxisRect::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ calculateAutoMargin()

- -
-
- - - - - -
- - - - - - - - -
int QCPAxisRect::calculateAutoMargin (QCP::MarginSide side)
-
-protectedvirtual
-
-

Returns the margin size for this side. It is used if automatic margins is enabled for this side (see setAutoMargins). If a minimum margin was set with setMinimumMargins, the returned value will not be smaller than the specified minimum margin.

-

The default implementation just returns the respective manual margin (setMargins) or the minimum margin, whichever is larger.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ layoutChanged()

- -
-
- - - - - -
- - - - - - - -
void QCPAxisRect::layoutChanged ()
-
-protectedvirtual
-
-

Reacts to a change in layout to potentially set the convenience axis pointers QCustomPlot::xAxis, QCustomPlot::yAxis, etc. of the parent QCustomPlot to the respective axes of this axis rect. This is only done if the respective convenience pointer is currently zero and if there is no QCPAxisRect at position (0, 0) of the plot layout.

-

This automation makes it simpler to replace the main axis rect with a newly created one, without the need to manually reset the convenience pointers.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ mousePressEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPAxisRect::mousePressEvent (QMouseEvent * event,
const QVariant & details 
)
-
-protectedvirtual
-
-

Event handler for when a mouse button is pressed on the axis rect. If the left mouse button is pressed, the range dragging interaction is initialized (the actual range manipulation happens in the mouseMoveEvent).

-

The mDragging flag is set to true and some anchor points are set that are needed to determine the distance the mouse was dragged in the mouse move/release events later.

-
See also
mouseMoveEvent, mouseReleaseEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseMoveEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPAxisRect::mouseMoveEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

Event handler for when the mouse is moved on the axis rect. If range dragging was activated in a preceding mousePressEvent, the range is moved accordingly.

-
See also
mousePressEvent, mouseReleaseEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseReleaseEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPAxisRect::mouseReleaseEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

This event gets called when the user releases the mouse button, after this layerable has become the mouse grabber by accepting the preceding mousePressEvent.

-

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter startPos indicates the position where the initial mousePressEvent occurred, that started the mouse interaction.

-

The default implementation does nothing.

-
See also
mousePressEvent, mouseMoveEvent, mouseDoubleClickEvent, wheelEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ wheelEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPAxisRect::wheelEvent (QWheelEvent * event)
-
-protectedvirtual
-
-

Event handler for mouse wheel events. If rangeZoom is Qt::Horizontal, Qt::Vertical or both, the ranges of the axes defined as rangeZoomHorzAxis and rangeZoomVertAxis are scaled. The center of the scaling operation is the current cursor position inside the axis rect. The scaling factor is dependent on the mouse wheel delta (which direction the wheel was rotated) to provide a natural zooming feel. The Strength of the zoom can be controlled via setRangeZoomFactor.

-

Note, that event->angleDelta() is usually +/-120 for single rotation steps. However, if the mouse wheel is turned rapidly, many steps may bunch up to one event, so the delta may then be multiples of 120. This is taken into account here, by calculating wheelSteps and using it as exponent of the range zoom factor. This takes care of the wheel direction automatically, by inverting the factor, when the wheel step is negative (f^-1 = 1/f).

- -

Reimplemented from QCPLayerable.

- -
-
- -

§ drawBackground()

- -
-
- - - - - -
- - - - - - - - -
void QCPAxisRect::drawBackground (QCPPainterpainter)
-
-protected
-
-

Draws the background of this axis rect. It may consist of a background fill (a QBrush) and a pixmap.

-

If a brush was given via setBackground(const QBrush &brush), this function first draws an according filling inside the axis rect with the provided painter.

-

Then, if a pixmap was provided via setBackground, this function buffers the scaled version depending on setBackgroundScaled and setBackgroundScaledMode and then draws it inside the axis rect with the provided painter. The scaled version is buffered in mScaledBackgroundPixmap to prevent expensive rescaling at every redraw. It is only updated, when the axis rect has changed in a way that requires a rescale of the background pixmap (this is dependent on the setBackgroundScaledMode), or when a differend axis background pixmap was set.

-
See also
setBackground, setBackgroundScaled, setBackgroundScaledMode
- -
-
- -

§ updateAxesOffset()

- -
-
- - - - - -
- - - - - - - - -
void QCPAxisRect::updateAxesOffset (QCPAxis::AxisType type)
-
-protected
-
-

This function makes sure multiple axes on the side specified with type don't collide, but are distributed according to their respective space requirement (QCPAxis::calculateMargin).

-

It does this by setting an appropriate offset (QCPAxis::setOffset) on all axes except the one with index zero.

-

This function is called by calculateAutoMargin.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layoutelements/layoutelement-axisrect.h
  • -
  • src/layoutelements/layoutelement-axisrect.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisRect__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAxisRect__inherit__graph.png deleted file mode 100644 index 11d2566b..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAxisRect__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTicker.html b/third_party/qcustomplot/documentation/html/classQCPAxisTicker.html deleted file mode 100644 index 879d445d..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAxisTicker.html +++ /dev/null @@ -1,707 +0,0 @@ - - - - - - -QCPAxisTicker Class Reference - - - - -
- -
-
QCPAxisTicker Class Reference
-
-
- -

The base class tick generator used by QCPAxis to create tick positions and tick labels. - More...

-
-Inheritance diagram for QCPAxisTicker:
-
-
Inheritance graph
- - - - - - - - -
- - - - -

-Public Types

enum  TickStepStrategy
 
- - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAxisTicker ()
 
-TickStepStrategy tickStepStrategy () const
 
-int tickCount () const
 
-double tickOrigin () const
 
void setTickStepStrategy (TickStepStrategy strategy)
 
void setTickCount (int count)
 
void setTickOrigin (double origin)
 
virtual void generate (const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector< double > &ticks, QVector< double > *subTicks, QVector< QString > *tickLabels)
 
- - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual double getTickStep (const QCPRange &range)
 
virtual int getSubTickCount (double tickStep)
 
virtual QString getTickLabel (double tick, const QLocale &locale, QChar formatChar, int precision)
 
virtual QVector< double > createTickVector (double tickStep, const QCPRange &range)
 
virtual QVector< double > createSubTickVector (int subTickCount, const QVector< double > &ticks)
 
virtual QVector< QString > createLabelVector (const QVector< double > &ticks, const QLocale &locale, QChar formatChar, int precision)
 
void trimTicks (const QCPRange &range, QVector< double > &ticks, bool keepOneOutlier) const
 
double pickClosest (double target, const QVector< double > &candidates) const
 
double getMantissa (double input, double *magnitude=nullptr) const
 
double cleanMantissa (double input) const
 
-

Detailed Description

-

The base class tick generator used by QCPAxis to create tick positions and tick labels.

-

Each QCPAxis has an internal QCPAxisTicker (or a subclass) in order to generate tick positions and tick labels for the current axis range. The ticker of an axis can be set via QCPAxis::setTicker. Since that method takes a QSharedPointer<QCPAxisTicker>, multiple axes can share the same ticker instance.

-

This base class generates normal tick coordinates and numeric labels for linear axes. It picks a reasonable tick step (the separation between ticks) which results in readable tick labels. The number of ticks that should be approximately generated can be set via setTickCount. Depending on the current tick step strategy (setTickStepStrategy), the algorithm either sacrifices readability to better match the specified tick count (QCPAxisTicker::tssMeetTickCount) or relaxes the tick count in favor of better tick steps (QCPAxisTicker::tssReadability), which is the default.

-

The following more specialized axis ticker subclasses are available, see details in the respective class documentation:

-
- - - - - - - - - - - - -
QCPAxisTickerFixed
-axisticker-fixed.png -
-
QCPAxisTickerLog
-axisticker-log.png -
-
QCPAxisTickerPi
-axisticker-pi.png -
-
QCPAxisTickerText
-axisticker-text.png -
-
QCPAxisTickerDateTime
-axisticker-datetime.png -
-
QCPAxisTickerTime
-axisticker-time.png -
-
-axisticker-time2.png -
-
-

-Creating own axis tickers

-

Creating own axis tickers can be achieved very easily by sublassing QCPAxisTicker and reimplementing some or all of the available virtual methods.

-

In the simplest case you might wish to just generate different tick steps than the other tickers, so you only reimplement the method getTickStep. If you additionally want control over the string that will be shown as tick label, reimplement getTickLabel.

-

If you wish to have complete control, you can generate the tick vectors and tick label vectors yourself by reimplementing createTickVector and createLabelVector. The default implementations use the previously mentioned virtual methods getTickStep and getTickLabel, but your reimplementations don't necessarily need to do so. For example in the case of unequal tick steps, the method getTickStep loses its usefulness and can be ignored.

-

The sub tick count between major ticks can be controlled with getSubTickCount. Full sub tick placement control is obtained by reimplementing createSubTickVector.

-

See the documentation of all these virtual methods in QCPAxisTicker for detailed information about the parameters and expected return values.

-

Member Enumeration Documentation

- -

§ TickStepStrategy

- -
-
-

Defines the strategies that the axis ticker may follow when choosing the size of the tick step.

-
See also
setTickStepStrategy
- - - -
Enumerator
tssReadability 

A nicely readable tick step is prioritized over matching the requested number of ticks (see setTickCount)

-
tssMeetTickCount 

Less readable tick steps are allowed which in turn facilitates getting closer to the requested tick count.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPAxisTicker()

- -
-
- - - - - - - -
QCPAxisTicker::QCPAxisTicker ()
-
-

Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker.

- -
-
-

Member Function Documentation

- -

§ setTickStepStrategy()

- -
-
- - - - - - - - -
void QCPAxisTicker::setTickStepStrategy (QCPAxisTicker::TickStepStrategy strategy)
-
-

Sets which strategy the axis ticker follows when choosing the size of the tick step. For the available strategies, see TickStepStrategy.

- -
-
- -

§ setTickCount()

- -
-
- - - - - - - - -
void QCPAxisTicker::setTickCount (int count)
-
-

Sets how many ticks this ticker shall aim to generate across the axis range. Note that count is not guaranteed to be matched exactly, as generating readable tick intervals may conflict with the requested number of ticks.

-

Whether the readability has priority over meeting the requested count can be specified with setTickStepStrategy.

- -
-
- -

§ setTickOrigin()

- -
-
- - - - - - - - -
void QCPAxisTicker::setTickOrigin (double origin)
-
-

Sets the mathematical coordinate (or "offset") of the zeroth tick. This tick coordinate is just a concept and doesn't need to be inside the currently visible axis range.

-

By default origin is zero, which for example yields ticks {-5, 0, 5, 10, 15,...} when the tick step is five. If origin is now set to 1 instead, the correspondingly generated ticks would be {-4, 1, 6, 11, 16,...}.

- -
-
- -

§ generate()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAxisTicker::generate (const QCPRangerange,
const QLocale & locale,
QChar formatChar,
int precision,
QVector< double > & ticks,
QVector< double > * subTicks,
QVector< QString > * tickLabels 
)
-
-virtual
-
-

This is the method called by QCPAxis in order to actually generate tick coordinates (ticks), tick label strings (tickLabels) and sub tick coordinates (subTicks).

-

The ticks are generated for the specified range. The generated labels typically follow the specified locale, formatChar and number precision, however this might be different (or even irrelevant) for certain QCPAxisTicker subclasses.

-

The output parameter ticks is filled with the generated tick positions in axis coordinates. The output parameters subTicks and tickLabels are optional (set them to nullptr if not needed) and are respectively filled with sub tick coordinates, and tick label strings belonging to ticks by index.

- -
-
- -

§ getTickStep()

- -
-
- - - - - -
- - - - - - - - -
double QCPAxisTicker::getTickStep (const QCPRangerange)
-
-protectedvirtual
-
-

Takes the entire currently visible axis range and returns a sensible tick step in order to provide readable tick labels as well as a reasonable number of tick counts (see setTickCount, setTickStepStrategy).

-

If a QCPAxisTicker subclass only wants a different tick step behaviour than the default implementation, it should reimplement this method. See cleanMantissa for a possible helper function.

- -

Reimplemented in QCPAxisTickerPi, QCPAxisTickerDateTime, QCPAxisTickerTime, QCPAxisTickerFixed, and QCPAxisTickerText.

- -
-
- -

§ getSubTickCount()

- -
-
- - - - - -
- - - - - - - - -
int QCPAxisTicker::getSubTickCount (double tickStep)
-
-protectedvirtual
-
-

Takes the tickStep, i.e. the distance between two consecutive ticks, and returns an appropriate number of sub ticks for that specific tick step.

-

Note that a returned sub tick count of e.g. 4 will split each tick interval into 5 sections.

- -

Reimplemented in QCPAxisTickerPi, QCPAxisTickerDateTime, QCPAxisTickerTime, QCPAxisTickerText, and QCPAxisTickerLog.

- -
-
- -

§ getTickLabel()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QString QCPAxisTicker::getTickLabel (double tick,
const QLocale & locale,
QChar formatChar,
int precision 
)
-
-protectedvirtual
-
-

This method returns the tick label string as it should be printed under the tick coordinate. If a textual number is returned, it should respect the provided locale, formatChar and precision.

-

If the returned value contains exponentials of the form "2e5" and beautifully typeset powers is enabled in the QCPAxis number format (QCPAxis::setNumberFormat), the exponential part will be formatted accordingly using multiplication symbol and superscript during rendering of the label automatically.

- -

Reimplemented in QCPAxisTickerPi, QCPAxisTickerDateTime, QCPAxisTickerTime, and QCPAxisTickerText.

- -
-
- -

§ createTickVector()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QVector< double > QCPAxisTicker::createTickVector (double tickStep,
const QCPRangerange 
)
-
-protectedvirtual
-
-

Returns a vector containing all coordinates of ticks that should be drawn. The default implementation generates ticks with a spacing of tickStep (mathematically starting at the tick step origin, see setTickOrigin) distributed over the passed range.

-

In order for the axis ticker to generate proper sub ticks, it is necessary that the first and last tick coordinates returned by this method are just below/above the provided range. Otherwise the outer intervals won't contain any sub ticks.

-

If a QCPAxisTicker subclass needs maximal control over the generated ticks, it should reimplement this method. Depending on the purpose of the subclass it doesn't necessarily need to base its result on tickStep, e.g. when the ticks are spaced unequally like in the case of QCPAxisTickerLog.

- -

Reimplemented in QCPAxisTickerDateTime, QCPAxisTickerText, and QCPAxisTickerLog.

- -
-
- -

§ createSubTickVector()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QVector< double > QCPAxisTicker::createSubTickVector (int subTickCount,
const QVector< double > & ticks 
)
-
-protectedvirtual
-
-

Returns a vector containing all coordinates of sub ticks that should be drawn. It generates subTickCount sub ticks between each tick pair given in ticks.

-

If a QCPAxisTicker subclass needs maximal control over the generated sub ticks, it should reimplement this method. Depending on the purpose of the subclass it doesn't necessarily need to base its result on subTickCount or ticks.

- -
-
- -

§ createLabelVector()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QVector< QString > QCPAxisTicker::createLabelVector (const QVector< double > & ticks,
const QLocale & locale,
QChar formatChar,
int precision 
)
-
-protectedvirtual
-
-

Returns a vector containing all tick label strings corresponding to the tick coordinates provided in ticks. The default implementation calls getTickLabel to generate the respective strings.

-

It is possible but uncommon for QCPAxisTicker subclasses to reimplement this method, as reimplementing getTickLabel often achieves the intended result easier.

- -
-
- -

§ trimTicks()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAxisTicker::trimTicks (const QCPRangerange,
QVector< double > & ticks,
bool keepOneOutlier 
) const
-
-protected
-
-

Removes tick coordinates from ticks which lie outside the specified range. If keepOneOutlier is true, it preserves one tick just outside the range on both sides, if present.

-

The passed ticks must be sorted in ascending order.

- -
-
- -

§ pickClosest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
double QCPAxisTicker::pickClosest (double target,
const QVector< double > & candidates 
) const
-
-protected
-
-

Returns the coordinate contained in candidates which is closest to the provided target.

-

This method assumes candidates is not empty and sorted in ascending order.

- -
-
- -

§ getMantissa()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
double QCPAxisTicker::getMantissa (double input,
double * magnitude = nullptr 
) const
-
-protected
-
-

Returns the decimal mantissa of input. Optionally, if magnitude is not set to zero, it also returns the magnitude of input as a power of 10.

-

For example, an input of 142.6 will return a mantissa of 1.426 and a magnitude of 100.

- -
-
- -

§ cleanMantissa()

- -
-
- - - - - -
- - - - - - - - -
double QCPAxisTicker::cleanMantissa (double input) const
-
-protected
-
-

Returns a number that is close to input but has a clean, easier human readable mantissa. How strongly the mantissa is altered, and thus how strong the result deviates from the original input, depends on the current tick step strategy (see setTickStepStrategy).

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/axis/axisticker.h
  • -
  • src/axis/axisticker.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerDateTime.html b/third_party/qcustomplot/documentation/html/classQCPAxisTickerDateTime.html deleted file mode 100644 index a0a9f6e0..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAxisTickerDateTime.html +++ /dev/null @@ -1,568 +0,0 @@ - - - - - - -QCPAxisTickerDateTime Class Reference - - - - -
- -
-
QCPAxisTickerDateTime Class Reference
-
-
- -

Specialized axis ticker for calendar dates and times as axis ticks. - More...

-
-Inheritance diagram for QCPAxisTickerDateTime:
-
-
Inheritance graph
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAxisTickerDateTime ()
 
-QString dateTimeFormat () const
 
-Qt::TimeSpec dateTimeSpec () const
 
-QTimeZone timeZone () const
 
void setDateTimeFormat (const QString &format)
 
void setDateTimeSpec (Qt::TimeSpec spec)
 
void setTimeZone (const QTimeZone &zone)
 
void setTickOrigin (double origin)
 
void setTickOrigin (const QDateTime &origin)
 
- Public Functions inherited from QCPAxisTicker
 QCPAxisTicker ()
 
-TickStepStrategy tickStepStrategy () const
 
-int tickCount () const
 
-double tickOrigin () const
 
void setTickStepStrategy (TickStepStrategy strategy)
 
void setTickCount (int count)
 
void setTickOrigin (double origin)
 
virtual void generate (const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector< double > &ticks, QVector< double > *subTicks, QVector< QString > *tickLabels)
 
- - - - - - - -

-Static Public Functions

static QDateTime keyToDateTime (double key)
 
static double dateTimeToKey (const QDateTime &dateTime)
 
static double dateTimeToKey (const QDate &date, Qt::TimeSpec timeSpec=Qt::LocalTime)
 
- - - -

-Protected Types

enum  DateStrategy
 
- - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual double getTickStep (const QCPRange &range)
 
virtual int getSubTickCount (double tickStep)
 
virtual QString getTickLabel (double tick, const QLocale &locale, QChar formatChar, int precision)
 
virtual QVector< double > createTickVector (double tickStep, const QCPRange &range)
 
- Protected Functions inherited from QCPAxisTicker
virtual QVector< double > createSubTickVector (int subTickCount, const QVector< double > &ticks)
 
virtual QVector< QString > createLabelVector (const QVector< double > &ticks, const QLocale &locale, QChar formatChar, int precision)
 
void trimTicks (const QCPRange &range, QVector< double > &ticks, bool keepOneOutlier) const
 
double pickClosest (double target, const QVector< double > &candidates) const
 
double getMantissa (double input, double *magnitude=nullptr) const
 
double cleanMantissa (double input) const
 
- - - - -

-Additional Inherited Members

- Public Types inherited from QCPAxisTicker
enum  TickStepStrategy
 
-

Detailed Description

-

Specialized axis ticker for calendar dates and times as axis ticks.

-
-axisticker-datetime.png -
-

This QCPAxisTicker subclass generates ticks that correspond to real calendar dates and times. The plot axis coordinate is interpreted as Unix Time, so seconds since Epoch (January 1, 1970, 00:00 UTC). This is also used for example by QDateTime in the toTime_t()/setTime_t() methods with a precision of one second. Since Qt 4.7, millisecond accuracy can be obtained from QDateTime by using QDateTime::fromMSecsSinceEpoch()/1000.0. The static methods dateTimeToKey and keyToDateTime conveniently perform this conversion achieving a precision of one millisecond on all Qt versions.

-

The format of the date/time display in the tick labels is controlled with setDateTimeFormat. If a different time spec or time zone shall be used for the tick label appearance, see setDateTimeSpec or setTimeZone, respectively.

-

This ticker produces unequal tick spacing in order to provide intuitive date and time-of-day ticks. For example, if the axis range spans a few years such that there is one tick per year, ticks will be positioned on 1. January of every year. This is intuitive but, due to leap years, will result in slightly unequal tick intervals (visually unnoticeable). The same can be seen in the image above: even though the number of days varies month by month, this ticker generates ticks on the same day of each month.

-

If you would like to change the date/time that is used as a (mathematical) starting date for the ticks, use the setTickOrigin(const QDateTime &origin) method overload, which takes a QDateTime. If you pass 15. July, 9:45 to this method, the yearly ticks will end up on 15. July at 9:45 of every year.

-

The ticker can be created and assigned to an axis like this:

QSharedPointer<QCPAxisTickerDateTime> dateTimeTicker(new QCPAxisTickerDateTime);
customPlot->xAxis->setTicker(dateTimeTicker);
customPlot->xAxis->setRange(QCPAxisTickerDateTime::dateTimeToKey(QDate(2013, 11, 16)), QCPAxisTickerDateTime::dateTimeToKey(QDate(2015, 5, 2)));
dateTimeTicker->setDateTimeFormat("d. MMM\nyyyy");
Note
If you rather wish to display relative times in terms of days, hours, minutes, seconds and milliseconds, and are not interested in the intricacies of real calendar dates with months and (leap) years, have a look at QCPAxisTickerTime instead.
-

Constructor & Destructor Documentation

- -

§ QCPAxisTickerDateTime()

- -
-
- - - - - - - -
QCPAxisTickerDateTime::QCPAxisTickerDateTime ()
-
-

Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker.

- -
-
-

Member Function Documentation

- -

§ setDateTimeFormat()

- -
-
- - - - - - - - -
void QCPAxisTickerDateTime::setDateTimeFormat (const QString & format)
-
-

Sets the format in which dates and times are displayed as tick labels. For details about the format string, see the documentation of QDateTime::toString().

-

Typical expressions are

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
d The day as a number without a leading zero (1 to 31)
dd The day as a number with a leading zero (01 to 31)
ddd The abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses the system locale to localize the name, i.e. QLocale::system().
dddd The long localized day name (e.g. 'Monday' to 'Sunday'). Uses the system locale to localize the name, i.e. QLocale::system().
M The month as a number without a leading zero (1 to 12)
MM The month as a number with a leading zero (01 to 12)
MMM The abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses the system locale to localize the name, i.e. QLocale::system().
MMMM The long localized month name (e.g. 'January' to 'December'). Uses the system locale to localize the name, i.e. QLocale::system().
yy The year as a two digit number (00 to 99)
yyyy The year as a four digit number. If the year is negative, a minus sign is prepended, making five characters.
h The hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
hh The hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
H The hour without a leading zero (0 to 23, even with AM/PM display)
HH The hour with a leading zero (00 to 23, even with AM/PM display)
m The minute without a leading zero (0 to 59)
mm The minute with a leading zero (00 to 59)
s The whole second, without any leading zero (0 to 59)
ss The whole second, with a leading zero where applicable (00 to 59)
z The fractional part of the second, to go after a decimal point, without trailing zeroes (0 to 999). Thus "s.z" reports the seconds to full available (millisecond) precision without trailing zeroes.
zzz The fractional part of the second, to millisecond precision, including trailing zeroes where applicable (000 to 999).
AP or A Use AM/PM display. A/AP will be replaced by an upper-case version of either QLocale::amText() or QLocale::pmText().
ap or a Use am/pm display. a/ap will be replaced by a lower-case version of either QLocale::amText() or QLocale::pmText().
t The timezone (for example "CEST")
-

Newlines can be inserted with "\n", literal strings (even when containing above expressions) by encapsulating them using single-quotes. A literal single quote can be generated by using two consecutive single quotes in the format.

-
See also
setDateTimeSpec, setTimeZone
- -
-
- -

§ setDateTimeSpec()

- -
-
- - - - - - - - -
void QCPAxisTickerDateTime::setDateTimeSpec (Qt::TimeSpec spec)
-
-

Sets the time spec that is used for creating the tick labels from corresponding dates/times.

-

The default value of QDateTime objects (and also QCPAxisTickerDateTime) is Qt::LocalTime. However, if the displayed tick labels shall be given in UTC, set spec to Qt::UTC.

-

Tick labels corresponding to other time zones can be achieved with setTimeZone (which sets spec to Qt::TimeZone internally). Note that if spec is afterwards set to not be Qt::TimeZone again, the setTimeZone setting will be ignored accordingly.

-
See also
setDateTimeFormat, setTimeZone
- -
-
- -

§ setTimeZone()

- -
-
- - - - - - - - -
void QCPAxisTickerDateTime::setTimeZone (const QTimeZone & zone)
-
-

Sets the time zone that is used for creating the tick labels from corresponding dates/times. The time spec (setDateTimeSpec) is set to Qt::TimeZone.

-
See also
setDateTimeFormat, setTimeZone
- -
-
- -

§ setTickOrigin() [1/2]

- -
-
- - - - - - - - -
void QCPAxisTickerDateTime::setTickOrigin (double origin)
-
-

Sets the tick origin (see QCPAxisTicker::setTickOrigin) in seconds since Epoch (1. Jan 1970, 00:00 UTC). For the date time ticker it might be more intuitive to use the overload which directly takes a QDateTime, see setTickOrigin(const QDateTime &origin).

-

This is useful to define the month/day/time recurring at greater tick interval steps. For example, If you pass 15. July, 9:45 to this method and the tick interval happens to be one tick per year, the ticks will end up on 15. July at 9:45 of every year.

- -
-
- -

§ setTickOrigin() [2/2]

- -
-
- - - - - - - - -
void QCPAxisTickerDateTime::setTickOrigin (const QDateTime & origin)
-
-

Sets the tick origin (see QCPAxisTicker::setTickOrigin) as a QDateTime origin.

-

This is useful to define the month/day/time recurring at greater tick interval steps. For example, If you pass 15. July, 9:45 to this method and the tick interval happens to be one tick per year, the ticks will end up on 15. July at 9:45 of every year.

- -
-
- -

§ keyToDateTime()

- -
-
- - - - - -
- - - - - - - - -
QDateTime QCPAxisTickerDateTime::keyToDateTime (double key)
-
-static
-
-

A convenience method which turns key (in seconds since Epoch 1. Jan 1970, 00:00 UTC) into a QDateTime object. This can be used to turn axis coordinates to actual QDateTimes.

-

The accuracy achieved by this method is one millisecond, irrespective of the used Qt version (it works around the lack of a QDateTime::fromMSecsSinceEpoch in Qt 4.6)

-
See also
dateTimeToKey
- -
-
- -

§ dateTimeToKey() [1/2]

- -
-
- - - - - -
- - - - - - - - -
double QCPAxisTickerDateTime::dateTimeToKey (const QDateTime & dateTime)
-
-static
-
-

This is an overloaded function.

-

A convenience method which turns a QDateTime object into a double value that corresponds to seconds since Epoch (1. Jan 1970, 00:00 UTC). This is the format used as axis coordinates by QCPAxisTickerDateTime.

-

The accuracy achieved by this method is one millisecond, irrespective of the used Qt version (it works around the lack of a QDateTime::toMSecsSinceEpoch in Qt 4.6)

-
See also
keyToDateTime
- -
-
- -

§ dateTimeToKey() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
double QCPAxisTickerDateTime::dateTimeToKey (const QDate & date,
Qt::TimeSpec timeSpec = Qt::LocalTime 
)
-
-static
-
-

This is an overloaded function.

-

A convenience method which turns a QDate object into a double value that corresponds to seconds since Epoch (1. Jan 1970, 00:00 UTC). This is the format used as axis coordinates by QCPAxisTickerDateTime.

-

The returned value will be the start of the passed day of date, interpreted in the given timeSpec.

-
See also
keyToDateTime
- -
-
- -

§ getTickStep()

- -
-
- - - - - -
- - - - - - - - -
double QCPAxisTickerDateTime::getTickStep (const QCPRangerange)
-
-protectedvirtual
-
-

Returns a sensible tick step with intervals appropriate for a date-time-display, such as weekly, monthly, bi-monthly, etc.

-

Note that this tick step isn't used exactly when generating the tick vector in createTickVector, but only as a guiding value requiring some correction for each individual tick interval. Otherwise this would lead to unintuitive date displays, e.g. jumping between first day in the month to the last day in the previous month from tick to tick, due to the non-uniform length of months. The same problem arises with leap years.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ getSubTickCount()

- -
-
- - - - - -
- - - - - - - - -
int QCPAxisTickerDateTime::getSubTickCount (double tickStep)
-
-protectedvirtual
-
-

Returns a sensible sub tick count with intervals appropriate for a date-time-display, such as weekly, monthly, bi-monthly, etc.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ getTickLabel()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QString QCPAxisTickerDateTime::getTickLabel (double tick,
const QLocale & locale,
QChar formatChar,
int precision 
)
-
-protectedvirtual
-
-

Generates a date/time tick label for tick coordinate tick, based on the currently set format (setDateTimeFormat), time spec (setDateTimeSpec), and possibly time zone (setTimeZone).

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ createTickVector()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QVector< double > QCPAxisTickerDateTime::createTickVector (double tickStep,
const QCPRangerange 
)
-
-protectedvirtual
-
-

Uses the passed tickStep as a guiding value and applies corrections in order to obtain non-uniform tick intervals but intuitive tick labels, e.g. falling on the same day of each month.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/axis/axistickerdatetime.h
  • -
  • src/axis/axistickerdatetime.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerDateTime__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAxisTickerDateTime__inherit__graph.png deleted file mode 100644 index 5cf8c190..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAxisTickerDateTime__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerFixed.html b/third_party/qcustomplot/documentation/html/classQCPAxisTickerFixed.html deleted file mode 100644 index 35d38422..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAxisTickerFixed.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - -QCPAxisTickerFixed Class Reference - - - - -
- -
-
QCPAxisTickerFixed Class Reference
-
-
- -

Specialized axis ticker with a fixed tick step. - More...

-
-Inheritance diagram for QCPAxisTickerFixed:
-
-
Inheritance graph
- - - -
- - - - - - - -

-Public Types

enum  ScaleStrategy
 
- Public Types inherited from QCPAxisTicker
enum  TickStepStrategy
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAxisTickerFixed ()
 
-double tickStep () const
 
-ScaleStrategy scaleStrategy () const
 
void setTickStep (double step)
 
void setScaleStrategy (ScaleStrategy strategy)
 
- Public Functions inherited from QCPAxisTicker
 QCPAxisTicker ()
 
-TickStepStrategy tickStepStrategy () const
 
-int tickCount () const
 
-double tickOrigin () const
 
void setTickStepStrategy (TickStepStrategy strategy)
 
void setTickCount (int count)
 
void setTickOrigin (double origin)
 
virtual void generate (const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector< double > &ticks, QVector< double > *subTicks, QVector< QString > *tickLabels)
 
- - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual double getTickStep (const QCPRange &range)
 
- Protected Functions inherited from QCPAxisTicker
virtual int getSubTickCount (double tickStep)
 
virtual QString getTickLabel (double tick, const QLocale &locale, QChar formatChar, int precision)
 
virtual QVector< double > createTickVector (double tickStep, const QCPRange &range)
 
virtual QVector< double > createSubTickVector (int subTickCount, const QVector< double > &ticks)
 
virtual QVector< QString > createLabelVector (const QVector< double > &ticks, const QLocale &locale, QChar formatChar, int precision)
 
void trimTicks (const QCPRange &range, QVector< double > &ticks, bool keepOneOutlier) const
 
double pickClosest (double target, const QVector< double > &candidates) const
 
double getMantissa (double input, double *magnitude=nullptr) const
 
double cleanMantissa (double input) const
 
-

Detailed Description

-

Specialized axis ticker with a fixed tick step.

-
-axisticker-fixed.png -
-

This QCPAxisTicker subclass generates ticks with a fixed tick step set with setTickStep. It is also possible to allow integer multiples and integer powers of the specified tick step with setScaleStrategy.

-

A typical application of this ticker is to make an axis only display integers, by setting the tick step of the ticker to 1.0 and the scale strategy to ssMultiples.

-

Another case is when a certain number has a special meaning and axis ticks should only appear at multiples of that value. In this case you might also want to consider QCPAxisTickerPi because despite the name it is not limited to only pi symbols/values.

-

The ticker can be created and assigned to an axis like this:

QSharedPointer<QCPAxisTickerFixed> fixedTicker(new QCPAxisTickerFixed);
customPlot->xAxis->setTicker(fixedTicker);
fixedTicker->setTickStep(1.0); // tick step shall be 1.0
fixedTicker->setScaleStrategy(QCPAxisTickerFixed::ssNone); // and no scaling of the tickstep (like multiples or powers) is allowed

Member Enumeration Documentation

- -

§ ScaleStrategy

- -
-
-

Defines how the axis ticker may modify the specified tick step (setTickStep) in order to control the number of ticks in the axis range.

-
See also
setScaleStrategy
- - - - -
Enumerator
ssNone 

Modifications are not allowed, the specified tick step is absolutely fixed. This might cause a high tick density and overlapping labels if the axis range is zoomed out.

-
ssMultiples 

An integer multiple of the specified tick step is allowed. The used factor follows the base class properties of setTickStepStrategy and setTickCount.

-
ssPowers 

An integer power of the specified tick step is allowed.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPAxisTickerFixed()

- -
-
- - - - - - - -
QCPAxisTickerFixed::QCPAxisTickerFixed ()
-
-

Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker.

- -
-
-

Member Function Documentation

- -

§ setTickStep()

- -
-
- - - - - - - - -
void QCPAxisTickerFixed::setTickStep (double step)
-
-

Sets the fixed tick interval to step.

-

The axis ticker will only use this tick step when generating axis ticks. This might cause a very high tick density and overlapping labels if the axis range is zoomed out. Using setScaleStrategy it is possible to relax the fixed step and also allow multiples or powers of step. This will enable the ticker to reduce the number of ticks to a reasonable amount (see setTickCount).

- -
-
- -

§ setScaleStrategy()

- -
-
- - - - - - - - -
void QCPAxisTickerFixed::setScaleStrategy (QCPAxisTickerFixed::ScaleStrategy strategy)
-
-

Sets whether the specified tick step (setTickStep) is absolutely fixed or whether modifications may be applied to it before calculating the finally used tick step, such as permitting multiples or powers. See ScaleStrategy for details.

-

The default strategy is ssNone, which means the tick step is absolutely fixed.

- -
-
- -

§ getTickStep()

- -
-
- - - - - -
- - - - - - - - -
double QCPAxisTickerFixed::getTickStep (const QCPRangerange)
-
-protectedvirtual
-
-

Determines the actually used tick step from the specified tick step and scale strategy (setTickStep, setScaleStrategy).

-

This method either returns the specified tick step exactly, or, if the scale strategy is not ssNone, a modification of it to allow varying the number of ticks in the current axis range.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/axis/axistickerfixed.h
  • -
  • src/axis/axistickerfixed.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerFixed__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAxisTickerFixed__inherit__graph.png deleted file mode 100644 index f09d495e..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAxisTickerFixed__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerLog.html b/third_party/qcustomplot/documentation/html/classQCPAxisTickerLog.html deleted file mode 100644 index d2377411..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAxisTickerLog.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - -QCPAxisTickerLog Class Reference - - - - -
- -
-
QCPAxisTickerLog Class Reference
-
-
- -

Specialized axis ticker suited for logarithmic axes. - More...

-
-Inheritance diagram for QCPAxisTickerLog:
-
-
Inheritance graph
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAxisTickerLog ()
 
-double logBase () const
 
-int subTickCount () const
 
void setLogBase (double base)
 
void setSubTickCount (int subTicks)
 
- Public Functions inherited from QCPAxisTicker
 QCPAxisTicker ()
 
-TickStepStrategy tickStepStrategy () const
 
-int tickCount () const
 
-double tickOrigin () const
 
void setTickStepStrategy (TickStepStrategy strategy)
 
void setTickCount (int count)
 
void setTickOrigin (double origin)
 
virtual void generate (const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector< double > &ticks, QVector< double > *subTicks, QVector< QString > *tickLabels)
 
- - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual int getSubTickCount (double tickStep)
 
virtual QVector< double > createTickVector (double tickStep, const QCPRange &range)
 
- Protected Functions inherited from QCPAxisTicker
virtual double getTickStep (const QCPRange &range)
 
virtual QString getTickLabel (double tick, const QLocale &locale, QChar formatChar, int precision)
 
virtual QVector< double > createSubTickVector (int subTickCount, const QVector< double > &ticks)
 
virtual QVector< QString > createLabelVector (const QVector< double > &ticks, const QLocale &locale, QChar formatChar, int precision)
 
void trimTicks (const QCPRange &range, QVector< double > &ticks, bool keepOneOutlier) const
 
double pickClosest (double target, const QVector< double > &candidates) const
 
double getMantissa (double input, double *magnitude=nullptr) const
 
double cleanMantissa (double input) const
 
- - - - -

-Additional Inherited Members

- Public Types inherited from QCPAxisTicker
enum  TickStepStrategy
 
-

Detailed Description

-

Specialized axis ticker suited for logarithmic axes.

-
-axisticker-log.png -
-

This QCPAxisTicker subclass generates ticks with unequal tick intervals suited for logarithmic axis scales. The ticks are placed at powers of the specified log base (setLogBase).

-

Especially in the case of a log base equal to 10 (the default), it might be desirable to have tick labels in the form of powers of ten without mantissa display. To achieve this, set the number precision (QCPAxis::setNumberPrecision) to zero and the number format (QCPAxis::setNumberFormat) to scientific (exponential) display with beautifully typeset decimal powers, so a format string of "eb". This will result in the following axis tick labels:

-
-axisticker-log-powers.png -
-

The ticker can be created and assigned to an axis like this:

QSharedPointer<QCPAxisTickerLog> logTicker(new QCPAxisTickerLog);
customPlot->xAxis->setTicker(logTicker);
// don't forget to also set the scale type accordingly, otherwise you'll have
// logarithmically spaced ticks on a linear axis:
customPlot->xAxis->setScaleType(QCPAxis::stLogarithmic);

Note that the nature of logarithmic ticks imply that there exists a smallest possible tick step, corresponding to one multiplication by the log base. If the user zooms in further than that, no new ticks would appear, leading to very sparse or even no axis ticks on the axis. To prevent this situation, this ticker falls back to regular tick generation if the axis range would be covered by too few logarithmically placed ticks.

-

Constructor & Destructor Documentation

- -

§ QCPAxisTickerLog()

- -
-
- - - - - - - -
QCPAxisTickerLog::QCPAxisTickerLog ()
-
-

Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker.

- -
-
-

Member Function Documentation

- -

§ setLogBase()

- -
-
- - - - - - - - -
void QCPAxisTickerLog::setLogBase (double base)
-
-

Sets the logarithm base used for tick coordinate generation. The ticks will be placed at integer powers of base.

- -
-
- -

§ setSubTickCount()

- -
-
- - - - - - - - -
void QCPAxisTickerLog::setSubTickCount (int subTicks)
-
-

Sets the number of sub ticks in a tick interval. Within each interval, the sub ticks are spaced linearly to provide a better visual guide, so the sub tick density increases toward the higher tick.

-

Note that subTicks is the number of sub ticks (not sub intervals) in one tick interval. So in the case of logarithm base 10 an intuitive sub tick spacing would be achieved with eight sub ticks (the default). This means e.g. between the ticks 10 and 100 there will be eight ticks, namely at 20, 30, 40, 50, 60, 70, 80 and 90.

- -
-
- -

§ getSubTickCount()

- -
-
- - - - - -
- - - - - - - - -
int QCPAxisTickerLog::getSubTickCount (double tickStep)
-
-protectedvirtual
-
-

Returns the sub tick count specified in setSubTickCount. For QCPAxisTickerLog, there is no automatic sub tick count calculation necessary.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ createTickVector()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QVector< double > QCPAxisTickerLog::createTickVector (double tickStep,
const QCPRangerange 
)
-
-protectedvirtual
-
-

Creates ticks with a spacing given by the logarithm base and an increasing integer power in the provided range. The step in which the power increases tick by tick is chosen in order to keep the total number of ticks as close as possible to the tick count (setTickCount).

-

The parameter tickStep is ignored for the normal logarithmic ticker generation. Only when zoomed in very far such that not enough logarithmically placed ticks would be visible, this function falls back to the regular QCPAxisTicker::createTickVector, which then uses tickStep.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/axis/axistickerlog.h
  • -
  • src/axis/axistickerlog.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerLog__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAxisTickerLog__inherit__graph.png deleted file mode 100644 index fdafd376..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAxisTickerLog__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerPi.html b/third_party/qcustomplot/documentation/html/classQCPAxisTickerPi.html deleted file mode 100644 index 797d00d6..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAxisTickerPi.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - -QCPAxisTickerPi Class Reference - - - - -
- -
-
QCPAxisTickerPi Class Reference
-
-
- -

Specialized axis ticker to display ticks in units of an arbitrary constant, for example pi. - More...

-
-Inheritance diagram for QCPAxisTickerPi:
-
-
Inheritance graph
- - - -
- - - - - - - -

-Public Types

enum  FractionStyle
 
- Public Types inherited from QCPAxisTicker
enum  TickStepStrategy
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAxisTickerPi ()
 
-QString piSymbol () const
 
-double piValue () const
 
-bool periodicity () const
 
-FractionStyle fractionStyle () const
 
void setPiSymbol (QString symbol)
 
void setPiValue (double pi)
 
void setPeriodicity (int multiplesOfPi)
 
void setFractionStyle (FractionStyle style)
 
- Public Functions inherited from QCPAxisTicker
 QCPAxisTicker ()
 
-TickStepStrategy tickStepStrategy () const
 
-int tickCount () const
 
-double tickOrigin () const
 
void setTickStepStrategy (TickStepStrategy strategy)
 
void setTickCount (int count)
 
void setTickOrigin (double origin)
 
virtual void generate (const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector< double > &ticks, QVector< double > *subTicks, QVector< QString > *tickLabels)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual double getTickStep (const QCPRange &range)
 
virtual int getSubTickCount (double tickStep)
 
virtual QString getTickLabel (double tick, const QLocale &locale, QChar formatChar, int precision)
 
void simplifyFraction (int &numerator, int &denominator) const
 
QString fractionToString (int numerator, int denominator) const
 
QString unicodeFraction (int numerator, int denominator) const
 
QString unicodeSuperscript (int number) const
 
QString unicodeSubscript (int number) const
 
- Protected Functions inherited from QCPAxisTicker
virtual QVector< double > createTickVector (double tickStep, const QCPRange &range)
 
virtual QVector< double > createSubTickVector (int subTickCount, const QVector< double > &ticks)
 
virtual QVector< QString > createLabelVector (const QVector< double > &ticks, const QLocale &locale, QChar formatChar, int precision)
 
void trimTicks (const QCPRange &range, QVector< double > &ticks, bool keepOneOutlier) const
 
double pickClosest (double target, const QVector< double > &candidates) const
 
double getMantissa (double input, double *magnitude=nullptr) const
 
double cleanMantissa (double input) const
 
-

Detailed Description

-

Specialized axis ticker to display ticks in units of an arbitrary constant, for example pi.

-
-axisticker-pi.png -
-

This QCPAxisTicker subclass generates ticks that are expressed with respect to a given symbolic constant with a numerical value specified with setPiValue and an appearance in the tick labels specified with setPiSymbol.

-

Ticks may be generated at fractions of the symbolic constant. How these fractions appear in the tick label can be configured with setFractionStyle.

-

The ticker can be created and assigned to an axis like this:

QSharedPointer<QCPAxisTickerPi> piTicker(new QCPAxisTickerPi);
customPlot->xAxis->setTicker(piTicker);

Member Enumeration Documentation

- -

§ FractionStyle

- -
-
-

Defines how fractions should be displayed in tick labels.

-
See also
setFractionStyle
- - - - -
Enumerator
fsFloatingPoint 

Fractions are displayed as regular decimal floating point numbers, e.g. "0.25" or "0.125".

-
fsAsciiFractions 

Fractions are written as rationals using ASCII characters only, e.g. "1/4" or "1/8".

-
fsUnicodeFractions 

Fractions are written using sub- and superscript UTF-8 digits and the fraction symbol.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPAxisTickerPi()

- -
-
- - - - - - - -
QCPAxisTickerPi::QCPAxisTickerPi ()
-
-

Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker.

- -
-
-

Member Function Documentation

- -

§ setPiSymbol()

- -
-
- - - - - - - - -
void QCPAxisTickerPi::setPiSymbol (QString symbol)
-
-

Sets how the symbol part (which is always a suffix to the number) shall appear in the axis tick label.

-

If a space shall appear between the number and the symbol, make sure the space is contained in symbol.

- -
-
- -

§ setPiValue()

- -
-
- - - - - - - - -
void QCPAxisTickerPi::setPiValue (double pi)
-
-

Sets the numerical value that the symbolic constant has.

-

This will be used to place the appropriate fractions of the symbol at the respective axis coordinates.

- -
-
- -

§ setPeriodicity()

- -
-
- - - - - - - - -
void QCPAxisTickerPi::setPeriodicity (int multiplesOfPi)
-
-

Sets whether the axis labels shall appear periodicly and if so, at which multiplicity of the symbolic constant.

-

To disable periodicity, set multiplesOfPi to zero.

-

For example, an axis that identifies 0 with 2pi would set multiplesOfPi to two.

- -
-
- -

§ setFractionStyle()

- -
-
- - - - - - - - -
void QCPAxisTickerPi::setFractionStyle (QCPAxisTickerPi::FractionStyle style)
-
-

Sets how the numerical/fractional part preceding the symbolic constant is displayed in tick labels. See FractionStyle for the various options.

- -
-
- -

§ getTickStep()

- -
-
- - - - - -
- - - - - - - - -
double QCPAxisTickerPi::getTickStep (const QCPRangerange)
-
-protectedvirtual
-
-

Returns the tick step, using the constant's value (setPiValue) as base unit. In consequence the numerical/fractional part preceding the symbolic constant is made to have a readable mantissa.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ getSubTickCount()

- -
-
- - - - - -
- - - - - - - - -
int QCPAxisTickerPi::getSubTickCount (double tickStep)
-
-protectedvirtual
-
-

Returns the sub tick count, using the constant's value (setPiValue) as base unit. In consequence the sub ticks divide the numerical/fractional part preceding the symbolic constant reasonably, and not the total tick coordinate.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ getTickLabel()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QString QCPAxisTickerPi::getTickLabel (double tick,
const QLocale & locale,
QChar formatChar,
int precision 
)
-
-protectedvirtual
-
-

Returns the tick label as a fractional/numerical part and a symbolic string as suffix. The formatting of the fraction is done according to the specified setFractionStyle. The appended symbol is specified with setPiSymbol.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ simplifyFraction()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPAxisTickerPi::simplifyFraction (int & numerator,
int & denominator 
) const
-
-protected
-
-

Takes the fraction given by numerator and denominator and modifies the values to make sure the fraction is in irreducible form, i.e. numerator and denominator don't share any common factors which could be cancelled.

- -
-
- -

§ fractionToString()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QString QCPAxisTickerPi::fractionToString (int numerator,
int denominator 
) const
-
-protected
-
-

Takes the fraction given by numerator and denominator and returns a string representation. The result depends on the configured fraction style (setFractionStyle).

-

This method is used to format the numerical/fractional part when generating tick labels. It simplifies the passed fraction to an irreducible form using simplifyFraction and factors out any integer parts of the fraction (e.g. "10/4" becomes "2 1/2").

- -
-
- -

§ unicodeFraction()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QString QCPAxisTickerPi::unicodeFraction (int numerator,
int denominator 
) const
-
-protected
-
-

Returns the unicode string representation of the fraction given by numerator and denominator. This is the representation used in fractionToString when the fraction style (setFractionStyle) is fsUnicodeFractions.

-

This method doesn't use the single-character common fractions but builds each fraction from a superscript unicode number, the unicode fraction character, and a subscript unicode number.

- -
-
- -

§ unicodeSuperscript()

- -
-
- - - - - -
- - - - - - - - -
QString QCPAxisTickerPi::unicodeSuperscript (int number) const
-
-protected
-
-

Returns the unicode string representing number as superscript. This is used to build unicode fractions in unicodeFraction.

- -
-
- -

§ unicodeSubscript()

- -
-
- - - - - -
- - - - - - - - -
QString QCPAxisTickerPi::unicodeSubscript (int number) const
-
-protected
-
-

Returns the unicode string representing number as subscript. This is used to build unicode fractions in unicodeFraction.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/axis/axistickerpi.h
  • -
  • src/axis/axistickerpi.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerPi__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAxisTickerPi__inherit__graph.png deleted file mode 100644 index dbd52670..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAxisTickerPi__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerText.html b/third_party/qcustomplot/documentation/html/classQCPAxisTickerText.html deleted file mode 100644 index 3e0118b8..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAxisTickerText.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - - - -QCPAxisTickerText Class Reference - - - - -
- -
-
QCPAxisTickerText Class Reference
-
-
- -

Specialized axis ticker which allows arbitrary labels at specified coordinates. - More...

-
-Inheritance diagram for QCPAxisTickerText:
-
-
Inheritance graph
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAxisTickerText ()
 
QMap< double, QString > & ticks ()
 
-int subTickCount () const
 
void setTicks (const QMap< double, QString > &ticks)
 
void setTicks (const QVector< double > &positions, const QVector< QString > &labels)
 
void setSubTickCount (int subTicks)
 
void clear ()
 
void addTick (double position, const QString &label)
 
void addTicks (const QMap< double, QString > &ticks)
 
void addTicks (const QVector< double > &positions, const QVector< QString > &labels)
 
- Public Functions inherited from QCPAxisTicker
 QCPAxisTicker ()
 
-TickStepStrategy tickStepStrategy () const
 
-int tickCount () const
 
-double tickOrigin () const
 
void setTickStepStrategy (TickStepStrategy strategy)
 
void setTickCount (int count)
 
void setTickOrigin (double origin)
 
virtual void generate (const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector< double > &ticks, QVector< double > *subTicks, QVector< QString > *tickLabels)
 
- - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual double getTickStep (const QCPRange &range)
 
virtual int getSubTickCount (double tickStep)
 
virtual QString getTickLabel (double tick, const QLocale &locale, QChar formatChar, int precision)
 
virtual QVector< double > createTickVector (double tickStep, const QCPRange &range)
 
- Protected Functions inherited from QCPAxisTicker
virtual QVector< double > createSubTickVector (int subTickCount, const QVector< double > &ticks)
 
virtual QVector< QString > createLabelVector (const QVector< double > &ticks, const QLocale &locale, QChar formatChar, int precision)
 
void trimTicks (const QCPRange &range, QVector< double > &ticks, bool keepOneOutlier) const
 
double pickClosest (double target, const QVector< double > &candidates) const
 
double getMantissa (double input, double *magnitude=nullptr) const
 
double cleanMantissa (double input) const
 
- - - - -

-Additional Inherited Members

- Public Types inherited from QCPAxisTicker
enum  TickStepStrategy
 
-

Detailed Description

-

Specialized axis ticker which allows arbitrary labels at specified coordinates.

-
-axisticker-text.png -
-

This QCPAxisTicker subclass generates ticks which can be directly specified by the user as coordinates and associated strings. They can be passed as a whole with setTicks or one at a time with addTick. Alternatively you can directly access the internal storage via ticks and modify the tick/label data there.

-

This is useful for cases where the axis represents categories rather than numerical values.

-

If you are updating the ticks of this ticker regularly and in a dynamic fasion (e.g. dependent on the axis range), it is a sign that you should probably create an own ticker by subclassing QCPAxisTicker, instead of using this one.

-

The ticker can be created and assigned to an axis like this:

QSharedPointer<QCPAxisTickerText> textTicker(new QCPAxisTickerText);
customPlot->xAxis->setTicker(textTicker);
textTicker->addTick(1.0, "Bacteria");
textTicker->addTick(2.0, "Protozoa");
textTicker->addTick(3.0, "Chromista");
textTicker->addTick(4.0, "Plants");
textTicker->addTick(5.0, "Fungi");
textTicker->addTick(6.0, "Animals");
textTicker->addTick(8.0, "Vogons");

Constructor & Destructor Documentation

- -

§ QCPAxisTickerText()

- -
-
- - - - - - - -
QCPAxisTickerText::QCPAxisTickerText ()
-
-

Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker.

- -
-
-

Member Function Documentation

- -

§ ticks()

- -
-
- - - - - -
- - - - - - - -
QMap< double, QString > & QCPAxisTickerText::ticks ()
-
-inline
-
-

Returns a non-const reference to the internal map which stores the tick coordinates and their labels.

-

You can access the map directly in order to add, remove or manipulate ticks, as an alternative to using the methods provided by QCPAxisTickerText, such as setTicks and addTick.

- -
-
- -

§ setTicks() [1/2]

- -
-
- - - - - - - - -
void QCPAxisTickerText::setTicks (const QMap< double, QString > & ticks)
-
-

This is an overloaded function.

-

Sets the ticks that shall appear on the axis. The map key of ticks corresponds to the axis coordinate, and the map value is the string that will appear as tick label.

-

An alternative to manipulate ticks is to directly access the internal storage with the ticks getter.

-
See also
addTicks, addTick, clear
- -
-
- -

§ setTicks() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxisTickerText::setTicks (const QVector< double > & positions,
const QVector< QString > & labels 
)
-
-

This is an overloaded function.

-

Sets the ticks that shall appear on the axis. The entries of positions correspond to the axis coordinates, and the entries of labels are the respective strings that will appear as tick labels.

-
See also
addTicks, addTick, clear
- -
-
- -

§ setSubTickCount()

- -
-
- - - - - - - - -
void QCPAxisTickerText::setSubTickCount (int subTicks)
-
-

Sets the number of sub ticks that shall appear between ticks. For QCPAxisTickerText, there is no automatic sub tick count calculation. So if sub ticks are needed, they must be configured with this method.

- -
-
- -

§ clear()

- -
-
- - - - - - - -
void QCPAxisTickerText::clear ()
-
-

Clears all ticks.

-

An alternative to manipulate ticks is to directly access the internal storage with the ticks getter.

-
See also
setTicks, addTicks, addTick
- -
-
- -

§ addTick()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxisTickerText::addTick (double position,
const QString & label 
)
-
-

Adds a single tick to the axis at the given axis coordinate position, with the provided tick label.

-
See also
addTicks, setTicks, clear
- -
-
- -

§ addTicks() [1/2]

- -
-
- - - - - - - - -
void QCPAxisTickerText::addTicks (const QMap< double, QString > & ticks)
-
-

This is an overloaded function.

-

Adds the provided ticks to the ones already existing. The map key of ticks corresponds to the axis coordinate, and the map value is the string that will appear as tick label.

-

An alternative to manipulate ticks is to directly access the internal storage with the ticks getter.

-
See also
addTick, setTicks, clear
- -
-
- -

§ addTicks() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxisTickerText::addTicks (const QVector< double > & positions,
const QVector< QString > & labels 
)
-
-

This is an overloaded function.

-

Adds the provided ticks to the ones already existing. The entries of positions correspond to the axis coordinates, and the entries of labels are the respective strings that will appear as tick labels.

-

An alternative to manipulate ticks is to directly access the internal storage with the ticks getter.

-
See also
addTick, setTicks, clear
- -
-
- -

§ getTickStep()

- -
-
- - - - - -
- - - - - - - - -
double QCPAxisTickerText::getTickStep (const QCPRangerange)
-
-protectedvirtual
-
-

Since the tick coordinates are provided externally, this method implementation does nothing.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ getSubTickCount()

- -
-
- - - - - -
- - - - - - - - -
int QCPAxisTickerText::getSubTickCount (double tickStep)
-
-protectedvirtual
-
-

Returns the sub tick count that was configured with setSubTickCount.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ getTickLabel()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QString QCPAxisTickerText::getTickLabel (double tick,
const QLocale & locale,
QChar formatChar,
int precision 
)
-
-protectedvirtual
-
-

Returns the tick label which corresponds to the key tick in the internal tick storage. Since the labels are provided externally, locale, formatChar, and precision are ignored.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ createTickVector()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QVector< double > QCPAxisTickerText::createTickVector (double tickStep,
const QCPRangerange 
)
-
-protectedvirtual
-
-

Returns the externally provided tick coordinates which are in the specified range. If available, one tick above and below the range is provided in addition, to allow possible sub tick calculation. The parameter tickStep is ignored.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/axis/axistickertext.h
  • -
  • src/axis/axistickertext.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerText__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAxisTickerText__inherit__graph.png deleted file mode 100644 index aa06210e..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAxisTickerText__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerTime.html b/third_party/qcustomplot/documentation/html/classQCPAxisTickerTime.html deleted file mode 100644 index eb742240..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPAxisTickerTime.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - -QCPAxisTickerTime Class Reference - - - - -
- -
-
QCPAxisTickerTime Class Reference
-
-
- -

Specialized axis ticker for time spans in units of milliseconds to days. - More...

-
-Inheritance diagram for QCPAxisTickerTime:
-
-
Inheritance graph
- - - -
- - - - - - - -

-Public Types

enum  TimeUnit
 
- Public Types inherited from QCPAxisTicker
enum  TickStepStrategy
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPAxisTickerTime ()
 
-QString timeFormat () const
 
-int fieldWidth (TimeUnit unit) const
 
void setTimeFormat (const QString &format)
 
void setFieldWidth (TimeUnit unit, int width)
 
- Public Functions inherited from QCPAxisTicker
 QCPAxisTicker ()
 
-TickStepStrategy tickStepStrategy () const
 
-int tickCount () const
 
-double tickOrigin () const
 
void setTickStepStrategy (TickStepStrategy strategy)
 
void setTickCount (int count)
 
void setTickOrigin (double origin)
 
virtual void generate (const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector< double > &ticks, QVector< double > *subTicks, QVector< QString > *tickLabels)
 
- - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual double getTickStep (const QCPRange &range)
 
virtual int getSubTickCount (double tickStep)
 
virtual QString getTickLabel (double tick, const QLocale &locale, QChar formatChar, int precision)
 
void replaceUnit (QString &text, TimeUnit unit, int value) const
 
- Protected Functions inherited from QCPAxisTicker
virtual QVector< double > createTickVector (double tickStep, const QCPRange &range)
 
virtual QVector< double > createSubTickVector (int subTickCount, const QVector< double > &ticks)
 
virtual QVector< QString > createLabelVector (const QVector< double > &ticks, const QLocale &locale, QChar formatChar, int precision)
 
void trimTicks (const QCPRange &range, QVector< double > &ticks, bool keepOneOutlier) const
 
double pickClosest (double target, const QVector< double > &candidates) const
 
double getMantissa (double input, double *magnitude=nullptr) const
 
double cleanMantissa (double input) const
 
-

Detailed Description

-

Specialized axis ticker for time spans in units of milliseconds to days.

-
-axisticker-time.png -
-

This QCPAxisTicker subclass generates ticks that corresponds to time intervals.

-

The format of the time display in the tick labels is controlled with setTimeFormat and setFieldWidth. The time coordinate is in the unit of seconds with respect to the time coordinate zero. Unlike with QCPAxisTickerDateTime, the ticks don't correspond to a specific calendar date and time.

-

The time can be displayed in milliseconds, seconds, minutes, hours and days. Depending on the largest available unit in the format specified with setTimeFormat, any time spans above will be carried in that largest unit. So for example if the format string is "%m:%s" and a tick at coordinate value 7815 (being 2 hours, 10 minutes and 15 seconds) is created, the resulting tick label will show "130:15" (130 minutes, 15 seconds). If the format string is "%h:%m:%s", the hour unit will be used and the label will thus be "02:10:15". Negative times with respect to the axis zero will carry a leading minus sign.

-

The ticker can be created and assigned to an axis like this:

QSharedPointer<QCPAxisTickerTime> timeTicker(new QCPAxisTickerTime);
customPlot->xAxis->setTicker(timeTicker);
customPlot->xAxis->setRange(-60*3.5, 60*11);
timeTicker->setTimeFormat("%m:%s");

Here is an example of a time axis providing time information in days, hours and minutes. Due to the axis range spanning a few days and the wanted tick count (setTickCount), the ticker decided to use tick steps of 12 hours:

-
-axisticker-time2.png -
-

The format string for this example is

timeTicker->setTimeFormat("day %d\n%h:%m");
Note
If you rather wish to display calendar dates and times, have a look at QCPAxisTickerDateTime instead.
-

Member Enumeration Documentation

- -

§ TimeUnit

- -
-
- - - - -
enum QCPAxisTickerTime::TimeUnit
-
-

Defines the logical units in which fractions of time spans can be expressed.

-
See also
setFieldWidth, setTimeFormat
- - - - - - -
Enumerator
tuMilliseconds 

Milliseconds, one thousandth of a second (%z in setTimeFormat)

-
tuSeconds 

Seconds (%s in setTimeFormat)

-
tuMinutes 

Minutes (%m in setTimeFormat)

-
tuHours 

Hours (%h in setTimeFormat)

-
tuDays 

Days (%d in setTimeFormat)

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPAxisTickerTime()

- -
-
- - - - - - - -
QCPAxisTickerTime::QCPAxisTickerTime ()
-
-

Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker.

- -
-
-

Member Function Documentation

- -

§ setTimeFormat()

- -
-
- - - - - - - - -
void QCPAxisTickerTime::setTimeFormat (const QString & format)
-
-

Sets the format that will be used to display time in the tick labels.

-

The available patterns are:

    -
  • %z for milliseconds
  • -
  • %s for seconds
  • -
  • %m for minutes
  • -
  • %h for hours
  • -
  • %d for days
  • -
-

The field width (zero padding) can be controlled for each unit with setFieldWidth.

-

The largest unit that appears in format will carry all the remaining time of a certain tick coordinate, even if it overflows the natural limit of the unit. For example, if %m is the largest unit it might become larger than 59 in order to consume larger time values. If on the other hand %h is available, the minutes will wrap around to zero after 59 and the time will carry to the hour digit.

- -
-
- -

§ setFieldWidth()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPAxisTickerTime::setFieldWidth (QCPAxisTickerTime::TimeUnit unit,
int width 
)
-
-

Sets the field widh of the specified unit to be width digits, when displayed in the tick label. If the number for the specific unit is shorter than width, it will be padded with an according number of zeros to the left in order to reach the field width.

-
See also
setTimeFormat
- -
-
- -

§ getTickStep()

- -
-
- - - - - -
- - - - - - - - -
double QCPAxisTickerTime::getTickStep (const QCPRangerange)
-
-protectedvirtual
-
-

Returns the tick step appropriate for time displays, depending on the provided range and the smallest available time unit in the current format (setTimeFormat). For example if the unit of seconds isn't available in the format, this method will not generate steps (like 2.5 minutes) that require sub-minute precision to be displayed correctly.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ getSubTickCount()

- -
-
- - - - - -
- - - - - - - - -
int QCPAxisTickerTime::getSubTickCount (double tickStep)
-
-protectedvirtual
-
-

Returns the sub tick count appropriate for the provided tickStep and time displays.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ getTickLabel()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QString QCPAxisTickerTime::getTickLabel (double tick,
const QLocale & locale,
QChar formatChar,
int precision 
)
-
-protectedvirtual
-
-

Returns the tick label corresponding to the provided tick and the configured format and field widths (setTimeFormat, setFieldWidth).

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPAxisTicker.

- -
-
- -

§ replaceUnit()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPAxisTickerTime::replaceUnit (QString & text,
QCPAxisTickerTime::TimeUnit unit,
int value 
) const
-
-protected
-
-

Replaces all occurrences of the format pattern belonging to unit in text with the specified value, using the field width as specified with setFieldWidth for the unit.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/axis/axistickertime.h
  • -
  • src/axis/axistickertime.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTickerTime__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAxisTickerTime__inherit__graph.png deleted file mode 100644 index eec458fa..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAxisTickerTime__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAxisTicker__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAxisTicker__inherit__graph.png deleted file mode 100644 index 822d6bb3..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAxisTicker__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPAxis__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPAxis__inherit__graph.png deleted file mode 100644 index 0cd9e163..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPAxis__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPBars.html b/third_party/qcustomplot/documentation/html/classQCPBars.html deleted file mode 100644 index 2d23ac8e..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPBars.html +++ /dev/null @@ -1,1223 +0,0 @@ - - - - - - -QCPBars Class Reference - - - - - -
- -

A plottable representing a bar chart in a plot. - More...

-
-Inheritance diagram for QCPBars:
-
-
Inheritance graph
- - - - - - -
- - - - -

-Public Types

enum  WidthType
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPBars (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
-double width () const
 
-WidthType widthType () const
 
-QCPBarsGroupbarsGroup () const
 
-double baseValue () const
 
-double stackingGap () const
 
QCPBarsbarBelow () const
 
QCPBarsbarAbove () const
 
QSharedPointer< QCPBarsDataContainerdata () const
 
void setData (QSharedPointer< QCPBarsDataContainer > data)
 
void setData (const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
 
void setWidth (double width)
 
void setWidthType (WidthType widthType)
 
void setBarsGroup (QCPBarsGroup *barsGroup)
 
void setBaseValue (double baseValue)
 
void setStackingGap (double pixels)
 
void addData (const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
 
void addData (double key, double value)
 
void moveBelow (QCPBars *bars)
 
void moveAbove (QCPBars *bars)
 
virtual QCPDataSelection selectTestRect (const QRectF &rect, bool onlySelectable) const
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
virtual QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const
 
virtual QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const
 
virtual QPointF dataPixelPosition (int index) const
 
- Public Functions inherited from QCPAbstractPlottable1D< QCPBarsData >
 QCPAbstractPlottable1D (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
virtual int dataCount () const
 
virtual double dataMainKey (int index) const
 
virtual double dataSortKey (int index) const
 
virtual double dataMainValue (int index) const
 
virtual QCPRange dataValueRange (int index) const
 
virtual bool sortKeyIsMainKey () const
 
virtual int findBegin (double sortKey, bool expandedRange=true) const
 
virtual int findEnd (double sortKey, bool expandedRange=true) const
 
virtual QCPPlottableInterface1Dinterface1D ()
 
- Public Functions inherited from QCPAbstractPlottable
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
-QString name () const
 
-bool antialiasedFill () const
 
-bool antialiasedScatters () const
 
-QPen pen () const
 
-QBrush brush () const
 
-QCPAxiskeyAxis () const
 
-QCPAxisvalueAxis () const
 
-QCP::SelectionType selectable () const
 
bool selected () const
 
QCPDataSelection selection () const
 
QCPSelectionDecoratorselectionDecorator () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (QCP::SelectionType selectable)
 
Q_SLOT void setSelection (QCPDataSelection selection)
 
void setSelectionDecorator (QCPSelectionDecorator *decorator)
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false, bool inKeyRange=false) const
 
bool addToLegend (QCPLegend *legend)
 
bool addToLegend ()
 
bool removeFromLegend (QCPLegend *legend) const
 
bool removeFromLegend () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const
 
void getVisibleDataBounds (QCPBarsDataContainer::const_iterator &begin, QCPBarsDataContainer::const_iterator &end) const
 
QRectF getBarRect (double key, double value) const
 
void getPixelWidth (double key, double &lower, double &upper) const
 
double getStackedBaseValue (double key, bool positive) const
 
- Protected Functions inherited from QCPAbstractPlottable1D< QCPBarsData >
void getDataSegments (QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
 
void drawPolyline (QCPPainter *painter, const QVector< QPointF > &lineData) const
 
- Protected Functions inherited from QCPAbstractPlottable
virtual QRect clipRect () const
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - -

-Protected Static Functions

static void connectBars (QCPBars *lower, QCPBars *upper)
 
- - - - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractPlottable
void selectionChanged (bool selected)
 
void selectionChanged (const QCPDataSelection &selection)
 
void selectableChanged (QCP::SelectionType selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A plottable representing a bar chart in a plot.

-
-QCPBars.png -
-

To plot data, assign it with the setData or addData functions.

-

-Changing the appearance

-

The appearance of the bars is determined by the pen and the brush (setPen, setBrush). The width of the individual bars can be controlled with setWidthType and setWidth.

-

Bar charts are stackable. This means, two QCPBars plottables can be placed on top of each other (see QCPBars::moveAbove). So when two bars are at the same key position, they will appear stacked.

-

If you would like to group multiple QCPBars plottables together so they appear side by side as shown below, use QCPBarsGroup.

-
-QCPBarsGroup.png -
-

-Usage

-

Like all data representing objects in QCustomPlot, the QCPBars is a plottable (QCPAbstractPlottable). So the plottable-interface of QCustomPlot applies (QCustomPlot::plottable, QCustomPlot::removePlottable, etc.)

-

Usually, you first create an instance:

QCPBars *newBars = new QCPBars(customPlot->xAxis, customPlot->yAxis);

which registers it with the QCustomPlot instance of the passed axes. Note that this QCustomPlot instance takes ownership of the plottable, so do not delete it manually but use QCustomPlot::removePlottable() instead. The newly created plottable can be modified, e.g.:

newBars->setName("Country population");
newBars->setData(xData, yData);

Member Enumeration Documentation

- -

§ WidthType

- -
-
- - - - -
enum QCPBars::WidthType
-
-

Defines the ways the width of the bar can be specified. Thus it defines what the number passed to setWidth actually means.

-
See also
setWidthType, setWidth
- - - - -
Enumerator
wtAbsolute 

Bar width is in absolute pixels.

-
wtAxisRectRatio 

Bar width is given by a fraction of the axis rect size.

-
wtPlotCoords 

Bar width is in key coordinates and thus scales with the key axis range.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPBars()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPBars::QCPBars (QCPAxiskeyAxis,
QCPAxisvalueAxis 
)
-
-explicit
-
-

Constructs a bar chart which uses keyAxis as its key axis ("x") and valueAxis as its value axis ("y"). keyAxis and valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though.

-

The created QCPBars is automatically registered with the QCustomPlot instance inferred from keyAxis. This QCustomPlot instance takes ownership of the QCPBars, so do not delete it manually but use QCustomPlot::removePlottable() instead.

- -
-
-

Member Function Documentation

- -

§ barBelow()

- -
-
- - - - - -
- - - - - - - -
QCPBars * QCPBars::barBelow () const
-
-inline
-
-

Returns the bars plottable that is directly below this bars plottable. If there is no such plottable, returns nullptr.

-
See also
barAbove, moveBelow, moveAbove
- -
-
- -

§ barAbove()

- -
-
- - - - - -
- - - - - - - -
QCPBars * QCPBars::barAbove () const
-
-inline
-
-

Returns the bars plottable that is directly above this bars plottable. If there is no such plottable, returns nullptr.

-
See also
barBelow, moveBelow, moveAbove
- -
-
- -

§ data()

- -
-
- - - - - -
- - - - - - - -
QSharedPointer< QCPBarsDataContainer > QCPBars::data () const
-
-inline
-
-

Returns a shared pointer to the internal data storage of type QCPBarsDataContainer. You may use it to directly manipulate the data, which may be more convenient and faster than using the regular setData or addData methods.

- -
-
- -

§ setData() [1/2]

- -
-
- - - - - - - - -
void QCPBars::setData (QSharedPointer< QCPBarsDataContainerdata)
-
-

This is an overloaded function.

-

Replaces the current data container with the provided data container.

-

Since a QSharedPointer is used, multiple QCPBars may share the same data container safely. Modifying the data in the container will then affect all bars that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers:

bars2->setData(bars1->data()); // bars1 and bars2 now share data container

If you do not wish to share containers, but create a copy from an existing container, rather use the QCPDataContainer<DataType>::set method on the bar's data container directly:

bars2->data()->set(*bars1->data()); // bars2 now has copy of bars1's data in its container
See also
addData
- -
-
- -

§ setData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPBars::setData (const QVector< double > & keys,
const QVector< double > & values,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Replaces the current data with the provided points in keys and values. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

If you can guarantee that the passed data points are sorted by keys in ascending order, you can set alreadySorted to true, to improve performance by saving a sorting run.

-
See also
addData
- -
-
- -

§ setWidth()

- -
-
- - - - - - - - -
void QCPBars::setWidth (double width)
-
-

Sets the width of the bars.

-

How the number passed as width is interpreted (e.g. screen pixels, plot coordinates,...), depends on the currently set width type, see setWidthType and WidthType.

- -
-
- -

§ setWidthType()

- -
-
- - - - - - - - -
void QCPBars::setWidthType (QCPBars::WidthType widthType)
-
-

Sets how the width of the bars is defined. See the documentation of WidthType for an explanation of the possible values for widthType.

-

The default value is wtPlotCoords.

-
See also
setWidth
- -
-
- -

§ setBarsGroup()

- -
-
- - - - - - - - -
void QCPBars::setBarsGroup (QCPBarsGroupbarsGroup)
-
-

Sets to which QCPBarsGroup this QCPBars instance belongs to. Alternatively, you can also use QCPBarsGroup::append.

-

To remove this QCPBars from any group, set barsGroup to nullptr.

- -
-
- -

§ setBaseValue()

- -
-
- - - - - - - - -
void QCPBars::setBaseValue (double baseValue)
-
-

Sets the base value of this bars plottable.

-

The base value defines where on the value coordinate the bars start. How far the bars extend from the base value is given by their individual value data. For example, if the base value is set to 1, a bar with data value 2 will have its lowest point at value coordinate 1 and highest point at 3.

-

For stacked bars, only the base value of the bottom-most QCPBars has meaning.

-

The default base value is 0.

- -
-
- -

§ setStackingGap()

- -
-
- - - - - - - - -
void QCPBars::setStackingGap (double pixels)
-
-

If this bars plottable is stacked on top of another bars plottable (moveAbove), this method allows specifying a distance in pixels, by which the drawn bar rectangles will be separated by the bars below it.

- -
-
- -

§ addData() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPBars::addData (const QVector< double > & keys,
const QVector< double > & values,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Adds the provided points in keys and values to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

If you can guarantee that the passed data points are sorted by keys in ascending order, you can set alreadySorted to true, to improve performance by saving a sorting run.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

- -
-
- -

§ addData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPBars::addData (double key,
double value 
)
-
-

This is an overloaded function. Adds the provided data point as key and value to the current data.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

- -
-
- -

§ moveBelow()

- -
-
- - - - - - - - -
void QCPBars::moveBelow (QCPBarsbars)
-
-

Moves this bars plottable below bars. In other words, the bars of this plottable will appear below the bars of bars. The move target bars must use the same key and value axis as this plottable.

-

Inserting into and removing from existing bar stacking is handled gracefully. If bars already has a bars object below itself, this bars object is inserted between the two. If this bars object is already between two other bars, the two other bars will be stacked on top of each other after the operation.

-

To remove this bars plottable from any stacking, set bars to nullptr.

-
See also
moveBelow, barAbove, barBelow
- -
-
- -

§ moveAbove()

- -
-
- - - - - - - - -
void QCPBars::moveAbove (QCPBarsbars)
-
-

Moves this bars plottable above bars. In other words, the bars of this plottable will appear above the bars of bars. The move target bars must use the same key and value axis as this plottable.

-

Inserting into and removing from existing bar stacking is handled gracefully. If bars already has a bars object above itself, this bars object is inserted between the two. If this bars object is already between two other bars, the two other bars will be stacked on top of each other after the operation.

-

To remove this bars plottable from any stacking, set bars to nullptr.

-
See also
moveBelow, barBelow, barAbove
- -
-
- -

§ selectTestRect()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPDataSelection QCPBars::selectTestRect (const QRectF & rect,
bool onlySelectable 
) const
-
-virtual
-
- -

-

Returns a data selection containing all the data points of this plottable which are contained (or hit by) rect. This is used mainly in the selection rect interaction for data selection (data selection mechanism).

-

If onlySelectable is true, an empty QCPDataSelection is returned if this plottable is not selectable (i.e. if QCPAbstractPlottable::setSelectable is QCP::stNone).

-
Note
rect must be a normalized rect (positive or zero width and height). This is especially important when using the rect of QCPSelectionRect::accepted, which is not necessarily normalized. Use QRect::normalized() when passing a rect which might not be normalized.
- -

Reimplemented from QCPAbstractPlottable1D< QCPBarsData >.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPBars::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

Implements a selectTest specific to this plottable's point geometry.

-

If details is not 0, it will be set to a QCPDataSelection, describing the closest data point to pos.

-

For general information about this virtual method, see the base class implementation. QCPAbstractPlottable::selectTest

- -

Reimplemented from QCPAbstractPlottable1D< QCPBarsData >.

- -
-
- -

§ getKeyRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPRange QCPBars::getKeyRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth 
) const
-
-virtual
-
-

Returns the coordinate range that all data in this plottable span in the key axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getValueRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ getValueRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPRange QCPBars::getValueRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth,
const QCPRangeinKeyRange = QCPRange() 
) const
-
-virtual
-
-

Returns the coordinate range that the data points in the specified key range (inKeyRange) span in the value axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

If inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys.

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getKeyRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ dataPixelPosition()

- -
-
- - - - - -
- - - - - - - - -
QPointF QCPBars::dataPixelPosition (int index) const
-
-virtual
-
- -

-

Returns the pixel position on the widget surface at which the data point at the given index appears.

-

Usually this corresponds to the point of dataMainKey/dataMainValue, in pixel coordinates. However, depending on the plottable, this might be a different apparent position than just a coord-to-pixel transform of those values. For example, QCPBars apparent data values can be shifted depending on their stacking, bar grouping or configured base value.

- -

Reimplemented from QCPAbstractPlottable1D< QCPBarsData >.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPBars::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ drawLegendIcon()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPBars::drawLegendIcon (QCPPainterpainter,
const QRectF & rect 
) const
-
-protectedvirtual
-
-

called by QCPLegend::draw (via QCPPlottableLegendItem::draw) to create a graphical representation of this plottable inside rect, next to the plottable name.

-

The passed painter has its cliprect set to rect, so painting outside of rect won't appear outside the legend icon border.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ getVisibleDataBounds()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPBars::getVisibleDataBounds (QCPBarsDataContainer::const_iterator & begin,
QCPBarsDataContainer::const_iterator & end 
) const
-
-protected
-
-

called by draw to determine which data (key) range is visible at the current key axis range setting, so only that needs to be processed. It also takes into account the bar width.

-

begin returns an iterator to the lowest data point that needs to be taken into account when plotting. Note that in order to get a clean plot all the way to the edge of the axis rect, lower may still be just outside the visible range.

-

end returns an iterator one higher than the highest visible data point. Same as before, end may also lie just outside of the visible range.

-

if the plottable contains no data, both begin and end point to constEnd.

- -
-
- -

§ getBarRect()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QRectF QCPBars::getBarRect (double key,
double value 
) const
-
-protected
-
-

Returns the rect in pixel coordinates of a single bar with the specified key and value. The rect is shifted according to the bar stacking (see moveAbove) and base value (see setBaseValue), and to have non-overlapping border lines with the bars stacked below.

- -
-
- -

§ getPixelWidth()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPBars::getPixelWidth (double key,
double & lower,
double & upper 
) const
-
-protected
-
-

This function is used to determine the width of the bar at coordinate key, according to the specified width (setWidth) and width type (setWidthType).

-

The output parameters lower and upper return the number of pixels the bar extends to lower and higher keys, relative to the key coordinate (so with a non-reversed horizontal axis, lower is negative and upper positive).

- -
-
- -

§ getStackedBaseValue()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
double QCPBars::getStackedBaseValue (double key,
bool positive 
) const
-
-protected
-
-

This function is called to find at which value to start drawing the base of a bar at key, when it is stacked on top of another QCPBars (e.g. with moveAbove).

-

positive and negative bars are separated per stack (positive are stacked above baseValue upwards, negative are stacked below baseValue downwards). This can be indicated with positive. So if the bar for which we need the base value is negative, set positive to false.

- -
-
- -

§ connectBars()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPBars::connectBars (QCPBarslower,
QCPBarsupper 
)
-
-staticprotected
-
-

Connects below and above to each other via their mBarAbove/mBarBelow properties. The bar(s) currently above lower and below upper will become disconnected to lower/upper.

-

If lower is zero, upper will be disconnected at the bottom. If upper is zero, lower will be disconnected at the top.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPBarsData.html b/third_party/qcustomplot/documentation/html/classQCPBarsData.html deleted file mode 100644 index 48115608..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPBarsData.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - -QCPBarsData Class Reference - - - - -
- -
-
QCPBarsData Class Reference
-
-
- -

Holds the data of one single data point (one bar) for QCPBars. - More...

- - - - - - - - - - - - - - -

-Public Functions

 QCPBarsData ()
 
 QCPBarsData (double key, double value)
 
double sortKey () const
 
double mainKey () const
 
double mainValue () const
 
QCPRange valueRange () const
 
- - - - - -

-Public Members

-double key
 
-double value
 
- - - - - -

-Static Public Functions

static QCPBarsData fromSortKey (double sortKey)
 
static bool sortKeyIsMainKey ()
 
-

Detailed Description

-

Holds the data of one single data point (one bar) for QCPBars.

-

The stored data is:

    -
  • key: coordinate on the key axis of this bar (this is the mainKey and the sortKey)
  • -
  • value: height coordinate on the value axis of this bar (this is the mainValue)
  • -
-

The container for storing multiple data points is QCPBarsDataContainer. It is a typedef for QCPDataContainer with QCPBarsData as the DataType template parameter. See the documentation there for an explanation regarding the data type's generic methods.

-
See also
QCPBarsDataContainer
-

Constructor & Destructor Documentation

- -

§ QCPBarsData() [1/2]

- -
-
- - - - - - - -
QCPBarsData::QCPBarsData ()
-
-

Constructs a bar data point with key and value set to zero.

- -
-
- -

§ QCPBarsData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
QCPBarsData::QCPBarsData (double key,
double value 
)
-
-

Constructs a bar data point with the specified key and value.

- -
-
-

Member Function Documentation

- -

§ sortKey()

- -
-
- - - - - -
- - - - - - - -
double QCPBarsData::sortKey () const
-
-inline
-
-

Returns the key member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ fromSortKey()

- -
-
- - - - - -
- - - - - - - - -
static QCPBarsData QCPBarsData::fromSortKey (double sortKey)
-
-inlinestatic
-
-

Returns a data point with the specified sortKey. All other members are set to zero.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ sortKeyIsMainKey()

- -
-
- - - - - -
- - - - - - - -
static static bool QCPBarsData::sortKeyIsMainKey ()
-
-inlinestatic
-
-

Since the member key is both the data point key coordinate and the data ordering parameter, this method returns true.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ mainKey()

- -
-
- - - - - -
- - - - - - - -
double QCPBarsData::mainKey () const
-
-inline
-
-

Returns the key member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ mainValue()

- -
-
- - - - - -
- - - - - - - -
double QCPBarsData::mainValue () const
-
-inline
-
-

Returns the value member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ valueRange()

- -
-
- - - - - -
- - - - - - - -
QCPRange QCPBarsData::valueRange () const
-
-inline
-
-

Returns a QCPRange with both lower and upper boundary set to value of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPBarsGroup.html b/third_party/qcustomplot/documentation/html/classQCPBarsGroup.html deleted file mode 100644 index 4fcba695..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPBarsGroup.html +++ /dev/null @@ -1,546 +0,0 @@ - - - - - - -QCPBarsGroup Class Reference - - - - -
- -
-
QCPBarsGroup Class Reference
-
-
- -

Groups multiple QCPBars together so they appear side by side. - More...

- -

Inherits QObject.

- - - - -

-Public Types

enum  SpacingType
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPBarsGroup (QCustomPlot *parentPlot)
 
-SpacingType spacingType () const
 
-double spacing () const
 
void setSpacingType (SpacingType spacingType)
 
void setSpacing (double spacing)
 
QList< QCPBars * > bars () const
 
QCPBarsbars (int index) const
 
int size () const
 
bool isEmpty () const
 
void clear ()
 
bool contains (QCPBars *bars) const
 
void append (QCPBars *bars)
 
void insert (int i, QCPBars *bars)
 
void remove (QCPBars *bars)
 
- - - - - - - - - -

-Protected Functions

void registerBars (QCPBars *bars)
 
void unregisterBars (QCPBars *bars)
 
double keyPixelOffset (const QCPBars *bars, double keyCoord)
 
double getPixelSpacing (const QCPBars *bars, double keyCoord)
 
-

Detailed Description

-

Groups multiple QCPBars together so they appear side by side.

-
-QCPBarsGroup.png -
-

When showing multiple QCPBars in one plot which have bars at identical keys, it may be desirable to have them appearing next to each other at each key. This is what adding the respective QCPBars plottables to a QCPBarsGroup achieves. (An alternative approach is to stack them on top of each other, see QCPBars::moveAbove.)

-

-Usage

-

To add a QCPBars plottable to the group, create a new group and then add the respective bars intances:

QCPBarsGroup *group = new QCPBarsGroup(customPlot);
group->append(bars1);
group->append(bars2);

Alternatively to appending to the group like shown above, you can also set the group on the QCPBars plottable via QCPBars::setBarsGroup.

-

The spacing between the bars can be configured via setSpacingType and setSpacing. The bars in this group appear in the plot in the order they were appended. To insert a bars plottable at a certain index position, or to reposition a bars plottable which is already in the group, use insert.

-

To remove specific bars from the group, use either remove or call QCPBars::setBarsGroup(0) on the respective bars plottable.

-

To clear the entire group, call clear, or simply delete the group.

-

-Example

-

The image above is generated with the following code:

QVector<double> datax = QVector<double>() << 1 << 2 << 3 << 4;
QVector<double> datay1 = QVector<double>() << 0.6 << 0.5 << 0.3 << 0.15;
QVector<double> datay2 = QVector<double>() << 0.3 << 0.28 << 0.2 << 0.1;
QVector<double> datay3 = QVector<double>() << 0.33 << 0.31 << 0.27 << 0.13;
QCPBarsGroup *group1 = new QCPBarsGroup(customPlot);
QCPBars *bars2 = new QCPBars(customPlot->xAxis, customPlot->yAxis);
bars2->setData(datax, datay2);
bars2->setBrush(QColor(180, 00, 120, 50));
bars2->setPen(QColor(180, 00, 120));
bars2->setWidth(0.15);
bars2->setBarsGroup(group1);
QCPBars *bars1 = new QCPBars(customPlot->xAxis, customPlot->yAxis);
bars1->setData(datax, datay1);
bars1->setBrush(QColor(0, 0, 255, 50));
bars1->setPen(QColor(0, 255, 0));
bars1->setWidth(0.15);
bars1->setBarsGroup(group1);
QCPBars *bars3 = new QCPBars(customPlot->xAxis, customPlot->yAxis);
bars3->setData(datax, datay3);
bars3->setBrush(QColor(255, 154, 0, 50));
bars3->setPen(QColor(255, 154, 0));
bars3->setWidth(0.15);
bars3->setBarsGroup(group1);
customPlot->xAxis->setRange(0.1, 4.9);
customPlot->yAxis->setRange(0, 0.7);

Member Enumeration Documentation

- -

§ SpacingType

- -
-
- - - - -
enum QCPBarsGroup::SpacingType
-
-

Defines the ways the spacing between bars in the group can be specified. Thus it defines what the number passed to setSpacing actually means.

-
See also
setSpacingType, setSpacing
- - - - -
Enumerator
stAbsolute 

Bar spacing is in absolute pixels.

-
stAxisRectRatio 

Bar spacing is given by a fraction of the axis rect size.

-
stPlotCoords 

Bar spacing is in key coordinates and thus scales with the key axis range.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPBarsGroup()

- -
-
- - - - - -
- - - - - - - - -
QCPBarsGroup::QCPBarsGroup (QCustomPlotparentPlot)
-
-explicit
-
-

Constructs a new bars group for the specified QCustomPlot instance.

- -
-
-

Member Function Documentation

- -

§ setSpacingType()

- -
-
- - - - - - - - -
void QCPBarsGroup::setSpacingType (SpacingType spacingType)
-
-

Sets how the spacing between adjacent bars is interpreted. See SpacingType.

-

The actual spacing can then be specified with setSpacing.

-
See also
setSpacing
- -
-
- -

§ setSpacing()

- -
-
- - - - - - - - -
void QCPBarsGroup::setSpacing (double spacing)
-
-

Sets the spacing between adjacent bars. What the number passed as spacing actually means, is defined by the current SpacingType, which can be set with setSpacingType.

-
See also
setSpacingType
- -
-
- -

§ bars() [1/2]

- -
-
- - - - - -
- - - - - - - -
QList< QCPBars * > QCPBarsGroup::bars () const
-
-inline
-
-

Returns all bars currently in this group.

-
See also
bars(int index)
- -
-
- -

§ bars() [2/2]

- -
-
- - - - - - - - -
QCPBars * QCPBarsGroup::bars (int index) const
-
-

Returns the QCPBars instance with the specified index in this group. If no such QCPBars exists, returns nullptr.

-
See also
bars(), size
- -
-
- -

§ size()

- -
-
- - - - - -
- - - - - - - -
int QCPBarsGroup::size () const
-
-inline
-
-

Returns the number of QCPBars plottables that are part of this group.

- -
-
- -

§ isEmpty()

- -
-
- - - - - -
- - - - - - - -
bool QCPBarsGroup::isEmpty () const
-
-inline
-
-

Returns whether this bars group is empty.

-
See also
size
- -
-
- -

§ clear()

- -
-
- - - - - - - -
void QCPBarsGroup::clear ()
-
-

Removes all QCPBars plottables from this group.

-
See also
isEmpty
- -
-
- -

§ contains()

- -
-
- - - - - -
- - - - - - - - -
bool QCPBarsGroup::contains (QCPBarsbars) const
-
-inline
-
-

Returns whether the specified bars plottable is part of this group.

- -
-
- -

§ append()

- -
-
- - - - - - - - -
void QCPBarsGroup::append (QCPBarsbars)
-
-

Adds the specified bars plottable to this group. Alternatively, you can also use QCPBars::setBarsGroup on the bars instance.

-
See also
insert, remove
- -
-
- -

§ insert()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPBarsGroup::insert (int i,
QCPBarsbars 
)
-
-

Inserts the specified bars plottable into this group at the specified index position i. This gives you full control over the ordering of the bars.

-

bars may already be part of this group. In that case, bars is just moved to the new index position.

-
See also
append, remove
- -
-
- -

§ remove()

- -
-
- - - - - - - - -
void QCPBarsGroup::remove (QCPBarsbars)
-
-

Removes the specified bars plottable from this group.

-
See also
contains, clear
- -
-
- -

§ registerBars()

- -
-
- - - - - -
- - - - - - - - -
void QCPBarsGroup::registerBars (QCPBarsbars)
-
-protected
-
-

Adds the specified bars to the internal mBars list of bars. This method does not change the barsGroup property on bars.

-
See also
unregisterBars
- -
-
- -

§ unregisterBars()

- -
-
- - - - - -
- - - - - - - - -
void QCPBarsGroup::unregisterBars (QCPBarsbars)
-
-protected
-
-

Removes the specified bars from the internal mBars list of bars. This method does not change the barsGroup property on bars.

-
See also
registerBars
- -
-
- -

§ keyPixelOffset()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
double QCPBarsGroup::keyPixelOffset (const QCPBarsbars,
double keyCoord 
)
-
-protected
-
-

Returns the pixel offset in the key dimension the specified bars plottable should have at the given key coordinate keyCoord. The offset is relative to the pixel position of the key coordinate keyCoord.

- -
-
- -

§ getPixelSpacing()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
double QCPBarsGroup::getPixelSpacing (const QCPBarsbars,
double keyCoord 
)
-
-protected
-
-

Returns the spacing in pixels which is between this bars and the following one, both at the key coordinate keyCoord.

-
Note
Typically the returned value doesn't depend on bars or keyCoord. bars is only needed to get access to the key axis transformation and axis rect for the modes stAxisRectRatio and stPlotCoords. The keyCoord is only relevant for spacings given in stPlotCoords on a logarithmic axis.
- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPBars__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPBars__inherit__graph.png deleted file mode 100644 index 0854a7ff..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPBars__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPColorGradient.html b/third_party/qcustomplot/documentation/html/classQCPColorGradient.html deleted file mode 100644 index 1c2ded94..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPColorGradient.html +++ /dev/null @@ -1,678 +0,0 @@ - - - - - - -QCPColorGradient Class Reference - - - - -
- -
-
QCPColorGradient Class Reference
-
-
- -

Defines a color gradient for use with e.g. QCPColorMap. - More...

- - - - - - - - -

-Public Types

enum  ColorInterpolation
 
enum  NanHandling
 
enum  GradientPreset
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPColorGradient ()
 
 QCPColorGradient (GradientPreset preset)
 
-bool operator== (const QCPColorGradient &other) const
 
-bool operator!= (const QCPColorGradient &other) const
 
-int levelCount () const
 
-QMap< double, QColor > colorStops () const
 
-ColorInterpolation colorInterpolation () const
 
-NanHandling nanHandling () const
 
-QColor nanColor () const
 
-bool periodic () const
 
void setLevelCount (int n)
 
void setColorStops (const QMap< double, QColor > &colorStops)
 
void setColorStopAt (double position, const QColor &color)
 
void setColorInterpolation (ColorInterpolation interpolation)
 
void setNanHandling (NanHandling handling)
 
void setNanColor (const QColor &color)
 
void setPeriodic (bool enabled)
 
void colorize (const double *data, const QCPRange &range, QRgb *scanLine, int n, int dataIndexFactor=1, bool logarithmic=false)
 
void colorize (const double *data, const unsigned char *alpha, const QCPRange &range, QRgb *scanLine, int n, int dataIndexFactor=1, bool logarithmic=false)
 
QRgb color (double position, const QCPRange &range, bool logarithmic=false)
 
void loadPreset (GradientPreset preset)
 
void clearColorStops ()
 
QCPColorGradient inverted () const
 
- - - - - -

-Protected Functions

bool stopsUseAlpha () const
 
void updateColorBuffer ()
 
-

Detailed Description

-

Defines a color gradient for use with e.g. QCPColorMap.

-

This class describes a color gradient which can be used to encode data with color. For example, QCPColorMap and QCPColorScale have setGradient methods which take an instance of this class. Colors are set with setColorStopAt(double position, const QColor &color) with a position from 0 to 1. In between these defined color positions, the color will be interpolated linearly either in RGB or HSV space, see setColorInterpolation.

-

Alternatively, load one of the preset color gradients shown in the image below, with loadPreset, or by directly specifying the preset in the constructor.

-

Apart from red, green and blue components, the gradient also interpolates the alpha values of the configured color stops. This allows to display some portions of the data range as transparent in the plot.

-

How NaN values are interpreted can be configured with setNanHandling.

-
-QCPColorGradient.png -
-

The constructor QCPColorGradient(GradientPreset preset) allows directly converting a GradientPreset to a QCPColorGradient. This means that you can directly pass GradientPreset to all the setGradient methods, e.g.:

colorMap->setGradient(QCPColorGradient::gpHot);

The total number of levels used in the gradient can be set with setLevelCount. Whether the color gradient shall be applied periodically (wrapping around) to data values that lie outside the data range specified on the plottable instance can be controlled with setPeriodic.

-

Member Enumeration Documentation

- -

§ ColorInterpolation

- -
-
-

Defines the color spaces in which color interpolation between gradient stops can be performed.

-
See also
setColorInterpolation
- - - -
Enumerator
ciRGB 

Color channels red, green and blue are linearly interpolated.

-
ciHSV 

Color channels hue, saturation and value are linearly interpolated (The hue is interpolated over the shortest angle distance)

-
- -
-
- -

§ NanHandling

- -
-
-

Defines how NaN data points shall appear in the plot.

-
See also
setNanHandling, setNanColor
- - - - - - -
Enumerator
nhNone 

NaN data points are not explicitly handled and shouldn't occur in the data (this gives slight performance improvement)

-
nhLowestColor 

NaN data points appear as the lowest color defined in this QCPColorGradient.

-
nhHighestColor 

NaN data points appear as the highest color defined in this QCPColorGradient.

-
nhTransparent 

NaN data points appear transparent.

-
nhNanColor 

NaN data points appear as the color defined with setNanColor.

-
- -
-
- -

§ GradientPreset

- -
-
-

Defines the available presets that can be loaded with loadPreset. See the documentation there for an image of the presets.

- - - - - - - - - - - - - -
Enumerator
gpGrayscale 

Continuous lightness from black to white (suited for non-biased data representation)

-
gpHot 

Continuous lightness from black over firey colors to white (suited for non-biased data representation)

-
gpCold 

Continuous lightness from black over icey colors to white (suited for non-biased data representation)

-
gpNight 

Continuous lightness from black over weak blueish colors to white (suited for non-biased data representation)

-
gpCandy 

Blue over pink to white.

-
gpGeography 

Colors suitable to represent different elevations on geographical maps.

-
gpIon 

Half hue spectrum from black over purple to blue and finally green (creates banding illusion but allows more precise magnitude estimates)

-
gpThermal 

Colors suitable for thermal imaging, ranging from dark blue over purple to orange, yellow and white.

-
gpPolar 

Colors suitable to emphasize polarity around the center, with blue for negative, black in the middle and red for positive values.

-
gpSpectrum 

An approximation of the visible light spectrum (creates banding illusion but allows more precise magnitude estimates)

-
gpJet 

Hue variation similar to a spectrum, often used in numerical visualization (creates banding illusion but allows more precise magnitude estimates)

-
gpHues 

Full hue cycle, with highest and lowest color red (suitable for periodic data, such as angles and phases, see setPeriodic)

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPColorGradient() [1/2]

- -
-
- - - - - - - -
QCPColorGradient::QCPColorGradient ()
-
-

Constructs a new, empty QCPColorGradient with no predefined color stops. You can add own color stops with setColorStopAt.

-

The color level count is initialized to 350.

- -
-
- -

§ QCPColorGradient() [2/2]

- -
-
- - - - - - - - -
QCPColorGradient::QCPColorGradient (GradientPreset preset)
-
-

Constructs a new QCPColorGradient initialized with the colors and color interpolation according to preset.

-

The color level count is initialized to 350.

- -
-
-

Member Function Documentation

- -

§ setLevelCount()

- -
-
- - - - - - - - -
void QCPColorGradient::setLevelCount (int n)
-
-

Sets the number of discretization levels of the color gradient to n. The default is 350 which is typically enough to create a smooth appearance. The minimum number of levels is 2.

-
-QCPColorGradient-levelcount.png -
- -
-
- -

§ setColorStops()

- -
-
- - - - - - - - -
void QCPColorGradient::setColorStops (const QMap< double, QColor > & colorStops)
-
-

Sets at which positions from 0 to 1 which color shall occur. The positions are the keys, the colors are the values of the passed QMap colorStops. In between these color stops, the color is interpolated according to setColorInterpolation.

-

A more convenient way to create a custom gradient may be to clear all color stops with clearColorStops (or creating a new, empty QCPColorGradient) and then adding them one by one with setColorStopAt.

-
See also
clearColorStops
- -
-
- -

§ setColorStopAt()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPColorGradient::setColorStopAt (double position,
const QColor & color 
)
-
-

Sets the color the gradient will have at the specified position (from 0 to 1). In between these color stops, the color is interpolated according to setColorInterpolation.

-
See also
setColorStops, clearColorStops
- -
-
- -

§ setColorInterpolation()

- -
-
- - - - - - - - -
void QCPColorGradient::setColorInterpolation (QCPColorGradient::ColorInterpolation interpolation)
-
-

Sets whether the colors in between the configured color stops (see setColorStopAt) shall be interpolated linearly in RGB or in HSV color space.

-

For example, a sweep in RGB space from red to green will have a muddy brown intermediate color, whereas in HSV space the intermediate color is yellow.

- -
-
- -

§ setNanHandling()

- -
-
- - - - - - - - -
void QCPColorGradient::setNanHandling (QCPColorGradient::NanHandling handling)
-
-

Sets how NaNs in the data are displayed in the plot.

-
See also
setNanColor
- -
-
- -

§ setNanColor()

- -
-
- - - - - - - - -
void QCPColorGradient::setNanColor (const QColor & color)
-
-

Sets the color that NaN data is represented by, if setNanHandling is set to ref nhNanColor.

-
See also
setNanHandling
- -
-
- -

§ setPeriodic()

- -
-
- - - - - - - - -
void QCPColorGradient::setPeriodic (bool enabled)
-
-

Sets whether data points that are outside the configured data range (e.g. QCPColorMap::setDataRange) are colored by periodically repeating the color gradient or whether they all have the same color, corresponding to the respective gradient boundary color.

-
-QCPColorGradient-periodic.png -
-

As shown in the image above, gradients that have the same start and end color are especially suitable for a periodic gradient mapping, since they produce smooth color transitions throughout the color map. A preset that has this property is gpHues.

-

In practice, using periodic color gradients makes sense when the data corresponds to a periodic dimension, such as an angle or a phase. If this is not the case, the color encoding might become ambiguous, because multiple different data values are shown as the same color.

- -
-
- -

§ colorize() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPColorGradient::colorize (const double * data,
const QCPRangerange,
QRgb * scanLine,
int n,
int dataIndexFactor = 1,
bool logarithmic = false 
)
-
-

This is an overloaded function.

-

This method is used to quickly convert a data array to colors. The colors will be output in the array scanLine. Both data and scanLine must have the length n when passed to this function. The data range that shall be used for mapping the data value to the gradient is passed in range. logarithmic indicates whether the data values shall be mapped to colors logarithmically.

-

if data actually contains 2D-data linearized via [row*columnCount + column], you can set dataIndexFactor to columnCount to convert a column instead of a row of the data array, in scanLine. scanLine will remain a regular (1D) array. This works because data is addressed data[i*dataIndexFactor].

-

Use the overloaded method to additionally provide alpha map data.

-

The QRgb values that are placed in scanLine have their r, g, and b components premultiplied with alpha (see QImage::Format_ARGB32_Premultiplied).

- -
-
- -

§ colorize() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPColorGradient::colorize (const double * data,
const unsigned char * alpha,
const QCPRangerange,
QRgb * scanLine,
int n,
int dataIndexFactor = 1,
bool logarithmic = false 
)
-
-

This is an overloaded function.

-

Additionally to the other overload of colorize, this method takes the array alpha, which has the same size and structure as data and encodes the alpha information per data point.

-

The QRgb values that are placed in scanLine have their r, g and b components premultiplied with alpha (see QImage::Format_ARGB32_Premultiplied).

- -
-
- -

§ color()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
QRgb QCPColorGradient::color (double position,
const QCPRangerange,
bool logarithmic = false 
)
-
-

This method is used to colorize a single data value given in position, to colors. The data range that shall be used for mapping the data value to the gradient is passed in range. logarithmic indicates whether the data value shall be mapped to a color logarithmically.

-

If an entire array of data values shall be converted, rather use colorize, for better performance.

-

The returned QRgb has its r, g and b components premultiplied with alpha (see QImage::Format_ARGB32_Premultiplied).

- -
-
- -

§ loadPreset()

- -
-
- - - - - - - - -
void QCPColorGradient::loadPreset (GradientPreset preset)
-
-

Clears the current color stops and loads the specified preset. A preset consists of predefined color stops and the corresponding color interpolation method.

-

The available presets are:

-QCPColorGradient.png -
- -
-
- -

§ clearColorStops()

- -
-
- - - - - - - -
void QCPColorGradient::clearColorStops ()
-
-

Clears all color stops.

-
See also
setColorStops, setColorStopAt
- -
-
- -

§ inverted()

- -
-
- - - - - - - -
QCPColorGradient QCPColorGradient::inverted () const
-
-

Returns an inverted gradient. The inverted gradient has all properties as this QCPColorGradient, but the order of the color stops is inverted.

-
See also
setColorStops, setColorStopAt
- -
-
- -

§ stopsUseAlpha()

- -
-
- - - - - -
- - - - - - - -
bool QCPColorGradient::stopsUseAlpha () const
-
-protected
-
-

Returns true if the color gradient uses transparency, i.e. if any of the configured color stops has an alpha value below 255.

- -
-
- -

§ updateColorBuffer()

- -
-
- - - - - -
- - - - - - - -
void QCPColorGradient::updateColorBuffer ()
-
-protected
-
-

Updates the internal color buffer which will be used by colorize and color, to quickly convert positions to colors. This is where the interpolation between color stops is calculated.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/colorgradient.h
  • -
  • src/colorgradient.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPColorMap.html b/third_party/qcustomplot/documentation/html/classQCPColorMap.html deleted file mode 100644 index 901a951d..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPColorMap.html +++ /dev/null @@ -1,892 +0,0 @@ - - - - - - -QCPColorMap Class Reference - - - - -
- -
-
QCPColorMap Class Reference
-
-
- -

A plottable representing a two-dimensional color map in a plot. - More...

-
-Inheritance diagram for QCPColorMap:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPColorMap (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
QCPColorMapDatadata () const
 
-QCPRange dataRange () const
 
-QCPAxis::ScaleType dataScaleType () const
 
-bool interpolate () const
 
-bool tightBoundary () const
 
-QCPColorGradient gradient () const
 
-QCPColorScalecolorScale () const
 
void setData (QCPColorMapData *data, bool copy=false)
 
Q_SLOT void setDataRange (const QCPRange &dataRange)
 
Q_SLOT void setDataScaleType (QCPAxis::ScaleType scaleType)
 
Q_SLOT void setGradient (const QCPColorGradient &gradient)
 
void setInterpolate (bool enabled)
 
void setTightBoundary (bool enabled)
 
void setColorScale (QCPColorScale *colorScale)
 
void rescaleDataRange (bool recalculateDataBounds=false)
 
Q_SLOT void updateLegendIcon (Qt::TransformationMode transformMode=Qt::SmoothTransformation, const QSize &thumbSize=QSize(32, 18))
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
virtual QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const
 
virtual QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const
 
- Public Functions inherited from QCPAbstractPlottable
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
-QString name () const
 
-bool antialiasedFill () const
 
-bool antialiasedScatters () const
 
-QPen pen () const
 
-QBrush brush () const
 
-QCPAxiskeyAxis () const
 
-QCPAxisvalueAxis () const
 
-QCP::SelectionType selectable () const
 
bool selected () const
 
QCPDataSelection selection () const
 
QCPSelectionDecoratorselectionDecorator () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (QCP::SelectionType selectable)
 
Q_SLOT void setSelection (QCPDataSelection selection)
 
void setSelectionDecorator (QCPSelectionDecorator *decorator)
 
virtual QCPPlottableInterface1Dinterface1D ()
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false, bool inKeyRange=false) const
 
bool addToLegend (QCPLegend *legend)
 
bool addToLegend ()
 
bool removeFromLegend (QCPLegend *legend) const
 
bool removeFromLegend () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - -

-Signals

void dataRangeChanged (const QCPRange &newRange)
 
void dataScaleTypeChanged (QCPAxis::ScaleType scaleType)
 
void gradientChanged (const QCPColorGradient &newGradient)
 
- Signals inherited from QCPAbstractPlottable
void selectionChanged (bool selected)
 
void selectionChanged (const QCPDataSelection &selection)
 
void selectableChanged (QCP::SelectionType selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void updateMapImage ()
 
virtual void draw (QCPPainter *painter)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const
 
- Protected Functions inherited from QCPAbstractPlottable
virtual QRect clipRect () const
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
-

Detailed Description

-

A plottable representing a two-dimensional color map in a plot.

-
-QCPColorMap.png -
-

The data is stored in the class QCPColorMapData, which can be accessed via the data() method.

-

A color map has three dimensions to represent a data point: The key dimension, the value dimension and the data dimension. As with other plottables such as graphs, key and value correspond to two orthogonal axes on the QCustomPlot surface that you specify in the QCPColorMap constructor. The data dimension however is encoded as the color of the point at (key, value).

-

Set the number of points (or cells) in the key/value dimension via QCPColorMapData::setSize. The plot coordinate range over which these points will be displayed is specified via QCPColorMapData::setRange. The first cell will be centered on the lower range boundary and the last cell will be centered on the upper range boundary. The data can be set by either accessing the cells directly with QCPColorMapData::setCell or by addressing the cells via their plot coordinates with QCPColorMapData::setData. If possible, you should prefer setCell, since it doesn't need to do any coordinate transformation and thus performs a bit better.

-

The cell with index (0, 0) is at the bottom left, if the color map uses normal (i.e. not reversed) key and value axes.

-

To show the user which colors correspond to which data values, a QCPColorScale is typically placed to the right of the axis rect. See the documentation there for details on how to add and use a color scale.

-

-Changing the appearance

-

Most important to the appearance is the color gradient, which can be specified via setGradient. See the documentation of QCPColorGradient for details on configuring a color gradient.

-

The data range that is mapped to the colors of the gradient can be specified with setDataRange. To make the data range encompass the whole data set minimum to maximum, call rescaleDataRange. If your data may contain NaN values, use QCPColorGradient::setNanHandling to define how they are displayed.

-

-Transparency

-

Transparency in color maps can be achieved by two mechanisms. On one hand, you can specify alpha values for color stops of the QCPColorGradient, via the regular QColor interface. This will cause the color map data which gets mapped to colors around those color stops to appear with the accordingly interpolated transparency.

-

On the other hand you can also directly apply an alpha value to each cell independent of its data, by using the alpha map feature of QCPColorMapData. The relevant methods are QCPColorMapData::setAlpha, QCPColorMapData::fillAlpha and QCPColorMapData::clearAlpha().

-

The two transparencies will be joined together in the plot and otherwise not interfere with each other. They are mixed in a multiplicative matter, so an alpha of e.g. 50% (128/255) in both modes simultaneously, will result in a total transparency of 25% (64/255).

-

-Usage

-

Like all data representing objects in QCustomPlot, the QCPColorMap is a plottable (QCPAbstractPlottable). So the plottable-interface of QCustomPlot applies (QCustomPlot::plottable, QCustomPlot::removePlottable, etc.)

-

Usually, you first create an instance:

QCPColorMap *colorMap = new QCPColorMap(customPlot->xAxis, customPlot->yAxis);

which registers it with the QCustomPlot instance of the passed axes. Note that this QCustomPlot instance takes ownership of the plottable, so do not delete it manually but use QCustomPlot::removePlottable() instead. The newly created plottable can be modified, e.g.:

colorMap->data()->setSize(50, 50);
colorMap->data()->setRange(QCPRange(0, 2), QCPRange(0, 2));
for (int x=0; x<50; ++x)
for (int y=0; y<50; ++y)
colorMap->data()->setCell(x, y, qCos(x/10.0)+qSin(y/10.0));
colorMap->rescaleDataRange(true);
customPlot->rescaleAxes();
customPlot->replot();
Note
The QCPColorMap always displays the data at equal key/value intervals, even if the key or value axis is set to a logarithmic scaling. If you want to use QCPColorMap with logarithmic axes, you shouldn't use the QCPColorMapData::setData method as it uses a linear transformation to determine the cell index. Rather directly access the cell index with QCPColorMapData::setCell.
-

Constructor & Destructor Documentation

- -

§ QCPColorMap()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPColorMap::QCPColorMap (QCPAxiskeyAxis,
QCPAxisvalueAxis 
)
-
-explicit
-
-

Constructs a color map with the specified keyAxis and valueAxis.

-

The created QCPColorMap is automatically registered with the QCustomPlot instance inferred from keyAxis. This QCustomPlot instance takes ownership of the QCPColorMap, so do not delete it manually but use QCustomPlot::removePlottable() instead.

- -
-
-

Member Function Documentation

- -

§ data()

- -
-
- - - - - -
- - - - - - - -
QCPColorMapData * QCPColorMap::data () const
-
-inline
-
-

Returns a pointer to the internal data storage of type QCPColorMapData. Access this to modify data points (cells) and the color map key/value range.

-
See also
setData
- -
-
- -

§ setData()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPColorMap::setData (QCPColorMapDatadata,
bool copy = false 
)
-
-

Replaces the current data with the provided data.

-

If copy is set to true, the data object will only be copied. if false, the color map takes ownership of the passed data and replaces the internal data pointer with it. This is significantly faster than copying for large datasets.

- -
-
- -

§ setDataRange()

- -
-
- - - - - - - - -
void QCPColorMap::setDataRange (const QCPRangedataRange)
-
-

Sets the data range of this color map to dataRange. The data range defines which data values are mapped to the color gradient.

-

To make the data range span the full range of the data set, use rescaleDataRange.

-
See also
QCPColorScale::setDataRange
- -
-
- -

§ setDataScaleType()

- -
-
- - - - - - - - -
void QCPColorMap::setDataScaleType (QCPAxis::ScaleType scaleType)
-
-

Sets whether the data is correlated with the color gradient linearly or logarithmically.

-
See also
QCPColorScale::setDataScaleType
- -
-
- -

§ setGradient()

- -
-
- - - - - - - - -
void QCPColorMap::setGradient (const QCPColorGradientgradient)
-
-

Sets the color gradient that is used to represent the data. For more details on how to create an own gradient or use one of the preset gradients, see QCPColorGradient.

-

The colors defined by the gradient will be used to represent data values in the currently set data range, see setDataRange. Data points that are outside this data range will either be colored uniformly with the respective gradient boundary color, or the gradient will repeat, depending on QCPColorGradient::setPeriodic.

-
See also
QCPColorScale::setGradient
- -
-
- -

§ setInterpolate()

- -
-
- - - - - - - - -
void QCPColorMap::setInterpolate (bool enabled)
-
-

Sets whether the color map image shall use bicubic interpolation when displaying the color map shrinked or expanded, and not at a 1:1 pixel-to-data scale.

-
-QCPColorMap-interpolate.png -
-A 10*10 color map, with interpolation and without interpolation enabled
- -
-
- -

§ setTightBoundary()

- -
-
- - - - - - - - -
void QCPColorMap::setTightBoundary (bool enabled)
-
-

Sets whether the outer most data rows and columns are clipped to the specified key and value range (see QCPColorMapData::setKeyRange, QCPColorMapData::setValueRange).

-

if enabled is set to false, the data points at the border of the color map are drawn with the same width and height as all other data points. Since the data points are represented by rectangles of one color centered on the data coordinate, this means that the shown color map extends by half a data point over the specified key/value range in each direction.

-
-QCPColorMap-tightboundary.png -
-A color map, with tight boundary enabled and disabled
- -
-
- -

§ setColorScale()

- -
-
- - - - - - - - -
void QCPColorMap::setColorScale (QCPColorScalecolorScale)
-
-

Associates the color scale colorScale with this color map.

-

This means that both the color scale and the color map synchronize their gradient, data range and data scale type (setGradient, setDataRange, setDataScaleType). Multiple color maps can be associated with one single color scale. This causes the color maps to also synchronize those properties, via the mutual color scale.

-

This function causes the color map to adopt the current color gradient, data range and data scale type of colorScale. After this call, you may change these properties at either the color map or the color scale, and the setting will be applied to both.

-

Pass nullptr as colorScale to disconnect the color scale from this color map again.

- -
-
- -

§ rescaleDataRange()

- -
-
- - - - - - - - -
void QCPColorMap::rescaleDataRange (bool recalculateDataBounds = false)
-
-

Sets the data range (setDataRange) to span the minimum and maximum values that occur in the current data set. This corresponds to the rescaleKeyAxis or rescaleValueAxis methods, only for the third data dimension of the color map.

-

The minimum and maximum values of the data set are buffered in the internal QCPColorMapData instance (data). As data is updated via its QCPColorMapData::setCell or QCPColorMapData::setData, the buffered minimum and maximum values are updated, too. For performance reasons, however, they are only updated in an expanding fashion. So the buffered maximum can only increase and the buffered minimum can only decrease. In consequence, changes to the data that actually lower the maximum of the data set (by overwriting the cell holding the current maximum with a smaller value), aren't recognized and the buffered maximum overestimates the true maximum of the data set. The same happens for the buffered minimum. To recalculate the true minimum and maximum by explicitly looking at each cell, the method QCPColorMapData::recalculateDataBounds can be used. For convenience, setting the parameter recalculateDataBounds calls this method before setting the data range to the buffered minimum and maximum.

-
See also
setDataRange
- -
-
- -

§ updateLegendIcon()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPColorMap::updateLegendIcon (Qt::TransformationMode transformMode = Qt::SmoothTransformation,
const QSize & thumbSize = QSize(32, 18) 
)
-
-

Takes the current appearance of the color map and updates the legend icon, which is used to represent this color map in the legend (see QCPLegend).

-

The transformMode specifies whether the rescaling is done by a faster, low quality image scaling algorithm (Qt::FastTransformation) or by a slower, higher quality algorithm (Qt::SmoothTransformation).

-

The current color map appearance is scaled down to thumbSize. Ideally, this should be equal to the size of the legend icon (see QCPLegend::setIconSize). If it isn't exactly the configured legend icon size, the thumb will be rescaled during drawing of the legend item.

-
See also
setDataRange
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPColorMap::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ getKeyRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPRange QCPColorMap::getKeyRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth 
) const
-
-virtual
-
-

Returns the coordinate range that all data in this plottable span in the key axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getValueRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ getValueRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPRange QCPColorMap::getValueRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth,
const QCPRangeinKeyRange = QCPRange() 
) const
-
-virtual
-
-

Returns the coordinate range that the data points in the specified key range (inKeyRange) span in the value axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

If inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys.

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getKeyRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ dataRangeChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPColorMap::dataRangeChanged (const QCPRangenewRange)
-
-signal
-
-

This signal is emitted when the data range changes.

-
See also
setDataRange
- -
-
- -

§ dataScaleTypeChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPColorMap::dataScaleTypeChanged (QCPAxis::ScaleType scaleType)
-
-signal
-
-

This signal is emitted when the data scale type changes.

-
See also
setDataScaleType
- -
-
- -

§ gradientChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPColorMap::gradientChanged (const QCPColorGradientnewGradient)
-
-signal
-
-

This signal is emitted when the gradient changes.

-
See also
setGradient
- -
-
- -

§ updateMapImage()

- -
-
- - - - - -
- - - - - - - -
void QCPColorMap::updateMapImage ()
-
-protectedvirtual
-
-

Updates the internal map image buffer by going through the internal QCPColorMapData and turning the data values into color pixels with QCPColorGradient::colorize.

-

This method is called by QCPColorMap::draw if either the data has been modified or the map image has been invalidated for a different reason (e.g. a change of the data range with setDataRange).

-

If the map cell count is low, the image created will be oversampled in order to avoid a QPainter::drawImage bug which makes inner pixel boundaries jitter when stretch-drawing images without smooth transform enabled. Accordingly, oversampling isn't performed if setInterpolate is true.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPColorMap::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ drawLegendIcon()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPColorMap::drawLegendIcon (QCPPainterpainter,
const QRectF & rect 
) const
-
-protectedvirtual
-
-

called by QCPLegend::draw (via QCPPlottableLegendItem::draw) to create a graphical representation of this plottable inside rect, next to the plottable name.

-

The passed painter has its cliprect set to rect, so painting outside of rect won't appear outside the legend icon border.

- -

Implements QCPAbstractPlottable.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/plottables/plottable-colormap.h
  • -
  • src/plottables/plottable-colormap.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPColorMapData.html b/third_party/qcustomplot/documentation/html/classQCPColorMapData.html deleted file mode 100644 index 73962488..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPColorMapData.html +++ /dev/null @@ -1,730 +0,0 @@ - - - - - - -QCPColorMapData Class Reference - - - - -
- -
-
QCPColorMapData Class Reference
-
-
- -

Holds the two-dimensional data of a QCPColorMap plottable. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPColorMapData (int keySize, int valueSize, const QCPRange &keyRange, const QCPRange &valueRange)
 
 QCPColorMapData (const QCPColorMapData &other)
 
QCPColorMapDataoperator= (const QCPColorMapData &other)
 
-int keySize () const
 
-int valueSize () const
 
-QCPRange keyRange () const
 
-QCPRange valueRange () const
 
-QCPRange dataBounds () const
 
-double data (double key, double value)
 
-double cell (int keyIndex, int valueIndex)
 
unsigned char alpha (int keyIndex, int valueIndex)
 
void setSize (int keySize, int valueSize)
 
void setKeySize (int keySize)
 
void setValueSize (int valueSize)
 
void setRange (const QCPRange &keyRange, const QCPRange &valueRange)
 
void setKeyRange (const QCPRange &keyRange)
 
void setValueRange (const QCPRange &valueRange)
 
void setData (double key, double value, double z)
 
void setCell (int keyIndex, int valueIndex, double z)
 
void setAlpha (int keyIndex, int valueIndex, unsigned char alpha)
 
void recalculateDataBounds ()
 
void clear ()
 
void clearAlpha ()
 
void fill (double z)
 
void fillAlpha (unsigned char alpha)
 
bool isEmpty () const
 
void coordToCell (double key, double value, int *keyIndex, int *valueIndex) const
 
void cellToCoord (int keyIndex, int valueIndex, double *key, double *value) const
 
- - - -

-Protected Functions

bool createAlpha (bool initializeOpaque=true)
 
-

Detailed Description

-

Holds the two-dimensional data of a QCPColorMap plottable.

-

This class is a data storage for QCPColorMap. It holds a two-dimensional array, which QCPColorMap then displays as a 2D image in the plot, where the array values are represented by a color, depending on the value.

-

The size of the array can be controlled via setSize (or setKeySize, setValueSize). Which plot coordinates these cells correspond to can be configured with setRange (or setKeyRange, setValueRange).

-

The data cells can be accessed in two ways: They can be directly addressed by an integer index with setCell. This is the fastest method. Alternatively, they can be addressed by their plot coordinate with setData. plot coordinate to cell index transformations and vice versa are provided by the functions coordToCell and cellToCoord.

-

A QCPColorMapData also holds an on-demand two-dimensional array of alpha values which (if allocated) has the same size as the data map. It can be accessed via setAlpha, fillAlpha and clearAlpha. The memory for the alpha map is only allocated if needed, i.e. on the first call of setAlpha. clearAlpha restores full opacity and frees the alpha map.

-

This class also buffers the minimum and maximum values that are in the data set, to provide QCPColorMap::rescaleDataRange with the necessary information quickly. Setting a cell to a value that is greater than the current maximum increases this maximum to the new value. However, setting the cell that currently holds the maximum value to a smaller value doesn't decrease the maximum again, because finding the true new maximum would require going through the entire data array, which might be time consuming. The same holds for the data minimum. This functionality is given by recalculateDataBounds, such that you can decide when it is sensible to find the true current minimum and maximum. The method QCPColorMap::rescaleDataRange offers a convenience parameter recalculateDataBounds which may be set to true to automatically call recalculateDataBounds internally.

-

Constructor & Destructor Documentation

- -

§ QCPColorMapData() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QCPColorMapData::QCPColorMapData (int keySize,
int valueSize,
const QCPRangekeyRange,
const QCPRangevalueRange 
)
-
-

Constructs a new QCPColorMapData instance. The instance has keySize cells in the key direction and valueSize cells in the value direction. These cells will be displayed by the QCPColorMap at the coordinates keyRange and valueRange.

-
See also
setSize, setKeySize, setValueSize, setRange, setKeyRange, setValueRange
- -
-
- -

§ QCPColorMapData() [2/2]

- -
-
- - - - - - - - -
QCPColorMapData::QCPColorMapData (const QCPColorMapDataother)
-
-

Constructs a new QCPColorMapData instance copying the data and range of other.

- -
-
-

Member Function Documentation

- -

§ operator=()

- -
-
- - - - - - - - -
QCPColorMapData & QCPColorMapData::operator= (const QCPColorMapDataother)
-
-

Overwrites this color map data instance with the data stored in other. The alpha map state is transferred, too.

- -
-
- -

§ alpha()

- -
-
- - - - - - - - - - - - - - - - - - -
unsigned char QCPColorMapData::alpha (int keyIndex,
int valueIndex 
)
-
-

Returns the alpha map value of the cell with the indices keyIndex and valueIndex.

-

If this color map data doesn't have an alpha map (because setAlpha was never called after creation or after a call to clearAlpha), returns 255, which corresponds to full opacity.

-
See also
setAlpha
- -
-
- -

§ setSize()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPColorMapData::setSize (int keySize,
int valueSize 
)
-
-

Resizes the data array to have keySize cells in the key dimension and valueSize cells in the value dimension.

-

The current data is discarded and the map cells are set to 0, unless the map had already the requested size.

-

Setting at least one of keySize or valueSize to zero frees the internal data array and isEmpty returns true.

-
See also
setRange, setKeySize, setValueSize
- -
-
- -

§ setKeySize()

- -
-
- - - - - - - - -
void QCPColorMapData::setKeySize (int keySize)
-
-

Resizes the data array to have keySize cells in the key dimension.

-

The current data is discarded and the map cells are set to 0, unless the map had already the requested size.

-

Setting keySize to zero frees the internal data array and isEmpty returns true.

-
See also
setKeyRange, setSize, setValueSize
- -
-
- -

§ setValueSize()

- -
-
- - - - - - - - -
void QCPColorMapData::setValueSize (int valueSize)
-
-

Resizes the data array to have valueSize cells in the value dimension.

-

The current data is discarded and the map cells are set to 0, unless the map had already the requested size.

-

Setting valueSize to zero frees the internal data array and isEmpty returns true.

-
See also
setValueRange, setSize, setKeySize
- -
-
- -

§ setRange()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPColorMapData::setRange (const QCPRangekeyRange,
const QCPRangevalueRange 
)
-
-

Sets the coordinate ranges the data shall be distributed over. This defines the rectangular area covered by the color map in plot coordinates.

-

The outer cells will be centered on the range boundaries given to this function. For example, if the key size (setKeySize) is 3 and keyRange is set to QCPRange(2, 3) there will be cells centered on the key coordinates 2, 2.5 and 3.

-
See also
setSize
- -
-
- -

§ setKeyRange()

- -
-
- - - - - - - - -
void QCPColorMapData::setKeyRange (const QCPRangekeyRange)
-
-

Sets the coordinate range the data shall be distributed over in the key dimension. Together with the value range, This defines the rectangular area covered by the color map in plot coordinates.

-

The outer cells will be centered on the range boundaries given to this function. For example, if the key size (setKeySize) is 3 and keyRange is set to QCPRange(2, 3) there will be cells centered on the key coordinates 2, 2.5 and 3.

-
See also
setRange, setValueRange, setSize
- -
-
- -

§ setValueRange()

- -
-
- - - - - - - - -
void QCPColorMapData::setValueRange (const QCPRangevalueRange)
-
-

Sets the coordinate range the data shall be distributed over in the value dimension. Together with the key range, This defines the rectangular area covered by the color map in plot coordinates.

-

The outer cells will be centered on the range boundaries given to this function. For example, if the value size (setValueSize) is 3 and valueRange is set to QCPRange(2, 3) there will be cells centered on the value coordinates 2, 2.5 and 3.

-
See also
setRange, setKeyRange, setSize
- -
-
- -

§ setData()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPColorMapData::setData (double key,
double value,
double z 
)
-
-

Sets the data of the cell, which lies at the plot coordinates given by key and value, to z.

-
Note
The QCPColorMap always displays the data at equal key/value intervals, even if the key or value axis is set to a logarithmic scaling. If you want to use QCPColorMap with logarithmic axes, you shouldn't use the QCPColorMapData::setData method as it uses a linear transformation to determine the cell index. Rather directly access the cell index with QCPColorMapData::setCell.
-
See also
setCell, setRange
- -
-
- -

§ setCell()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPColorMapData::setCell (int keyIndex,
int valueIndex,
double z 
)
-
-

Sets the data of the cell with indices keyIndex and valueIndex to z. The indices enumerate the cells starting from zero, up to the map's size-1 in the respective dimension (see setSize).

-

In the standard plot configuration (horizontal key axis and vertical value axis, both not range-reversed), the cell with indices (0, 0) is in the bottom left corner and the cell with indices (keySize-1, valueSize-1) is in the top right corner of the color map.

-
See also
setData, setSize
- -
-
- -

§ setAlpha()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPColorMapData::setAlpha (int keyIndex,
int valueIndex,
unsigned char alpha 
)
-
-

Sets the alpha of the color map cell given by keyIndex and valueIndex to alpha. A value of 0 for alpha results in a fully transparent cell, and a value of 255 results in a fully opaque cell.

-

If an alpha map doesn't exist yet for this color map data, it will be created here. If you wish to restore full opacity and free any allocated memory of the alpha map, call clearAlpha.

-

Note that the cell-wise alpha which can be configured here is independent of any alpha configured in the color map's gradient (QCPColorGradient). If a cell is affected both by the cell-wise and gradient alpha, the alpha values will be blended accordingly during rendering of the color map.

-
See also
fillAlpha, clearAlpha
- -
-
- -

§ recalculateDataBounds()

- -
-
- - - - - - - -
void QCPColorMapData::recalculateDataBounds ()
-
-

Goes through the data and updates the buffered minimum and maximum data values.

-

Calling this method is only advised if you are about to call QCPColorMap::rescaleDataRange and can not guarantee that the cells holding the maximum or minimum data haven't been overwritten with a smaller or larger value respectively, since the buffered maximum/minimum values have been updated the last time. Why this is the case is explained in the class description (QCPColorMapData).

-

Note that the method QCPColorMap::rescaleDataRange provides a parameter recalculateDataBounds for convenience. Setting this to true will call this method for you, before doing the rescale.

- -
-
- -

§ clear()

- -
-
- - - - - - - -
void QCPColorMapData::clear ()
-
-

Frees the internal data memory.

-

This is equivalent to calling setSize(0, 0).

- -
-
- -

§ clearAlpha()

- -
-
- - - - - - - -
void QCPColorMapData::clearAlpha ()
-
-

Frees the internal alpha map. The color map will have full opacity again.

- -
-
- -

§ fill()

- -
-
- - - - - - - - -
void QCPColorMapData::fill (double z)
-
-

Sets all cells to the value z.

- -
-
- -

§ fillAlpha()

- -
-
- - - - - - - - -
void QCPColorMapData::fillAlpha (unsigned char alpha)
-
-

Sets the opacity of all color map cells to alpha. A value of 0 for alpha results in a fully transparent color map, and a value of 255 results in a fully opaque color map.

-

If you wish to restore opacity to 100% and free any used memory for the alpha map, rather use clearAlpha.

-
See also
setAlpha
- -
-
- -

§ isEmpty()

- -
-
- - - - - -
- - - - - - - -
bool QCPColorMapData::isEmpty () const
-
-inline
-
-

Returns whether this instance carries no data. This is equivalent to having a size where at least one of the dimensions is 0 (see setSize).

- -
-
- -

§ coordToCell()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPColorMapData::coordToCell (double key,
double value,
int * keyIndex,
int * valueIndex 
) const
-
-

Transforms plot coordinates given by key and value to cell indices of this QCPColorMapData instance. The resulting cell indices are returned via the output parameters keyIndex and valueIndex.

-

The retrieved key/value cell indices can then be used for example with setCell.

-

If you are only interested in a key or value index, you may pass nullptr as valueIndex or keyIndex.

-
Note
The QCPColorMap always displays the data at equal key/value intervals, even if the key or value axis is set to a logarithmic scaling. If you want to use QCPColorMap with logarithmic axes, you shouldn't use the QCPColorMapData::coordToCell method as it uses a linear transformation to determine the cell index.
-
See also
cellToCoord, QCPAxis::coordToPixel
- -
-
- -

§ cellToCoord()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPColorMapData::cellToCoord (int keyIndex,
int valueIndex,
double * key,
double * value 
) const
-
-

Transforms cell indices given by keyIndex and valueIndex to cell indices of this QCPColorMapData instance. The resulting coordinates are returned via the output parameters key and value.

-

If you are only interested in a key or value coordinate, you may pass nullptr as key or value.

-
Note
The QCPColorMap always displays the data at equal key/value intervals, even if the key or value axis is set to a logarithmic scaling. If you want to use QCPColorMap with logarithmic axes, you shouldn't use the QCPColorMapData::cellToCoord method as it uses a linear transformation to determine the cell index.
-
See also
coordToCell, QCPAxis::pixelToCoord
- -
-
- -

§ createAlpha()

- -
-
- - - - - -
- - - - - - - - -
bool QCPColorMapData::createAlpha (bool initializeOpaque = true)
-
-protected
-
-

Allocates the internal alpha map with the current data map key/value size and, if initializeOpaque is true, initializes all values to 255. If initializeOpaque is false, the values are not initialized at all. In this case, the alpha map should be initialized manually, e.g. with fillAlpha.

-

If an alpha map exists already, it is deleted first. If this color map is empty (has either key or value size zero, see isEmpty), the alpha map is cleared.

-

The return value indicates the existence of the alpha map after the call. So this method returns true if the data map isn't empty and an alpha map was successfully allocated.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/plottables/plottable-colormap.h
  • -
  • src/plottables/plottable-colormap.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPColorMap__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPColorMap__inherit__graph.png deleted file mode 100644 index 874011f8..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPColorMap__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPColorScale.html b/third_party/qcustomplot/documentation/html/classQCPColorScale.html deleted file mode 100644 index 43486fe9..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPColorScale.html +++ /dev/null @@ -1,823 +0,0 @@ - - - - - - -QCPColorScale Class Reference - - - - -
- -
-
QCPColorScale Class Reference
-
-
- -

A color scale for use with color coding data such as QCPColorMap. - More...

-
-Inheritance diagram for QCPColorScale:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPColorScale (QCustomPlot *parentPlot)
 
QCPAxisaxis () const
 
-QCPAxis::AxisType type () const
 
-QCPRange dataRange () const
 
-QCPAxis::ScaleType dataScaleType () const
 
-QCPColorGradient gradient () const
 
-QString label () const
 
-int barWidth () const
 
-bool rangeDrag () const
 
-bool rangeZoom () const
 
void setType (QCPAxis::AxisType type)
 
Q_SLOT void setDataRange (const QCPRange &dataRange)
 
Q_SLOT void setDataScaleType (QCPAxis::ScaleType scaleType)
 
Q_SLOT void setGradient (const QCPColorGradient &gradient)
 
void setLabel (const QString &str)
 
void setBarWidth (int width)
 
void setRangeDrag (bool enabled)
 
void setRangeZoom (bool enabled)
 
QList< QCPColorMap * > colorMaps () const
 
void rescaleDataRange (bool onlyVisibleMaps)
 
virtual void update (UpdatePhase phase)
 
- Public Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
virtual QSize minimumOuterSizeHint () const
 
virtual QSize maximumOuterSizeHint () const
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - -

-Signals

void dataRangeChanged (const QCPRange &newRange)
 
void dataScaleTypeChanged (QCPAxis::ScaleType scaleType)
 
void gradientChanged (const QCPColorGradient &newGradient)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void wheelEvent (QWheelEvent *event)
 
- Protected Functions inherited from QCPLayoutElement
virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
virtual void draw (QCPPainter *painter)
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
- Protected Functions inherited from QCPLayerable
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - -

-Additional Inherited Members

- Public Types inherited from QCPLayoutElement
enum  UpdatePhase
 
enum  SizeConstraintRect
 
-

Detailed Description

-

A color scale for use with color coding data such as QCPColorMap.

-

This layout element can be placed on the plot to correlate a color gradient with data values. It is usually used in combination with one or multiple QCPColorMaps.

-
-QCPColorScale.png -
-

The color scale can be either horizontal or vertical, as shown in the image above. The orientation and the side where the numbers appear is controlled with setType.

-

Use QCPColorMap::setColorScale to connect a color map with a color scale. Once they are connected, they share their gradient, data range and data scale type (setGradient, setDataRange, setDataScaleType). Multiple color maps may be associated with a single color scale, to make them all synchronize these properties.

-

To have finer control over the number display and axis behaviour, you can directly access the axis. See the documentation of QCPAxis for details about configuring axes. For example, if you want to change the number of automatically generated ticks, call

colorScale->axis()->ticker()->setTickCount(3);

Placing a color scale next to the main axis rect works like with any other layout element:

QCPColorScale *colorScale = new QCPColorScale(customPlot);
customPlot->plotLayout()->addElement(0, 1, colorScale);
colorScale->setLabel("Some Label Text");

In this case we have placed it to the right of the default axis rect, so it wasn't necessary to call setType, since QCPAxis::atRight is already the default. The text next to the color scale can be set with setLabel.

-

For optimum appearance (like in the image above), it may be desirable to line up the axis rect and the borders of the color scale. Use a QCPMarginGroup to achieve this:

QCPMarginGroup *group = new QCPMarginGroup(customPlot);
customPlot->axisRect()->setMarginGroup(QCP::msTop|QCP::msBottom, group);

Color scales are initialized with a non-zero minimum top and bottom margin (setMinimumMargins), because vertical color scales are most common and the minimum top/bottom margin makes sure it keeps some distance to the top/bottom widget border. So if you change to a horizontal color scale by setting setType to QCPAxis::atBottom or QCPAxis::atTop, you might want to also change the minimum margins accordingly, e.g. setMinimumMargins(QMargins(6, 0, 6, 0)).

-

Constructor & Destructor Documentation

- -

§ QCPColorScale()

- -
-
- - - - - -
- - - - - - - - -
QCPColorScale::QCPColorScale (QCustomPlotparentPlot)
-
-explicit
-
-

Constructs a new QCPColorScale.

- -
-
-

Member Function Documentation

- -

§ axis()

- -
-
- - - - - -
- - - - - - - -
QCPAxis * QCPColorScale::axis () const
-
-inline
-
-

Returns the internal QCPAxis instance of this color scale. You can access it to alter the appearance and behaviour of the axis. QCPColorScale duplicates some properties in its interface for convenience. Those are setDataRange (QCPAxis::setRange), setDataScaleType (QCPAxis::setScaleType), and the method setLabel (QCPAxis::setLabel). As they each are connected, it does not matter whether you use the method on the QCPColorScale or on its QCPAxis.

-

If the type of the color scale is changed with setType, the axis returned by this method will change, too, to either the left, right, bottom or top axis, depending on which type was set.

- -
-
- -

§ setType()

- -
-
- - - - - - - - -
void QCPColorScale::setType (QCPAxis::AxisType type)
-
-

Sets at which side of the color scale the axis is placed, and thus also its orientation.

-

Note that after setting type to a different value, the axis returned by axis() will be a different one. The new axis will adopt the following properties from the previous axis: The range, scale type, label and ticker (the latter will be shared and not copied).

- -
-
- -

§ setDataRange()

- -
-
- - - - - - - - -
void QCPColorScale::setDataRange (const QCPRangedataRange)
-
-

Sets the range spanned by the color gradient and that is shown by the axis in the color scale.

-

It is equivalent to calling QCPColorMap::setDataRange on any of the connected color maps. It is also equivalent to directly accessing the axis and setting its range with QCPAxis::setRange.

-
See also
setDataScaleType, setGradient, rescaleDataRange
- -
-
- -

§ setDataScaleType()

- -
-
- - - - - - - - -
void QCPColorScale::setDataScaleType (QCPAxis::ScaleType scaleType)
-
-

Sets the scale type of the color scale, i.e. whether values are associated with colors linearly or logarithmically.

-

It is equivalent to calling QCPColorMap::setDataScaleType on any of the connected color maps. It is also equivalent to directly accessing the axis and setting its scale type with QCPAxis::setScaleType.

-

Note that this method controls the coordinate transformation. For logarithmic scales, you will likely also want to use a logarithmic tick spacing and labeling, which can be achieved by setting the color scale's axis ticker to an instance of QCPAxisTickerLog :

-
colorScale->axis()->setTicker(QSharedPointer<QCPAxisTickerLog>(new QCPAxisTickerLog));

See the documentation of QCPAxisTickerLog about the details of logarithmic axis tick creation.

-
See also
setDataRange, setGradient
- -
-
- -

§ setGradient()

- -
-
- - - - - - - - -
void QCPColorScale::setGradient (const QCPColorGradientgradient)
-
-

Sets the color gradient that will be used to represent data values.

-

It is equivalent to calling QCPColorMap::setGradient on any of the connected color maps.

-
See also
setDataRange, setDataScaleType
- -
-
- -

§ setLabel()

- -
-
- - - - - - - - -
void QCPColorScale::setLabel (const QString & str)
-
-

Sets the axis label of the color scale. This is equivalent to calling QCPAxis::setLabel on the internal axis.

- -
-
- -

§ setBarWidth()

- -
-
- - - - - - - - -
void QCPColorScale::setBarWidth (int width)
-
-

Sets the width (or height, for horizontal color scales) the bar where the gradient is displayed will have.

- -
-
- -

§ setRangeDrag()

- -
-
- - - - - - - - -
void QCPColorScale::setRangeDrag (bool enabled)
-
-

Sets whether the user can drag the data range (setDataRange).

-

Note that QCP::iRangeDrag must be in the QCustomPlot's interactions (QCustomPlot::setInteractions) to allow range dragging.

- -
-
- -

§ setRangeZoom()

- -
-
- - - - - - - - -
void QCPColorScale::setRangeZoom (bool enabled)
-
-

Sets whether the user can zoom the data range (setDataRange) by scrolling the mouse wheel.

-

Note that QCP::iRangeZoom must be in the QCustomPlot's interactions (QCustomPlot::setInteractions) to allow range dragging.

- -
-
- -

§ colorMaps()

- -
-
- - - - - - - -
QList< QCPColorMap * > QCPColorScale::colorMaps () const
-
-

Returns a list of all the color maps associated with this color scale.

- -
-
- -

§ rescaleDataRange()

- -
-
- - - - - - - - -
void QCPColorScale::rescaleDataRange (bool onlyVisibleMaps)
-
-

Changes the data range such that all color maps associated with this color scale are fully mapped to the gradient in the data dimension.

-
See also
setDataRange
- -
-
- -

§ update()

- -
-
- - - - - -
- - - - - - - - -
void QCPColorScale::update (UpdatePhase phase)
-
-virtual
-
-

Updates the layout element and sub-elements. This function is automatically called before every replot by the parent layout element. It is called multiple times, once for every UpdatePhase. The phases are run through in the order of the enum values. For details about what happens at the different phases, see the documentation of UpdatePhase.

-

Layout elements that have child elements should call the update method of their child elements, and pass the current phase unchanged.

-

The default implementation executes the automatic margin mechanism in the upMargins phase. Subclasses should make sure to call the base class implementation.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ dataRangeChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPColorScale::dataRangeChanged (const QCPRangenewRange)
-
-signal
-
-

This signal is emitted when the data range changes.

-
See also
setDataRange
- -
-
- -

§ dataScaleTypeChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPColorScale::dataScaleTypeChanged (QCPAxis::ScaleType scaleType)
-
-signal
-
-

This signal is emitted when the data scale type changes.

-
See also
setDataScaleType
- -
-
- -

§ gradientChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPColorScale::gradientChanged (const QCPColorGradientnewGradient)
-
-signal
-
-

This signal is emitted when the gradient changes.

-
See also
setGradient
- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPColorScale::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

This function applies the default antialiasing setting to the specified painter, using the function applyAntialiasingHint. It is the antialiasing state the painter is put in, when draw is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the draw function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.

-

First example: QCPGraph has multiple entities that have an antialiasing setting: The graph line, fills and scatters. Those can be configured via QCPGraph::setAntialiased, QCPGraph::setAntialiasedFill and QCPGraph::setAntialiasedScatters. Consequently, there isn't only the QCPGraph::applyDefaultAntialiasingHint function (which corresponds to the graph line's antialiasing), but specialized ones like QCPGraph::applyFillAntialiasingHint and QCPGraph::applyScattersAntialiasingHint. So before drawing one of those entities, QCPGraph::draw calls the respective specialized applyAntialiasingHint function.

-

Second example: QCPItemLine consists only of a line so there is only one antialiasing setting which can be controlled with QCPItemLine::setAntialiased. (This function is inherited by all layerables. The specialized functions, as seen on QCPGraph, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal QCPItemLine::applyDefaultAntialiasingHint. The QCPItemLine::draw function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the draw function is called, and that's the state it wants to draw the line with.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ mousePressEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPColorScale::mousePressEvent (QMouseEvent * event,
const QVariant & details 
)
-
-protectedvirtual
-
-

This event gets called when the user presses a mouse button while the cursor is over the layerable. Whether a cursor is over the layerable is decided by a preceding call to selectTest.

-

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter details contains layerable-specific details about the hit, which were generated in the previous call to selectTest. For example, One-dimensional plottables like QCPGraph or QCPBars convey the clicked data point in the details parameter, as QCPDataSelection packed as QVariant. Multi-part objects convey the specific SelectablePart that was hit (e.g. QCPAxis::SelectablePart in the case of axes).

-

QCustomPlot uses an event propagation system that works the same as Qt's system. If your layerable doesn't reimplement the mousePressEvent or explicitly calls event->ignore() in its reimplementation, the event will be propagated to the next layerable in the stacking order.

-

Once a layerable has accepted the mousePressEvent, it is considered the mouse grabber and will receive all following calls to mouseMoveEvent or mouseReleaseEvent for this mouse interaction (a "mouse interaction" in this context ends with the release).

-

The default implementation does nothing except explicitly ignoring the event with event->ignore().

-
See also
mouseMoveEvent, mouseReleaseEvent, mouseDoubleClickEvent, wheelEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseMoveEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPColorScale::mouseMoveEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

This event gets called when the user moves the mouse while holding a mouse button, after this layerable has become the mouse grabber by accepting the preceding mousePressEvent.

-

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter startPos indicates the position where the initial mousePressEvent occurred, that started the mouse interaction.

-

The default implementation does nothing.

-
See also
mousePressEvent, mouseReleaseEvent, mouseDoubleClickEvent, wheelEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseReleaseEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPColorScale::mouseReleaseEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

This event gets called when the user releases the mouse button, after this layerable has become the mouse grabber by accepting the preceding mousePressEvent.

-

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter startPos indicates the position where the initial mousePressEvent occurred, that started the mouse interaction.

-

The default implementation does nothing.

-
See also
mousePressEvent, mouseMoveEvent, mouseDoubleClickEvent, wheelEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ wheelEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPColorScale::wheelEvent (QWheelEvent * event)
-
-protectedvirtual
-
-

This event gets called when the user turns the mouse scroll wheel while the cursor is over the layerable. Whether a cursor is over the layerable is decided by a preceding call to selectTest.

-

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos().

-

The event->angleDelta() indicates how far the mouse wheel was turned, which is usually +/- 120 for single rotation steps. However, if the mouse wheel is turned rapidly, multiple steps may accumulate to one event, making the delta larger. On the other hand, if the wheel has very smooth steps or none at all, the delta may be smaller.

-

The default implementation does nothing.

-
See also
mousePressEvent, mouseMoveEvent, mouseReleaseEvent, mouseDoubleClickEvent
- -

Reimplemented from QCPLayerable.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layoutelements/layoutelement-colorscale.h
  • -
  • src/layoutelements/layoutelement-colorscale.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPColorScale__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPColorScale__inherit__graph.png deleted file mode 100644 index 290435d9..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPColorScale__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPCurve.html b/third_party/qcustomplot/documentation/html/classQCPCurve.html deleted file mode 100644 index d4797c96..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPCurve.html +++ /dev/null @@ -1,1579 +0,0 @@ - - - - - - -QCPCurve Class Reference - - - - -
- -
-
QCPCurve Class Reference
-
-
- -

A plottable representing a parametric curve in a plot. - More...

-
-Inheritance diagram for QCPCurve:
-
-
Inheritance graph
- - - - - - -
- - - - -

-Public Types

enum  LineStyle
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPCurve (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
QSharedPointer< QCPCurveDataContainerdata () const
 
-QCPScatterStyle scatterStyle () const
 
-int scatterSkip () const
 
-LineStyle lineStyle () const
 
void setData (QSharedPointer< QCPCurveDataContainer > data)
 
void setData (const QVector< double > &t, const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
 
void setData (const QVector< double > &keys, const QVector< double > &values)
 
void setScatterStyle (const QCPScatterStyle &style)
 
void setScatterSkip (int skip)
 
void setLineStyle (LineStyle style)
 
void addData (const QVector< double > &t, const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
 
void addData (const QVector< double > &keys, const QVector< double > &values)
 
void addData (double t, double key, double value)
 
void addData (double key, double value)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
virtual QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const
 
virtual QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const
 
- Public Functions inherited from QCPAbstractPlottable1D< QCPCurveData >
 QCPAbstractPlottable1D (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
virtual int dataCount () const
 
virtual double dataMainKey (int index) const
 
virtual double dataSortKey (int index) const
 
virtual double dataMainValue (int index) const
 
virtual QCPRange dataValueRange (int index) const
 
virtual QPointF dataPixelPosition (int index) const
 
virtual bool sortKeyIsMainKey () const
 
virtual QCPDataSelection selectTestRect (const QRectF &rect, bool onlySelectable) const
 
virtual int findBegin (double sortKey, bool expandedRange=true) const
 
virtual int findEnd (double sortKey, bool expandedRange=true) const
 
virtual QCPPlottableInterface1Dinterface1D ()
 
- Public Functions inherited from QCPAbstractPlottable
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
-QString name () const
 
-bool antialiasedFill () const
 
-bool antialiasedScatters () const
 
-QPen pen () const
 
-QBrush brush () const
 
-QCPAxiskeyAxis () const
 
-QCPAxisvalueAxis () const
 
-QCP::SelectionType selectable () const
 
bool selected () const
 
QCPDataSelection selection () const
 
QCPSelectionDecoratorselectionDecorator () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (QCP::SelectionType selectable)
 
Q_SLOT void setSelection (QCPDataSelection selection)
 
void setSelectionDecorator (QCPSelectionDecorator *decorator)
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false, bool inKeyRange=false) const
 
bool addToLegend (QCPLegend *legend)
 
bool addToLegend ()
 
bool removeFromLegend (QCPLegend *legend) const
 
bool removeFromLegend () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const
 
virtual void drawCurveLine (QCPPainter *painter, const QVector< QPointF > &lines) const
 
virtual void drawScatterPlot (QCPPainter *painter, const QVector< QPointF > &points, const QCPScatterStyle &style) const
 
void getCurveLines (QVector< QPointF > *lines, const QCPDataRange &dataRange, double penWidth) const
 
void getScatters (QVector< QPointF > *scatters, const QCPDataRange &dataRange, double scatterWidth) const
 
int getRegion (double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const
 
QPointF getOptimizedPoint (int otherRegion, double otherKey, double otherValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const
 
QVector< QPointF > getOptimizedCornerPoints (int prevRegion, int currentRegion, double prevKey, double prevValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const
 
bool mayTraverse (int prevRegion, int currentRegion) const
 
bool getTraverse (double prevKey, double prevValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin, QPointF &crossA, QPointF &crossB) const
 
void getTraverseCornerPoints (int prevRegion, int currentRegion, double keyMin, double valueMax, double keyMax, double valueMin, QVector< QPointF > &beforeTraverse, QVector< QPointF > &afterTraverse) const
 
double pointDistance (const QPointF &pixelPoint, QCPCurveDataContainer::const_iterator &closestData) const
 
- Protected Functions inherited from QCPAbstractPlottable1D< QCPCurveData >
void getDataSegments (QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
 
void drawPolyline (QCPPainter *painter, const QVector< QPointF > &lineData) const
 
- Protected Functions inherited from QCPAbstractPlottable
virtual QRect clipRect () const
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractPlottable
void selectionChanged (bool selected)
 
void selectionChanged (const QCPDataSelection &selection)
 
void selectableChanged (QCP::SelectionType selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A plottable representing a parametric curve in a plot.

-
-QCPCurve.png -
-

Unlike QCPGraph, plottables of this type may have multiple points with the same key coordinate, so their visual representation can have loops. This is realized by introducing a third coordinate t, which defines the order of the points described by the other two coordinates x and y.

-

To plot data, assign it with the setData or addData functions. Alternatively, you can also access and modify the curve's data via the data method, which returns a pointer to the internal QCPCurveDataContainer.

-

Gaps in the curve can be created by adding data points with NaN as key and value (qQNaN() or std::numeric_limits<double>::quiet_NaN()) in between the two data points that shall be separated.

-

-Changing the appearance

-

The appearance of the curve is determined by the pen and the brush (setPen, setBrush).

-

-Usage

-

Like all data representing objects in QCustomPlot, the QCPCurve is a plottable (QCPAbstractPlottable). So the plottable-interface of QCustomPlot applies (QCustomPlot::plottable, QCustomPlot::removePlottable, etc.)

-

Usually, you first create an instance:

QCPCurve *newCurve = new QCPCurve(customPlot->xAxis, customPlot->yAxis);

which registers it with the QCustomPlot instance of the passed axes. Note that this QCustomPlot instance takes ownership of the plottable, so do not delete it manually but use QCustomPlot::removePlottable() instead. The newly created plottable can be modified, e.g.:

newCurve->setName("Fermat's Spiral");
newCurve->setData(tData, xData, yData);

Member Enumeration Documentation

- -

§ LineStyle

- -
-
- - - - -
enum QCPCurve::LineStyle
-
-

Defines how the curve's line is represented visually in the plot. The line is drawn with the current pen of the curve (setPen).

See also
setLineStyle
- - - -
Enumerator
lsNone 

No line is drawn between data points (e.g. only scatters)

-
lsLine 

Data points are connected with a straight line.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPCurve()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPCurve::QCPCurve (QCPAxiskeyAxis,
QCPAxisvalueAxis 
)
-
-explicit
-
-

Constructs a curve which uses keyAxis as its key axis ("x") and valueAxis as its value axis ("y"). keyAxis and valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though.

-

The created QCPCurve is automatically registered with the QCustomPlot instance inferred from keyAxis. This QCustomPlot instance takes ownership of the QCPCurve, so do not delete it manually but use QCustomPlot::removePlottable() instead.

- -
-
-

Member Function Documentation

- -

§ data()

- -
-
- - - - - -
- - - - - - - -
QSharedPointer< QCPCurveDataContainer > QCPCurve::data () const
-
-inline
-
-

Returns a shared pointer to the internal data storage of type QCPCurveDataContainer. You may use it to directly manipulate the data, which may be more convenient and faster than using the regular setData or addData methods.

- -
-
- -

§ setData() [1/3]

- -
-
- - - - - - - - -
void QCPCurve::setData (QSharedPointer< QCPCurveDataContainerdata)
-
-

This is an overloaded function.

-

Replaces the current data container with the provided data container.

-

Since a QSharedPointer is used, multiple QCPCurves may share the same data container safely. Modifying the data in the container will then affect all curves that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers:

curve2->setData(curve1->data()); // curve1 and curve2 now share data container

If you do not wish to share containers, but create a copy from an existing container, rather use the QCPDataContainer<DataType>::set method on the curve's data container directly:

curve2->data()->set(*curve1->data()); // curve2 now has copy of curve1's data in its container
See also
addData
- -
-
- -

§ setData() [2/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPCurve::setData (const QVector< double > & t,
const QVector< double > & keys,
const QVector< double > & values,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Replaces the current data with the provided points in t, keys and values. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

If you can guarantee that the passed data points are sorted by t in ascending order, you can set alreadySorted to true, to improve performance by saving a sorting run.

-
See also
addData
- -
-
- -

§ setData() [3/3]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPCurve::setData (const QVector< double > & keys,
const QVector< double > & values 
)
-
-

This is an overloaded function.

-

Replaces the current data with the provided points in keys and values. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

The t parameter of each data point will be set to the integer index of the respective key/value pair.

-
See also
addData
- -
-
- -

§ setScatterStyle()

- -
-
- - - - - - - - -
void QCPCurve::setScatterStyle (const QCPScatterStylestyle)
-
-

Sets the visual appearance of single data points in the plot. If set to QCPScatterStyle::ssNone, no scatter points are drawn (e.g. for line-only plots with appropriate line style).

-
See also
QCPScatterStyle, setLineStyle
- -
-
- -

§ setScatterSkip()

- -
-
- - - - - - - - -
void QCPCurve::setScatterSkip (int skip)
-
-

If scatters are displayed (scatter style not QCPScatterStyle::ssNone), skip number of scatter points are skipped/not drawn after every drawn scatter point.

-

This can be used to make the data appear sparser while for example still having a smooth line, and to improve performance for very high density plots.

-

If skip is set to 0 (default), all scatter points are drawn.

-
See also
setScatterStyle
- -
-
- -

§ setLineStyle()

- -
-
- - - - - - - - -
void QCPCurve::setLineStyle (QCPCurve::LineStyle style)
-
-

Sets how the single data points are connected in the plot or how they are represented visually apart from the scatter symbol. For scatter-only plots, set style to lsNone and setScatterStyle to the desired scatter style.

-
See also
setScatterStyle
- -
-
- -

§ addData() [1/4]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPCurve::addData (const QVector< double > & t,
const QVector< double > & keys,
const QVector< double > & values,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Adds the provided points in t, keys and values to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

If you can guarantee that the passed data points are sorted by keys in ascending order, you can set alreadySorted to true, to improve performance by saving a sorting run.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

- -
-
- -

§ addData() [2/4]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPCurve::addData (const QVector< double > & keys,
const QVector< double > & values 
)
-
-

This is an overloaded function.

-

Adds the provided points in keys and values to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

The t parameter of each data point will be set to the integer index of the respective key/value pair.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

- -
-
- -

§ addData() [3/4]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPCurve::addData (double t,
double key,
double value 
)
-
-

This is an overloaded function. Adds the provided data point as t, key and value to the current data.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

- -
-
- -

§ addData() [4/4]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPCurve::addData (double key,
double value 
)
-
-

This is an overloaded function.

-

Adds the provided data point as key and value to the current data.

-

The t parameter is generated automatically by increments of 1 for each point, starting at the highest t of previously existing data or 0, if the curve data is empty.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPCurve::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

Implements a selectTest specific to this plottable's point geometry.

-

If details is not 0, it will be set to a QCPDataSelection, describing the closest data point to pos.

-

For general information about this virtual method, see the base class implementation. QCPAbstractPlottable::selectTest

- -

Reimplemented from QCPAbstractPlottable1D< QCPCurveData >.

- -
-
- -

§ getKeyRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPRange QCPCurve::getKeyRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth 
) const
-
-virtual
-
-

Returns the coordinate range that all data in this plottable span in the key axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getValueRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ getValueRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPRange QCPCurve::getValueRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth,
const QCPRangeinKeyRange = QCPRange() 
) const
-
-virtual
-
-

Returns the coordinate range that the data points in the specified key range (inKeyRange) span in the value axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

If inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys.

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getKeyRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPCurve::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ drawLegendIcon()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPCurve::drawLegendIcon (QCPPainterpainter,
const QRectF & rect 
) const
-
-protectedvirtual
-
-

called by QCPLegend::draw (via QCPPlottableLegendItem::draw) to create a graphical representation of this plottable inside rect, next to the plottable name.

-

The passed painter has its cliprect set to rect, so painting outside of rect won't appear outside the legend icon border.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ drawCurveLine()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPCurve::drawCurveLine (QCPPainterpainter,
const QVector< QPointF > & lines 
) const
-
-protectedvirtual
-
-

Draws lines between the points in lines, given in pixel coordinates.

-
See also
drawScatterPlot, getCurveLines
- -
-
- -

§ drawScatterPlot()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPCurve::drawScatterPlot (QCPPainterpainter,
const QVector< QPointF > & points,
const QCPScatterStylestyle 
) const
-
-protectedvirtual
-
-

Draws scatter symbols at every point passed in points, given in pixel coordinates. The scatters will be drawn with painter and have the appearance as specified in style.

-
See also
drawCurveLine, getCurveLines
- -
-
- -

§ getCurveLines()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPCurve::getCurveLines (QVector< QPointF > * lines,
const QCPDataRangedataRange,
double penWidth 
) const
-
-protected
-
-

Called by draw to generate points in pixel coordinates which represent the line of the curve.

-

Line segments that aren't visible in the current axis rect are handled in an optimized way. They are projected onto a rectangle slightly larger than the visible axis rect and simplified regarding point count. The algorithm makes sure to preserve appearance of lines and fills inside the visible axis rect by generating new temporary points on the outer rect if necessary.

-

lines will be filled with points in pixel coordinates, that can be drawn with drawCurveLine.

-

dataRange specifies the beginning and ending data indices that will be taken into account for conversion. In this function, the specified range may exceed the total data bounds without harm: a correspondingly trimmed data range will be used. This takes the burden off the user of this function to check for valid indices in dataRange, e.g. when extending ranges coming from getDataSegments.

-

penWidth specifies the pen width that will be used to later draw the lines generated by this function. This is needed here to calculate an accordingly wider margin around the axis rect when performing the line optimization.

-

Methods that are also involved in the algorithm are: getRegion, getOptimizedPoint, getOptimizedCornerPoints mayTraverse, getTraverse, getTraverseCornerPoints.

-
See also
drawCurveLine, drawScatterPlot
- -
-
- -

§ getScatters()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPCurve::getScatters (QVector< QPointF > * scatters,
const QCPDataRangedataRange,
double scatterWidth 
) const
-
-protected
-
-

Called by draw to generate points in pixel coordinates which represent the scatters of the curve. If a scatter skip is configured (setScatterSkip), the returned points are accordingly sparser.

-

Scatters that aren't visible in the current axis rect are optimized away.

-

scatters will be filled with points in pixel coordinates, that can be drawn with drawScatterPlot.

-

dataRange specifies the beginning and ending data indices that will be taken into account for conversion.

-

scatterWidth specifies the scatter width that will be used to later draw the scatters at pixel coordinates generated by this function. This is needed here to calculate an accordingly wider margin around the axis rect when performing the data point reduction.

-
See also
draw, drawScatterPlot
- -
-
- -

§ getRegion()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int QCPCurve::getRegion (double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin 
) const
-
-protected
-
-

This function is part of the curve optimization algorithm of getCurveLines.

-

It returns the region of the given point (key, value) with respect to a rectangle defined by keyMin, keyMax, valueMin, and valueMax.

-

The regions are enumerated from top to bottom (valueMin to valueMax) and left to right (keyMin to keyMax):

- - - - - - - -
147
258
369
-

With the rectangle being region 5, and the outer regions extending infinitely outwards. In the curve optimization algorithm, region 5 is considered to be the visible portion of the plot.

- -
-
- -

§ getOptimizedPoint()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QPointF QCPCurve::getOptimizedPoint (int otherRegion,
double otherKey,
double otherValue,
double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin 
) const
-
-protected
-
-

This function is part of the curve optimization algorithm of getCurveLines.

-

This method is used in case the current segment passes from inside the visible rect (region 5, see getRegion) to any of the outer regions (otherRegion). The current segment is given by the line connecting (key, value) with (otherKey, otherValue).

-

It returns the intersection point of the segment with the border of region 5.

-

For this function it doesn't matter whether (key, value) is the point inside region 5 or whether it's (otherKey, otherValue), i.e. whether the segment is coming from region 5 or leaving it. It is important though that otherRegion correctly identifies the other region not equal to 5.

- -
-
- -

§ getOptimizedCornerPoints()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QVector< QPointF > QCPCurve::getOptimizedCornerPoints (int prevRegion,
int currentRegion,
double prevKey,
double prevValue,
double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin 
) const
-
-protected
-
-

This function is part of the curve optimization algorithm of getCurveLines.

-

In situations where a single segment skips over multiple regions it might become necessary to add extra points at the corners of region 5 (see getRegion) such that the optimized segment doesn't unintentionally cut through the visible area of the axis rect and create plot artifacts. This method provides these points that must be added, assuming the original segment doesn't start, end, or traverse region 5. (Corner points where region 5 is traversed are calculated by getTraverseCornerPoints.)

-

For example, consider a segment which directly goes from region 4 to 2 but originally is far out to the top left such that it doesn't cross region 5. Naively optimizing these points by projecting them on the top and left borders of region 5 will create a segment that surely crosses 5, creating a visual artifact in the plot. This method prevents this by providing extra points at the top left corner, making the optimized curve correctly pass from region 4 to 1 to 2 without traversing 5.

- -
-
- -

§ mayTraverse()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool QCPCurve::mayTraverse (int prevRegion,
int currentRegion 
) const
-
-protected
-
-

This function is part of the curve optimization algorithm of getCurveLines.

-

This method returns whether a segment going from prevRegion to currentRegion (see getRegion) may traverse the visible region 5. This function assumes that neither prevRegion nor currentRegion is 5 itself.

-

If this method returns false, the segment for sure doesn't pass region 5. If it returns true, the segment may or may not pass region 5 and a more fine-grained calculation must be used (getTraverse).

- -
-
- -

§ getTraverse()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool QCPCurve::getTraverse (double prevKey,
double prevValue,
double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin,
QPointF & crossA,
QPointF & crossB 
) const
-
-protected
-
-

This function is part of the curve optimization algorithm of getCurveLines.

-

This method assumes that the mayTraverse test has returned true, so there is a chance the segment defined by (prevKey, prevValue) and (key, value) goes through the visible region 5.

-

The return value of this method indicates whether the segment actually traverses region 5 or not.

-

If the segment traverses 5, the output parameters crossA and crossB indicate the entry and exit points of region 5. They will become the optimized points for that segment.

- -
-
- -

§ getTraverseCornerPoints()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPCurve::getTraverseCornerPoints (int prevRegion,
int currentRegion,
double keyMin,
double valueMax,
double keyMax,
double valueMin,
QVector< QPointF > & beforeTraverse,
QVector< QPointF > & afterTraverse 
) const
-
-protected
-
-

This function is part of the curve optimization algorithm of getCurveLines.

-

This method assumes that the getTraverse test has returned true, so the segment definitely traverses the visible region 5 when going from prevRegion to currentRegion.

-

In certain situations it is not sufficient to merely generate the entry and exit points of the segment into/out of region 5, as getTraverse provides. It may happen that a single segment, in addition to traversing region 5, skips another region outside of region 5, which makes it necessary to add an optimized corner point there (very similar to the job getOptimizedCornerPoints does for segments that are completely in outside regions and don't traverse 5).

-

As an example, consider a segment going from region 1 to region 6, traversing the lower left corner of region 5. In this configuration, the segment additionally crosses the border between region 1 and 2 before entering region 5. This makes it necessary to add an additional point in the top left corner, before adding the optimized traverse points. So in this case, the output parameter beforeTraverse will contain the top left corner point, and afterTraverse will be empty.

-

In some cases, such as when going from region 1 to 9, it may even be necessary to add additional corner points before and after the traverse. Then both beforeTraverse and afterTraverse return the respective corner points.

- -
-
- -

§ pointDistance()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
double QCPCurve::pointDistance (const QPointF & pixelPoint,
QCPCurveDataContainer::const_iterator & closestData 
) const
-
-protected
-
-

Calculates the (minimum) distance (in pixels) the curve's representation has from the given pixelPoint in pixels. This is used to determine whether the curve was clicked or not, e.g. in selectTest. The closest data point to pixelPoint is returned in closestData. Note that if the curve has a line representation, the returned distance may be smaller than the distance to the closestData point, since the distance to the curve line is also taken into account.

-

If either the curve has no data or if the line style is lsNone and the scatter style's shape is QCPScatterStyle::ssNone (i.e. there is no visual representation of the curve), returns -1.0.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPCurveData.html b/third_party/qcustomplot/documentation/html/classQCPCurveData.html deleted file mode 100644 index a6528129..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPCurveData.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - -QCPCurveData Class Reference - - - - -
- -
-
QCPCurveData Class Reference
-
-
- -

Holds the data of one single data point for QCPCurve. - More...

- - - - - - - - - - - - - - -

-Public Functions

 QCPCurveData ()
 
 QCPCurveData (double t, double key, double value)
 
double sortKey () const
 
double mainKey () const
 
double mainValue () const
 
QCPRange valueRange () const
 
- - - - - - - -

-Public Members

-double t
 
-double key
 
-double value
 
- - - - - -

-Static Public Functions

static QCPCurveData fromSortKey (double sortKey)
 
static bool sortKeyIsMainKey ()
 
-

Detailed Description

-

Holds the data of one single data point for QCPCurve.

-

The stored data is:

    -
  • t: the free ordering parameter of this curve point, like in the mathematical vector (x(t), y(t)). (This is the sortKey)
  • -
  • key: coordinate on the key axis of this curve point (this is the mainKey)
  • -
  • value: coordinate on the value axis of this curve point (this is the mainValue)
  • -
-

The container for storing multiple data points is QCPCurveDataContainer. It is a typedef for QCPDataContainer with QCPCurveData as the DataType template parameter. See the documentation there for an explanation regarding the data type's generic methods.

-
See also
QCPCurveDataContainer
-

Constructor & Destructor Documentation

- -

§ QCPCurveData() [1/2]

- -
-
- - - - - - - -
QCPCurveData::QCPCurveData ()
-
-

Constructs a curve data point with t, key and value set to zero.

- -
-
- -

§ QCPCurveData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPCurveData::QCPCurveData (double t,
double key,
double value 
)
-
-

Constructs a curve data point with the specified t, key and value.

- -
-
-

Member Function Documentation

- -

§ sortKey()

- -
-
- - - - - -
- - - - - - - -
double QCPCurveData::sortKey () const
-
-inline
-
-

Returns the t member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ fromSortKey()

- -
-
- - - - - -
- - - - - - - - -
static QCPCurveData QCPCurveData::fromSortKey (double sortKey)
-
-inlinestatic
-
-

Returns a data point with the specified sortKey (assigned to the data point's t member). All other members are set to zero.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ sortKeyIsMainKey()

- -
-
- - - - - -
- - - - - - - -
static static bool QCPCurveData::sortKeyIsMainKey ()
-
-inlinestatic
-
-

Since the member key is the data point key coordinate and the member t is the data ordering parameter, this method returns false.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ mainKey()

- -
-
- - - - - -
- - - - - - - -
double QCPCurveData::mainKey () const
-
-inline
-
-

Returns the key member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ mainValue()

- -
-
- - - - - -
- - - - - - - -
double QCPCurveData::mainValue () const
-
-inline
-
-

Returns the value member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ valueRange()

- -
-
- - - - - -
- - - - - - - -
QCPRange QCPCurveData::valueRange () const
-
-inline
-
-

Returns a QCPRange with both lower and upper boundary set to value of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPCurve__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPCurve__inherit__graph.png deleted file mode 100644 index ce61e5c7..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPCurve__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPDataContainer.html b/third_party/qcustomplot/documentation/html/classQCPDataContainer.html deleted file mode 100644 index 46820732..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPDataContainer.html +++ /dev/null @@ -1,1025 +0,0 @@ - - - - - - -QCPDataContainer< DataType > Class Template Reference - - - - -
- -
-
QCPDataContainer< DataType > Class Template Reference
-
-
- -

The generic data container for one-dimensional plottables. - More...

- - - - - - -

-Public Types

-typedef QVector< DataType >::const_iterator const_iterator
 
-typedef QVector< DataType >::iterator iterator
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPDataContainer ()
 
int size () const
 
bool isEmpty () const
 
-bool autoSqueeze () const
 
void setAutoSqueeze (bool enabled)
 
void set (const QCPDataContainer< DataType > &data)
 
void set (const QVector< DataType > &data, bool alreadySorted=false)
 
void add (const QCPDataContainer< DataType > &data)
 
void add (const QVector< DataType > &data, bool alreadySorted=false)
 
void add (const DataType &data)
 
void removeBefore (double sortKey)
 
void removeAfter (double sortKey)
 
void remove (double sortKeyFrom, double sortKeyTo)
 
void remove (double sortKey)
 
void clear ()
 
void sort ()
 
void squeeze (bool preAllocation=true, bool postAllocation=true)
 
const_iterator constBegin () const
 
const_iterator constEnd () const
 
iterator begin ()
 
iterator end ()
 
const_iterator findBegin (double sortKey, bool expandedRange=true) const
 
const_iterator findEnd (double sortKey, bool expandedRange=true) const
 
const_iterator at (int index) const
 
QCPRange keyRange (bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth)
 
QCPRange valueRange (bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange())
 
QCPDataRange dataRange () const
 
void limitIteratorsToDataRange (const_iterator &begin, const_iterator &end, const QCPDataRange &dataRange) const
 
- - - - - -

-Protected Functions

void preallocateGrow (int minimumPreallocSize)
 
void performAutoSqueeze ()
 
- - - - - -

-Related Non-Members

(Note that these are not member functions.)

-
template<class DataType >
bool qcpLessThanSortKey (const DataType &a, const DataType &b)
 
-

Detailed Description

-

template<class DataType>
-class QCPDataContainer< DataType >

- -

The generic data container for one-dimensional plottables.

-

This class template provides a fast container for data storage of one-dimensional data. The data type is specified as template parameter (called DataType in the following) and must provide some methods as described in the next section.

-

The data is stored in a sorted fashion, which allows very quick lookups by the sorted key as well as retrieval of ranges (see findBegin, findEnd, keyRange) using binary search. The container uses a preallocation and a postallocation scheme, such that appending and prepending data (with respect to the sort key) is very fast and minimizes reallocations. If data is added which needs to be inserted between existing keys, the merge usually can be done quickly too, using the fact that existing data is always sorted. The user can further improve performance by specifying that added data is already itself sorted by key, if he can guarantee that this is the case (see for example add(const QVector<DataType> &data, bool alreadySorted)).

-

The data can be accessed with the provided const iterators (constBegin, constEnd). If it is necessary to alter existing data in-place, the non-const iterators can be used (begin, end). Changing data members that are not the sort key (for most data types called key) is safe from the container's perspective.

-

Great care must be taken however if the sort key is modified through the non-const iterators. For performance reasons, the iterators don't automatically cause a re-sorting upon their manipulation. It is thus the responsibility of the user to leave the container in a sorted state when finished with the data manipulation, before calling any other methods on the container. A complete re-sort (e.g. after finishing all sort key manipulation) can be done by calling sort. Failing to do so can not be detected by the container efficiently and will cause both rendering artifacts and potential data loss.

-

Implementing one-dimensional plottables that make use of a QCPDataContainer<T> is usually done by subclassing from QCPAbstractPlottable1D<T>, which introduces an according mDataContainer member and some convenience methods.

-

-Requirements for the DataType template parameter

-

The template parameter DataType is the type of the stored data points. It must be trivially copyable and have the following public methods, preferably inline:

-
    -
  • double sortKey() const
    - Returns the member variable of this data point that is the sort key, defining the ordering in the container. Often this variable is simply called key.
  • -
-
    -
  • static DataType fromSortKey(double sortKey)
    - Returns a new instance of the data type initialized with its sort key set to sortKey.
  • -
-
    -
  • static bool sortKeyIsMainKey()
    - Returns true if the sort key is equal to the main key (see method mainKey below). For most plottables this is the case. It is not the case for example for QCPCurve, which uses t as sort key and key as main key. This is the reason why QCPCurve unlike QCPGraph can display parametric curves with loops.
  • -
-
    -
  • double mainKey() const
    - Returns the variable of this data point considered the main key. This is commonly the variable that is used as the coordinate of this data point on the key axis of the plottable. This method is used for example when determining the automatic axis rescaling of key axes (QCPAxis::rescale).
  • -
-
    -
  • double mainValue() const
    - Returns the variable of this data point considered the main value. This is commonly the variable that is used as the coordinate of this data point on the value axis of the plottable.
  • -
-
    -
  • QCPRange valueRange() const
    - Returns the range this data point spans in the value axis coordinate. If the data is single-valued (e.g. QCPGraphData), this is simply a range with both lower and upper set to the main data point value. However if the data points can represent multiple values at once (e.g QCPFinancialData with its high, low, open and close values at each key) this method should return the range those values span. This method is used for example when determining the automatic axis rescaling of value axes (QCPAxis::rescale).
  • -
-

Constructor & Destructor Documentation

- -

§ QCPDataContainer()

- -
-
-
-template<class DataType >
- - - - - - - -
QCPDataContainer< DataType >::QCPDataContainer ()
-
-

Constructs a QCPDataContainer used for plottable classes that represent a series of key-sorted data

- -
-
-

Member Function Documentation

- -

§ size()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - -
int QCPDataContainer< DataType >::size () const
-
-inline
-
-

Returns the number of data points in the container.

- -
-
- -

§ isEmpty()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - -
bool QCPDataContainer< DataType >::isEmpty () const
-
-inline
-
-

Returns whether this container holds no data points.

- -
-
- -

§ setAutoSqueeze()

- -
-
-
-template<class DataType >
- - - - - - - - -
void QCPDataContainer< DataType >::setAutoSqueeze (bool enabled)
-
-

Sets whether the container automatically decides when to release memory from its post- and preallocation pools when data points are removed. By default this is enabled and for typical applications shouldn't be changed.

-

If auto squeeze is disabled, you can manually decide when to release pre-/postallocation with squeeze.

- -
-
- -

§ set() [1/2]

- -
-
-
-template<class DataType >
- - - - - - - - -
void QCPDataContainer< DataType >::set (const QCPDataContainer< DataType > & data)
-
-

This is an overloaded function.

-

Replaces the current data in this container with the provided data.

-
See also
add, remove
- -
-
- -

§ set() [2/2]

- -
-
-
-template<class DataType >
- - - - - - - - - - - - - - - - - - -
void QCPDataContainer< DataType >::set (const QVector< DataType > & data,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Replaces the current data in this container with the provided data

-

If you can guarantee that the data points in data have ascending order with respect to the DataType's sort key, set alreadySorted to true to avoid an unnecessary sorting run.

-
See also
add, remove
- -
-
- -

§ add() [1/3]

- -
-
-
-template<class DataType >
- - - - - - - - -
void QCPDataContainer< DataType >::add (const QCPDataContainer< DataType > & data)
-
-

This is an overloaded function.

-

Adds the provided data to the current data in this container.

-
See also
set, remove
- -
-
- -

§ add() [2/3]

- -
-
-
-template<class DataType >
- - - - - - - - - - - - - - - - - - -
void QCPDataContainer< DataType >::add (const QVector< DataType > & data,
bool alreadySorted = false 
)
-
-

Adds the provided data points in data to the current data.

-

If you can guarantee that the data points in data have ascending order with respect to the DataType's sort key, set alreadySorted to true to avoid an unnecessary sorting run.

-
See also
set, remove
- -
-
- -

§ add() [3/3]

- -
-
-
-template<class DataType >
- - - - - - - - -
void QCPDataContainer< DataType >::add (const DataType & data)
-
-

This is an overloaded function.

-

Adds the provided single data point to the current data.

-
See also
remove
- -
-
- -

§ removeBefore()

- -
-
-
-template<class DataType >
- - - - - - - - -
void QCPDataContainer< DataType >::removeBefore (double sortKey)
-
-

Removes all data points with (sort-)keys smaller than or equal to sortKey.

-
See also
removeAfter, remove, clear
- -
-
- -

§ removeAfter()

- -
-
-
-template<class DataType >
- - - - - - - - -
void QCPDataContainer< DataType >::removeAfter (double sortKey)
-
-

Removes all data points with (sort-)keys greater than or equal to sortKey.

-
See also
removeBefore, remove, clear
- -
-
- -

§ remove() [1/2]

- -
-
-
-template<class DataType >
- - - - - - - - - - - - - - - - - - -
void QCPDataContainer< DataType >::remove (double sortKeyFrom,
double sortKeyTo 
)
-
-

Removes all data points with (sort-)keys between sortKeyFrom and sortKeyTo. if sortKeyFrom is greater or equal to sortKeyTo, the function does nothing. To remove a single data point with known (sort-)key, use remove(double sortKey).

-
See also
removeBefore, removeAfter, clear
- -
-
- -

§ remove() [2/2]

- -
-
-
-template<class DataType >
- - - - - - - - -
void QCPDataContainer< DataType >::remove (double sortKey)
-
-

This is an overloaded function.

-

Removes a single data point at sortKey. If the position is not known with absolute (binary) precision, consider using remove(double sortKeyFrom, double sortKeyTo) with a small fuzziness interval around the suspected position, depeding on the precision with which the (sort-)key is known.

-
See also
removeBefore, removeAfter, clear
- -
-
- -

§ clear()

- -
-
-
-template<class DataType >
- - - - - - - -
void QCPDataContainer< DataType >::clear ()
-
-

Removes all data points.

-
See also
remove, removeAfter, removeBefore
- -
-
- -

§ sort()

- -
-
-
-template<class DataType >
- - - - - - - -
void QCPDataContainer< DataType >::sort ()
-
-

Re-sorts all data points in the container by their sort key.

-

When setting, adding or removing points using the QCPDataContainer interface (set, add, remove, etc.), the container makes sure to always stay in a sorted state such that a full resort is never necessary. However, if you choose to directly manipulate the sort key on data points by accessing and modifying it through the non-const iterators (begin, end), it is your responsibility to bring the container back into a sorted state before any other methods are called on it. This can be achieved by calling this method immediately after finishing the sort key manipulation.

- -
-
- -

§ squeeze()

- -
-
-
-template<class DataType >
- - - - - - - - - - - - - - - - - - -
void QCPDataContainer< DataType >::squeeze (bool preAllocation = true,
bool postAllocation = true 
)
-
-

Frees all unused memory that is currently in the preallocation and postallocation pools.

-

Note that QCPDataContainer automatically decides whether squeezing is necessary, if setAutoSqueeze is left enabled. It should thus not be necessary to use this method for typical applications.

-

The parameters preAllocation and postAllocation control whether pre- and/or post allocation should be freed, respectively.

- -
-
- -

§ constBegin()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - -
QCPDataContainer::const_iterator QCPDataContainer< DataType >::constBegin () const
-
-inline
-
-

Returns a const iterator to the first data point in this container.

- -
-
- -

§ constEnd()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - -
QCPDataContainer::const_iterator QCPDataContainer< DataType >::constEnd () const
-
-inline
-
-

Returns a const iterator to the element past the last data point in this container.

- -
-
- -

§ begin()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - -
QCPDataContainer::iterator QCPDataContainer< DataType >::begin ()
-
-inline
-
-

Returns a non-const iterator to the first data point in this container.

-

You can manipulate the data points in-place through the non-const iterators, but great care must be taken when manipulating the sort key of a data point, see sort, or the detailed description of this class.

- -
-
- -

§ end()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - -
QCPDataContainer::iterator QCPDataContainer< DataType >::end ()
-
-inline
-
-

Returns a non-const iterator to the element past the last data point in this container.

-

You can manipulate the data points in-place through the non-const iterators, but great care must be taken when manipulating the sort key of a data point, see sort, or the detailed description of this class.

- -
-
- -

§ findBegin()

- -
-
-
-template<class DataType >
- - - - - - - - - - - - - - - - - - -
QCPDataContainer< DataType >::const_iterator QCPDataContainer< DataType >::findBegin (double sortKey,
bool expandedRange = true 
) const
-
-

Returns an iterator to the data point with a (sort-)key that is equal to, just below, or just above sortKey. If expandedRange is true, the data point just below sortKey will be considered, otherwise the one just above.

-

This can be used in conjunction with findEnd to iterate over data points within a given key range, including or excluding the bounding data points that are just beyond the specified range.

-

If expandedRange is true but there are no data points below sortKey, constBegin is returned.

-

If the container is empty, returns constEnd.

-
See also
findEnd, QCPPlottableInterface1D::findBegin
- -
-
- -

§ findEnd()

- -
-
-
-template<class DataType >
- - - - - - - - - - - - - - - - - - -
QCPDataContainer< DataType >::const_iterator QCPDataContainer< DataType >::findEnd (double sortKey,
bool expandedRange = true 
) const
-
-

Returns an iterator to the element after the data point with a (sort-)key that is equal to, just above or just below sortKey. If expandedRange is true, the data point just above sortKey will be considered, otherwise the one just below.

-

This can be used in conjunction with findBegin to iterate over data points within a given key range, including the bounding data points that are just below and above the specified range.

-

If expandedRange is true but there are no data points above sortKey, constEnd is returned.

-

If the container is empty, constEnd is returned.

-
See also
findBegin, QCPPlottableInterface1D::findEnd
- -
-
- -

§ at()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - -
QCPDataContainer::const_iterator QCPDataContainer< DataType >::at (int index) const
-
-inline
-
-

Returns a const iterator to the element with the specified index. If index points beyond the available elements in this container, returns constEnd, i.e. an iterator past the last valid element.

-

You can use this method to easily obtain iterators from a QCPDataRange, see the data selection page for an example.

- -
-
- -

§ keyRange()

- -
-
-
-template<class DataType >
- - - - - - - - - - - - - - - - - - -
QCPRange QCPDataContainer< DataType >::keyRange (bool & foundRange,
QCP::SignDomain signDomain = QCP::sdBoth 
)
-
-

Returns the range encompassed by the (main-)key coordinate of all data points. The output parameter foundRange indicates whether a sensible range was found. If this is false, you should not use the returned QCPRange (e.g. the data container is empty or all points have the same key).

-

Use signDomain to control which sign of the key coordinates should be considered. This is relevant e.g. for logarithmic plots which can mathematically only display one sign domain at a time.

-

If the DataType reports that its main key is equal to the sort key (sortKeyIsMainKey), as is the case for most plottables, this method uses this fact and finds the range very quickly.

-
See also
valueRange
- -
-
- -

§ valueRange()

- -
-
-
-template<class DataType >
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPRange QCPDataContainer< DataType >::valueRange (bool & foundRange,
QCP::SignDomain signDomain = QCP::sdBoth,
const QCPRangeinKeyRange = QCPRange() 
)
-
-

Returns the range encompassed by the value coordinates of the data points in the specified key range (inKeyRange), using the full DataType::valueRange reported by the data points. The output parameter foundRange indicates whether a sensible range was found. If this is false, you should not use the returned QCPRange (e.g. the data container is empty or all points have the same value).

-

Inf and -Inf data values are ignored.

-

If inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys.

-

Use signDomain to control which sign of the value coordinates should be considered. This is relevant e.g. for logarithmic plots which can mathematically only display one sign domain at a time.

-
See also
keyRange
- -
-
- -

§ dataRange()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - -
QCPDataRange QCPDataContainer< DataType >::dataRange () const
-
-inline
-
-

Returns a QCPDataRange encompassing the entire data set of this container. This means the begin index of the returned range is 0, and the end index is size.

- -
-
- -

§ limitIteratorsToDataRange()

- -
-
-
-template<class DataType >
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPDataContainer< DataType >::limitIteratorsToDataRange (const_iterator & begin,
const_iterator & end,
const QCPDataRangedataRange 
) const
-
-

Makes sure begin and end mark a data range that is both within the bounds of this data container's data, as well as within the specified dataRange. The initial range described by the passed iterators begin and end is never expanded, only contracted if necessary.

-

This function doesn't require for dataRange to be within the bounds of this data container's valid range.

- -
-
- -

§ preallocateGrow()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - -
void QCPDataContainer< DataType >::preallocateGrow (int minimumPreallocSize)
-
-protected
-
-

Increases the preallocation pool to have a size of at least minimumPreallocSize. Depending on the preallocation history, the container will grow by more than requested, to speed up future consecutive size increases.

-

if minimumPreallocSize is smaller than or equal to the current preallocation pool size, this method does nothing.

- -
-
- -

§ performAutoSqueeze()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - -
void QCPDataContainer< DataType >::performAutoSqueeze ()
-
-protected
-
-

This method decides, depending on the total allocation size and the size of the unused pre- and postallocation pools, whether it is sensible to reduce the pools in order to free up unused memory. It then possibly calls squeeze to do the deallocation.

-

If setAutoSqueeze is enabled, this method is called automatically each time data points are removed from the container (e.g. remove).

-
Note
when changing the decision parameters, care must be taken not to cause a back-and-forth between squeezing and reallocation due to the growth strategy of the internal QVector and preallocateGrow. The hysteresis between allocation and deallocation should be made high enough (at the expense of possibly larger unused memory from time to time).
- -
-
-

Friends And Related Function Documentation

- -

§ qcpLessThanSortKey()

- -
-
-
-template<class DataType >
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool qcpLessThanSortKey (const DataType & a,
const DataType & b 
)
-
-related
-
-

Returns whether the sort key of a is less than the sort key of b.

-
See also
QCPDataContainer::sort
- -
-
-
The documentation for this class was generated from the following file: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPDataRange.html b/third_party/qcustomplot/documentation/html/classQCPDataRange.html deleted file mode 100644 index 657cc00e..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPDataRange.html +++ /dev/null @@ -1,484 +0,0 @@ - - - - - - -QCPDataRange Class Reference - - - - -
- -
-
QCPDataRange Class Reference
-
-
- -

Describes a data range given by begin and end index. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPDataRange ()
 
 QCPDataRange (int begin, int end)
 
-bool operator== (const QCPDataRange &other) const
 
-bool operator!= (const QCPDataRange &other) const
 
-int begin () const
 
-int end () const
 
int size () const
 
int length () const
 
void setBegin (int begin)
 
void setEnd (int end)
 
bool isValid () const
 
bool isEmpty () const
 
QCPDataRange bounded (const QCPDataRange &other) const
 
QCPDataRange expanded (const QCPDataRange &other) const
 
QCPDataRange intersection (const QCPDataRange &other) const
 
QCPDataRange adjusted (int changeBegin, int changeEnd) const
 
bool intersects (const QCPDataRange &other) const
 
bool contains (const QCPDataRange &other) const
 
- - - - -

-Related Non-Members

(Note that these are not member functions.)

-
QDebug operator<< (QDebug d, const QCPDataRange &dataRange)
 
-

Detailed Description

-

Describes a data range given by begin and end index.

-

QCPDataRange holds two integers describing the begin (setBegin) and end (setEnd) index of a contiguous set of data points. The end index corresponds to the data point just after the last data point of the data range, like in standard iterators.

-

Data Ranges are not bound to a certain plottable, thus they can be freely exchanged, created and modified. If a non-contiguous data set shall be described, the class QCPDataSelection is used, which holds and manages multiple instances of QCPDataRange. In most situations, QCPDataSelection is thus used.

-

Both QCPDataRange and QCPDataSelection offer convenience methods to work with them, e.g. bounded, expanded, intersects, intersection, adjusted, contains. Further, addition and subtraction operators (defined in QCPDataSelection) can be used to join/subtract data ranges and data selections (or mixtures), to retrieve a corresponding QCPDataSelection.

-

QCustomPlot's data selection mechanism is based on QCPDataSelection and QCPDataRange.

-
Note
Do not confuse QCPDataRange with QCPRange. A QCPRange describes an interval in floating point plot coordinates, e.g. the current axis range.
-

Constructor & Destructor Documentation

- -

§ QCPDataRange() [1/2]

- -
-
- - - - - - - -
QCPDataRange::QCPDataRange ()
-
-

Creates an empty QCPDataRange, with begin and end set to 0.

- -
-
- -

§ QCPDataRange() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
QCPDataRange::QCPDataRange (int begin,
int end 
)
-
-

Creates a QCPDataRange, initialized with the specified begin and end.

-

No checks or corrections are made to ensure the resulting range is valid (isValid).

- -
-
-

Member Function Documentation

- -

§ size()

- -
-
- - - - - -
- - - - - - - -
int QCPDataRange::size () const
-
-inline
-
-

Returns the number of data points described by this data range. This is equal to the end index minus the begin index.

-
See also
length
- -
-
- -

§ length()

- -
-
- - - - - -
- - - - - - - -
int QCPDataRange::length () const
-
-inline
-
-

Returns the number of data points described by this data range. Equivalent to size.

- -
-
- -

§ setBegin()

- -
-
- - - - - -
- - - - - - - - -
void QCPDataRange::setBegin (int begin)
-
-inline
-
-

Sets the begin of this data range. The begin index points to the first data point that is part of the data range.

-

No checks or corrections are made to ensure the resulting range is valid (isValid).

-
See also
setEnd
- -
-
- -

§ setEnd()

- -
-
- - - - - -
- - - - - - - - -
void QCPDataRange::setEnd (int end)
-
-inline
-
-

Sets the end of this data range. The end index points to the data point just after the last data point that is part of the data range.

-

No checks or corrections are made to ensure the resulting range is valid (isValid).

-
See also
setBegin
- -
-
- -

§ isValid()

- -
-
- - - - - -
- - - - - - - -
bool QCPDataRange::isValid () const
-
-inline
-
-

Returns whether this range is valid. A valid range has a begin index greater or equal to 0, and an end index greater or equal to the begin index.

-
Note
Invalid ranges should be avoided and are never the result of any of QCustomPlot's methods (unless they are themselves fed with invalid ranges). Do not pass invalid ranges to QCustomPlot's methods. The invalid range is not inherently prevented in QCPDataRange, to allow temporary invalid begin/end values while manipulating the range. An invalid range is not necessarily empty (isEmpty), since its length can be negative and thus non-zero.
- -
-
- -

§ isEmpty()

- -
-
- - - - - -
- - - - - - - -
bool QCPDataRange::isEmpty () const
-
-inline
-
-

Returns whether this range is empty, i.e. whether its begin index equals its end index.

-
See also
size, length
- -
-
- -

§ bounded()

- -
-
- - - - - - - - -
QCPDataRange QCPDataRange::bounded (const QCPDataRangeother) const
-
-

Returns a data range that matches this data range, except that parts exceeding other are excluded.

-

This method is very similar to intersection, with one distinction: If this range and the other range share no intersection, the returned data range will be empty with begin and end set to the respective boundary side of other, at which this range is residing. (intersection would just return a range with begin and end set to 0.)

- -
-
- -

§ expanded()

- -
-
- - - - - - - - -
QCPDataRange QCPDataRange::expanded (const QCPDataRangeother) const
-
-

Returns a data range that contains both this data range as well as other.

- -
-
- -

§ intersection()

- -
-
- - - - - - - - -
QCPDataRange QCPDataRange::intersection (const QCPDataRangeother) const
-
-

Returns the data range which is contained in both this data range and other.

-

This method is very similar to bounded, with one distinction: If this range and the other range share no intersection, the returned data range will be empty with begin and end set to 0. (bounded would return a range with begin and end set to one of the boundaries of other, depending on which side this range is on.)

-
See also
QCPDataSelection::intersection
- -
-
- -

§ adjusted()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPDataRange QCPDataRange::adjusted (int changeBegin,
int changeEnd 
) const
-
-inline
-
-

Returns a data range where changeBegin and changeEnd were added to the begin and end indices, respectively.

- -
-
- -

§ intersects()

- -
-
- - - - - - - - -
bool QCPDataRange::intersects (const QCPDataRangeother) const
-
-

Returns whether this data range and other share common data points.

-
See also
intersection, contains
- -
-
- -

§ contains()

- -
-
- - - - - - - - -
bool QCPDataRange::contains (const QCPDataRangeother) const
-
-

Returns whether all data points of other are also contained inside this data range.

-
See also
intersects
- -
-
-

Friends And Related Function Documentation

- -

§ operator<<()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QDebug operator<< (QDebug d,
const QCPDataRangedataRange 
)
-
-related
-
-

Prints dataRange in a human readable format to the qDebug output.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/selection.h
  • -
  • src/selection.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPDataSelection.html b/third_party/qcustomplot/documentation/html/classQCPDataSelection.html deleted file mode 100644 index 1ca1a241..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPDataSelection.html +++ /dev/null @@ -1,912 +0,0 @@ - - - - - - -QCPDataSelection Class Reference - - - - -
- -
-
QCPDataSelection Class Reference
-
-
- -

Describes a data set by holding multiple QCPDataRange instances. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPDataSelection ()
 
 QCPDataSelection (const QCPDataRange &range)
 
bool operator== (const QCPDataSelection &other) const
 
-bool operator!= (const QCPDataSelection &other) const
 
QCPDataSelectionoperator+= (const QCPDataSelection &other)
 
QCPDataSelectionoperator+= (const QCPDataRange &other)
 
QCPDataSelectionoperator-= (const QCPDataSelection &other)
 
QCPDataSelectionoperator-= (const QCPDataRange &other)
 
int dataRangeCount () const
 
int dataPointCount () const
 
QCPDataRange dataRange (int index=0) const
 
QList< QCPDataRangedataRanges () const
 
QCPDataRange span () const
 
void addDataRange (const QCPDataRange &dataRange, bool simplify=true)
 
void clear ()
 
bool isEmpty () const
 
void simplify ()
 
void enforceType (QCP::SelectionType type)
 
bool contains (const QCPDataSelection &other) const
 
QCPDataSelection intersection (const QCPDataRange &other) const
 
QCPDataSelection intersection (const QCPDataSelection &other) const
 
QCPDataSelection inverse (const QCPDataRange &outerRange) const
 
- - - - - - - - - - - - - - - - - -

-Friends

const QCPDataSelection operator+ (const QCPDataSelection &a, const QCPDataSelection &b)
 
const QCPDataSelection operator+ (const QCPDataRange &a, const QCPDataSelection &b)
 
const QCPDataSelection operator+ (const QCPDataSelection &a, const QCPDataRange &b)
 
const QCPDataSelection operator+ (const QCPDataRange &a, const QCPDataRange &b)
 
const QCPDataSelection operator- (const QCPDataSelection &a, const QCPDataSelection &b)
 
const QCPDataSelection operator- (const QCPDataRange &a, const QCPDataSelection &b)
 
const QCPDataSelection operator- (const QCPDataSelection &a, const QCPDataRange &b)
 
const QCPDataSelection operator- (const QCPDataRange &a, const QCPDataRange &b)
 
- - - - -

-Related Non-Members

(Note that these are not member functions.)

-
QDebug operator<< (QDebug d, const QCPDataSelection &selection)
 
-

Detailed Description

-

Describes a data set by holding multiple QCPDataRange instances.

-

QCPDataSelection manages multiple instances of QCPDataRange in order to represent any (possibly disjoint) set of data selection.

-

The data selection can be modified with addition and subtraction operators which take QCPDataSelection and QCPDataRange instances, as well as methods such as addDataRange and clear. Read access is provided by dataRange, dataRanges, dataRangeCount, etc.

-

The method simplify is used to join directly adjacent or even overlapping QCPDataRange instances. QCPDataSelection automatically simplifies when using the addition/subtraction operators. The only case when simplify is left to the user, is when calling addDataRange, with the parameter simplify explicitly set to false. This is useful if many data ranges will be added to the selection successively and the overhead for simplifying after each iteration shall be avoided. In this case, you should make sure to call simplify after completing the operation.

-

Use enforceType to bring the data selection into a state complying with the constraints for selections defined in QCP::SelectionType.

-

QCustomPlot's data selection mechanism is based on QCPDataSelection and QCPDataRange.

-

-Iterating over a data selection

-

As an example, the following code snippet calculates the average value of a graph's data selection:

-
QCPDataSelection selection = graph->selection();
double sum = 0;
foreach (QCPDataRange dataRange, selection.dataRanges())
{
QCPGraphDataContainer::const_iterator begin = graph->data()->at(dataRange.begin()); // get range begin iterator from index
QCPGraphDataContainer::const_iterator end = graph->data()->at(dataRange.end()); // get range end iterator from index
for (QCPGraphDataContainer::const_iterator it=begin; it!=end; ++it)
{
// iterator "it" will go through all selected data points, as an example, we calculate the value average
sum += it->value;
}
}
double average = sum/selection.dataPointCount();

Constructor & Destructor Documentation

- -

§ QCPDataSelection() [1/2]

- -
-
- - - - - -
- - - - - - - -
QCPDataSelection::QCPDataSelection ()
-
-explicit
-
-

Creates an empty QCPDataSelection.

- -
-
- -

§ QCPDataSelection() [2/2]

- -
-
- - - - - -
- - - - - - - - -
QCPDataSelection::QCPDataSelection (const QCPDataRangerange)
-
-explicit
-
-

Creates a QCPDataSelection containing the provided range.

- -
-
-

Member Function Documentation

- -

§ operator==()

- -
-
- - - - - - - - -
bool QCPDataSelection::operator== (const QCPDataSelectionother) const
-
-

Returns true if this selection is identical (contains the same data ranges with the same begin and end indices) to other.

-

Note that both data selections must be in simplified state (the usual state of the selection, see simplify) for this operator to return correct results.

- -
-
- -

§ operator+=() [1/2]

- -
-
- - - - - - - - -
QCPDataSelection & QCPDataSelection::operator+= (const QCPDataSelectionother)
-
-

Adds the data selection of other to this data selection, and then simplifies this data selection (see simplify).

- -
-
- -

§ operator+=() [2/2]

- -
-
- - - - - - - - -
QCPDataSelection & QCPDataSelection::operator+= (const QCPDataRangeother)
-
-

Adds the data range other to this data selection, and then simplifies this data selection (see simplify).

- -
-
- -

§ operator-=() [1/2]

- -
-
- - - - - - - - -
QCPDataSelection & QCPDataSelection::operator-= (const QCPDataSelectionother)
-
-

Removes all data point indices that are described by other from this data selection.

- -
-
- -

§ operator-=() [2/2]

- -
-
- - - - - - - - -
QCPDataSelection & QCPDataSelection::operator-= (const QCPDataRangeother)
-
-

Removes all data point indices that are described by other from this data selection.

- -
-
- -

§ dataRangeCount()

- -
-
- - - - - -
- - - - - - - -
int QCPDataSelection::dataRangeCount () const
-
-inline
-
-

Returns the number of ranges that make up the data selection. The ranges can be accessed by dataRange via their index.

-
See also
dataRange, dataPointCount
- -
-
- -

§ dataPointCount()

- -
-
- - - - - - - -
int QCPDataSelection::dataPointCount () const
-
-

Returns the total number of data points contained in all data ranges that make up this data selection.

- -
-
- -

§ dataRange()

- -
-
- - - - - - - - -
QCPDataRange QCPDataSelection::dataRange (int index = 0) const
-
-

Returns the data range with the specified index.

-

If the data selection is simplified (the usual state of the selection, see simplify), the ranges are sorted by ascending data point index.

-
See also
dataRangeCount
- -
-
- -

§ dataRanges()

- -
-
- - - - - -
- - - - - - - -
QList< QCPDataRange > QCPDataSelection::dataRanges () const
-
-inline
-
-

Returns all data ranges that make up the data selection. If the data selection is simplified (the usual state of the selection, see simplify), the ranges are sorted by ascending data point index.

-
See also
dataRange
- -
-
- -

§ span()

- -
-
- - - - - - - -
QCPDataRange QCPDataSelection::span () const
-
-

Returns a QCPDataRange which spans the entire data selection, including possible intermediate segments which are not part of the original data selection.

- -
-
- -

§ addDataRange()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPDataSelection::addDataRange (const QCPDataRangedataRange,
bool simplify = true 
)
-
-

Adds the given dataRange to this data selection. This is equivalent to the += operator but allows disabling immediate simplification by setting simplify to false. This can improve performance if adding a very large amount of data ranges successively. In this case, make sure to call simplify manually, after the operation.

- -
-
- -

§ clear()

- -
-
- - - - - - - -
void QCPDataSelection::clear ()
-
-

Removes all data ranges. The data selection then contains no data points.

-

isEmpty

- -
-
- -

§ isEmpty()

- -
-
- - - - - -
- - - - - - - -
bool QCPDataSelection::isEmpty () const
-
-inline
-
-

Returns true if there are no data ranges, and thus no data points, in this QCPDataSelection instance.

-
See also
dataRangeCount
- -
-
- -

§ simplify()

- -
-
- - - - - - - -
void QCPDataSelection::simplify ()
-
-

Sorts all data ranges by range begin index in ascending order, and then joins directly adjacent or overlapping ranges. This can reduce the number of individual data ranges in the selection, and prevents possible double-counting when iterating over the data points held by the data ranges.

-

This method is automatically called when using the addition/subtraction operators. The only case when simplify is left to the user, is when calling addDataRange, with the parameter simplify explicitly set to false.

- -
-
- -

§ enforceType()

- -
-
- - - - - - - - -
void QCPDataSelection::enforceType (QCP::SelectionType type)
-
-

Makes sure this data selection conforms to the specified type selection type. Before the type is enforced, simplify is called.

-

Depending on type, enforcing means adding new data points that were previously not part of the selection, or removing data points from the selection. If the current selection already conforms to type, the data selection is not changed.

-
See also
QCP::SelectionType
- -
-
- -

§ contains()

- -
-
- - - - - - - - -
bool QCPDataSelection::contains (const QCPDataSelectionother) const
-
-

Returns true if the data selection other is contained entirely in this data selection, i.e. all data point indices that are in other are also in this data selection.

-
See also
QCPDataRange::contains
- -
-
- -

§ intersection() [1/2]

- -
-
- - - - - - - - -
QCPDataSelection QCPDataSelection::intersection (const QCPDataRangeother) const
-
-

Returns a data selection containing the points which are both in this data selection and in the data range other.

-

A common use case is to limit an unknown data selection to the valid range of a data container, using QCPDataContainer::dataRange as other. One can then safely iterate over the returned data selection without exceeding the data container's bounds.

- -
-
- -

§ intersection() [2/2]

- -
-
- - - - - - - - -
QCPDataSelection QCPDataSelection::intersection (const QCPDataSelectionother) const
-
-

Returns a data selection containing the points which are both in this data selection and in the data selection other.

- -
-
- -

§ inverse()

- -
-
- - - - - - - - -
QCPDataSelection QCPDataSelection::inverse (const QCPDataRangeouterRange) const
-
-

Returns a data selection which is the exact inverse of this data selection, with outerRange defining the base range on which to invert. If outerRange is smaller than the span of this data selection, it is expanded accordingly.

-

For example, this method can be used to retrieve all unselected segments by setting outerRange to the full data range of the plottable, and calling this method on a data selection holding the selected segments.

- -
-
-

Friends And Related Function Documentation

- -

§ operator+ [1/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPDataSelection operator+ (const QCPDataSelectiona,
const QCPDataSelectionb 
)
-
-friend
-
-

Return a QCPDataSelection with the data points in a joined with the data points in b. The resulting data selection is already simplified (see QCPDataSelection::simplify).

- -
-
- -

§ operator+ [2/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPDataSelection operator+ (const QCPDataRangea,
const QCPDataSelectionb 
)
-
-friend
-
-

Return a QCPDataSelection with the data points in a joined with the data points in b. The resulting data selection is already simplified (see QCPDataSelection::simplify).

- -
-
- -

§ operator+ [3/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPDataSelection operator+ (const QCPDataSelectiona,
const QCPDataRangeb 
)
-
-friend
-
-

Return a QCPDataSelection with the data points in a joined with the data points in b. The resulting data selection is already simplified (see QCPDataSelection::simplify).

- -
-
- -

§ operator+ [4/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPDataSelection operator+ (const QCPDataRangea,
const QCPDataRangeb 
)
-
-friend
-
-

Return a QCPDataSelection with the data points in a joined with the data points in b. The resulting data selection is already simplified (see QCPDataSelection::simplify).

- -
-
- -

§ operator- [1/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPDataSelection operator- (const QCPDataSelectiona,
const QCPDataSelectionb 
)
-
-friend
-
-

Return a QCPDataSelection with the data points which are in a but not in b.

- -
-
- -

§ operator- [2/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPDataSelection operator- (const QCPDataRangea,
const QCPDataSelectionb 
)
-
-friend
-
-

Return a QCPDataSelection with the data points which are in a but not in b.

- -
-
- -

§ operator- [3/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPDataSelection operator- (const QCPDataSelectiona,
const QCPDataRangeb 
)
-
-friend
-
-

Return a QCPDataSelection with the data points which are in a but not in b.

- -
-
- -

§ operator- [4/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPDataSelection operator- (const QCPDataRangea,
const QCPDataRangeb 
)
-
-friend
-
-

Return a QCPDataSelection with the data points which are in a but not in b.

- -
-
- -

§ operator<<()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QDebug operator<< (QDebug d,
const QCPDataSelectionselection 
)
-
-related
-
-

Prints selection in a human readable format to the qDebug output.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/selection.h
  • -
  • src/selection.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPErrorBars.html b/third_party/qcustomplot/documentation/html/classQCPErrorBars.html deleted file mode 100644 index 4dfc5e7b..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPErrorBars.html +++ /dev/null @@ -1,1457 +0,0 @@ - - - - - - -QCPErrorBars Class Reference - - - - -
- -
-
QCPErrorBars Class Reference
-
-
- -

A plottable that adds a set of error bars to other plottables. - More...

-
-Inheritance diagram for QCPErrorBars:
-
-
Inheritance graph
- - - - - -
- - - - -

-Public Types

enum  ErrorType
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPErrorBars (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
QSharedPointer< QCPErrorBarsDataContainerdata () const
 
-QCPAbstractPlottabledataPlottable () const
 
-ErrorType errorType () const
 
-double whiskerWidth () const
 
-double symbolGap () const
 
void setData (QSharedPointer< QCPErrorBarsDataContainer > data)
 
void setData (const QVector< double > &error)
 
void setData (const QVector< double > &errorMinus, const QVector< double > &errorPlus)
 
void setDataPlottable (QCPAbstractPlottable *plottable)
 
void setErrorType (ErrorType type)
 
void setWhiskerWidth (double pixels)
 
void setSymbolGap (double pixels)
 
void addData (const QVector< double > &error)
 
void addData (const QVector< double > &errorMinus, const QVector< double > &errorPlus)
 
void addData (double error)
 
void addData (double errorMinus, double errorPlus)
 
virtual int dataCount () const
 
virtual double dataMainKey (int index) const
 
virtual double dataSortKey (int index) const
 
virtual double dataMainValue (int index) const
 
virtual QCPRange dataValueRange (int index) const
 
virtual QPointF dataPixelPosition (int index) const
 
virtual bool sortKeyIsMainKey () const
 
virtual QCPDataSelection selectTestRect (const QRectF &rect, bool onlySelectable) const
 
virtual int findBegin (double sortKey, bool expandedRange=true) const
 
virtual int findEnd (double sortKey, bool expandedRange=true) const
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
virtual QCPPlottableInterface1Dinterface1D ()
 
- Public Functions inherited from QCPAbstractPlottable
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
-QString name () const
 
-bool antialiasedFill () const
 
-bool antialiasedScatters () const
 
-QPen pen () const
 
-QBrush brush () const
 
-QCPAxiskeyAxis () const
 
-QCPAxisvalueAxis () const
 
-QCP::SelectionType selectable () const
 
bool selected () const
 
QCPDataSelection selection () const
 
QCPSelectionDecoratorselectionDecorator () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (QCP::SelectionType selectable)
 
Q_SLOT void setSelection (QCPDataSelection selection)
 
void setSelectionDecorator (QCPSelectionDecorator *decorator)
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false, bool inKeyRange=false) const
 
bool addToLegend (QCPLegend *legend)
 
bool addToLegend ()
 
bool removeFromLegend (QCPLegend *legend) const
 
bool removeFromLegend () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const
 
virtual QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const
 
virtual QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const
 
void getErrorBarLines (QCPErrorBarsDataContainer::const_iterator it, QVector< QLineF > &backbones, QVector< QLineF > &whiskers) const
 
void getVisibleDataBounds (QCPErrorBarsDataContainer::const_iterator &begin, QCPErrorBarsDataContainer::const_iterator &end, const QCPDataRange &rangeRestriction) const
 
double pointDistance (const QPointF &pixelPoint, QCPErrorBarsDataContainer::const_iterator &closestData) const
 
void getDataSegments (QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
 
bool errorBarVisible (int index) const
 
bool rectIntersectsLine (const QRectF &pixelRect, const QLineF &line) const
 
- Protected Functions inherited from QCPAbstractPlottable
virtual QRect clipRect () const
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractPlottable
void selectionChanged (bool selected)
 
void selectionChanged (const QCPDataSelection &selection)
 
void selectableChanged (QCP::SelectionType selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A plottable that adds a set of error bars to other plottables.

-
-QCPErrorBars.png -
-

The QCPErrorBars plottable can be attached to other one-dimensional plottables (e.g. QCPGraph, QCPCurve, QCPBars, etc.) and equips them with error bars.

-

Use setDataPlottable to define for which plottable the QCPErrorBars shall display the error bars. The orientation of the error bars can be controlled with setErrorType.

-

By using setData, you can supply the actual error data, either as symmetric error or plus/minus asymmetric errors. QCPErrorBars only stores the error data. The absolute key/value position of each error bar will be adopted from the configured data plottable. The error data of the QCPErrorBars are associated one-to-one via their index to the data points of the data plottable. You can directly access and manipulate the error bar data via data.

-

Set either of the plus/minus errors to NaN (qQNaN() or std::numeric_limits<double>::quiet_NaN()) to not show the respective error bar on the data point at that index.

-

-Changing the appearance

-

The appearance of the error bars is defined by the pen (setPen), and the width of the whiskers (setWhiskerWidth). Further, the error bar backbones may leave a gap around the data point center to prevent that error bars are drawn too close to or even through scatter points. This gap size can be controlled via setSymbolGap.

-

Member Enumeration Documentation

- -

§ ErrorType

- -
-
- - - - -
enum QCPErrorBars::ErrorType
-
-

Defines in which orientation the error bars shall appear. If your data needs both error dimensions, create two QCPErrorBars with different ErrorType.

-
See also
setErrorType
- - - -
Enumerator
etKeyError 

The errors are for the key dimension (bars appear parallel to the key axis)

-
etValueError 

The errors are for the value dimension (bars appear parallel to the value axis)

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPErrorBars()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPErrorBars::QCPErrorBars (QCPAxiskeyAxis,
QCPAxisvalueAxis 
)
-
-explicit
-
-

Constructs an error bars plottable which uses keyAxis as its key axis ("x") and valueAxis as its value axis ("y"). keyAxis and valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though.

-

It is also important that the keyAxis and valueAxis are the same for the error bars plottable and the data plottable that the error bars shall be drawn on (setDataPlottable).

-

The created QCPErrorBars is automatically registered with the QCustomPlot instance inferred from keyAxis. This QCustomPlot instance takes ownership of the QCPErrorBars, so do not delete it manually but use QCustomPlot::removePlottable() instead.

- -
-
-

Member Function Documentation

- -

§ data()

- -
-
- - - - - -
- - - - - - - -
QSharedPointer< QCPErrorBarsDataContainer > QCPErrorBars::data () const
-
-inline
-
-

Returns a shared pointer to the internal data storage of type QCPErrorBarsDataContainer. You may use it to directly manipulate the error values, which may be more convenient and faster than using the regular setData methods.

- -
-
- -

§ setData() [1/3]

- -
-
- - - - - - - - -
void QCPErrorBars::setData (QSharedPointer< QCPErrorBarsDataContainerdata)
-
-

This is an overloaded function.

-

Replaces the current data container with the provided data container.

-

Since a QSharedPointer is used, multiple QCPErrorBars instances may share the same data container safely. Modifying the data in the container will then affect all QCPErrorBars instances that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers:

errorBars2->setData(errorBars1->data()); // errorBars1 and errorBars2 now share data container

If you do not wish to share containers, but create a copy from an existing container, assign the data containers directly:

*errorBars2->data() = *errorBars1->data(); // errorBars2 now has copy of errorBars1's data in its container

(This uses different notation compared with other plottables, because the QCPErrorBars uses a QVector<QCPErrorBarsData> as its data container, instead of a QCPDataContainer.)

-
See also
addData
- -
-
- -

§ setData() [2/3]

- -
-
- - - - - - - - -
void QCPErrorBars::setData (const QVector< double > & error)
-
-

This is an overloaded function.

-

Sets symmetrical error values as specified in error. The errors will be associated one-to-one by the data point index to the associated data plottable (setDataPlottable).

-

You can directly access and manipulate the error bar data via data.

-
See also
addData
- -
-
- -

§ setData() [3/3]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPErrorBars::setData (const QVector< double > & errorMinus,
const QVector< double > & errorPlus 
)
-
-

This is an overloaded function.

-

Sets asymmetrical errors as specified in errorMinus and errorPlus. The errors will be associated one-to-one by the data point index to the associated data plottable (setDataPlottable).

-

You can directly access and manipulate the error bar data via data.

-
See also
addData
- -
-
- -

§ setDataPlottable()

- -
-
- - - - - - - - -
void QCPErrorBars::setDataPlottable (QCPAbstractPlottableplottable)
-
-

Sets the data plottable to which the error bars will be applied. The error values specified e.g. via setData will be associated one-to-one by the data point index to the data points of plottable. This means that the error bars will adopt the key/value coordinates of the data point with the same index.

-

The passed plottable must be a one-dimensional plottable, i.e. it must implement the QCPPlottableInterface1D. Further, it must not be a QCPErrorBars instance itself. If either of these restrictions is violated, a corresponding qDebug output is generated, and the data plottable of this QCPErrorBars instance is set to zero.

-

For proper display, care must also be taken that the key and value axes of the plottable match those configured for this QCPErrorBars instance.

- -
-
- -

§ setErrorType()

- -
-
- - - - - - - - -
void QCPErrorBars::setErrorType (ErrorType type)
-
-

Sets in which orientation the error bars shall appear on the data points. If your data needs both error dimensions, create two QCPErrorBars with different type.

- -
-
- -

§ setWhiskerWidth()

- -
-
- - - - - - - - -
void QCPErrorBars::setWhiskerWidth (double pixels)
-
-

Sets the width of the whiskers (the short bars at the end of the actual error bar backbones) to pixels.

- -
-
- -

§ setSymbolGap()

- -
-
- - - - - - - - -
void QCPErrorBars::setSymbolGap (double pixels)
-
-

Sets the gap diameter around the data points that will be left out when drawing the error bar backbones. This gap prevents that error bars are drawn too close to or even through scatter points.

- -
-
- -

§ addData() [1/4]

- -
-
- - - - - - - - -
void QCPErrorBars::addData (const QVector< double > & error)
-
-

This is an overloaded function.

-

Adds symmetrical error values as specified in error. The errors will be associated one-to-one by the data point index to the associated data plottable (setDataPlottable).

-

You can directly access and manipulate the error bar data via data.

-
See also
setData
- -
-
- -

§ addData() [2/4]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPErrorBars::addData (const QVector< double > & errorMinus,
const QVector< double > & errorPlus 
)
-
-

This is an overloaded function.

-

Adds asymmetrical errors as specified in errorMinus and errorPlus. The errors will be associated one-to-one by the data point index to the associated data plottable (setDataPlottable).

-

You can directly access and manipulate the error bar data via data.

-
See also
setData
- -
-
- -

§ addData() [3/4]

- -
-
- - - - - - - - -
void QCPErrorBars::addData (double error)
-
-

This is an overloaded function.

-

Adds a single symmetrical error bar as specified in error. The errors will be associated one-to-one by the data point index to the associated data plottable (setDataPlottable).

-

You can directly access and manipulate the error bar data via data.

-
See also
setData
- -
-
- -

§ addData() [4/4]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPErrorBars::addData (double errorMinus,
double errorPlus 
)
-
-

This is an overloaded function.

-

Adds a single asymmetrical error bar as specified in errorMinus and errorPlus. The errors will be associated one-to-one by the data point index to the associated data plottable (setDataPlottable).

-

You can directly access and manipulate the error bar data via data.

-
See also
setData
- -
-
- -

§ dataCount()

- -
-
- - - - - -
- - - - - - - -
int QCPErrorBars::dataCount () const
-
-virtual
-
-

Returns the number of data points of the plottable.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ dataMainKey()

- -
-
- - - - - -
- - - - - - - - -
double QCPErrorBars::dataMainKey (int index) const
-
-virtual
-
-

Returns the main key of the data point at the given index.

-

What the main key is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ dataSortKey()

- -
-
- - - - - -
- - - - - - - - -
double QCPErrorBars::dataSortKey (int index) const
-
-virtual
-
-

Returns the sort key of the data point at the given index.

-

What the sort key is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ dataMainValue()

- -
-
- - - - - -
- - - - - - - - -
double QCPErrorBars::dataMainValue (int index) const
-
-virtual
-
-

Returns the main value of the data point at the given index.

-

What the main value is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ dataValueRange()

- -
-
- - - - - -
- - - - - - - - -
QCPRange QCPErrorBars::dataValueRange (int index) const
-
-virtual
-
-

Returns the value range of the data point at the given index.

-

What the value range is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ dataPixelPosition()

- -
-
- - - - - -
- - - - - - - - -
QPointF QCPErrorBars::dataPixelPosition (int index) const
-
-virtual
-
-

Returns the pixel position on the widget surface at which the data point at the given index appears.

-

Usually this corresponds to the point of dataMainKey/dataMainValue, in pixel coordinates. However, depending on the plottable, this might be a different apparent position than just a coord-to-pixel transform of those values. For example, QCPBars apparent data values can be shifted depending on their stacking, bar grouping or configured base value.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ sortKeyIsMainKey()

- -
-
- - - - - -
- - - - - - - -
bool QCPErrorBars::sortKeyIsMainKey () const
-
-virtual
-
-

Returns whether the sort key (dataSortKey) is identical to the main key (dataMainKey).

-

What the sort and main keys are, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ selectTestRect()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPDataSelection QCPErrorBars::selectTestRect (const QRectF & rect,
bool onlySelectable 
) const
-
-virtual
-
- -

-

Returns a data selection containing all the data points of this plottable which are contained (or hit by) rect. This is used mainly in the selection rect interaction for data selection (data selection mechanism).

-

If onlySelectable is true, an empty QCPDataSelection is returned if this plottable is not selectable (i.e. if QCPAbstractPlottable::setSelectable is QCP::stNone).

-
Note
rect must be a normalized rect (positive or zero width and height). This is especially important when using the rect of QCPSelectionRect::accepted, which is not necessarily normalized. Use QRect::normalized() when passing a rect which might not be normalized.
- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ findBegin()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int QCPErrorBars::findBegin (double sortKey,
bool expandedRange = true 
) const
-
-virtual
-
-

Returns the index of the data point with a (sort-)key that is equal to, just below, or just above sortKey. If expandedRange is true, the data point just below sortKey will be considered, otherwise the one just above.

-

This can be used in conjunction with findEnd to iterate over data points within a given key range, including or excluding the bounding data points that are just beyond the specified range.

-

If expandedRange is true but there are no data points below sortKey, 0 is returned.

-

If the container is empty, returns 0 (in that case, findEnd will also return 0, so a loop using these methods will not iterate over the index 0).

-
See also
findEnd, QCPDataContainer::findBegin
- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ findEnd()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int QCPErrorBars::findEnd (double sortKey,
bool expandedRange = true 
) const
-
-virtual
-
-

Returns the index one after the data point with a (sort-)key that is equal to, just above, or just below sortKey. If expandedRange is true, the data point just above sortKey will be considered, otherwise the one just below.

-

This can be used in conjunction with findBegin to iterate over data points within a given key range, including the bounding data points that are just below and above the specified range.

-

If expandedRange is true but there are no data points above sortKey, the index just above the highest data point is returned.

-

If the container is empty, returns 0.

-
See also
findBegin, QCPDataContainer::findEnd
- -

Implements QCPPlottableInterface1D.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPErrorBars::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

Implements a selectTest specific to this plottable's point geometry.

-

If details is not 0, it will be set to a QCPDataSelection, describing the closest data point to pos.

-

For general information about this virtual method, see the base class implementation. QCPAbstractPlottable::selectTest

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ interface1D()

- -
-
- - - - - -
- - - - - - - -
virtual QCPPlottableInterface1D* QCPErrorBars::interface1D ()
-
-inlinevirtual
-
-

If this plottable is a one-dimensional plottable, i.e. it implements the QCPPlottableInterface1D, returns the this pointer with that type. Otherwise (e.g. in the case of a QCPColorMap) returns zero.

-

You can use this method to gain read access to data coordinates while holding a pointer to the abstract base class only.

- -

Reimplemented from QCPAbstractPlottable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPErrorBars::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ drawLegendIcon()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPErrorBars::drawLegendIcon (QCPPainterpainter,
const QRectF & rect 
) const
-
-protectedvirtual
-
-

called by QCPLegend::draw (via QCPPlottableLegendItem::draw) to create a graphical representation of this plottable inside rect, next to the plottable name.

-

The passed painter has its cliprect set to rect, so painting outside of rect won't appear outside the legend icon border.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ getKeyRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPRange QCPErrorBars::getKeyRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth 
) const
-
-protectedvirtual
-
-

Returns the coordinate range that all data in this plottable span in the key axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getValueRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ getValueRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPRange QCPErrorBars::getValueRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth,
const QCPRangeinKeyRange = QCPRange() 
) const
-
-protectedvirtual
-
-

Returns the coordinate range that the data points in the specified key range (inKeyRange) span in the value axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

If inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys.

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getKeyRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ getErrorBarLines()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPErrorBars::getErrorBarLines (QCPErrorBarsDataContainer::const_iterator it,
QVector< QLineF > & backbones,
QVector< QLineF > & whiskers 
) const
-
-protected
-
-

Calculates the lines that make up the error bar belonging to the data point it.

-

The resulting lines are added to backbones and whiskers. The vectors are not cleared, so calling this method with different it but the same backbones and whiskers allows to accumulate lines for multiple data points.

-

This method assumes that it is a valid iterator within the bounds of this QCPErrorBars instance and within the bounds of the associated data plottable.

- -
-
- -

§ getVisibleDataBounds()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPErrorBars::getVisibleDataBounds (QCPErrorBarsDataContainer::const_iterator & begin,
QCPErrorBarsDataContainer::const_iterator & end,
const QCPDataRangerangeRestriction 
) const
-
-protected
-
-

This method outputs the currently visible data range via begin and end. The returned range will also never exceed rangeRestriction.

-

Since error bars with type etKeyError may extend to arbitrarily positive and negative key coordinates relative to their data point key, this method checks all outer error bars whether they truly don't reach into the visible portion of the axis rect, by calling errorBarVisible. On the other hand error bars with type etValueError that are associated with data plottables whose sort key is equal to the main key (see QCPDataContainer DataType) can be handled very efficiently by finding the visible range of error bars through binary search (QCPPlottableInterface1D::findBegin and QCPPlottableInterface1D::findEnd).

-

If the plottable's sort key is not equal to the main key, this method returns the full data range, only restricted by rangeRestriction. Drawing optimization then has to be done on a point-by-point basis in the draw method.

- -
-
- -

§ pointDistance()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
double QCPErrorBars::pointDistance (const QPointF & pixelPoint,
QCPErrorBarsDataContainer::const_iterator & closestData 
) const
-
-protected
-
-

Calculates the minimum distance in pixels the error bars' representation has from the given pixelPoint. This is used to determine whether the error bar was clicked or not, e.g. in selectTest. The closest data point to pixelPoint is returned in closestData.

- -
-
- -

§ getDataSegments()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPErrorBars::getDataSegments (QList< QCPDataRange > & selectedSegments,
QList< QCPDataRange > & unselectedSegments 
) const
-
-protected
-
-
Note
This method is identical to QCPAbstractPlottable1D::getDataSegments but needs to be reproduced here since the QCPErrorBars plottable, as a special case that doesn't have its own key/value data coordinates, doesn't derive from QCPAbstractPlottable1D. See the documentation there for details.
- -
-
- -

§ errorBarVisible()

- -
-
- - - - - -
- - - - - - - - -
bool QCPErrorBars::errorBarVisible (int index) const
-
-protected
-
-

Returns whether the error bar at the specified index is visible within the current key axis range.

-

This method assumes for performance reasons without checking that the key axis, the value axis, and the data plottable (setDataPlottable) are not nullptr and that index is within valid bounds of this QCPErrorBars instance and the bounds of the data plottable.

- -
-
- -

§ rectIntersectsLine()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool QCPErrorBars::rectIntersectsLine (const QRectF & pixelRect,
const QLineF & line 
) const
-
-protected
-
-

Returns whether line intersects (or is contained in) pixelRect.

-

line is assumed to be either perfectly horizontal or perfectly vertical, as is the case for error bar lines.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPErrorBarsData.html b/third_party/qcustomplot/documentation/html/classQCPErrorBarsData.html deleted file mode 100644 index 38ab96eb..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPErrorBarsData.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -QCPErrorBarsData Class Reference - - - - -
- -
-
QCPErrorBarsData Class Reference
-
-
- -

Holds the data of one single error bar for QCPErrorBars. - More...

- - - - - - - - -

-Public Functions

 QCPErrorBarsData ()
 
 QCPErrorBarsData (double error)
 
 QCPErrorBarsData (double errorMinus, double errorPlus)
 
- - - - - -

-Public Members

-double errorMinus
 
-double errorPlus
 
-

Detailed Description

-

Holds the data of one single error bar for QCPErrorBars.

-

The stored data is:

    -
  • errorMinus: how much the error bar extends towards negative coordinates from the data point position
  • -
  • errorPlus: how much the error bar extends towards positive coordinates from the data point position
  • -
-

The container for storing the error bar information is QCPErrorBarsDataContainer. It is a typedef for QVector<QCPErrorBarsData>.

-
See also
QCPErrorBarsDataContainer
-

Constructor & Destructor Documentation

- -

§ QCPErrorBarsData() [1/3]

- -
-
- - - - - - - -
QCPErrorBarsData::QCPErrorBarsData ()
-
-

Constructs an error bar with errors set to zero.

- -
-
- -

§ QCPErrorBarsData() [2/3]

- -
-
- - - - - -
- - - - - - - - -
QCPErrorBarsData::QCPErrorBarsData (double error)
-
-explicit
-
-

Constructs an error bar with equal error in both negative and positive direction.

- -
-
- -

§ QCPErrorBarsData() [3/3]

- -
-
- - - - - - - - - - - - - - - - - - -
QCPErrorBarsData::QCPErrorBarsData (double errorMinus,
double errorPlus 
)
-
-

Constructs an error bar with negative and positive errors set to errorMinus and errorPlus, respectively.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPErrorBars__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPErrorBars__inherit__graph.png deleted file mode 100644 index 64317a87..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPErrorBars__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPFinancial.html b/third_party/qcustomplot/documentation/html/classQCPFinancial.html deleted file mode 100644 index f4ea3481..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPFinancial.html +++ /dev/null @@ -1,1410 +0,0 @@ - - - - - - -QCPFinancial Class Reference - - - - -
- -
-
QCPFinancial Class Reference
-
-
- -

A plottable representing a financial stock chart. - More...

-
-Inheritance diagram for QCPFinancial:
-
-
Inheritance graph
- - - - - - -
- - - - - - -

-Public Types

enum  WidthType
 
enum  ChartStyle
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPFinancial (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
QSharedPointer< QCPFinancialDataContainerdata () const
 
-ChartStyle chartStyle () const
 
-double width () const
 
-WidthType widthType () const
 
-bool twoColored () const
 
-QBrush brushPositive () const
 
-QBrush brushNegative () const
 
-QPen penPositive () const
 
-QPen penNegative () const
 
void setData (QSharedPointer< QCPFinancialDataContainer > data)
 
void setData (const QVector< double > &keys, const QVector< double > &open, const QVector< double > &high, const QVector< double > &low, const QVector< double > &close, bool alreadySorted=false)
 
void setChartStyle (ChartStyle style)
 
void setWidth (double width)
 
void setWidthType (WidthType widthType)
 
void setTwoColored (bool twoColored)
 
void setBrushPositive (const QBrush &brush)
 
void setBrushNegative (const QBrush &brush)
 
void setPenPositive (const QPen &pen)
 
void setPenNegative (const QPen &pen)
 
void addData (const QVector< double > &keys, const QVector< double > &open, const QVector< double > &high, const QVector< double > &low, const QVector< double > &close, bool alreadySorted=false)
 
void addData (double key, double open, double high, double low, double close)
 
virtual QCPDataSelection selectTestRect (const QRectF &rect, bool onlySelectable) const
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
virtual QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const
 
virtual QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const
 
- Public Functions inherited from QCPAbstractPlottable1D< QCPFinancialData >
 QCPAbstractPlottable1D (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
virtual int dataCount () const
 
virtual double dataMainKey (int index) const
 
virtual double dataSortKey (int index) const
 
virtual double dataMainValue (int index) const
 
virtual QCPRange dataValueRange (int index) const
 
virtual QPointF dataPixelPosition (int index) const
 
virtual bool sortKeyIsMainKey () const
 
virtual int findBegin (double sortKey, bool expandedRange=true) const
 
virtual int findEnd (double sortKey, bool expandedRange=true) const
 
virtual QCPPlottableInterface1Dinterface1D ()
 
- Public Functions inherited from QCPAbstractPlottable
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
-QString name () const
 
-bool antialiasedFill () const
 
-bool antialiasedScatters () const
 
-QPen pen () const
 
-QBrush brush () const
 
-QCPAxiskeyAxis () const
 
-QCPAxisvalueAxis () const
 
-QCP::SelectionType selectable () const
 
bool selected () const
 
QCPDataSelection selection () const
 
QCPSelectionDecoratorselectionDecorator () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (QCP::SelectionType selectable)
 
Q_SLOT void setSelection (QCPDataSelection selection)
 
void setSelectionDecorator (QCPSelectionDecorator *decorator)
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false, bool inKeyRange=false) const
 
bool addToLegend (QCPLegend *legend)
 
bool addToLegend ()
 
bool removeFromLegend (QCPLegend *legend) const
 
bool removeFromLegend () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - -

-Static Public Functions

static QCPFinancialDataContainer timeSeriesToOhlc (const QVector< double > &time, const QVector< double > &value, double timeBinSize, double timeBinOffset=0)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const
 
void drawOhlcPlot (QCPPainter *painter, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, bool isSelected)
 
void drawCandlestickPlot (QCPPainter *painter, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, bool isSelected)
 
double getPixelWidth (double key, double keyPixel) const
 
double ohlcSelectTest (const QPointF &pos, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, QCPFinancialDataContainer::const_iterator &closestDataPoint) const
 
double candlestickSelectTest (const QPointF &pos, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, QCPFinancialDataContainer::const_iterator &closestDataPoint) const
 
void getVisibleDataBounds (QCPFinancialDataContainer::const_iterator &begin, QCPFinancialDataContainer::const_iterator &end) const
 
QRectF selectionHitBox (QCPFinancialDataContainer::const_iterator it) const
 
- Protected Functions inherited from QCPAbstractPlottable1D< QCPFinancialData >
void getDataSegments (QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
 
void drawPolyline (QCPPainter *painter, const QVector< QPointF > &lineData) const
 
- Protected Functions inherited from QCPAbstractPlottable
virtual QRect clipRect () const
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractPlottable
void selectionChanged (bool selected)
 
void selectionChanged (const QCPDataSelection &selection)
 
void selectableChanged (QCP::SelectionType selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A plottable representing a financial stock chart.

-
-QCPFinancial.png -
-

This plottable represents time series data binned to certain intervals, mainly used for stock charts. The two common representations OHLC (Open-High-Low-Close) bars and Candlesticks can be set via setChartStyle.

-

The data is passed via setData as a set of open/high/low/close values at certain keys (typically times). This means the data must be already binned appropriately. If data is only available as a series of values (e.g. price against time), you can use the static convenience function timeSeriesToOhlc to generate binned OHLC-data which can then be passed to setData.

-

The width of the OHLC bars/candlesticks can be controlled with setWidth and setWidthType. A typical choice is to set the width type to wtPlotCoords (the default) and the width to (or slightly less than) one time bin interval width.

-

-Changing the appearance

-

Charts can be either single- or two-colored (setTwoColored). If set to be single-colored, lines are drawn with the plottable's pen (setPen) and fills with the brush (setBrush).

-

If set to two-colored, positive changes of the value during an interval (close >= open) are represented with a different pen and brush than negative changes (close < open). These can be configured with setPenPositive, setPenNegative, setBrushPositive, and setBrushNegative. In two-colored mode, the normal plottable pen/brush is ignored. Upon selection however, the normal selected pen/brush (provided by the selectionDecorator) is used, irrespective of whether the chart is single- or two-colored.

-

-Usage

-

Like all data representing objects in QCustomPlot, the QCPFinancial is a plottable (QCPAbstractPlottable). So the plottable-interface of QCustomPlot applies (QCustomPlot::plottable, QCustomPlot::removePlottable, etc.)

-

Usually, you first create an instance:

-
QCPFinancial *newFinancial = new QCPFinancial(customPlot->xAxis, customPlot->yAxis);

which registers it with the QCustomPlot instance of the passed axes. Note that this QCustomPlot instance takes ownership of the plottable, so do not delete it manually but use QCustomPlot::removePlottable() instead. The newly created plottable can be modified, e.g.:

-
newFinancial->setName("Stock prices");
newFinancial->data()->set(QCPFinancial::timeSeriesToOhlc(time, price, 3600*24));

Here we have used the static helper method timeSeriesToOhlc, to turn a time-price data series into a 24-hour binned open-high-low-close data series as QCPFinancial uses.

-

Member Enumeration Documentation

- -

§ WidthType

- -
-
- - - - -
enum QCPFinancial::WidthType
-
-

Defines the ways the width of the financial bar can be specified. Thus it defines what the number passed to setWidth actually means.

-
See also
setWidthType, setWidth
- - - - -
Enumerator
wtAbsolute 

width is in absolute pixels

-
wtAxisRectRatio 

width is given by a fraction of the axis rect size

-
wtPlotCoords 

width is in key coordinates and thus scales with the key axis range

-
- -
-
- -

§ ChartStyle

- -
-
- - - - -
enum QCPFinancial::ChartStyle
-
-

Defines the possible representations of OHLC data in the plot.

-
See also
setChartStyle
- - - -
Enumerator
csOhlc 

Open-High-Low-Close bar representation.

-
csCandlestick 

Candlestick representation.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPFinancial()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPFinancial::QCPFinancial (QCPAxiskeyAxis,
QCPAxisvalueAxis 
)
-
-explicit
-
-

Constructs a financial chart which uses keyAxis as its key axis ("x") and valueAxis as its value axis ("y"). keyAxis and valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though.

-

The created QCPFinancial is automatically registered with the QCustomPlot instance inferred from keyAxis. This QCustomPlot instance takes ownership of the QCPFinancial, so do not delete it manually but use QCustomPlot::removePlottable() instead.

- -
-
-

Member Function Documentation

- -

§ data()

- -
-
- - - - - -
- - - - - - - -
QCPFinancialDataContainer * QCPFinancial::data () const
-
-inline
-
-

Returns a pointer to the internal data storage of type QCPFinancialDataContainer. You may use it to directly manipulate the data, which may be more convenient and faster than using the regular setData or addData methods, in certain situations.

- -
-
- -

§ setData() [1/2]

- -
-
- - - - - - - - -
void QCPFinancial::setData (QSharedPointer< QCPFinancialDataContainerdata)
-
-

This is an overloaded function.

-

Replaces the current data container with the provided data container.

-

Since a QSharedPointer is used, multiple QCPFinancials may share the same data container safely. Modifying the data in the container will then affect all financials that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers:

financial2->setData(financial1->data()); // financial1 and financial2 now share data container

If you do not wish to share containers, but create a copy from an existing container, rather use the QCPDataContainer<DataType>::set method on the financial's data container directly:

financial2->data()->set(*financial1->data()); // financial2 now has copy of financial1's data in its container
See also
addData, timeSeriesToOhlc
- -
-
- -

§ setData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPFinancial::setData (const QVector< double > & keys,
const QVector< double > & open,
const QVector< double > & high,
const QVector< double > & low,
const QVector< double > & close,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Replaces the current data with the provided points in keys, open, high, low and close. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

If you can guarantee that the passed data points are sorted by keys in ascending order, you can set alreadySorted to true, to improve performance by saving a sorting run.

-
See also
addData, timeSeriesToOhlc
- -
-
- -

§ setChartStyle()

- -
-
- - - - - - - - -
void QCPFinancial::setChartStyle (QCPFinancial::ChartStyle style)
-
-

Sets which representation style shall be used to display the OHLC data.

- -
-
- -

§ setWidth()

- -
-
- - - - - - - - -
void QCPFinancial::setWidth (double width)
-
-

Sets the width of the individual bars/candlesticks to width in plot key coordinates.

-

A typical choice is to set it to (or slightly less than) one bin interval width.

- -
-
- -

§ setWidthType()

- -
-
- - - - - - - - -
void QCPFinancial::setWidthType (QCPFinancial::WidthType widthType)
-
-

Sets how the width of the financial bars is defined. See the documentation of WidthType for an explanation of the possible values for widthType.

-

The default value is wtPlotCoords.

-
See also
setWidth
- -
-
- -

§ setTwoColored()

- -
-
- - - - - - - - -
void QCPFinancial::setTwoColored (bool twoColored)
-
-

Sets whether this chart shall contrast positive from negative trends per data point by using two separate colors to draw the respective bars/candlesticks.

-

If twoColored is false, the normal plottable's pen and brush are used (setPen, setBrush).

-
See also
setPenPositive, setPenNegative, setBrushPositive, setBrushNegative
- -
-
- -

§ setBrushPositive()

- -
-
- - - - - - - - -
void QCPFinancial::setBrushPositive (const QBrush & brush)
-
-

If setTwoColored is set to true, this function controls the brush that is used to draw fills of data points with a positive trend (i.e. bars/candlesticks with close >= open).

-

If twoColored is false, the normal plottable's pen and brush are used (setPen, setBrush).

-
See also
setBrushNegative, setPenPositive, setPenNegative
- -
-
- -

§ setBrushNegative()

- -
-
- - - - - - - - -
void QCPFinancial::setBrushNegative (const QBrush & brush)
-
-

If setTwoColored is set to true, this function controls the brush that is used to draw fills of data points with a negative trend (i.e. bars/candlesticks with close < open).

-

If twoColored is false, the normal plottable's pen and brush are used (setPen, setBrush).

-
See also
setBrushPositive, setPenNegative, setPenPositive
- -
-
- -

§ setPenPositive()

- -
-
- - - - - - - - -
void QCPFinancial::setPenPositive (const QPen & pen)
-
-

If setTwoColored is set to true, this function controls the pen that is used to draw outlines of data points with a positive trend (i.e. bars/candlesticks with close >= open).

-

If twoColored is false, the normal plottable's pen and brush are used (setPen, setBrush).

-
See also
setPenNegative, setBrushPositive, setBrushNegative
- -
-
- -

§ setPenNegative()

- -
-
- - - - - - - - -
void QCPFinancial::setPenNegative (const QPen & pen)
-
-

If setTwoColored is set to true, this function controls the pen that is used to draw outlines of data points with a negative trend (i.e. bars/candlesticks with close < open).

-

If twoColored is false, the normal plottable's pen and brush are used (setPen, setBrush).

-
See also
setPenPositive, setBrushNegative, setBrushPositive
- -
-
- -

§ addData() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPFinancial::addData (const QVector< double > & keys,
const QVector< double > & open,
const QVector< double > & high,
const QVector< double > & low,
const QVector< double > & close,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Adds the provided points in keys, open, high, low and close to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

If you can guarantee that the passed data points are sorted by keys in ascending order, you can set alreadySorted to true, to improve performance by saving a sorting run.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

-
See also
timeSeriesToOhlc
- -
-
- -

§ addData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPFinancial::addData (double key,
double open,
double high,
double low,
double close 
)
-
-

This is an overloaded function.

-

Adds the provided data point as key, open, high, low and close to the current data.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

-
See also
timeSeriesToOhlc
- -
-
- -

§ selectTestRect()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPDataSelection QCPFinancial::selectTestRect (const QRectF & rect,
bool onlySelectable 
) const
-
-virtual
-
- -

-

Returns a data selection containing all the data points of this plottable which are contained (or hit by) rect. This is used mainly in the selection rect interaction for data selection (data selection mechanism).

-

If onlySelectable is true, an empty QCPDataSelection is returned if this plottable is not selectable (i.e. if QCPAbstractPlottable::setSelectable is QCP::stNone).

-
Note
rect must be a normalized rect (positive or zero width and height). This is especially important when using the rect of QCPSelectionRect::accepted, which is not necessarily normalized. Use QRect::normalized() when passing a rect which might not be normalized.
- -

Reimplemented from QCPAbstractPlottable1D< QCPFinancialData >.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPFinancial::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

Implements a selectTest specific to this plottable's point geometry.

-

If details is not 0, it will be set to a QCPDataSelection, describing the closest data point to pos.

-

For general information about this virtual method, see the base class implementation. QCPAbstractPlottable::selectTest

- -

Reimplemented from QCPAbstractPlottable1D< QCPFinancialData >.

- -
-
- -

§ getKeyRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPRange QCPFinancial::getKeyRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth 
) const
-
-virtual
-
-

Returns the coordinate range that all data in this plottable span in the key axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getValueRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ getValueRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPRange QCPFinancial::getValueRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth,
const QCPRangeinKeyRange = QCPRange() 
) const
-
-virtual
-
-

Returns the coordinate range that the data points in the specified key range (inKeyRange) span in the value axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

If inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys.

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getKeyRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ timeSeriesToOhlc()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QCPFinancialDataContainer QCPFinancial::timeSeriesToOhlc (const QVector< double > & time,
const QVector< double > & value,
double timeBinSize,
double timeBinOffset = 0 
)
-
-static
-
-

A convenience function that converts time series data (value against time) to OHLC binned data points. The return value can then be passed on to QCPFinancialDataContainer::set(const QCPFinancialDataContainer&).

-

The size of the bins can be controlled with timeBinSize in the same units as time is given. For example, if the unit of time is seconds and single OHLC/Candlesticks should span an hour each, set timeBinSize to 3600.

-

timeBinOffset allows to control precisely at what time coordinate a bin should start. The value passed as timeBinOffset doesn't need to be in the range encompassed by the time keys. It merely defines the mathematical offset/phase of the bins that will be used to process the data.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPFinancial::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ drawLegendIcon()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPFinancial::drawLegendIcon (QCPPainterpainter,
const QRectF & rect 
) const
-
-protectedvirtual
-
-

called by QCPLegend::draw (via QCPPlottableLegendItem::draw) to create a graphical representation of this plottable inside rect, next to the plottable name.

-

The passed painter has its cliprect set to rect, so painting outside of rect won't appear outside the legend icon border.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ drawOhlcPlot()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPFinancial::drawOhlcPlot (QCPPainterpainter,
const QCPFinancialDataContainer::const_iterator & begin,
const QCPFinancialDataContainer::const_iterator & end,
bool isSelected 
)
-
-protected
-
-

Draws the data from begin to end-1 as OHLC bars with the provided painter.

-

This method is a helper function for draw. It is used when the chart style is csOhlc.

- -
-
- -

§ drawCandlestickPlot()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPFinancial::drawCandlestickPlot (QCPPainterpainter,
const QCPFinancialDataContainer::const_iterator & begin,
const QCPFinancialDataContainer::const_iterator & end,
bool isSelected 
)
-
-protected
-
-

Draws the data from begin to end-1 as Candlesticks with the provided painter.

-

This method is a helper function for draw. It is used when the chart style is csCandlestick.

- -
-
- -

§ getPixelWidth()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
double QCPFinancial::getPixelWidth (double key,
double keyPixel 
) const
-
-protected
-
-

This function is used to determine the width of the bar at coordinate key, according to the specified width (setWidth) and width type (setWidthType). Provide the pixel position of key in keyPixel (because usually this was already calculated via QCPAxis::coordToPixel when this function is called).

-

It returns the number of pixels the bar extends to higher keys, relative to the key coordinate. So with a non-reversed horizontal axis, the return value is positive. With a reversed horizontal axis, the return value is negative. This is important so the open/close flags on the csOhlc bar are drawn to the correct side.

- -
-
- -

§ ohlcSelectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
double QCPFinancial::ohlcSelectTest (const QPointF & pos,
const QCPFinancialDataContainer::const_iterator & begin,
const QCPFinancialDataContainer::const_iterator & end,
QCPFinancialDataContainer::const_iterator & closestDataPoint 
) const
-
-protected
-
-

This method is a helper function for selectTest. It is used to test for selection when the chart style is csOhlc. It only tests against the data points between begin and end.

-

Like selectTest, this method returns the shortest distance of pos to the graphical representation of the plottable, and closestDataPoint will point to the respective data point.

- -
-
- -

§ candlestickSelectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
double QCPFinancial::candlestickSelectTest (const QPointF & pos,
const QCPFinancialDataContainer::const_iterator & begin,
const QCPFinancialDataContainer::const_iterator & end,
QCPFinancialDataContainer::const_iterator & closestDataPoint 
) const
-
-protected
-
-

This method is a helper function for selectTest. It is used to test for selection when the chart style is csCandlestick. It only tests against the data points between begin and end.

-

Like selectTest, this method returns the shortest distance of pos to the graphical representation of the plottable, and closestDataPoint will point to the respective data point.

- -
-
- -

§ getVisibleDataBounds()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPFinancial::getVisibleDataBounds (QCPFinancialDataContainer::const_iterator & begin,
QCPFinancialDataContainer::const_iterator & end 
) const
-
-protected
-
-

called by the drawing methods to determine which data (key) range is visible at the current key axis range setting, so only that needs to be processed.

-

begin returns an iterator to the lowest data point that needs to be taken into account when plotting. Note that in order to get a clean plot all the way to the edge of the axis rect, begin may still be just outside the visible range.

-

end returns the iterator just above the highest data point that needs to be taken into account. Same as before, end may also lie just outside of the visible range

-

if the plottable contains no data, both begin and end point to constEnd.

- -
-
- -

§ selectionHitBox()

- -
-
- - - - - -
- - - - - - - - -
QRectF QCPFinancial::selectionHitBox (QCPFinancialDataContainer::const_iterator it) const
-
-protected
-
-

Returns the hit box in pixel coordinates that will be used for data selection with the selection rect (selectTestRect), of the data point given by it.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPFinancialData.html b/third_party/qcustomplot/documentation/html/classQCPFinancialData.html deleted file mode 100644 index 6070ad11..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPFinancialData.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - -QCPFinancialData Class Reference - - - - -
- -
-
QCPFinancialData Class Reference
-
-
- -

Holds the data of one single data point for QCPFinancial. - More...

- - - - - - - - - - - - - - -

-Public Functions

 QCPFinancialData ()
 
 QCPFinancialData (double key, double open, double high, double low, double close)
 
double sortKey () const
 
double mainKey () const
 
double mainValue () const
 
QCPRange valueRange () const
 
- - - - - - - - - - - -

-Public Members

-double key
 
-double open
 
-double high
 
-double low
 
-double close
 
- - - - - -

-Static Public Functions

static QCPFinancialData fromSortKey (double sortKey)
 
static bool sortKeyIsMainKey ()
 
-

Detailed Description

-

Holds the data of one single data point for QCPFinancial.

-

The stored data is:

    -
  • key: coordinate on the key axis of this data point (this is the mainKey and the sortKey)
  • -
  • open: The opening value at the data point (this is the mainValue)
  • -
  • high: The high/maximum value at the data point
  • -
  • low: The low/minimum value at the data point
  • -
  • close: The closing value at the data point
  • -
-

The container for storing multiple data points is QCPFinancialDataContainer. It is a typedef for QCPDataContainer with QCPFinancialData as the DataType template parameter. See the documentation there for an explanation regarding the data type's generic methods.

-
See also
QCPFinancialDataContainer
-

Constructor & Destructor Documentation

- -

§ QCPFinancialData() [1/2]

- -
-
- - - - - - - -
QCPFinancialData::QCPFinancialData ()
-
-

Constructs a data point with key and all values set to zero.

- -
-
- -

§ QCPFinancialData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QCPFinancialData::QCPFinancialData (double key,
double open,
double high,
double low,
double close 
)
-
-

Constructs a data point with the specified key and OHLC values.

- -
-
-

Member Function Documentation

- -

§ sortKey()

- -
-
- - - - - -
- - - - - - - -
double QCPFinancialData::sortKey () const
-
-inline
-
-

Returns the key member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ fromSortKey()

- -
-
- - - - - -
- - - - - - - - -
static QCPFinancialData QCPFinancialData::fromSortKey (double sortKey)
-
-inlinestatic
-
-

Returns a data point with the specified sortKey. All other members are set to zero.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ sortKeyIsMainKey()

- -
-
- - - - - -
- - - - - - - -
static static bool QCPFinancialData::sortKeyIsMainKey ()
-
-inlinestatic
-
-

Since the member key is both the data point key coordinate and the data ordering parameter, this method returns true.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ mainKey()

- -
-
- - - - - -
- - - - - - - -
double QCPFinancialData::mainKey () const
-
-inline
-
-

Returns the key member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ mainValue()

- -
-
- - - - - -
- - - - - - - -
double QCPFinancialData::mainValue () const
-
-inline
-
-

Returns the open member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ valueRange()

- -
-
- - - - - -
- - - - - - - -
QCPRange QCPFinancialData::valueRange () const
-
-inline
-
-

Returns a QCPRange spanning from the low to the high value of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPFinancial__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPFinancial__inherit__graph.png deleted file mode 100644 index f498e39f..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPFinancial__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPGraph.html b/third_party/qcustomplot/documentation/html/classQCPGraph.html deleted file mode 100644 index e1aecdb8..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPGraph.html +++ /dev/null @@ -1,1880 +0,0 @@ - - - - - - -QCPGraph Class Reference - - - - -
- -
-
QCPGraph Class Reference
-
-
- -

A plottable representing a graph in a plot. - More...

-
-Inheritance diagram for QCPGraph:
-
-
Inheritance graph
- - - - - - -
- - - - -

-Public Types

enum  LineStyle
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPGraph (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
QSharedPointer< QCPGraphDataContainerdata () const
 
-LineStyle lineStyle () const
 
-QCPScatterStyle scatterStyle () const
 
-int scatterSkip () const
 
-QCPGraphchannelFillGraph () const
 
-bool adaptiveSampling () const
 
void setData (QSharedPointer< QCPGraphDataContainer > data)
 
void setData (const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
 
void setLineStyle (LineStyle ls)
 
void setScatterStyle (const QCPScatterStyle &style)
 
void setScatterSkip (int skip)
 
void setChannelFillGraph (QCPGraph *targetGraph)
 
void setAdaptiveSampling (bool enabled)
 
void addData (const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
 
void addData (double key, double value)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
virtual QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const
 
virtual QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const
 
- Public Functions inherited from QCPAbstractPlottable1D< QCPGraphData >
 QCPAbstractPlottable1D (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
virtual int dataCount () const
 
virtual double dataMainKey (int index) const
 
virtual double dataSortKey (int index) const
 
virtual double dataMainValue (int index) const
 
virtual QCPRange dataValueRange (int index) const
 
virtual QPointF dataPixelPosition (int index) const
 
virtual bool sortKeyIsMainKey () const
 
virtual QCPDataSelection selectTestRect (const QRectF &rect, bool onlySelectable) const
 
virtual int findBegin (double sortKey, bool expandedRange=true) const
 
virtual int findEnd (double sortKey, bool expandedRange=true) const
 
virtual QCPPlottableInterface1Dinterface1D ()
 
- Public Functions inherited from QCPAbstractPlottable
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
-QString name () const
 
-bool antialiasedFill () const
 
-bool antialiasedScatters () const
 
-QPen pen () const
 
-QBrush brush () const
 
-QCPAxiskeyAxis () const
 
-QCPAxisvalueAxis () const
 
-QCP::SelectionType selectable () const
 
bool selected () const
 
QCPDataSelection selection () const
 
QCPSelectionDecoratorselectionDecorator () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (QCP::SelectionType selectable)
 
Q_SLOT void setSelection (QCPDataSelection selection)
 
void setSelectionDecorator (QCPSelectionDecorator *decorator)
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false, bool inKeyRange=false) const
 
bool addToLegend (QCPLegend *legend)
 
bool addToLegend ()
 
bool removeFromLegend (QCPLegend *legend) const
 
bool removeFromLegend () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const
 
virtual void drawFill (QCPPainter *painter, QVector< QPointF > *lines) const
 
virtual void drawScatterPlot (QCPPainter *painter, const QVector< QPointF > &scatters, const QCPScatterStyle &style) const
 
virtual void drawLinePlot (QCPPainter *painter, const QVector< QPointF > &lines) const
 
virtual void drawImpulsePlot (QCPPainter *painter, const QVector< QPointF > &lines) const
 
virtual void getOptimizedLineData (QVector< QCPGraphData > *lineData, const QCPGraphDataContainer::const_iterator &begin, const QCPGraphDataContainer::const_iterator &end) const
 
virtual void getOptimizedScatterData (QVector< QCPGraphData > *scatterData, QCPGraphDataContainer::const_iterator begin, QCPGraphDataContainer::const_iterator end) const
 
void getVisibleDataBounds (QCPGraphDataContainer::const_iterator &begin, QCPGraphDataContainer::const_iterator &end, const QCPDataRange &rangeRestriction) const
 
void getLines (QVector< QPointF > *lines, const QCPDataRange &dataRange) const
 
void getScatters (QVector< QPointF > *scatters, const QCPDataRange &dataRange) const
 
QVector< QPointF > dataToLines (const QVector< QCPGraphData > &data) const
 
QVector< QPointF > dataToStepLeftLines (const QVector< QCPGraphData > &data) const
 
QVector< QPointF > dataToStepRightLines (const QVector< QCPGraphData > &data) const
 
QVector< QPointF > dataToStepCenterLines (const QVector< QCPGraphData > &data) const
 
QVector< QPointF > dataToImpulseLines (const QVector< QCPGraphData > &data) const
 
QVector< QCPDataRangegetNonNanSegments (const QVector< QPointF > *lineData, Qt::Orientation keyOrientation) const
 
QVector< QPair< QCPDataRange, QCPDataRange > > getOverlappingSegments (QVector< QCPDataRange > thisSegments, const QVector< QPointF > *thisData, QVector< QCPDataRange > otherSegments, const QVector< QPointF > *otherData) const
 
bool segmentsIntersect (double aLower, double aUpper, double bLower, double bUpper, int &bPrecedence) const
 
QPointF getFillBasePoint (QPointF matchingDataPoint) const
 
const QPolygonF getFillPolygon (const QVector< QPointF > *lineData, QCPDataRange segment) const
 
const QPolygonF getChannelFillPolygon (const QVector< QPointF > *thisData, QCPDataRange thisSegment, const QVector< QPointF > *otherData, QCPDataRange otherSegment) const
 
int findIndexBelowX (const QVector< QPointF > *data, double x) const
 
int findIndexAboveX (const QVector< QPointF > *data, double x) const
 
int findIndexBelowY (const QVector< QPointF > *data, double y) const
 
int findIndexAboveY (const QVector< QPointF > *data, double y) const
 
double pointDistance (const QPointF &pixelPoint, QCPGraphDataContainer::const_iterator &closestData) const
 
- Protected Functions inherited from QCPAbstractPlottable1D< QCPGraphData >
void getDataSegments (QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
 
void drawPolyline (QCPPainter *painter, const QVector< QPointF > &lineData) const
 
- Protected Functions inherited from QCPAbstractPlottable
virtual QRect clipRect () const
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractPlottable
void selectionChanged (bool selected)
 
void selectionChanged (const QCPDataSelection &selection)
 
void selectableChanged (QCP::SelectionType selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A plottable representing a graph in a plot.

-
-QCPGraph.png -
-

Usually you create new graphs by calling QCustomPlot::addGraph. The resulting instance can be accessed via QCustomPlot::graph.

-

To plot data, assign it with the setData or addData functions. Alternatively, you can also access and modify the data via the data method, which returns a pointer to the internal QCPGraphDataContainer.

-

Graphs are used to display single-valued data. Single-valued means that there should only be one data point per unique key coordinate. In other words, the graph can't have loops. If you do want to plot non-single-valued curves, rather use the QCPCurve plottable.

-

Gaps in the graph line can be created by adding data points with NaN as value (qQNaN() or std::numeric_limits<double>::quiet_NaN()) in between the two data points that shall be separated.

-

-Changing the appearance

-

The appearance of the graph is mainly determined by the line style, scatter style, brush and pen of the graph (setLineStyle, setScatterStyle, setBrush, setPen).

-

-Filling under or between graphs

-

QCPGraph knows two types of fills: Normal graph fills towards the zero-value-line parallel to the key axis of the graph, and fills between two graphs, called channel fills. To enable a fill, just set a brush with setBrush which is neither Qt::NoBrush nor fully transparent.

-

By default, a normal fill towards the zero-value-line will be drawn. To set up a channel fill between this graph and another one, call setChannelFillGraph with the other graph as parameter.

-
See also
QCustomPlot::addGraph, QCustomPlot::graph
-

Member Enumeration Documentation

- -

§ LineStyle

- -
-
- - - - -
enum QCPGraph::LineStyle
-
-

Defines how the graph's line is represented visually in the plot. The line is drawn with the current pen of the graph (setPen).

See also
setLineStyle
- - - - - - - -
Enumerator
lsNone 

data points are not connected with any lines (e.g. data only represented with symbols according to the scatter style, see setScatterStyle)

-
lsLine 

data points are connected by a straight line

-
lsStepLeft 

line is drawn as steps where the step height is the value of the left data point

-
lsStepRight 

line is drawn as steps where the step height is the value of the right data point

-
lsStepCenter 

line is drawn as steps where the step is in between two data points

-
lsImpulse 

each data point is represented by a line parallel to the value axis, which reaches from the data point to the zero-value-line

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPGraph()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPGraph::QCPGraph (QCPAxiskeyAxis,
QCPAxisvalueAxis 
)
-
-explicit
-
-

Constructs a graph which uses keyAxis as its key axis ("x") and valueAxis as its value axis ("y"). keyAxis and valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though.

-

The created QCPGraph is automatically registered with the QCustomPlot instance inferred from keyAxis. This QCustomPlot instance takes ownership of the QCPGraph, so do not delete it manually but use QCustomPlot::removePlottable() instead.

-

To directly create a graph inside a plot, you can also use the simpler QCustomPlot::addGraph function.

- -
-
-

Member Function Documentation

- -

§ data()

- -
-
- - - - - -
- - - - - - - -
QSharedPointer< QCPGraphDataContainer > QCPGraph::data () const
-
-inline
-
-

Returns a shared pointer to the internal data storage of type QCPGraphDataContainer. You may use it to directly manipulate the data, which may be more convenient and faster than using the regular setData or addData methods.

- -
-
- -

§ setData() [1/2]

- -
-
- - - - - - - - -
void QCPGraph::setData (QSharedPointer< QCPGraphDataContainerdata)
-
-

This is an overloaded function.

-

Replaces the current data container with the provided data container.

-

Since a QSharedPointer is used, multiple QCPGraphs may share the same data container safely. Modifying the data in the container will then affect all graphs that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers:

graph2->setData(graph1->data()); // graph1 and graph2 now share data container

If you do not wish to share containers, but create a copy from an existing container, rather use the QCPDataContainer<DataType>::set method on the graph's data container directly:

graph2->data()->set(*graph1->data()); // graph2 now has copy of graph1's data in its container
See also
addData
- -
-
- -

§ setData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPGraph::setData (const QVector< double > & keys,
const QVector< double > & values,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Replaces the current data with the provided points in keys and values. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

If you can guarantee that the passed data points are sorted by keys in ascending order, you can set alreadySorted to true, to improve performance by saving a sorting run.

-
See also
addData
- -
-
- -

§ setLineStyle()

- -
-
- - - - - - - - -
void QCPGraph::setLineStyle (LineStyle ls)
-
-

Sets how the single data points are connected in the plot. For scatter-only plots, set ls to lsNone and setScatterStyle to the desired scatter style.

-
See also
setScatterStyle
- -
-
- -

§ setScatterStyle()

- -
-
- - - - - - - - -
void QCPGraph::setScatterStyle (const QCPScatterStylestyle)
-
-

Sets the visual appearance of single data points in the plot. If set to QCPScatterStyle::ssNone, no scatter points are drawn (e.g. for line-only-plots with appropriate line style).

-
See also
QCPScatterStyle, setLineStyle
- -
-
- -

§ setScatterSkip()

- -
-
- - - - - - - - -
void QCPGraph::setScatterSkip (int skip)
-
-

If scatters are displayed (scatter style not QCPScatterStyle::ssNone), skip number of scatter points are skipped/not drawn after every drawn scatter point.

-

This can be used to make the data appear sparser while for example still having a smooth line, and to improve performance for very high density plots.

-

If skip is set to 0 (default), all scatter points are drawn.

-
See also
setScatterStyle
- -
-
- -

§ setChannelFillGraph()

- -
-
- - - - - - - - -
void QCPGraph::setChannelFillGraph (QCPGraphtargetGraph)
-
-

Sets the target graph for filling the area between this graph and targetGraph with the current brush (setBrush).

-

When targetGraph is set to 0, a normal graph fill to the zero-value-line will be shown. To disable any filling, set the brush to Qt::NoBrush.

-
See also
setBrush
- -
-
- -

§ setAdaptiveSampling()

- -
-
- - - - - - - - -
void QCPGraph::setAdaptiveSampling (bool enabled)
-
-

Sets whether adaptive sampling shall be used when plotting this graph. QCustomPlot's adaptive sampling technique can drastically improve the replot performance for graphs with a larger number of points (e.g. above 10,000), without notably changing the appearance of the graph.

-

By default, adaptive sampling is enabled. Even if enabled, QCustomPlot decides whether adaptive sampling shall actually be used on a per-graph basis. So leaving adaptive sampling enabled has no disadvantage in almost all cases.

-
-adaptive-sampling-line.png -
-A line plot of 500,000 points without and with adaptive sampling
-

As can be seen, line plots experience no visual degradation from adaptive sampling. Outliers are reproduced reliably, as well as the overall shape of the data set. The replot time reduces dramatically though. This allows QCustomPlot to display large amounts of data in realtime.

-
-adaptive-sampling-scatter.png -
-A scatter plot of 100,000 points without and with adaptive sampling
-

Care must be taken when using high-density scatter plots in combination with adaptive sampling. The adaptive sampling algorithm treats scatter plots more carefully than line plots which still gives a significant reduction of replot times, but not quite as much as for line plots. This is because scatter plots inherently need more data points to be preserved in order to still resemble the original, non-adaptive-sampling plot. As shown above, the results still aren't quite identical, as banding occurs for the outer data points. This is in fact intentional, such that the boundaries of the data cloud stay visible to the viewer. How strong the banding appears, depends on the point density, i.e. the number of points in the plot.

-

For some situations with scatter plots it might thus be desirable to manually turn adaptive sampling off. For example, when saving the plot to disk. This can be achieved by setting enabled to false before issuing a command like QCustomPlot::savePng, and setting enabled back to true afterwards.

- -
-
- -

§ addData() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPGraph::addData (const QVector< double > & keys,
const QVector< double > & values,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Adds the provided points in keys and values to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

If you can guarantee that the passed data points are sorted by keys in ascending order, you can set alreadySorted to true, to improve performance by saving a sorting run.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

- -
-
- -

§ addData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPGraph::addData (double key,
double value 
)
-
-

This is an overloaded function.

-

Adds the provided data point as key and value to the current data.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPGraph::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

Implements a selectTest specific to this plottable's point geometry.

-

If details is not 0, it will be set to a QCPDataSelection, describing the closest data point to pos.

-

For general information about this virtual method, see the base class implementation. QCPAbstractPlottable::selectTest

- -

Reimplemented from QCPAbstractPlottable1D< QCPGraphData >.

- -
-
- -

§ getKeyRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPRange QCPGraph::getKeyRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth 
) const
-
-virtual
-
-

Returns the coordinate range that all data in this plottable span in the key axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getValueRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ getValueRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPRange QCPGraph::getValueRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth,
const QCPRangeinKeyRange = QCPRange() 
) const
-
-virtual
-
-

Returns the coordinate range that the data points in the specified key range (inKeyRange) span in the value axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

If inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys.

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getKeyRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPGraph::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ drawLegendIcon()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPGraph::drawLegendIcon (QCPPainterpainter,
const QRectF & rect 
) const
-
-protectedvirtual
-
-

called by QCPLegend::draw (via QCPPlottableLegendItem::draw) to create a graphical representation of this plottable inside rect, next to the plottable name.

-

The passed painter has its cliprect set to rect, so painting outside of rect won't appear outside the legend icon border.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ drawFill()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPGraph::drawFill (QCPPainterpainter,
QVector< QPointF > * lines 
) const
-
-protectedvirtual
-
-

Draws the fill of the graph using the specified painter, with the currently set brush.

-

Depending on whether a normal fill or a channel fill (setChannelFillGraph) is needed, getFillPolygon or getChannelFillPolygon are used to find the according fill polygons.

-

In order to handle NaN Data points correctly (the fill needs to be split into disjoint areas), this method first determines a list of non-NaN segments with getNonNanSegments, on which to operate. In the channel fill case, getOverlappingSegments is used to consolidate the non-NaN segments of the two involved graphs, before passing the overlapping pairs to getChannelFillPolygon.

-

Pass the points of this graph's line as lines, in pixel coordinates.

-
See also
drawLinePlot, drawImpulsePlot, drawScatterPlot
- -
-
- -

§ drawScatterPlot()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPGraph::drawScatterPlot (QCPPainterpainter,
const QVector< QPointF > & scatters,
const QCPScatterStylestyle 
) const
-
-protectedvirtual
-
-

Draws scatter symbols at every point passed in scatters, given in pixel coordinates. The scatters will be drawn with painter and have the appearance as specified in style.

-
See also
drawLinePlot, drawImpulsePlot
- -
-
- -

§ drawLinePlot()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPGraph::drawLinePlot (QCPPainterpainter,
const QVector< QPointF > & lines 
) const
-
-protectedvirtual
-
-

Draws lines between the points in lines, given in pixel coordinates.

-
See also
drawScatterPlot, drawImpulsePlot, QCPAbstractPlottable1D::drawPolyline
- -
-
- -

§ drawImpulsePlot()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPGraph::drawImpulsePlot (QCPPainterpainter,
const QVector< QPointF > & lines 
) const
-
-protectedvirtual
-
-

Draws impulses from the provided data, i.e. it connects all line pairs in lines, given in pixel coordinates. The lines necessary for impulses are generated by dataToImpulseLines from the regular graph data points.

-
See also
drawLinePlot, drawScatterPlot
- -
-
- -

§ getOptimizedLineData()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPGraph::getOptimizedLineData (QVector< QCPGraphData > * lineData,
const QCPGraphDataContainer::const_iterator & begin,
const QCPGraphDataContainer::const_iterator & end 
) const
-
-protectedvirtual
-
-

Returns via lineData the data points that need to be visualized for this graph when plotting graph lines, taking into consideration the currently visible axis ranges and, if setAdaptiveSampling is enabled, local point densities. The considered data can be restricted further by begin and end, e.g. to only plot a certain segment of the data (see getDataSegments).

-

This method is used by getLines to retrieve the basic working set of data.

-
See also
getOptimizedScatterData
- -
-
- -

§ getOptimizedScatterData()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPGraph::getOptimizedScatterData (QVector< QCPGraphData > * scatterData,
QCPGraphDataContainer::const_iterator begin,
QCPGraphDataContainer::const_iterator end 
) const
-
-protectedvirtual
-
-

Returns via scatterData the data points that need to be visualized for this graph when plotting scatter points, taking into consideration the currently visible axis ranges and, if setAdaptiveSampling is enabled, local point densities. The considered data can be restricted further by begin and end, e.g. to only plot a certain segment of the data (see getDataSegments).

-

This method is used by getScatters to retrieve the basic working set of data.

-
See also
getOptimizedLineData
- -
-
- -

§ getVisibleDataBounds()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPGraph::getVisibleDataBounds (QCPGraphDataContainer::const_iterator & begin,
QCPGraphDataContainer::const_iterator & end,
const QCPDataRangerangeRestriction 
) const
-
-protected
-
-

This method outputs the currently visible data range via begin and end. The returned range will also never exceed rangeRestriction.

-

This method takes into account that the drawing of data lines at the axis rect border always requires the points just outside the visible axis range. So begin and end may actually indicate a range that contains one additional data point to the left and right of the visible axis range.

- -
-
- -

§ getLines()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPGraph::getLines (QVector< QPointF > * lines,
const QCPDataRangedataRange 
) const
-
-protected
-
-

This method retrieves an optimized set of data points via getOptimizedLineData, and branches out to the line style specific functions such as dataToLines, dataToStepLeftLines, etc. according to the line style of the graph.

-

lines will be filled with points in pixel coordinates, that can be drawn with the according draw functions like drawLinePlot and drawImpulsePlot. The points returned in lines aren't necessarily the original data points. For example, step line styles require additional points to form the steps when drawn. If the line style of the graph is lsNone, the lines vector will be empty.

-

dataRange specifies the beginning and ending data indices that will be taken into account for conversion. In this function, the specified range may exceed the total data bounds without harm: a correspondingly trimmed data range will be used. This takes the burden off the user of this function to check for valid indices in dataRange, e.g. when extending ranges coming from getDataSegments.

-
See also
getScatters
- -
-
- -

§ getScatters()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPGraph::getScatters (QVector< QPointF > * scatters,
const QCPDataRangedataRange 
) const
-
-protected
-
-

This method retrieves an optimized set of data points via getOptimizedScatterData and then converts them to pixel coordinates. The resulting points are returned in scatters, and can be passed to drawScatterPlot.

-

dataRange specifies the beginning and ending data indices that will be taken into account for conversion. In this function, the specified range may exceed the total data bounds without harm: a correspondingly trimmed data range will be used. This takes the burden off the user of this function to check for valid indices in dataRange, e.g. when extending ranges coming from getDataSegments.

- -
-
- -

§ dataToLines()

- -
-
- - - - - -
- - - - - - - - -
QVector< QPointF > QCPGraph::dataToLines (const QVector< QCPGraphData > & data) const
-
-protected
-
-

Takes raw data points in plot coordinates as data, and returns a vector containing pixel coordinate points which are suitable for drawing the line style lsLine.

-

The source of data is usually getOptimizedLineData, and this method is called in getLines if the line style is set accordingly.

-
See also
dataToStepLeftLines, dataToStepRightLines, dataToStepCenterLines, dataToImpulseLines, getLines, drawLinePlot
- -
-
- -

§ dataToStepLeftLines()

- -
-
- - - - - -
- - - - - - - - -
QVector< QPointF > QCPGraph::dataToStepLeftLines (const QVector< QCPGraphData > & data) const
-
-protected
-
-

Takes raw data points in plot coordinates as data, and returns a vector containing pixel coordinate points which are suitable for drawing the line style lsStepLeft.

-

The source of data is usually getOptimizedLineData, and this method is called in getLines if the line style is set accordingly.

-
See also
dataToLines, dataToStepRightLines, dataToStepCenterLines, dataToImpulseLines, getLines, drawLinePlot
- -
-
- -

§ dataToStepRightLines()

- -
-
- - - - - -
- - - - - - - - -
QVector< QPointF > QCPGraph::dataToStepRightLines (const QVector< QCPGraphData > & data) const
-
-protected
-
-

Takes raw data points in plot coordinates as data, and returns a vector containing pixel coordinate points which are suitable for drawing the line style lsStepRight.

-

The source of data is usually getOptimizedLineData, and this method is called in getLines if the line style is set accordingly.

-
See also
dataToLines, dataToStepLeftLines, dataToStepCenterLines, dataToImpulseLines, getLines, drawLinePlot
- -
-
- -

§ dataToStepCenterLines()

- -
-
- - - - - -
- - - - - - - - -
QVector< QPointF > QCPGraph::dataToStepCenterLines (const QVector< QCPGraphData > & data) const
-
-protected
-
-

Takes raw data points in plot coordinates as data, and returns a vector containing pixel coordinate points which are suitable for drawing the line style lsStepCenter.

-

The source of data is usually getOptimizedLineData, and this method is called in getLines if the line style is set accordingly.

-
See also
dataToLines, dataToStepLeftLines, dataToStepRightLines, dataToImpulseLines, getLines, drawLinePlot
- -
-
- -

§ dataToImpulseLines()

- -
-
- - - - - -
- - - - - - - - -
QVector< QPointF > QCPGraph::dataToImpulseLines (const QVector< QCPGraphData > & data) const
-
-protected
-
-

Takes raw data points in plot coordinates as data, and returns a vector containing pixel coordinate points which are suitable for drawing the line style lsImpulse.

-

The source of data is usually getOptimizedLineData, and this method is called in getLines if the line style is set accordingly.

-
See also
dataToLines, dataToStepLeftLines, dataToStepRightLines, dataToStepCenterLines, getLines, drawImpulsePlot
- -
-
- -

§ getNonNanSegments()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QVector< QCPDataRange > QCPGraph::getNonNanSegments (const QVector< QPointF > * lineData,
Qt::Orientation keyOrientation 
) const
-
-protected
-
-

This method goes through the passed points in lineData and returns a list of the segments which don't contain NaN data points.

-

keyOrientation defines whether the x or y member of the passed QPointF is used to check for NaN. If keyOrientation is Qt::Horizontal, the y member is checked, if it is Qt::Vertical, the x member is checked.

-
See also
getOverlappingSegments, drawFill
- -
-
- -

§ getOverlappingSegments()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QVector< QPair< QCPDataRange, QCPDataRange > > QCPGraph::getOverlappingSegments (QVector< QCPDataRangethisSegments,
const QVector< QPointF > * thisData,
QVector< QCPDataRangeotherSegments,
const QVector< QPointF > * otherData 
) const
-
-protected
-
-

This method takes two segment lists (e.g. created by getNonNanSegments) thisSegments and otherSegments, and their associated point data thisData and otherData.

-

It returns all pairs of segments (the first from thisSegments, the second from otherSegments), which overlap in plot coordinates.

-

This method is useful in the case of a channel fill between two graphs, when only those non-NaN segments which actually overlap in their key coordinate shall be considered for drawing a channel fill polygon.

-

It is assumed that the passed segments in thisSegments are ordered ascending by index, and that the segments don't overlap themselves. The same is assumed for the segments in otherSegments. This is fulfilled when the segments are obtained via getNonNanSegments.

-
See also
getNonNanSegments, segmentsIntersect, drawFill, getChannelFillPolygon
- -
-
- -

§ segmentsIntersect()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool QCPGraph::segmentsIntersect (double aLower,
double aUpper,
double bLower,
double bUpper,
int & bPrecedence 
) const
-
-protected
-
-

Returns whether the segments defined by the coordinates (aLower, aUpper) and (bLower, bUpper) have overlap.

-

The output parameter bPrecedence indicates whether the b segment reaches farther than the a segment or not. If bPrecedence returns 1, segment b reaches the farthest to higher coordinates (i.e. bUpper > aUpper). If it returns -1, segment a reaches the farthest. Only if both segment's upper bounds are identical, 0 is returned as bPrecedence.

-

It is assumed that the lower bounds always have smaller or equal values than the upper bounds.

-
See also
getOverlappingSegments
- -
-
- -

§ getFillBasePoint()

- -
-
- - - - - -
- - - - - - - - -
QPointF QCPGraph::getFillBasePoint (QPointF matchingDataPoint) const
-
-protected
-
-

Returns the point which closes the fill polygon on the zero-value-line parallel to the key axis. The logarithmic axis scale case is a bit special, since the zero-value-line in pixel coordinates is in positive or negative infinity. So this case is handled separately by just closing the fill polygon on the axis which lies in the direction towards the zero value.

-

matchingDataPoint will provide the key (in pixels) of the returned point. Depending on whether the key axis of this graph is horizontal or vertical, matchingDataPoint will provide the x or y value of the returned point, respectively.

- -
-
- -

§ getFillPolygon()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QPolygonF QCPGraph::getFillPolygon (const QVector< QPointF > * lineData,
QCPDataRange segment 
) const
-
-protected
-
-

Returns the polygon needed for drawing normal fills between this graph and the key axis.

-

Pass the graph's data points (in pixel coordinates) as lineData, and specify the segment which shall be used for the fill. The collection of lineData points described by segment must not contain NaN data points (see getNonNanSegments).

-

The returned fill polygon will be closed at the key axis (the zero-value line) for linear value axes. For logarithmic value axes the polygon will reach just beyond the corresponding axis rect side (see getFillBasePoint).

-

For increased performance (due to implicit sharing), keep the returned QPolygonF const.

-
See also
drawFill, getNonNanSegments
- -
-
- -

§ getChannelFillPolygon()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const QPolygonF QCPGraph::getChannelFillPolygon (const QVector< QPointF > * thisData,
QCPDataRange thisSegment,
const QVector< QPointF > * otherData,
QCPDataRange otherSegment 
) const
-
-protected
-
-

Returns the polygon needed for drawing (partial) channel fills between this graph and the graph specified by setChannelFillGraph.

-

The data points of this graph are passed as pixel coordinates via thisData, the data of the other graph as otherData. The returned polygon will be calculated for the specified data segments thisSegment and otherSegment, pertaining to the respective thisData and otherData, respectively.

-

The passed thisSegment and otherSegment should correspond to the segment pairs returned by getOverlappingSegments, to make sure only segments that actually have key coordinate overlap need to be processed here.

-

For increased performance due to implicit sharing, keep the returned QPolygonF const.

-
See also
drawFill, getOverlappingSegments, getNonNanSegments
- -
-
- -

§ findIndexBelowX()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int QCPGraph::findIndexBelowX (const QVector< QPointF > * data,
double x 
) const
-
-protected
-
-

Finds the highest index of data, whose points x value is just below x. Assumes x values in data points are ordered ascending, as is ensured by getLines/getScatters if the key axis is horizontal.

-

Used to calculate the channel fill polygon, see getChannelFillPolygon.

- -
-
- -

§ findIndexAboveX()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int QCPGraph::findIndexAboveX (const QVector< QPointF > * data,
double x 
) const
-
-protected
-
-

Finds the smallest index of data, whose points x value is just above x. Assumes x values in data points are ordered ascending, as is ensured by getLines/getScatters if the key axis is horizontal.

-

Used to calculate the channel fill polygon, see getChannelFillPolygon.

- -
-
- -

§ findIndexBelowY()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int QCPGraph::findIndexBelowY (const QVector< QPointF > * data,
double y 
) const
-
-protected
-
-

Finds the highest index of data, whose points y value is just below y. Assumes y values in data points are ordered ascending, as is ensured by getLines/getScatters if the key axis is vertical.

-

Used to calculate the channel fill polygon, see getChannelFillPolygon.

- -
-
- -

§ findIndexAboveY()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int QCPGraph::findIndexAboveY (const QVector< QPointF > * data,
double y 
) const
-
-protected
-
-

Finds the smallest index of data, whose points y value is just above y. Assumes y values in data points are ordered ascending, as is ensured by getLines/getScatters if the key axis is vertical.

-

Used to calculate the channel fill polygon, see getChannelFillPolygon.

- -
-
- -

§ pointDistance()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
double QCPGraph::pointDistance (const QPointF & pixelPoint,
QCPGraphDataContainer::const_iterator & closestData 
) const
-
-protected
-
-

Calculates the minimum distance in pixels the graph's representation has from the given pixelPoint. This is used to determine whether the graph was clicked or not, e.g. in selectTest. The closest data point to pixelPoint is returned in closestData. Note that if the graph has a line representation, the returned distance may be smaller than the distance to the closestData point, since the distance to the graph line is also taken into account.

-

If either the graph has no data or if the line style is lsNone and the scatter style's shape is QCPScatterStyle::ssNone (i.e. there is no visual representation of the graph), returns -1.0.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPGraphData.html b/third_party/qcustomplot/documentation/html/classQCPGraphData.html deleted file mode 100644 index 5cba2395..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPGraphData.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - -QCPGraphData Class Reference - - - - -
- -
-
QCPGraphData Class Reference
-
-
- -

Holds the data of one single data point for QCPGraph. - More...

- - - - - - - - - - - - - - -

-Public Functions

 QCPGraphData ()
 
 QCPGraphData (double key, double value)
 
double sortKey () const
 
double mainKey () const
 
double mainValue () const
 
QCPRange valueRange () const
 
- - - - - -

-Public Members

-double key
 
-double value
 
- - - - - -

-Static Public Functions

static QCPGraphData fromSortKey (double sortKey)
 
static bool sortKeyIsMainKey ()
 
-

Detailed Description

-

Holds the data of one single data point for QCPGraph.

-

The stored data is:

    -
  • key: coordinate on the key axis of this data point (this is the mainKey and the sortKey)
  • -
  • value: coordinate on the value axis of this data point (this is the mainValue)
  • -
-

The container for storing multiple data points is QCPGraphDataContainer. It is a typedef for QCPDataContainer with QCPGraphData as the DataType template parameter. See the documentation there for an explanation regarding the data type's generic methods.

-
See also
QCPGraphDataContainer
-

Constructor & Destructor Documentation

- -

§ QCPGraphData() [1/2]

- -
-
- - - - - - - -
QCPGraphData::QCPGraphData ()
-
-

Constructs a data point with key and value set to zero.

- -
-
- -

§ QCPGraphData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
QCPGraphData::QCPGraphData (double key,
double value 
)
-
-

Constructs a data point with the specified key and value.

- -
-
-

Member Function Documentation

- -

§ sortKey()

- -
-
- - - - - -
- - - - - - - -
double QCPGraphData::sortKey () const
-
-inline
-
-

Returns the key member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ fromSortKey()

- -
-
- - - - - -
- - - - - - - - -
static QCPGraphData QCPGraphData::fromSortKey (double sortKey)
-
-inlinestatic
-
-

Returns a data point with the specified sortKey. All other members are set to zero.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ sortKeyIsMainKey()

- -
-
- - - - - -
- - - - - - - -
static static bool QCPGraphData::sortKeyIsMainKey ()
-
-inlinestatic
-
-

Since the member key is both the data point key coordinate and the data ordering parameter, this method returns true.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ mainKey()

- -
-
- - - - - -
- - - - - - - -
double QCPGraphData::mainKey () const
-
-inline
-
-

Returns the key member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ mainValue()

- -
-
- - - - - -
- - - - - - - -
double QCPGraphData::mainValue () const
-
-inline
-
-

Returns the value member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ valueRange()

- -
-
- - - - - -
- - - - - - - -
QCPRange QCPGraphData::valueRange () const
-
-inline
-
-

Returns a QCPRange with both lower and upper boundary set to value of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPGraph__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPGraph__inherit__graph.png deleted file mode 100644 index 53c2edd7..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPGraph__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPGrid.html b/third_party/qcustomplot/documentation/html/classQCPGrid.html deleted file mode 100644 index 70323852..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPGrid.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - -QCPGrid Class Reference - - - - -
- -
-
QCPGrid Class Reference
-
-
- -

Responsible for drawing the grid of a QCPAxis. - More...

-
-Inheritance diagram for QCPGrid:
-
-
Inheritance graph
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPGrid (QCPAxis *parentAxis)
 
-bool subGridVisible () const
 
-bool antialiasedSubGrid () const
 
-bool antialiasedZeroLine () const
 
-QPen pen () const
 
-QPen subGridPen () const
 
-QPen zeroLinePen () const
 
void setSubGridVisible (bool visible)
 
void setAntialiasedSubGrid (bool enabled)
 
void setAntialiasedZeroLine (bool enabled)
 
void setPen (const QPen &pen)
 
void setSubGridPen (const QPen &pen)
 
void setZeroLinePen (const QPen &pen)
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
void drawGridLines (QCPPainter *painter) const
 
void drawSubGridLines (QCPPainter *painter) const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - -

-Additional Inherited Members

- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

Responsible for drawing the grid of a QCPAxis.

-

This class is tightly bound to QCPAxis. Every axis owns a grid instance and uses it to draw the grid lines, sub grid lines and zero-line. You can interact with the grid of an axis via QCPAxis::grid. Normally, you don't need to create an instance of QCPGrid yourself.

-

The axis and grid drawing was split into two classes to allow them to be placed on different layers (both QCPAxis and QCPGrid inherit from QCPLayerable). Thus it is possible to have the grid in the background and the axes in the foreground, and any plottables/items in between. This described situation is the default setup, see the QCPLayer documentation.

-

Constructor & Destructor Documentation

- -

§ QCPGrid()

- -
-
- - - - - -
- - - - - - - - -
QCPGrid::QCPGrid (QCPAxisparentAxis)
-
-explicit
-
-

Creates a QCPGrid instance and sets default values.

-

You shouldn't instantiate grids on their own, since every QCPAxis brings its own QCPGrid.

- -
-
-

Member Function Documentation

- -

§ setSubGridVisible()

- -
-
- - - - - - - - -
void QCPGrid::setSubGridVisible (bool visible)
-
-

Sets whether grid lines at sub tick marks are drawn.

-
See also
setSubGridPen
- -
-
- -

§ setAntialiasedSubGrid()

- -
-
- - - - - - - - -
void QCPGrid::setAntialiasedSubGrid (bool enabled)
-
-

Sets whether sub grid lines are drawn antialiased.

- -
-
- -

§ setAntialiasedZeroLine()

- -
-
- - - - - - - - -
void QCPGrid::setAntialiasedZeroLine (bool enabled)
-
-

Sets whether zero lines are drawn antialiased.

- -
-
- -

§ setPen()

- -
-
- - - - - - - - -
void QCPGrid::setPen (const QPen & pen)
-
-

Sets the pen with which (major) grid lines are drawn.

- -
-
- -

§ setSubGridPen()

- -
-
- - - - - - - - -
void QCPGrid::setSubGridPen (const QPen & pen)
-
-

Sets the pen with which sub grid lines are drawn.

- -
-
- -

§ setZeroLinePen()

- -
-
- - - - - - - - -
void QCPGrid::setZeroLinePen (const QPen & pen)
-
-

Sets the pen with which zero lines are drawn.

-

Zero lines are lines at value coordinate 0 which may be drawn with a different pen than other grid lines. To disable zero lines and just draw normal grid lines at zero, set pen to Qt::NoPen.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPGrid::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

A convenience function to easily set the QPainter::Antialiased hint on the provided painter before drawing the major grid lines.

-

This is the antialiasing state the painter passed to the draw method is in by default.

-

This function takes into account the local setting of the antialiasing flag as well as the overrides set with QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

-
See also
setAntialiased
- -

Implements QCPLayerable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPGrid::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws grid lines and sub grid lines at the positions of (sub) ticks of the parent axis, spanning over the complete axis rect. Also draws the zero line, if appropriate (setZeroLinePen).

- -

Implements QCPLayerable.

- -
-
- -

§ drawGridLines()

- -
-
- - - - - -
- - - - - - - - -
void QCPGrid::drawGridLines (QCPPainterpainter) const
-
-protected
-
-

Draws the main grid lines and possibly a zero line with the specified painter.

-

This is a helper function called by draw.

- -
-
- -

§ drawSubGridLines()

- -
-
- - - - - -
- - - - - - - - -
void QCPGrid::drawSubGridLines (QCPPainterpainter) const
-
-protected
-
-

Draws the sub grid lines with the specified painter.

-

This is a helper function called by draw.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/axis/axis.h
  • -
  • src/axis/axis.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPGrid__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPGrid__inherit__graph.png deleted file mode 100644 index e393bd32..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPGrid__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPItemAnchor.html b/third_party/qcustomplot/documentation/html/classQCPItemAnchor.html deleted file mode 100644 index cf0469e6..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPItemAnchor.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - -QCPItemAnchor Class Reference - - - - -
- -
-
QCPItemAnchor Class Reference
-
-
- -

An anchor of an item to which positions can be attached to. - More...

-
-Inheritance diagram for QCPItemAnchor:
-
-
Inheritance graph
- - - -
- - - - - - - - -

-Public Functions

 QCPItemAnchor (QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name, int anchorId=-1)
 
-QString name () const
 
virtual QPointF pixelPosition () const
 
- - - - - - - - - - - -

-Protected Functions

virtual QCPItemPositiontoQCPItemPosition ()
 
void addChildX (QCPItemPosition *pos)
 
void removeChildX (QCPItemPosition *pos)
 
void addChildY (QCPItemPosition *pos)
 
void removeChildY (QCPItemPosition *pos)
 
-

Detailed Description

-

An anchor of an item to which positions can be attached to.

-

An item (QCPAbstractItem) may have one or more anchors. Unlike QCPItemPosition, an anchor doesn't control anything on its item, but provides a way to tie other items via their positions to the anchor.

-

For example, a QCPItemRect is defined by its positions topLeft and bottomRight. Additionally it has various anchors like top, topRight or bottomLeft etc. So you can attach the start (which is a QCPItemPosition) of a QCPItemLine to one of the anchors by calling QCPItemPosition::setParentAnchor on start, passing the wanted anchor of the QCPItemRect. This way the start of the line will now always follow the respective anchor location on the rect item.

-

Note that QCPItemPosition derives from QCPItemAnchor, so every position can also serve as an anchor to other positions.

-

To learn how to provide anchors in your own item subclasses, see the subclassing section of the QCPAbstractItem documentation.

-

Constructor & Destructor Documentation

- -

§ QCPItemAnchor()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QCPItemAnchor::QCPItemAnchor (QCustomPlotparentPlot,
QCPAbstractItemparentItem,
const QString & name,
int anchorId = -1 
)
-
-

Creates a new QCPItemAnchor. You shouldn't create QCPItemAnchor instances directly, even if you want to make a new item subclass. Use QCPAbstractItem::createAnchor instead, as explained in the subclassing section of the QCPAbstractItem documentation.

- -
-
-

Member Function Documentation

- -

§ pixelPosition()

- -
-
- - - - - -
- - - - - - - -
QPointF QCPItemAnchor::pixelPosition () const
-
-virtual
-
-

Returns the final absolute pixel position of the QCPItemAnchor on the QCustomPlot surface.

-

The pixel information is internally retrieved via QCPAbstractItem::anchorPixelPosition of the parent item, QCPItemAnchor is just an intermediary.

- -

Reimplemented in QCPItemPosition.

- -
-
- -

§ toQCPItemPosition()

- -
-
- - - - - -
- - - - - - - -
QCPItemPosition * QCPItemAnchor::toQCPItemPosition ()
-
-inlineprotectedvirtual
-
-

Returns nullptr if this instance is merely a QCPItemAnchor, and a valid pointer of type QCPItemPosition* if it actually is a QCPItemPosition (which is a subclass of QCPItemAnchor).

-

This safe downcast functionality could also be achieved with a dynamic_cast. However, QCustomPlot avoids dynamic_cast to work with projects that don't have RTTI support enabled (e.g. -fno-rtti flag with gcc compiler).

- -

Reimplemented in QCPItemPosition.

- -
-
- -

§ addChildX()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemAnchor::addChildX (QCPItemPositionpos)
-
-protected
-
-

Adds pos to the childX list of this anchor, which keeps track of which children use this anchor as parent anchor for the respective coordinate. This is necessary to notify the children prior to destruction of the anchor.

-

Note that this function does not change the parent setting in pos.

- -
-
- -

§ removeChildX()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemAnchor::removeChildX (QCPItemPositionpos)
-
-protected
-
-

Removes pos from the childX list of this anchor.

-

Note that this function does not change the parent setting in pos.

- -
-
- -

§ addChildY()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemAnchor::addChildY (QCPItemPositionpos)
-
-protected
-
-

Adds pos to the childY list of this anchor, which keeps track of which children use this anchor as parent anchor for the respective coordinate. This is necessary to notify the children prior to destruction of the anchor.

-

Note that this function does not change the parent setting in pos.

- -
-
- -

§ removeChildY()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemAnchor::removeChildY (QCPItemPositionpos)
-
-protected
-
-

Removes pos from the childY list of this anchor.

-

Note that this function does not change the parent setting in pos.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/item.h
  • -
  • src/item.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPItemAnchor__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPItemAnchor__inherit__graph.png deleted file mode 100644 index 6c42aa0a..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPItemAnchor__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPItemBracket.html b/third_party/qcustomplot/documentation/html/classQCPItemBracket.html deleted file mode 100644 index bb849e61..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPItemBracket.html +++ /dev/null @@ -1,509 +0,0 @@ - - - - - - -QCPItemBracket Class Reference - - - - -
- -
-
QCPItemBracket Class Reference
-
-
- -

A bracket for referencing/highlighting certain parts in the plot. - More...

-
-Inheritance diagram for QCPItemBracket:
-
-
Inheritance graph
- - - - -
- - - - -

-Public Types

enum  BracketStyle
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPItemBracket (QCustomPlot *parentPlot)
 
-QPen pen () const
 
-QPen selectedPen () const
 
-double length () const
 
-BracketStyle style () const
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
void setLength (double length)
 
void setStyle (BracketStyle style)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPAbstractItem
 QCPAbstractItem (QCustomPlot *parentPlot)
 
-bool clipToAxisRect () const
 
-QCPAxisRectclipAxisRect () const
 
-bool selectable () const
 
-bool selected () const
 
void setClipToAxisRect (bool clip)
 
void setClipAxisRect (QCPAxisRect *rect)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
QList< QCPItemPosition * > positions () const
 
QList< QCPItemAnchor * > anchors () const
 
QCPItemPositionposition (const QString &name) const
 
QCPItemAnchoranchor (const QString &name) const
 
bool hasAnchor (const QString &name) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - -

-Public Members

-QCPItemPosition *const left
 
-QCPItemPosition *const right
 
-QCPItemAnchor *const center
 
- - - -

-Protected Types

enum  AnchorIndex
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual QPointF anchorPixelPosition (int anchorId) const
 
QPen mainPen () const
 
- Protected Functions inherited from QCPAbstractItem
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
double rectDistance (const QRectF &rect, const QPointF &pos, bool filledRect) const
 
QCPItemPositioncreatePosition (const QString &name)
 
QCPItemAnchorcreateAnchor (const QString &name, int anchorId)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractItem
void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A bracket for referencing/highlighting certain parts in the plot.

-
-QCPItemBracket.png -
-Bracket example. Blue dotted circles are anchors, solid blue discs are positions.
-

It has two positions, left and right, which define the span of the bracket. If left is actually farther to the left than right, the bracket is opened to the bottom, as shown in the example image.

-

The bracket supports multiple styles via setStyle. The length, i.e. how far the bracket stretches away from the embraced span, can be controlled with setLength.

-
-QCPItemBracket-length.png -
-
Demonstrating the effect of different values for setLength, for styles bsCalligraphic and bsSquare. Anchors and positions are displayed for reference.

It provides an anchor center, to allow connection of other items, e.g. an arrow (QCPItemLine or QCPItemCurve) or a text label (QCPItemText), to the bracket.

-

Member Enumeration Documentation

- -

§ BracketStyle

- -
-
-

Defines the various visual shapes of the bracket item. The appearance can be further modified by setLength and setPen.

-
See also
setStyle
- - - - - -
Enumerator
bsSquare 

A brace with angled edges.

-
bsRound 

A brace with round edges.

-
bsCurly 

A curly brace.

-
bsCalligraphic 

A curly brace with varying stroke width giving a calligraphic impression.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPItemBracket()

- -
-
- - - - - -
- - - - - - - - -
QCPItemBracket::QCPItemBracket (QCustomPlotparentPlot)
-
-explicit
-
-

Creates a bracket item and sets default values.

-

The created item is automatically registered with parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.

- -
-
-

Member Function Documentation

- -

§ setPen()

- -
-
- - - - - - - - -
void QCPItemBracket::setPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the bracket.

-

Note that when the style is bsCalligraphic, only the color will be taken from the pen, the stroke and width are ignored. To change the apparent stroke width of a calligraphic bracket, use setLength, which has a similar effect.

-
See also
setSelectedPen
- -
-
- -

§ setSelectedPen()

- -
-
- - - - - - - - -
void QCPItemBracket::setSelectedPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the bracket when selected

-
See also
setPen, setSelected
- -
-
- -

§ setLength()

- -
-
- - - - - - - - -
void QCPItemBracket::setLength (double length)
-
-

Sets the length in pixels how far the bracket extends in the direction towards the embraced span of the bracket (i.e. perpendicular to the left-right-direction)

-
-QCPItemBracket-length.png -
-
Demonstrating the effect of different values for setLength, for styles bsCalligraphic and bsSquare. Anchors and positions are displayed for reference.
-
-
- -

§ setStyle()

- -
-
- - - - - - - - -
void QCPItemBracket::setStyle (QCPItemBracket::BracketStyle style)
-
-

Sets the style of the bracket, i.e. the shape/visual appearance.

-
See also
setPen
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPItemBracket::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Implements QCPAbstractItem.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemBracket::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws this item with the provided painter.

-

The cliprect of the provided painter is set to the rect returned by clipRect before this function is called. The clipRect depends on the clipping settings defined by setClipToAxisRect and setClipAxisRect.

- -

Implements QCPAbstractItem.

- -
-
- -

§ anchorPixelPosition()

- -
-
- - - - - -
- - - - - - - - -
QPointF QCPItemBracket::anchorPixelPosition (int anchorId) const
-
-protectedvirtual
-
-

Returns the pixel position of the anchor with Id anchorId. This function must be reimplemented in item subclasses if they want to provide anchors (QCPItemAnchor).

-

For example, if the item has two anchors with id 0 and 1, this function takes one of these anchor ids and returns the respective pixel points of the specified anchor.

-
See also
createAnchor
- -

Reimplemented from QCPAbstractItem.

- -
-
- -

§ mainPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPItemBracket::mainPen () const
-
-protected
-
-

Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/items/item-bracket.h
  • -
  • src/items/item-bracket.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPItemBracket__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPItemBracket__inherit__graph.png deleted file mode 100644 index d7e1e2f7..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPItemBracket__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPItemCurve.html b/third_party/qcustomplot/documentation/html/classQCPItemCurve.html deleted file mode 100644 index 6525fc78..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPItemCurve.html +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - -QCPItemCurve Class Reference - - - - -
- -
-
QCPItemCurve Class Reference
-
-
- -

A curved line from one point to another. - More...

-
-Inheritance diagram for QCPItemCurve:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPItemCurve (QCustomPlot *parentPlot)
 
-QPen pen () const
 
-QPen selectedPen () const
 
-QCPLineEnding head () const
 
-QCPLineEnding tail () const
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
void setHead (const QCPLineEnding &head)
 
void setTail (const QCPLineEnding &tail)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPAbstractItem
 QCPAbstractItem (QCustomPlot *parentPlot)
 
-bool clipToAxisRect () const
 
-QCPAxisRectclipAxisRect () const
 
-bool selectable () const
 
-bool selected () const
 
void setClipToAxisRect (bool clip)
 
void setClipAxisRect (QCPAxisRect *rect)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
QList< QCPItemPosition * > positions () const
 
QList< QCPItemAnchor * > anchors () const
 
QCPItemPositionposition (const QString &name) const
 
QCPItemAnchoranchor (const QString &name) const
 
bool hasAnchor (const QString &name) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - -

-Public Members

-QCPItemPosition *const start
 
-QCPItemPosition *const startDir
 
-QCPItemPosition *const endDir
 
-QCPItemPosition *const end
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
QPen mainPen () const
 
- Protected Functions inherited from QCPAbstractItem
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual QPointF anchorPixelPosition (int anchorId) const
 
double rectDistance (const QRectF &rect, const QPointF &pos, bool filledRect) const
 
QCPItemPositioncreatePosition (const QString &name)
 
QCPItemAnchorcreateAnchor (const QString &name, int anchorId)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractItem
void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A curved line from one point to another.

-
-QCPItemCurve.png -
-Curve example. Blue dotted circles are anchors, solid blue discs are positions.
-

It has four positions, start and end, which define the end points of the line, and two control points which define the direction the line exits from the start and the direction from which it approaches the end: startDir and endDir.

-

With setHead and setTail you may set different line ending styles, e.g. to create an arrow.

-

Often it is desirable for the control points to stay at fixed relative positions to the start/end point. This can be achieved by setting the parent anchor e.g. of startDir simply to start, and then specify the desired pixel offset with QCPItemPosition::setCoords on startDir.

-

Constructor & Destructor Documentation

- -

§ QCPItemCurve()

- -
-
- - - - - -
- - - - - - - - -
QCPItemCurve::QCPItemCurve (QCustomPlotparentPlot)
-
-explicit
-
-

Creates a curve item and sets default values.

-

The created item is automatically registered with parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.

- -
-
-

Member Function Documentation

- -

§ setPen()

- -
-
- - - - - - - - -
void QCPItemCurve::setPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line

-
See also
setSelectedPen
- -
-
- -

§ setSelectedPen()

- -
-
- - - - - - - - -
void QCPItemCurve::setSelectedPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line when selected

-
See also
setPen, setSelected
- -
-
- -

§ setHead()

- -
-
- - - - - - - - -
void QCPItemCurve::setHead (const QCPLineEndinghead)
-
-

Sets the line ending style of the head. The head corresponds to the end position.

-

Note that due to the overloaded QCPLineEnding constructor, you may directly specify a QCPLineEnding::EndingStyle here, e.g.

See also
setTail
- -
-
- -

§ setTail()

- -
-
- - - - - - - - -
void QCPItemCurve::setTail (const QCPLineEndingtail)
-
-

Sets the line ending style of the tail. The tail corresponds to the start position.

-

Note that due to the overloaded QCPLineEnding constructor, you may directly specify a QCPLineEnding::EndingStyle here, e.g.

See also
setHead
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPItemCurve::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Implements QCPAbstractItem.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemCurve::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws this item with the provided painter.

-

The cliprect of the provided painter is set to the rect returned by clipRect before this function is called. The clipRect depends on the clipping settings defined by setClipToAxisRect and setClipAxisRect.

- -

Implements QCPAbstractItem.

- -
-
- -

§ mainPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPItemCurve::mainPen () const
-
-protected
-
-

Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/items/item-curve.h
  • -
  • src/items/item-curve.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPItemCurve__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPItemCurve__inherit__graph.png deleted file mode 100644 index 0e8ebff1..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPItemCurve__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPItemEllipse.html b/third_party/qcustomplot/documentation/html/classQCPItemEllipse.html deleted file mode 100644 index 6261d8f8..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPItemEllipse.html +++ /dev/null @@ -1,520 +0,0 @@ - - - - - - -QCPItemEllipse Class Reference - - - - -
- -
-
QCPItemEllipse Class Reference
-
-
- -

An ellipse. - More...

-
-Inheritance diagram for QCPItemEllipse:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPItemEllipse (QCustomPlot *parentPlot)
 
-QPen pen () const
 
-QPen selectedPen () const
 
-QBrush brush () const
 
-QBrush selectedBrush () const
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setSelectedBrush (const QBrush &brush)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPAbstractItem
 QCPAbstractItem (QCustomPlot *parentPlot)
 
-bool clipToAxisRect () const
 
-QCPAxisRectclipAxisRect () const
 
-bool selectable () const
 
-bool selected () const
 
void setClipToAxisRect (bool clip)
 
void setClipAxisRect (QCPAxisRect *rect)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
QList< QCPItemPosition * > positions () const
 
QList< QCPItemAnchor * > anchors () const
 
QCPItemPositionposition (const QString &name) const
 
QCPItemAnchoranchor (const QString &name) const
 
bool hasAnchor (const QString &name) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - -

-Public Members

-QCPItemPosition *const topLeft
 
-QCPItemPosition *const bottomRight
 
-QCPItemAnchor *const topLeftRim
 
-QCPItemAnchor *const top
 
-QCPItemAnchor *const topRightRim
 
-QCPItemAnchor *const right
 
-QCPItemAnchor *const bottomRightRim
 
-QCPItemAnchor *const bottom
 
-QCPItemAnchor *const bottomLeftRim
 
-QCPItemAnchor *const left
 
-QCPItemAnchor *const center
 
- - - -

-Protected Types

enum  AnchorIndex
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual QPointF anchorPixelPosition (int anchorId) const
 
QPen mainPen () const
 
QBrush mainBrush () const
 
- Protected Functions inherited from QCPAbstractItem
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
double rectDistance (const QRectF &rect, const QPointF &pos, bool filledRect) const
 
QCPItemPositioncreatePosition (const QString &name)
 
QCPItemAnchorcreateAnchor (const QString &name, int anchorId)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractItem
void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

An ellipse.

-
-QCPItemEllipse.png -
-Ellipse example. Blue dotted circles are anchors, solid blue discs are positions.
-

It has two positions, topLeft and bottomRight, which define the rect the ellipse will be drawn in.

-

Constructor & Destructor Documentation

- -

§ QCPItemEllipse()

- -
-
- - - - - -
- - - - - - - - -
QCPItemEllipse::QCPItemEllipse (QCustomPlotparentPlot)
-
-explicit
-
-

Creates an ellipse item and sets default values.

-

The created item is automatically registered with parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.

- -
-
-

Member Function Documentation

- -

§ setPen()

- -
-
- - - - - - - - -
void QCPItemEllipse::setPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line of the ellipse

-
See also
setSelectedPen, setBrush
- -
-
- -

§ setSelectedPen()

- -
-
- - - - - - - - -
void QCPItemEllipse::setSelectedPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line of the ellipse when selected

-
See also
setPen, setSelected
- -
-
- -

§ setBrush()

- -
-
- - - - - - - - -
void QCPItemEllipse::setBrush (const QBrush & brush)
-
-

Sets the brush that will be used to fill the ellipse. To disable filling, set brush to Qt::NoBrush.

-
See also
setSelectedBrush, setPen
- -
-
- -

§ setSelectedBrush()

- -
-
- - - - - - - - -
void QCPItemEllipse::setSelectedBrush (const QBrush & brush)
-
-

Sets the brush that will be used to fill the ellipse when selected. To disable filling, set brush to Qt::NoBrush.

-
See also
setBrush
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPItemEllipse::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Implements QCPAbstractItem.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemEllipse::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws this item with the provided painter.

-

The cliprect of the provided painter is set to the rect returned by clipRect before this function is called. The clipRect depends on the clipping settings defined by setClipToAxisRect and setClipAxisRect.

- -

Implements QCPAbstractItem.

- -
-
- -

§ anchorPixelPosition()

- -
-
- - - - - -
- - - - - - - - -
QPointF QCPItemEllipse::anchorPixelPosition (int anchorId) const
-
-protectedvirtual
-
-

Returns the pixel position of the anchor with Id anchorId. This function must be reimplemented in item subclasses if they want to provide anchors (QCPItemAnchor).

-

For example, if the item has two anchors with id 0 and 1, this function takes one of these anchor ids and returns the respective pixel points of the specified anchor.

-
See also
createAnchor
- -

Reimplemented from QCPAbstractItem.

- -
-
- -

§ mainPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPItemEllipse::mainPen () const
-
-protected
-
-

Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is.

- -
-
- -

§ mainBrush()

- -
-
- - - - - -
- - - - - - - -
QBrush QCPItemEllipse::mainBrush () const
-
-protected
-
-

Returns the brush that should be used for drawing fills of the item. Returns mBrush when the item is not selected and mSelectedBrush when it is.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/items/item-ellipse.h
  • -
  • src/items/item-ellipse.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPItemEllipse__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPItemEllipse__inherit__graph.png deleted file mode 100644 index 05c11310..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPItemEllipse__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPItemLine.html b/third_party/qcustomplot/documentation/html/classQCPItemLine.html deleted file mode 100644 index 2983c9db..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPItemLine.html +++ /dev/null @@ -1,475 +0,0 @@ - - - - - - -QCPItemLine Class Reference - - - - -
- -
-
QCPItemLine Class Reference
-
-
- -

A line from one point to another. - More...

-
-Inheritance diagram for QCPItemLine:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPItemLine (QCustomPlot *parentPlot)
 
-QPen pen () const
 
-QPen selectedPen () const
 
-QCPLineEnding head () const
 
-QCPLineEnding tail () const
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
void setHead (const QCPLineEnding &head)
 
void setTail (const QCPLineEnding &tail)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPAbstractItem
 QCPAbstractItem (QCustomPlot *parentPlot)
 
-bool clipToAxisRect () const
 
-QCPAxisRectclipAxisRect () const
 
-bool selectable () const
 
-bool selected () const
 
void setClipToAxisRect (bool clip)
 
void setClipAxisRect (QCPAxisRect *rect)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
QList< QCPItemPosition * > positions () const
 
QList< QCPItemAnchor * > anchors () const
 
QCPItemPositionposition (const QString &name) const
 
QCPItemAnchoranchor (const QString &name) const
 
bool hasAnchor (const QString &name) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - -

-Public Members

-QCPItemPosition *const start
 
-QCPItemPosition *const end
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
QLineF getRectClippedLine (const QCPVector2D &start, const QCPVector2D &end, const QRect &rect) const
 
QPen mainPen () const
 
- Protected Functions inherited from QCPAbstractItem
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual QPointF anchorPixelPosition (int anchorId) const
 
double rectDistance (const QRectF &rect, const QPointF &pos, bool filledRect) const
 
QCPItemPositioncreatePosition (const QString &name)
 
QCPItemAnchorcreateAnchor (const QString &name, int anchorId)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractItem
void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A line from one point to another.

-
-QCPItemLine.png -
-Line example. Blue dotted circles are anchors, solid blue discs are positions.
-

It has two positions, start and end, which define the end points of the line.

-

With setHead and setTail you may set different line ending styles, e.g. to create an arrow.

-

Constructor & Destructor Documentation

- -

§ QCPItemLine()

- -
-
- - - - - -
- - - - - - - - -
QCPItemLine::QCPItemLine (QCustomPlotparentPlot)
-
-explicit
-
-

Creates a line item and sets default values.

-

The created item is automatically registered with parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.

- -
-
-

Member Function Documentation

- -

§ setPen()

- -
-
- - - - - - - - -
void QCPItemLine::setPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line

-
See also
setSelectedPen
- -
-
- -

§ setSelectedPen()

- -
-
- - - - - - - - -
void QCPItemLine::setSelectedPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line when selected

-
See also
setPen, setSelected
- -
-
- -

§ setHead()

- -
-
- - - - - - - - -
void QCPItemLine::setHead (const QCPLineEndinghead)
-
-

Sets the line ending style of the head. The head corresponds to the end position.

-

Note that due to the overloaded QCPLineEnding constructor, you may directly specify a QCPLineEnding::EndingStyle here, e.g.

See also
setTail
- -
-
- -

§ setTail()

- -
-
- - - - - - - - -
void QCPItemLine::setTail (const QCPLineEndingtail)
-
-

Sets the line ending style of the tail. The tail corresponds to the start position.

-

Note that due to the overloaded QCPLineEnding constructor, you may directly specify a QCPLineEnding::EndingStyle here, e.g.

See also
setHead
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPItemLine::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Implements QCPAbstractItem.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemLine::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws this item with the provided painter.

-

The cliprect of the provided painter is set to the rect returned by clipRect before this function is called. The clipRect depends on the clipping settings defined by setClipToAxisRect and setClipAxisRect.

- -

Implements QCPAbstractItem.

- -
-
- -

§ getRectClippedLine()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QLineF QCPItemLine::getRectClippedLine (const QCPVector2Dstart,
const QCPVector2Dend,
const QRect & rect 
) const
-
-protected
-
-

Returns the section of the line defined by start and end, that is visible in the specified rect.

-

This is a helper function for draw.

- -
-
- -

§ mainPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPItemLine::mainPen () const
-
-protected
-
-

Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/items/item-line.h
  • -
  • src/items/item-line.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPItemLine__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPItemLine__inherit__graph.png deleted file mode 100644 index 18e17ce6..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPItemLine__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPItemPixmap.html b/third_party/qcustomplot/documentation/html/classQCPItemPixmap.html deleted file mode 100644 index 4afd9be6..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPItemPixmap.html +++ /dev/null @@ -1,592 +0,0 @@ - - - - - - -QCPItemPixmap Class Reference - - - - -
- -
-
QCPItemPixmap Class Reference
-
-
- -

An arbitrary pixmap. - More...

-
-Inheritance diagram for QCPItemPixmap:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPItemPixmap (QCustomPlot *parentPlot)
 
-QPixmap pixmap () const
 
-bool scaled () const
 
-Qt::AspectRatioMode aspectRatioMode () const
 
-Qt::TransformationMode transformationMode () const
 
-QPen pen () const
 
-QPen selectedPen () const
 
void setPixmap (const QPixmap &pixmap)
 
void setScaled (bool scaled, Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio, Qt::TransformationMode transformationMode=Qt::SmoothTransformation)
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPAbstractItem
 QCPAbstractItem (QCustomPlot *parentPlot)
 
-bool clipToAxisRect () const
 
-QCPAxisRectclipAxisRect () const
 
-bool selectable () const
 
-bool selected () const
 
void setClipToAxisRect (bool clip)
 
void setClipAxisRect (QCPAxisRect *rect)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
QList< QCPItemPosition * > positions () const
 
QList< QCPItemAnchor * > anchors () const
 
QCPItemPositionposition (const QString &name) const
 
QCPItemAnchoranchor (const QString &name) const
 
bool hasAnchor (const QString &name) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - -

-Public Members

-QCPItemPosition *const topLeft
 
-QCPItemPosition *const bottomRight
 
-QCPItemAnchor *const top
 
-QCPItemAnchor *const topRight
 
-QCPItemAnchor *const right
 
-QCPItemAnchor *const bottom
 
-QCPItemAnchor *const bottomLeft
 
-QCPItemAnchor *const left
 
- - - -

-Protected Types

enum  AnchorIndex
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual QPointF anchorPixelPosition (int anchorId) const
 
void updateScaledPixmap (QRect finalRect=QRect(), bool flipHorz=false, bool flipVert=false)
 
QRect getFinalRect (bool *flippedHorz=nullptr, bool *flippedVert=nullptr) const
 
QPen mainPen () const
 
- Protected Functions inherited from QCPAbstractItem
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
double rectDistance (const QRectF &rect, const QPointF &pos, bool filledRect) const
 
QCPItemPositioncreatePosition (const QString &name)
 
QCPItemAnchorcreateAnchor (const QString &name, int anchorId)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractItem
void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

An arbitrary pixmap.

-
-QCPItemPixmap.png -
-Pixmap example. Blue dotted circles are anchors, solid blue discs are positions.
-

It has two positions, topLeft and bottomRight, which define the rectangle the pixmap will be drawn in. Depending on the scale setting (setScaled), the pixmap will be either scaled to fit the rectangle or be drawn aligned to the topLeft position.

-

If scaling is enabled and topLeft is further to the bottom/right than bottomRight (as shown on the right side of the example image), the pixmap will be flipped in the respective orientations.

-

Constructor & Destructor Documentation

- -

§ QCPItemPixmap()

- -
-
- - - - - -
- - - - - - - - -
QCPItemPixmap::QCPItemPixmap (QCustomPlotparentPlot)
-
-explicit
-
-

Creates a rectangle item and sets default values.

-

The created item is automatically registered with parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.

- -
-
-

Member Function Documentation

- -

§ setPixmap()

- -
-
- - - - - - - - -
void QCPItemPixmap::setPixmap (const QPixmap & pixmap)
-
-

Sets the pixmap that will be displayed.

- -
-
- -

§ setScaled()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPItemPixmap::setScaled (bool scaled,
Qt::AspectRatioMode aspectRatioMode = Qt::KeepAspectRatio,
Qt::TransformationMode transformationMode = Qt::SmoothTransformation 
)
-
-

Sets whether the pixmap will be scaled to fit the rectangle defined by the topLeft and bottomRight positions.

- -
-
- -

§ setPen()

- -
-
- - - - - - - - -
void QCPItemPixmap::setPen (const QPen & pen)
-
-

Sets the pen that will be used to draw a border around the pixmap.

-
See also
setSelectedPen, setBrush
- -
-
- -

§ setSelectedPen()

- -
-
- - - - - - - - -
void QCPItemPixmap::setSelectedPen (const QPen & pen)
-
-

Sets the pen that will be used to draw a border around the pixmap when selected

-
See also
setPen, setSelected
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPItemPixmap::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Implements QCPAbstractItem.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemPixmap::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws this item with the provided painter.

-

The cliprect of the provided painter is set to the rect returned by clipRect before this function is called. The clipRect depends on the clipping settings defined by setClipToAxisRect and setClipAxisRect.

- -

Implements QCPAbstractItem.

- -
-
- -

§ anchorPixelPosition()

- -
-
- - - - - -
- - - - - - - - -
QPointF QCPItemPixmap::anchorPixelPosition (int anchorId) const
-
-protectedvirtual
-
-

Returns the pixel position of the anchor with Id anchorId. This function must be reimplemented in item subclasses if they want to provide anchors (QCPItemAnchor).

-

For example, if the item has two anchors with id 0 and 1, this function takes one of these anchor ids and returns the respective pixel points of the specified anchor.

-
See also
createAnchor
- -

Reimplemented from QCPAbstractItem.

- -
-
- -

§ updateScaledPixmap()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPItemPixmap::updateScaledPixmap (QRect finalRect = QRect(),
bool flipHorz = false,
bool flipVert = false 
)
-
-protected
-
-

Creates the buffered scaled image (mScaledPixmap) to fit the specified finalRect. The parameters flipHorz and flipVert control whether the resulting image shall be flipped horizontally or vertically. (This is used when topLeft is further to the bottom/right than bottomRight.)

-

This function only creates the scaled pixmap when the buffered pixmap has a different size than the expected result, so calling this function repeatedly, e.g. in the draw function, does not cause expensive rescaling every time.

-

If scaling is disabled, sets mScaledPixmap to a null QPixmap.

- -
-
- -

§ getFinalRect()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QRect QCPItemPixmap::getFinalRect (bool * flippedHorz = nullptr,
bool * flippedVert = nullptr 
) const
-
-protected
-
-

Returns the final (tight) rect the pixmap is drawn in, depending on the current item positions and scaling settings.

-

The output parameters flippedHorz and flippedVert return whether the pixmap should be drawn flipped horizontally or vertically in the returned rect. (The returned rect itself is always normalized, i.e. the top left corner of the rect is actually further to the top/left than the bottom right corner). This is the case when the item position topLeft is further to the bottom/right than bottomRight.

-

If scaling is disabled, returns a rect with size of the original pixmap and the top left corner aligned with the item position topLeft. The position bottomRight is ignored.

- -
-
- -

§ mainPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPItemPixmap::mainPen () const
-
-protected
-
-

Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/items/item-pixmap.h
  • -
  • src/items/item-pixmap.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPItemPixmap__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPItemPixmap__inherit__graph.png deleted file mode 100644 index b5f927cb..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPItemPixmap__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPItemPosition.html b/third_party/qcustomplot/documentation/html/classQCPItemPosition.html deleted file mode 100644 index a4171bbc..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPItemPosition.html +++ /dev/null @@ -1,606 +0,0 @@ - - - - - - -QCPItemPosition Class Reference - - - - -
- -
-
QCPItemPosition Class Reference
-
-
- -

Manages the position of an item. - More...

-
-Inheritance diagram for QCPItemPosition:
-
-
Inheritance graph
- - - -
- - - - -

-Public Types

enum  PositionType
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPItemPosition (QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name)
 
PositionType type () const
 
-PositionType typeX () const
 
-PositionType typeY () const
 
QCPItemAnchorparentAnchor () const
 
-QCPItemAnchorparentAnchorX () const
 
-QCPItemAnchorparentAnchorY () const
 
-double key () const
 
-double value () const
 
-QPointF coords () const
 
-QCPAxiskeyAxis () const
 
-QCPAxisvalueAxis () const
 
-QCPAxisRectaxisRect () const
 
virtual QPointF pixelPosition () const
 
void setType (PositionType type)
 
void setTypeX (PositionType type)
 
void setTypeY (PositionType type)
 
bool setParentAnchor (QCPItemAnchor *parentAnchor, bool keepPixelPosition=false)
 
bool setParentAnchorX (QCPItemAnchor *parentAnchor, bool keepPixelPosition=false)
 
bool setParentAnchorY (QCPItemAnchor *parentAnchor, bool keepPixelPosition=false)
 
void setCoords (double key, double value)
 
void setCoords (const QPointF &pos)
 
void setAxes (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
void setAxisRect (QCPAxisRect *axisRect)
 
void setPixelPosition (const QPointF &pixelPosition)
 
- Public Functions inherited from QCPItemAnchor
 QCPItemAnchor (QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name, int anchorId=-1)
 
-QString name () const
 
- - - - - - - - - - - - -

-Protected Functions

virtual QCPItemPositiontoQCPItemPosition ()
 
- Protected Functions inherited from QCPItemAnchor
void addChildX (QCPItemPosition *pos)
 
void removeChildX (QCPItemPosition *pos)
 
void addChildY (QCPItemPosition *pos)
 
void removeChildY (QCPItemPosition *pos)
 
-

Detailed Description

-

Manages the position of an item.

-

Every item has at least one public QCPItemPosition member pointer which provides ways to position the item on the QCustomPlot surface. Some items have multiple positions, for example QCPItemRect has two: topLeft and bottomRight.

-

QCPItemPosition has a type (PositionType) that can be set with setType. This type defines how coordinates passed to setCoords are to be interpreted, e.g. as absolute pixel coordinates, as plot coordinates of certain axes (QCPItemPosition::setAxes), as fractions of the axis rect (QCPItemPosition::setAxisRect), etc. For more advanced plots it is also possible to assign different types per X/Y coordinate of the position (see setTypeX, setTypeY). This way an item could be positioned for example at a fixed pixel distance from the top in the Y direction, while following a plot coordinate in the X direction.

-

A QCPItemPosition may have a parent QCPItemAnchor, see setParentAnchor. This way you can tie multiple items together. If the QCPItemPosition has a parent, its coordinates (setCoords) are considered to be absolute pixels in the reference frame of the parent anchor, where (0, 0) means directly ontop of the parent anchor. For example, You could attach the start position of a QCPItemLine to the bottom anchor of a QCPItemText to make the starting point of the line always be centered under the text label, no matter where the text is moved to. For more advanced plots, it is possible to assign different parent anchors per X/Y coordinate of the position, see setParentAnchorX, setParentAnchorY. This way an item could follow another item in the X direction but stay at a fixed position in the Y direction. Or even follow item A in X, and item B in Y.

-

Note that every QCPItemPosition inherits from QCPItemAnchor and thus can itself be used as parent anchor for other positions.

-

To set the apparent pixel position on the QCustomPlot surface directly, use setPixelPosition. This works no matter what type this QCPItemPosition is or what parent-child situation it is in, as setPixelPosition transforms the coordinates appropriately, to make the position appear at the specified pixel values.

-

Member Enumeration Documentation

- -

§ PositionType

- -
-
-

Defines the ways an item position can be specified. Thus it defines what the numbers passed to setCoords actually mean.

-
See also
setType
- - - - - -
Enumerator
ptAbsolute 

Static positioning in pixels, starting from the top left corner of the viewport/widget.

-
ptViewportRatio 

Static positioning given by a fraction of the viewport size. For example, if you call setCoords(0, 0), the position will be at the top left corner of the viewport/widget. setCoords(1, 1) will be at the bottom right corner, setCoords(0.5, 0) will be horizontally centered and vertically at the top of the viewport/widget, etc.

-
ptAxisRectRatio 

Static positioning given by a fraction of the axis rect size (see setAxisRect). For example, if you call setCoords(0, 0), the position will be at the top left corner of the axis rect. setCoords(1, 1) will be at the bottom right corner, setCoords(0.5, 0) will be horizontally centered and vertically at the top of the axis rect, etc. You can also go beyond the axis rect by providing negative coordinates or coordinates larger than 1.

-
ptPlotCoords 

Dynamic positioning at a plot coordinate defined by two axes (see setAxes).

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPItemPosition()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPItemPosition::QCPItemPosition (QCustomPlotparentPlot,
QCPAbstractItemparentItem,
const QString & name 
)
-
-

Creates a new QCPItemPosition. You shouldn't create QCPItemPosition instances directly, even if you want to make a new item subclass. Use QCPAbstractItem::createPosition instead, as explained in the subclassing section of the QCPAbstractItem documentation.

- -
-
-

Member Function Documentation

- -

§ type()

- -
-
- - - - - -
- - - - - - - -
QCPItemPosition::PositionType * QCPItemPosition::type () const
-
-inline
-
-

Returns the current position type.

-

If different types were set for X and Y (setTypeX, setTypeY), this method returns the type of the X coordinate. In that case rather use typeX() and typeY().

-
See also
setType
- -
-
- -

§ parentAnchor()

- -
-
- - - - - -
- - - - - - - -
QCPItemAnchor * QCPItemPosition::parentAnchor () const
-
-inline
-
-

Returns the current parent anchor.

-

If different parent anchors were set for X and Y (setParentAnchorX, setParentAnchorY), this method returns the parent anchor of the Y coordinate. In that case rather use parentAnchorX() and parentAnchorY().

-
See also
setParentAnchor
- -
-
- -

§ pixelPosition()

- -
-
- - - - - -
- - - - - - - -
QPointF QCPItemPosition::pixelPosition () const
-
-virtual
-
-

Returns the final absolute pixel position of the QCPItemPosition on the QCustomPlot surface. It includes all effects of type (setType) and possible parent anchors (setParentAnchor).

-
See also
setPixelPosition
- -

Reimplemented from QCPItemAnchor.

- -
-
- -

§ setType()

- -
-
- - - - - - - - -
void QCPItemPosition::setType (QCPItemPosition::PositionType type)
-
-

Sets the type of the position. The type defines how the coordinates passed to setCoords should be handled and how the QCPItemPosition should behave in the plot.

-

The possible values for type can be separated in two main categories:

-
    -
  • The position is regarded as a point in plot coordinates. This corresponds to ptPlotCoords and requires two axes that define the plot coordinate system. They can be specified with setAxes. By default, the QCustomPlot's x- and yAxis are used.
  • -
- -

Note that the position type ptPlotCoords is only available (and sensible) when the position has no parent anchor (setParentAnchor).

-

If the type is changed, the apparent pixel position on the plot is preserved. This means the coordinates as retrieved with coords() and set with setCoords may change in the process.

-

This method sets the type for both X and Y directions. It is also possible to set different types for X and Y, see setTypeX, setTypeY.

- -
-
- -

§ setTypeX()

- -
-
- - - - - - - - -
void QCPItemPosition::setTypeX (QCPItemPosition::PositionType type)
-
-

This method sets the position type of the X coordinate to type.

-

For a detailed description of what a position type is, see the documentation of setType.

-
See also
setType, setTypeY
- -
-
- -

§ setTypeY()

- -
-
- - - - - - - - -
void QCPItemPosition::setTypeY (QCPItemPosition::PositionType type)
-
-

This method sets the position type of the Y coordinate to type.

-

For a detailed description of what a position type is, see the documentation of setType.

-
See also
setType, setTypeX
- -
-
- -

§ setParentAnchor()

- -
-
- - - - - - - - - - - - - - - - - - -
bool QCPItemPosition::setParentAnchor (QCPItemAnchorparentAnchor,
bool keepPixelPosition = false 
)
-
-

Sets the parent of this QCPItemPosition to parentAnchor. This means the position will now follow any position changes of the anchor. The local coordinate system of positions with a parent anchor always is absolute pixels, with (0, 0) being exactly on top of the parent anchor. (Hence the type shouldn't be set to ptPlotCoords for positions with parent anchors.)

-

if keepPixelPosition is true, the current pixel position of the QCPItemPosition is preserved during reparenting. If it's set to false, the coordinates are set to (0, 0), i.e. the position will be exactly on top of the parent anchor.

-

To remove this QCPItemPosition from any parent anchor, set parentAnchor to nullptr.

-

If the QCPItemPosition previously had no parent and the type is ptPlotCoords, the type is set to ptAbsolute, to keep the position in a valid state.

-

This method sets the parent anchor for both X and Y directions. It is also possible to set different parents for X and Y, see setParentAnchorX, setParentAnchorY.

- -
-
- -

§ setParentAnchorX()

- -
-
- - - - - - - - - - - - - - - - - - -
bool QCPItemPosition::setParentAnchorX (QCPItemAnchorparentAnchor,
bool keepPixelPosition = false 
)
-
-

This method sets the parent anchor of the X coordinate to parentAnchor.

-

For a detailed description of what a parent anchor is, see the documentation of setParentAnchor.

-
See also
setParentAnchor, setParentAnchorY
- -
-
- -

§ setParentAnchorY()

- -
-
- - - - - - - - - - - - - - - - - - -
bool QCPItemPosition::setParentAnchorY (QCPItemAnchorparentAnchor,
bool keepPixelPosition = false 
)
-
-

This method sets the parent anchor of the Y coordinate to parentAnchor.

-

For a detailed description of what a parent anchor is, see the documentation of setParentAnchor.

-
See also
setParentAnchor, setParentAnchorX
- -
-
- -

§ setCoords() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPItemPosition::setCoords (double key,
double value 
)
-
-

Sets the coordinates of this QCPItemPosition. What the coordinates mean, is defined by the type (setType, setTypeX, setTypeY).

-

For example, if the type is ptAbsolute, key and value mean the x and y pixel position on the QCustomPlot surface. In that case the origin (0, 0) is in the top left corner of the QCustomPlot viewport. If the type is ptPlotCoords, key and value mean a point in the plot coordinate system defined by the axes set by setAxes. By default those are the QCustomPlot's xAxis and yAxis. See the documentation of setType for other available coordinate types and their meaning.

-

If different types were configured for X and Y (setTypeX, setTypeY), key and value must also be provided in the different coordinate systems. Here, the X type refers to key, and the Y type refers to value.

-
See also
setPixelPosition
- -
-
- -

§ setCoords() [2/2]

- -
-
- - - - - - - - -
void QCPItemPosition::setCoords (const QPointF & pos)
-
-

This is an overloaded function.

-

Sets the coordinates as a QPointF pos where pos.x has the meaning of key and pos.y the meaning of value of the setCoords(double key, double value) method.

- -
-
- -

§ setAxes()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPItemPosition::setAxes (QCPAxiskeyAxis,
QCPAxisvalueAxis 
)
-
-

When setType is ptPlotCoords, this function may be used to specify the axes the coordinates set with setCoords relate to. By default they are set to the initial xAxis and yAxis of the QCustomPlot.

- -
-
- -

§ setAxisRect()

- -
-
- - - - - - - - -
void QCPItemPosition::setAxisRect (QCPAxisRectaxisRect)
-
-

When setType is ptAxisRectRatio, this function may be used to specify the axis rect the coordinates set with setCoords relate to. By default this is set to the main axis rect of the QCustomPlot.

- -
-
- -

§ setPixelPosition()

- -
-
- - - - - - - - -
void QCPItemPosition::setPixelPosition (const QPointF & pixelPosition)
-
-

Sets the apparent pixel position. This works no matter what type (setType) this QCPItemPosition is or what parent-child situation it is in, as coordinates are transformed appropriately, to make the position finally appear at the specified pixel values.

-

Only if the type is ptAbsolute and no parent anchor is set, this function's effect is identical to that of setCoords.

-
See also
pixelPosition, setCoords
- -
-
- -

§ toQCPItemPosition()

- -
-
- - - - - -
- - - - - - - -
virtual QCPItemPosition* QCPItemPosition::toQCPItemPosition ()
-
-inlineprotectedvirtual
-
-

Returns nullptr if this instance is merely a QCPItemAnchor, and a valid pointer of type QCPItemPosition* if it actually is a QCPItemPosition (which is a subclass of QCPItemAnchor).

-

This safe downcast functionality could also be achieved with a dynamic_cast. However, QCustomPlot avoids dynamic_cast to work with projects that don't have RTTI support enabled (e.g. -fno-rtti flag with gcc compiler).

- -

Reimplemented from QCPItemAnchor.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/item.h
  • -
  • src/item.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPItemPosition__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPItemPosition__inherit__graph.png deleted file mode 100644 index 67e9bda2..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPItemPosition__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPItemRect.html b/third_party/qcustomplot/documentation/html/classQCPItemRect.html deleted file mode 100644 index 0d31d8c1..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPItemRect.html +++ /dev/null @@ -1,511 +0,0 @@ - - - - - - -QCPItemRect Class Reference - - - - -
- -
-
QCPItemRect Class Reference
-
-
- -

A rectangle. - More...

-
-Inheritance diagram for QCPItemRect:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPItemRect (QCustomPlot *parentPlot)
 
-QPen pen () const
 
-QPen selectedPen () const
 
-QBrush brush () const
 
-QBrush selectedBrush () const
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setSelectedBrush (const QBrush &brush)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPAbstractItem
 QCPAbstractItem (QCustomPlot *parentPlot)
 
-bool clipToAxisRect () const
 
-QCPAxisRectclipAxisRect () const
 
-bool selectable () const
 
-bool selected () const
 
void setClipToAxisRect (bool clip)
 
void setClipAxisRect (QCPAxisRect *rect)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
QList< QCPItemPosition * > positions () const
 
QList< QCPItemAnchor * > anchors () const
 
QCPItemPositionposition (const QString &name) const
 
QCPItemAnchoranchor (const QString &name) const
 
bool hasAnchor (const QString &name) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - -

-Public Members

-QCPItemPosition *const topLeft
 
-QCPItemPosition *const bottomRight
 
-QCPItemAnchor *const top
 
-QCPItemAnchor *const topRight
 
-QCPItemAnchor *const right
 
-QCPItemAnchor *const bottom
 
-QCPItemAnchor *const bottomLeft
 
-QCPItemAnchor *const left
 
- - - -

-Protected Types

enum  AnchorIndex
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual QPointF anchorPixelPosition (int anchorId) const
 
QPen mainPen () const
 
QBrush mainBrush () const
 
- Protected Functions inherited from QCPAbstractItem
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
double rectDistance (const QRectF &rect, const QPointF &pos, bool filledRect) const
 
QCPItemPositioncreatePosition (const QString &name)
 
QCPItemAnchorcreateAnchor (const QString &name, int anchorId)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractItem
void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A rectangle.

-
-QCPItemRect.png -
-Rectangle example. Blue dotted circles are anchors, solid blue discs are positions.
-

It has two positions, topLeft and bottomRight, which define the rectangle.

-

Constructor & Destructor Documentation

- -

§ QCPItemRect()

- -
-
- - - - - -
- - - - - - - - -
QCPItemRect::QCPItemRect (QCustomPlotparentPlot)
-
-explicit
-
-

Creates a rectangle item and sets default values.

-

The created item is automatically registered with parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.

- -
-
-

Member Function Documentation

- -

§ setPen()

- -
-
- - - - - - - - -
void QCPItemRect::setPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line of the rectangle

-
See also
setSelectedPen, setBrush
- -
-
- -

§ setSelectedPen()

- -
-
- - - - - - - - -
void QCPItemRect::setSelectedPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line of the rectangle when selected

-
See also
setPen, setSelected
- -
-
- -

§ setBrush()

- -
-
- - - - - - - - -
void QCPItemRect::setBrush (const QBrush & brush)
-
-

Sets the brush that will be used to fill the rectangle. To disable filling, set brush to Qt::NoBrush.

-
See also
setSelectedBrush, setPen
- -
-
- -

§ setSelectedBrush()

- -
-
- - - - - - - - -
void QCPItemRect::setSelectedBrush (const QBrush & brush)
-
-

Sets the brush that will be used to fill the rectangle when selected. To disable filling, set brush to Qt::NoBrush.

-
See also
setBrush
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPItemRect::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Implements QCPAbstractItem.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemRect::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws this item with the provided painter.

-

The cliprect of the provided painter is set to the rect returned by clipRect before this function is called. The clipRect depends on the clipping settings defined by setClipToAxisRect and setClipAxisRect.

- -

Implements QCPAbstractItem.

- -
-
- -

§ anchorPixelPosition()

- -
-
- - - - - -
- - - - - - - - -
QPointF QCPItemRect::anchorPixelPosition (int anchorId) const
-
-protectedvirtual
-
-

Returns the pixel position of the anchor with Id anchorId. This function must be reimplemented in item subclasses if they want to provide anchors (QCPItemAnchor).

-

For example, if the item has two anchors with id 0 and 1, this function takes one of these anchor ids and returns the respective pixel points of the specified anchor.

-
See also
createAnchor
- -

Reimplemented from QCPAbstractItem.

- -
-
- -

§ mainPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPItemRect::mainPen () const
-
-protected
-
-

Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is.

- -
-
- -

§ mainBrush()

- -
-
- - - - - -
- - - - - - - -
QBrush QCPItemRect::mainBrush () const
-
-protected
-
-

Returns the brush that should be used for drawing fills of the item. Returns mBrush when the item is not selected and mSelectedBrush when it is.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/items/item-rect.h
  • -
  • src/items/item-rect.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPItemRect__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPItemRect__inherit__graph.png deleted file mode 100644 index 87b2afac..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPItemRect__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPItemStraightLine.html b/third_party/qcustomplot/documentation/html/classQCPItemStraightLine.html deleted file mode 100644 index 26c3966c..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPItemStraightLine.html +++ /dev/null @@ -1,424 +0,0 @@ - - - - - - -QCPItemStraightLine Class Reference - - - - -
- -
-
QCPItemStraightLine Class Reference
-
-
- -

A straight line that spans infinitely in both directions. - More...

-
-Inheritance diagram for QCPItemStraightLine:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPItemStraightLine (QCustomPlot *parentPlot)
 
-QPen pen () const
 
-QPen selectedPen () const
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPAbstractItem
 QCPAbstractItem (QCustomPlot *parentPlot)
 
-bool clipToAxisRect () const
 
-QCPAxisRectclipAxisRect () const
 
-bool selectable () const
 
-bool selected () const
 
void setClipToAxisRect (bool clip)
 
void setClipAxisRect (QCPAxisRect *rect)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
QList< QCPItemPosition * > positions () const
 
QList< QCPItemAnchor * > anchors () const
 
QCPItemPositionposition (const QString &name) const
 
QCPItemAnchoranchor (const QString &name) const
 
bool hasAnchor (const QString &name) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - -

-Public Members

-QCPItemPosition *const point1
 
-QCPItemPosition *const point2
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
QLineF getRectClippedStraightLine (const QCPVector2D &base, const QCPVector2D &vec, const QRect &rect) const
 
QPen mainPen () const
 
- Protected Functions inherited from QCPAbstractItem
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual QPointF anchorPixelPosition (int anchorId) const
 
double rectDistance (const QRectF &rect, const QPointF &pos, bool filledRect) const
 
QCPItemPositioncreatePosition (const QString &name)
 
QCPItemAnchorcreateAnchor (const QString &name, int anchorId)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractItem
void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A straight line that spans infinitely in both directions.

-
-QCPItemStraightLine.png -
-Straight line example. Blue dotted circles are anchors, solid blue discs are positions.
-

It has two positions, point1 and point2, which define the straight line.

-

Constructor & Destructor Documentation

- -

§ QCPItemStraightLine()

- -
-
- - - - - -
- - - - - - - - -
QCPItemStraightLine::QCPItemStraightLine (QCustomPlotparentPlot)
-
-explicit
-
-

Creates a straight line item and sets default values.

-

The created item is automatically registered with parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.

- -
-
-

Member Function Documentation

- -

§ setPen()

- -
-
- - - - - - - - -
void QCPItemStraightLine::setPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line

-
See also
setSelectedPen
- -
-
- -

§ setSelectedPen()

- -
-
- - - - - - - - -
void QCPItemStraightLine::setSelectedPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line when selected

-
See also
setPen, setSelected
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPItemStraightLine::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Implements QCPAbstractItem.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemStraightLine::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws this item with the provided painter.

-

The cliprect of the provided painter is set to the rect returned by clipRect before this function is called. The clipRect depends on the clipping settings defined by setClipToAxisRect and setClipAxisRect.

- -

Implements QCPAbstractItem.

- -
-
- -

§ getRectClippedStraightLine()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QLineF QCPItemStraightLine::getRectClippedStraightLine (const QCPVector2Dbase,
const QCPVector2Dvec,
const QRect & rect 
) const
-
-protected
-
-

Returns the section of the straight line defined by base and direction vector vec, that is visible in the specified rect.

-

This is a helper function for draw.

- -
-
- -

§ mainPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPItemStraightLine::mainPen () const
-
-protected
-
-

Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/items/item-straightline.h
  • -
  • src/items/item-straightline.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPItemStraightLine__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPItemStraightLine__inherit__graph.png deleted file mode 100644 index d39a05bf..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPItemStraightLine__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPItemText.html b/third_party/qcustomplot/documentation/html/classQCPItemText.html deleted file mode 100644 index 28972f41..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPItemText.html +++ /dev/null @@ -1,843 +0,0 @@ - - - - - - -QCPItemText Class Reference - - - - -
- -
-
QCPItemText Class Reference
-
-
- -

A text label. - More...

-
-Inheritance diagram for QCPItemText:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPItemText (QCustomPlot *parentPlot)
 
-QColor color () const
 
-QColor selectedColor () const
 
-QPen pen () const
 
-QPen selectedPen () const
 
-QBrush brush () const
 
-QBrush selectedBrush () const
 
-QFont font () const
 
-QFont selectedFont () const
 
-QString text () const
 
-Qt::Alignment positionAlignment () const
 
-Qt::Alignment textAlignment () const
 
-double rotation () const
 
-QMargins padding () const
 
void setColor (const QColor &color)
 
void setSelectedColor (const QColor &color)
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setSelectedBrush (const QBrush &brush)
 
void setFont (const QFont &font)
 
void setSelectedFont (const QFont &font)
 
void setText (const QString &text)
 
void setPositionAlignment (Qt::Alignment alignment)
 
void setTextAlignment (Qt::Alignment alignment)
 
void setRotation (double degrees)
 
void setPadding (const QMargins &padding)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPAbstractItem
 QCPAbstractItem (QCustomPlot *parentPlot)
 
-bool clipToAxisRect () const
 
-QCPAxisRectclipAxisRect () const
 
-bool selectable () const
 
-bool selected () const
 
void setClipToAxisRect (bool clip)
 
void setClipAxisRect (QCPAxisRect *rect)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
QList< QCPItemPosition * > positions () const
 
QList< QCPItemAnchor * > anchors () const
 
QCPItemPositionposition (const QString &name) const
 
QCPItemAnchoranchor (const QString &name) const
 
bool hasAnchor (const QString &name) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - -

-Public Members

-QCPItemPosition *const position
 
-QCPItemAnchor *const topLeft
 
-QCPItemAnchor *const top
 
-QCPItemAnchor *const topRight
 
-QCPItemAnchor *const right
 
-QCPItemAnchor *const bottomRight
 
-QCPItemAnchor *const bottom
 
-QCPItemAnchor *const bottomLeft
 
-QCPItemAnchor *const left
 
- - - -

-Protected Types

enum  AnchorIndex
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual QPointF anchorPixelPosition (int anchorId) const
 
QPointF getTextDrawPoint (const QPointF &pos, const QRectF &rect, Qt::Alignment positionAlignment) const
 
QFont mainFont () const
 
QColor mainColor () const
 
QPen mainPen () const
 
QBrush mainBrush () const
 
- Protected Functions inherited from QCPAbstractItem
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
double rectDistance (const QRectF &rect, const QPointF &pos, bool filledRect) const
 
QCPItemPositioncreatePosition (const QString &name)
 
QCPItemAnchorcreateAnchor (const QString &name, int anchorId)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractItem
void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A text label.

-
-QCPItemText.png -
-Text example. Blue dotted circles are anchors, solid blue discs are positions.
-

Its position is defined by the member position and the setting of setPositionAlignment. The latter controls which part of the text rect shall be aligned with position.

-

The text alignment itself (i.e. left, center, right) can be controlled with setTextAlignment.

-

The text may be rotated around the position point with setRotation.

-

Constructor & Destructor Documentation

- -

§ QCPItemText()

- -
-
- - - - - -
- - - - - - - - -
QCPItemText::QCPItemText (QCustomPlotparentPlot)
-
-explicit
-
-

Creates a text item and sets default values.

-

The created item is automatically registered with parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.

- -
-
-

Member Function Documentation

- -

§ setColor()

- -
-
- - - - - - - - -
void QCPItemText::setColor (const QColor & color)
-
-

Sets the color of the text.

- -
-
- -

§ setSelectedColor()

- -
-
- - - - - - - - -
void QCPItemText::setSelectedColor (const QColor & color)
-
-

Sets the color of the text that will be used when the item is selected.

- -
-
- -

§ setPen()

- -
-
- - - - - - - - -
void QCPItemText::setPen (const QPen & pen)
-
-

Sets the pen that will be used do draw a rectangular border around the text. To disable the border, set pen to Qt::NoPen.

-
See also
setSelectedPen, setBrush, setPadding
- -
-
- -

§ setSelectedPen()

- -
-
- - - - - - - - -
void QCPItemText::setSelectedPen (const QPen & pen)
-
-

Sets the pen that will be used do draw a rectangular border around the text, when the item is selected. To disable the border, set pen to Qt::NoPen.

-
See also
setPen
- -
-
- -

§ setBrush()

- -
-
- - - - - - - - -
void QCPItemText::setBrush (const QBrush & brush)
-
-

Sets the brush that will be used do fill the background of the text. To disable the background, set brush to Qt::NoBrush.

-
See also
setSelectedBrush, setPen, setPadding
- -
-
- -

§ setSelectedBrush()

- -
-
- - - - - - - - -
void QCPItemText::setSelectedBrush (const QBrush & brush)
-
-

Sets the brush that will be used do fill the background of the text, when the item is selected. To disable the background, set brush to Qt::NoBrush.

-
See also
setBrush
- -
-
- -

§ setFont()

- -
-
- - - - - - - - -
void QCPItemText::setFont (const QFont & font)
-
-

Sets the font of the text.

-
See also
setSelectedFont, setColor
- -
-
- -

§ setSelectedFont()

- -
-
- - - - - - - - -
void QCPItemText::setSelectedFont (const QFont & font)
-
-

Sets the font of the text that will be used when the item is selected.

-
See also
setFont
- -
-
- -

§ setText()

- -
-
- - - - - - - - -
void QCPItemText::setText (const QString & text)
-
-

Sets the text that will be displayed. Multi-line texts are supported by inserting a line break character, e.g. '
-'.

-
See also
setFont, setColor, setTextAlignment
- -
-
- -

§ setPositionAlignment()

- -
-
- - - - - - - - -
void QCPItemText::setPositionAlignment (Qt::Alignment alignment)
-
-

Sets which point of the text rect shall be aligned with position.

-

Examples:

    -
  • If alignment is Qt::AlignHCenter | Qt::AlignTop, the text will be positioned such that the top of the text rect will be horizontally centered on position.
  • -
  • If alignment is Qt::AlignLeft | Qt::AlignBottom, position will indicate the bottom left corner of the text rect.
  • -
-

If you want to control the alignment of (multi-lined) text within the text rect, use setTextAlignment.

- -
-
- -

§ setTextAlignment()

- -
-
- - - - - - - - -
void QCPItemText::setTextAlignment (Qt::Alignment alignment)
-
-

Controls how (multi-lined) text is aligned inside the text rect (typically Qt::AlignLeft, Qt::AlignCenter or Qt::AlignRight).

- -
-
- -

§ setRotation()

- -
-
- - - - - - - - -
void QCPItemText::setRotation (double degrees)
-
-

Sets the angle in degrees by which the text (and the text rectangle, if visible) will be rotated around position.

- -
-
- -

§ setPadding()

- -
-
- - - - - - - - -
void QCPItemText::setPadding (const QMargins & padding)
-
-

Sets the distance between the border of the text rectangle and the text. The appearance (and visibility) of the text rectangle can be controlled with setPen and setBrush.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPItemText::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Implements QCPAbstractItem.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemText::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws this item with the provided painter.

-

The cliprect of the provided painter is set to the rect returned by clipRect before this function is called. The clipRect depends on the clipping settings defined by setClipToAxisRect and setClipAxisRect.

- -

Implements QCPAbstractItem.

- -
-
- -

§ anchorPixelPosition()

- -
-
- - - - - -
- - - - - - - - -
QPointF QCPItemText::anchorPixelPosition (int anchorId) const
-
-protectedvirtual
-
-

Returns the pixel position of the anchor with Id anchorId. This function must be reimplemented in item subclasses if they want to provide anchors (QCPItemAnchor).

-

For example, if the item has two anchors with id 0 and 1, this function takes one of these anchor ids and returns the respective pixel points of the specified anchor.

-
See also
createAnchor
- -

Reimplemented from QCPAbstractItem.

- -
-
- -

§ getTextDrawPoint()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QPointF QCPItemText::getTextDrawPoint (const QPointF & pos,
const QRectF & rect,
Qt::Alignment positionAlignment 
) const
-
-protected
-
-

Returns the point that must be given to the QPainter::drawText function (which expects the top left point of the text rect), according to the position pos, the text bounding box rect and the requested positionAlignment.

-

For example, if positionAlignment is Qt::AlignLeft | Qt::AlignBottom the returned point will be shifted upward by the height of rect, starting from pos. So if the text is finally drawn at that point, the lower left corner of the resulting text rect is at pos.

- -
-
- -

§ mainFont()

- -
-
- - - - - -
- - - - - - - -
QFont QCPItemText::mainFont () const
-
-protected
-
-

Returns the font that should be used for drawing text. Returns mFont when the item is not selected and mSelectedFont when it is.

- -
-
- -

§ mainColor()

- -
-
- - - - - -
- - - - - - - -
QColor QCPItemText::mainColor () const
-
-protected
-
-

Returns the color that should be used for drawing text. Returns mColor when the item is not selected and mSelectedColor when it is.

- -
-
- -

§ mainPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPItemText::mainPen () const
-
-protected
-
-

Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is.

- -
-
- -

§ mainBrush()

- -
-
- - - - - -
- - - - - - - -
QBrush QCPItemText::mainBrush () const
-
-protected
-
-

Returns the brush that should be used for drawing fills of the item. Returns mBrush when the item is not selected and mSelectedBrush when it is.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/items/item-text.h
  • -
  • src/items/item-text.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPItemText__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPItemText__inherit__graph.png deleted file mode 100644 index 29fb2e20..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPItemText__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPItemTracer.html b/third_party/qcustomplot/documentation/html/classQCPItemTracer.html deleted file mode 100644 index a8d0a1cd..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPItemTracer.html +++ /dev/null @@ -1,641 +0,0 @@ - - - - - - -QCPItemTracer Class Reference - - - - -
- -
-
QCPItemTracer Class Reference
-
-
- -

Item that sticks to QCPGraph data points. - More...

-
-Inheritance diagram for QCPItemTracer:
-
-
Inheritance graph
- - - - -
- - - - -

-Public Types

enum  TracerStyle
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPItemTracer (QCustomPlot *parentPlot)
 
-QPen pen () const
 
-QPen selectedPen () const
 
-QBrush brush () const
 
-QBrush selectedBrush () const
 
-double size () const
 
-TracerStyle style () const
 
-QCPGraphgraph () const
 
-double graphKey () const
 
-bool interpolating () const
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setSelectedBrush (const QBrush &brush)
 
void setSize (double size)
 
void setStyle (TracerStyle style)
 
void setGraph (QCPGraph *graph)
 
void setGraphKey (double key)
 
void setInterpolating (bool enabled)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
void updatePosition ()
 
- Public Functions inherited from QCPAbstractItem
 QCPAbstractItem (QCustomPlot *parentPlot)
 
-bool clipToAxisRect () const
 
-QCPAxisRectclipAxisRect () const
 
-bool selectable () const
 
-bool selected () const
 
void setClipToAxisRect (bool clip)
 
void setClipAxisRect (QCPAxisRect *rect)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
QList< QCPItemPosition * > positions () const
 
QList< QCPItemAnchor * > anchors () const
 
QCPItemPositionposition (const QString &name) const
 
QCPItemAnchoranchor (const QString &name) const
 
bool hasAnchor (const QString &name) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - -

-Public Members

-QCPItemPosition *const position
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
QPen mainPen () const
 
QBrush mainBrush () const
 
- Protected Functions inherited from QCPAbstractItem
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual QPointF anchorPixelPosition (int anchorId) const
 
double rectDistance (const QRectF &rect, const QPointF &pos, bool filledRect) const
 
QCPItemPositioncreatePosition (const QString &name)
 
QCPItemAnchorcreateAnchor (const QString &name, int anchorId)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractItem
void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

Item that sticks to QCPGraph data points.

-
-QCPItemTracer.png -
-Tracer example. Blue dotted circles are anchors, solid blue discs are positions.
-

The tracer can be connected with a QCPGraph via setGraph. Then it will automatically adopt the coordinate axes of the graph and update its position to be on the graph's data. This means the key stays controllable via setGraphKey, but the value will follow the graph data. If a QCPGraph is connected, note that setting the coordinates of the tracer item directly via position will have no effect because they will be overriden in the next redraw (this is when the coordinate update happens).

-

If the specified key in setGraphKey is outside the key bounds of the graph, the tracer will stay at the corresponding end of the graph.

-

With setInterpolating you may specify whether the tracer may only stay exactly on data points or whether it interpolates data points linearly, if given a key that lies between two data points of the graph.

-

The tracer has different visual styles, see setStyle. It is also possible to make the tracer have no own visual appearance (set the style to tsNone), and just connect other item positions to the tracer position (used as an anchor) via QCPItemPosition::setParentAnchor.

-
Note
The tracer position is only automatically updated upon redraws. So when the data of the graph changes and immediately afterwards (without a redraw) the position coordinates of the tracer are retrieved, they will not reflect the updated data of the graph. In this case updatePosition must be called manually, prior to reading the tracer coordinates.
-

Member Enumeration Documentation

- -

§ TracerStyle

- -
-
- - - - -
enum QCPItemTracer::TracerStyle
-
-

The different visual appearances a tracer item can have. Some styles size may be controlled with setSize.

-
See also
setStyle
- - - - - - -
Enumerator
tsNone 

The tracer is not visible.

-
tsPlus 

A plus shaped crosshair with limited size.

-
tsCrosshair 

A plus shaped crosshair which spans the complete axis rect.

-
tsCircle 

A circle.

-
tsSquare 

A square.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPItemTracer()

- -
-
- - - - - -
- - - - - - - - -
QCPItemTracer::QCPItemTracer (QCustomPlotparentPlot)
-
-explicit
-
-

Creates a tracer item and sets default values.

-

The created item is automatically registered with parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.

- -
-
-

Member Function Documentation

- -

§ setPen()

- -
-
- - - - - - - - -
void QCPItemTracer::setPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line of the tracer

-
See also
setSelectedPen, setBrush
- -
-
- -

§ setSelectedPen()

- -
-
- - - - - - - - -
void QCPItemTracer::setSelectedPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the line of the tracer when selected

-
See also
setPen, setSelected
- -
-
- -

§ setBrush()

- -
-
- - - - - - - - -
void QCPItemTracer::setBrush (const QBrush & brush)
-
-

Sets the brush that will be used to draw any fills of the tracer

-
See also
setSelectedBrush, setPen
- -
-
- -

§ setSelectedBrush()

- -
-
- - - - - - - - -
void QCPItemTracer::setSelectedBrush (const QBrush & brush)
-
-

Sets the brush that will be used to draw any fills of the tracer, when selected.

-
See also
setBrush, setSelected
- -
-
- -

§ setSize()

- -
-
- - - - - - - - -
void QCPItemTracer::setSize (double size)
-
-

Sets the size of the tracer in pixels, if the style supports setting a size (e.g. tsSquare does, tsCrosshair does not).

- -
-
- -

§ setStyle()

- -
-
- - - - - - - - -
void QCPItemTracer::setStyle (QCPItemTracer::TracerStyle style)
-
-

Sets the style/visual appearance of the tracer.

-

If you only want to use the tracer position as an anchor for other items, set style to tsNone.

- -
-
- -

§ setGraph()

- -
-
- - - - - - - - -
void QCPItemTracer::setGraph (QCPGraphgraph)
-
-

Sets the QCPGraph this tracer sticks to. The tracer position will be set to type QCPItemPosition::ptPlotCoords and the axes will be set to the axes of graph.

-

To free the tracer from any graph, set graph to nullptr. The tracer position can then be placed freely like any other item position. This is the state the tracer will assume when its graph gets deleted while still attached to it.

-
See also
setGraphKey
- -
-
- -

§ setGraphKey()

- -
-
- - - - - - - - -
void QCPItemTracer::setGraphKey (double key)
-
-

Sets the key of the graph's data point the tracer will be positioned at. This is the only free coordinate of a tracer when attached to a graph.

-

Depending on setInterpolating, the tracer will be either positioned on the data point closest to key, or will stay exactly at key and interpolate the value linearly.

-
See also
setGraph, setInterpolating
- -
-
- -

§ setInterpolating()

- -
-
- - - - - - - - -
void QCPItemTracer::setInterpolating (bool enabled)
-
-

Sets whether the value of the graph's data points shall be interpolated, when positioning the tracer.

-

If enabled is set to false and a key is given with setGraphKey, the tracer is placed on the data point of the graph which is closest to the key, but which is not necessarily exactly there. If enabled is true, the tracer will be positioned exactly at the specified key, and the appropriate value will be interpolated from the graph's data points linearly.

-
See also
setGraph, setGraphKey
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPItemTracer::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Implements QCPAbstractItem.

- -
-
- -

§ updatePosition()

- -
-
- - - - - - - -
void QCPItemTracer::updatePosition ()
-
-

If the tracer is connected with a graph (setGraph), this function updates the tracer's position to reside on the graph data, depending on the configured key (setGraphKey).

-

It is called automatically on every redraw and normally doesn't need to be called manually. One exception is when you want to read the tracer coordinates via position and are not sure that the graph's data (or the tracer key with setGraphKey) hasn't changed since the last redraw. In that situation, call this function before accessing position, to make sure you don't get out-of-date coordinates.

-

If there is no graph set on this tracer, this function does nothing.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPItemTracer::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws this item with the provided painter.

-

The cliprect of the provided painter is set to the rect returned by clipRect before this function is called. The clipRect depends on the clipping settings defined by setClipToAxisRect and setClipAxisRect.

- -

Implements QCPAbstractItem.

- -
-
- -

§ mainPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPItemTracer::mainPen () const
-
-protected
-
-

Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is.

- -
-
- -

§ mainBrush()

- -
-
- - - - - -
- - - - - - - -
QBrush QCPItemTracer::mainBrush () const
-
-protected
-
-

Returns the brush that should be used for drawing fills of the item. Returns mBrush when the item is not selected and mSelectedBrush when it is.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/items/item-tracer.h
  • -
  • src/items/item-tracer.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPItemTracer__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPItemTracer__inherit__graph.png deleted file mode 100644 index bd25db9a..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPItemTracer__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPLayer.html b/third_party/qcustomplot/documentation/html/classQCPLayer.html deleted file mode 100644 index b15adbca..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPLayer.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - -QCPLayer Class Reference - - - - -
- -
-
QCPLayer Class Reference
-
-
- -

A layer that may contain objects, to control the rendering order. - More...

- -

Inherits QObject.

- - - - -

-Public Types

enum  LayerMode
 
- - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPLayer (QCustomPlot *parentPlot, const QString &layerName)
 
-QCustomPlotparentPlot () const
 
-QString name () const
 
int index () const
 
QList< QCPLayerable * > children () const
 
-bool visible () const
 
-LayerMode mode () const
 
void setVisible (bool visible)
 
void setMode (LayerMode mode)
 
void replot ()
 
- - - - - - - - - -

-Protected Functions

void draw (QCPPainter *painter)
 
void drawToPaintBuffer ()
 
void addChild (QCPLayerable *layerable, bool prepend)
 
void removeChild (QCPLayerable *layerable)
 
-

Detailed Description

-

A layer that may contain objects, to control the rendering order.

-

The Layering system of QCustomPlot is the mechanism to control the rendering order of the elements inside the plot.

-

It is based on the two classes QCPLayer and QCPLayerable. QCustomPlot holds an ordered list of one or more instances of QCPLayer (see QCustomPlot::addLayer, QCustomPlot::layer, QCustomPlot::moveLayer, etc.). When replotting, QCustomPlot goes through the list of layers bottom to top and successively draws the layerables of the layers into the paint buffer(s).

-

A QCPLayer contains an ordered list of QCPLayerable instances. QCPLayerable is an abstract base class from which almost all visible objects derive, like axes, grids, graphs, items, etc.

-

-Default layers

-

Initially, QCustomPlot has six layers: "background", "grid", "main", "axes", "legend" and "overlay" (in that order). On top is the "overlay" layer, which only contains the QCustomPlot's selection rect (QCustomPlot::selectionRect). The next two layers "axes" and "legend" contain the default axes and legend, so they will be drawn above plottables. In the middle, there is the "main" layer. It is initially empty and set as the current layer (see QCustomPlot::setCurrentLayer). This means, all new plottables, items etc. are created on this layer by default. Then comes the "grid" layer which contains the QCPGrid instances (which belong tightly to QCPAxis, see QCPAxis::grid). The Axis rect background shall be drawn behind everything else, thus the default QCPAxisRect instance is placed on the "background" layer. Of course, the layer affiliation of the individual objects can be changed as required (QCPLayerable::setLayer).

-

-Controlling the rendering order via layers

-

Controlling the ordering of layerables in the plot is easy: Create a new layer in the position you want the layerable to be in, e.g. above "main", with QCustomPlot::addLayer. Then set the current layer with QCustomPlot::setCurrentLayer to that new layer and finally create the objects normally. They will be placed on the new layer automatically, due to the current layer setting. Alternatively you could have also ignored the current layer setting and just moved the objects with QCPLayerable::setLayer to the desired layer after creating them.

-

It is also possible to move whole layers. For example, If you want the grid to be shown in front of all plottables/items on the "main" layer, just move it above "main" with QCustomPlot::moveLayer.

-

The rendering order within one layer is simply by order of creation or insertion. The item created last (or added last to the layer), is drawn on top of all other objects on that layer.

-

When a layer is deleted, the objects on it are not deleted with it, but fall on the layer below the deleted layer, see QCustomPlot::removeLayer.

-

-Replotting only a specific layer

-

If the layer mode (setMode) is set to lmBuffered, you can replot only this specific layer by calling replot. In certain situations this can provide better replot performance, compared with a full replot of all layers. Upon creation of a new layer, the layer mode is initialized to lmLogical. The only layer that is set to lmBuffered in a new QCustomPlot instance is the "overlay" layer, containing the selection rect.

-

Member Enumeration Documentation

- -

§ LayerMode

- -
-
- - - - -
enum QCPLayer::LayerMode
-
-

Defines the different rendering modes of a layer. Depending on the mode, certain layers can be replotted individually, without the need to replot (possibly complex) layerables on other layers.

-
See also
setMode
- - - -
Enumerator
lmLogical 

Layer is used only for rendering order, and shares paint buffer with all other adjacent logical layers.

-
lmBuffered 

Layer has its own paint buffer and may be replotted individually (see replot).

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPLayer()

- -
-
- - - - - - - - - - - - - - - - - - -
QCPLayer::QCPLayer (QCustomPlotparentPlot,
const QString & layerName 
)
-
-

Creates a new QCPLayer instance.

-

Normally you shouldn't directly instantiate layers, use QCustomPlot::addLayer instead.

-
Warning
It is not checked that layerName is actually a unique layer name in parentPlot. This check is only performed by QCustomPlot::addLayer.
- -
-
-

Member Function Documentation

- -

§ index()

- -
-
- - - - - -
- - - - - - - -
int QCPLayer::index () const
-
-inline
-
-

Returns the index this layer has in the QCustomPlot. The index is the integer number by which this layer can be accessed via QCustomPlot::layer.

-

Layers with higher indices will be drawn above layers with lower indices.

- -
-
- -

§ children()

- -
-
- - - - - -
- - - - - - - -
QList< QCPLayerable * > QCPLayer::children () const
-
-inline
-
-

Returns a list of all layerables on this layer. The order corresponds to the rendering order: layerables with higher indices are drawn above layerables with lower indices.

- -
-
- -

§ setVisible()

- -
-
- - - - - - - - -
void QCPLayer::setVisible (bool visible)
-
-

Sets whether this layer is visible or not. If visible is set to false, all layerables on this layer will be invisible.

-

This function doesn't change the visibility property of the layerables (QCPLayerable::setVisible), but the QCPLayerable::realVisibility of each layerable takes the visibility of the parent layer into account.

- -
-
- -

§ setMode()

- -
-
- - - - - - - - -
void QCPLayer::setMode (QCPLayer::LayerMode mode)
-
-

Sets the rendering mode of this layer.

-

If mode is set to lmBuffered for a layer, it will be given a dedicated paint buffer by the parent QCustomPlot instance. This means it may be replotted individually by calling QCPLayer::replot, without needing to replot all other layers.

-

Layers which are set to lmLogical (the default) are used only to define the rendering order and can't be replotted individually.

-

Note that each layer which is set to lmBuffered requires additional paint buffers for the layers below, above and for the layer itself. This increases the memory consumption and (slightly) decreases the repainting speed because multiple paint buffers need to be joined. So you should carefully choose which layers benefit from having their own paint buffer. A typical example would be a layer which contains certain layerables (e.g. items) that need to be changed and thus replotted regularly, while all other layerables on other layers stay static. By default, only the topmost layer called "overlay" is in mode lmBuffered, and contains the selection rect.

-
See also
replot
- -
-
- -

§ replot()

- -
-
- - - - - - - -
void QCPLayer::replot ()
-
-

If the layer mode (setMode) is set to lmBuffered, this method allows replotting only the layerables on this specific layer, without the need to replot all other layers (as a call to QCustomPlot::replot would do).

-

QCustomPlot also makes sure to replot all layers instead of only this one, if the layer ordering or any layerable-layer-association has changed since the last full replot and any other paint buffers were thus invalidated.

-

If the layer mode is lmLogical however, this method simply calls QCustomPlot::replot on the parent QCustomPlot instance.

-
See also
draw
- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayer::draw (QCPPainterpainter)
-
-protected
-
-

Draws the contents of this layer with the provided painter.

-
See also
replot, drawToPaintBuffer
- -
-
- -

§ drawToPaintBuffer()

- -
-
- - - - - -
- - - - - - - -
void QCPLayer::drawToPaintBuffer ()
-
-protected
-
-

Draws the contents of this layer into the paint buffer which is associated with this layer. The association is established by the parent QCustomPlot, which manages all paint buffers (see QCustomPlot::setupPaintBuffers).

-
See also
draw
- -
-
- -

§ addChild()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPLayer::addChild (QCPLayerablelayerable,
bool prepend 
)
-
-protected
-
-

Adds the layerable to the list of this layer. If prepend is set to true, the layerable will be prepended to the list, i.e. be drawn beneath the other layerables already in the list.

-

This function does not change the mLayer member of layerable to this layer. (Use QCPLayerable::setLayer to change the layer of an object, not this function.)

-
See also
removeChild
- -
-
- -

§ removeChild()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayer::removeChild (QCPLayerablelayerable)
-
-protected
-
-

Removes the layerable from the list of this layer.

-

This function does not change the mLayer member of layerable. (Use QCPLayerable::setLayer to change the layer of an object, not this function.)

-
See also
addChild
- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layer.h
  • -
  • src/layer.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPLayerable.html b/third_party/qcustomplot/documentation/html/classQCPLayerable.html deleted file mode 100644 index 29fa18a7..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPLayerable.html +++ /dev/null @@ -1,995 +0,0 @@ - - - - - - -QCPLayerable Class Reference - - - - -
- -
-
QCPLayerable Class Referenceabstract
-
-
- -

Base class for all drawable objects. - More...

-
-Inheritance diagram for QCPLayerable:
-
-
Inheritance graph
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
bool realVisibility () const
 
- - - -

-Signals

void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const =0
 
virtual void draw (QCPPainter *painter)=0
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
-

Detailed Description

-

Base class for all drawable objects.

-

This is the abstract base class most visible objects derive from, e.g. plottables, axes, grid etc.

-

Every layerable is on a layer (QCPLayer) which allows controlling the rendering order by stacking the layers accordingly.

-

For details about the layering mechanism, see the QCPLayer documentation.

-

Constructor & Destructor Documentation

- -

§ QCPLayerable()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPLayerable::QCPLayerable (QCustomPlotplot,
QString targetLayer = QString(),
QCPLayerableparentLayerable = nullptr 
)
-
-

Creates a new QCPLayerable instance.

-

Since QCPLayerable is an abstract base class, it can't be instantiated directly. Use one of the derived classes.

-

If plot is provided, it automatically places itself on the layer named targetLayer. If targetLayer is an empty string, it places itself on the current layer of the plot (see QCustomPlot::setCurrentLayer).

-

It is possible to provide nullptr as plot. In that case, you should assign a parent plot at a later time with initializeParentPlot.

-

The layerable's parent layerable is set to parentLayerable, if provided. Direct layerable parents are mainly used to control visibility in a hierarchy of layerables. This means a layerable is only drawn, if all its ancestor layerables are also visible. Note that parentLayerable does not become the QObject-parent (for memory management) of this layerable, plot does. It is not uncommon to set the QObject-parent to something else in the constructors of QCPLayerable subclasses, to guarantee a working destruction hierarchy.

- -
-
-

Member Function Documentation

- -

§ parentLayerable()

- -
-
- - - - - -
- - - - - - - -
QCPLayerable * QCPLayerable::parentLayerable () const
-
-inline
-
-

Returns the parent layerable of this layerable. The parent layerable is used to provide visibility hierarchies in conjunction with the method realVisibility. This way, layerables only get drawn if their parent layerables are visible, too.

-

Note that a parent layerable is not necessarily also the QObject parent for memory management. Further, a layerable doesn't always have a parent layerable, so this function may return nullptr.

-

A parent layerable is set implicitly when placed inside layout elements and doesn't need to be set manually by the user.

- -
-
- -

§ setVisible()

- -
-
- - - - - - - - -
void QCPLayerable::setVisible (bool on)
-
-

Sets the visibility of this layerable object. If an object is not visible, it will not be drawn on the QCustomPlot surface, and user interaction with it (e.g. click and selection) is not possible.

- -
-
- -

§ setLayer() [1/2]

- -
-
- - - - - - - - -
bool QCPLayerable::setLayer (QCPLayerlayer)
-
-

Sets the layer of this layerable object. The object will be placed on top of the other objects already on layer.

-

If layer is 0, this layerable will not be on any layer and thus not appear in the plot (or interact/receive events).

-

Returns true if the layer of this layerable was successfully changed to layer.

- -
-
- -

§ setLayer() [2/2]

- -
-
- - - - - - - - -
bool QCPLayerable::setLayer (const QString & layerName)
-
-

This is an overloaded function. Sets the layer of this layerable object by name

-

Returns true on success, i.e. if layerName is a valid layer name.

- -
-
- -

§ setAntialiased()

- -
-
- - - - - - - - -
void QCPLayerable::setAntialiased (bool enabled)
-
-

Sets whether this object will be drawn antialiased or not.

-

Note that antialiasing settings may be overridden by QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPLayerable::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Reimplemented in QCPLayoutInset, QCPAxis, QCPLegend, QCPBars, QCPPolarAxisRadial, QCPAbstractItem, QCPPolarAxisAngular, QCPPolarGraph, QCPLayoutElement, QCPFinancial, QCPAbstractPlottable, QCPColorMap, QCPErrorBars, QCPGraph, QCPStatisticalBox, QCPCurve, QCPItemTracer, QCPItemText, QCPTextElement, QCPItemBracket, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, QCPAbstractPlottable1D< QCPCurveData >, QCPAbstractLegendItem, QCPItemPixmap, QCPItemCurve, QCPItemLine, QCPItemEllipse, QCPItemRect, and QCPItemStraightLine.

- -
-
- -

§ realVisibility()

- -
-
- - - - - - - -
bool QCPLayerable::realVisibility () const
-
-

Returns whether this layerable is visible, taking the visibility of the layerable parent and the visibility of this layerable's layer into account. This is the method that is consulted to decide whether a layerable shall be drawn or not.

-

If this layerable has a direct layerable parent (usually set via hierarchies implemented in subclasses, like in the case of QCPLayoutElement), this function returns true only if this layerable has its visibility set to true and the parent layerable's realVisibility returns true.

- -
-
- -

§ layerChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPLayerable::layerChanged (QCPLayernewLayer)
-
-signal
-
-

This signal is emitted when the layer of this layerable changes, i.e. this layerable is moved to a different layer.

-
See also
setLayer
- -
-
- -

§ parentPlotInitialized()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayerable::parentPlotInitialized (QCustomPlotparentPlot)
-
-protectedvirtual
-
-

This function is called by initializeParentPlot, to allow subclasses to react on the setting of a parent plot. This is the case when nullptr was passed as parent plot in the constructor, and the parent plot is set at a later time.

-

For example, QCPLayoutElement/QCPLayout hierarchies may be created independently of any QCustomPlot at first. When they are then added to a layout inside the QCustomPlot, the top level element of the hierarchy gets its parent plot initialized with initializeParentPlot. To propagate the parent plot to all the children of the hierarchy, the top level element then uses this function to pass the parent plot on to its child elements.

-

The default implementation does nothing.

-
See also
initializeParentPlot
- -

Reimplemented in QCPLegend, and QCPLayoutElement.

- -
-
- -

§ selectionCategory()

- -
-
- - - - - -
- - - - - - - -
QCP::Interaction QCPLayerable::selectionCategory () const
-
-protectedvirtual
-
-

Returns the selection category this layerable shall belong to. The selection category is used in conjunction with QCustomPlot::setInteractions to control which objects are selectable and which aren't.

-

Subclasses that don't fit any of the normal QCP::Interaction values can use QCP::iSelectOther. This is what the default implementation returns.

-
See also
QCustomPlot::setInteractions
- -

Reimplemented in QCPAxis, QCPPolarAxisAngular, QCPPolarAxisRadial, QCPLegend, QCPAbstractItem, QCPAbstractPlottable, QCPPolarGraph, and QCPAbstractLegendItem.

- -
-
- -

§ clipRect()

- -
-
- - - - - -
- - - - - - - -
QRect QCPLayerable::clipRect () const
-
-protectedvirtual
-
-

Returns the clipping rectangle of this layerable object. By default, this is the viewport of the parent QCustomPlot. Specific subclasses may reimplement this function to provide different clipping rects.

-

The returned clipping rect is set on the painter before the draw function of the respective object is called.

- -

Reimplemented in QCPAbstractItem, QCPAbstractPlottable, QCPPolarGraph, and QCPAbstractLegendItem.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayerable::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedpure virtual
-
-

This function applies the default antialiasing setting to the specified painter, using the function applyAntialiasingHint. It is the antialiasing state the painter is put in, when draw is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the draw function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.

-

First example: QCPGraph has multiple entities that have an antialiasing setting: The graph line, fills and scatters. Those can be configured via QCPGraph::setAntialiased, QCPGraph::setAntialiasedFill and QCPGraph::setAntialiasedScatters. Consequently, there isn't only the QCPGraph::applyDefaultAntialiasingHint function (which corresponds to the graph line's antialiasing), but specialized ones like QCPGraph::applyFillAntialiasingHint and QCPGraph::applyScattersAntialiasingHint. So before drawing one of those entities, QCPGraph::draw calls the respective specialized applyAntialiasingHint function.

-

Second example: QCPItemLine consists only of a line so there is only one antialiasing setting which can be controlled with QCPItemLine::setAntialiased. (This function is inherited by all layerables. The specialized functions, as seen on QCPGraph, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal QCPItemLine::applyDefaultAntialiasingHint. The QCPItemLine::draw function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the draw function is called, and that's the state it wants to draw the line with.

- -

Implemented in QCPAxis, QCPPolarAxisAngular, QCPPolarAxisRadial, QCPLegend, QCPAbstractItem, QCPAbstractPlottable, QCPPolarGraph, QCPLayoutElement, QCPAxisRect, QCPColorScale, QCPTextElement, QCPPolarGrid, QCPGrid, QCPAbstractLegendItem, and QCPSelectionRect.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayerable::draw (QCPPainterpainter)
-
-protectedpure virtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implemented in QCPAxis, QCPPolarAxisAngular, QCPPolarAxisRadial, QCPLegend, QCPBars, QCPAbstractItem, QCPAbstractPlottable, QCPPolarGraph, QCPColorMap, QCPLayoutElement, QCPFinancial, QCPAxisRect, QCPErrorBars, QCPGraph, QCPStatisticalBox, QCPCurve, QCPPlottableLegendItem, QCPItemText, QCPItemTracer, QCPTextElement, QCPPolarGrid, QCPGrid, QCPAbstractLegendItem, QCPItemPixmap, QCPItemBracket, QCPItemEllipse, QCPItemRect, QCPSelectionRect, QCPItemCurve, QCPItemLine, QCPItemStraightLine, and QCPPolarLegendItem.

- -
-
- -

§ selectEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPLayerable::selectEvent (QMouseEvent * event,
bool additive,
const QVariant & details,
bool * selectionStateChanged 
)
-
-protectedvirtual
-
-

This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing.

-

event is the mouse event that caused the selection. additive indicates, whether the user was holding the multi-select-modifier while performing the selection (see QCustomPlot::setMultiSelectModifier). if additive is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected).

-

Every selectEvent is preceded by a call to selectTest, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent QCustomPlot). The details data you output from selectTest is fed back via details here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually details is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like QCPAxis). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked.

-

selectionStateChanged is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if additive is true, selectionStateChanged must also be set to true, because the selection toggles. If additive is false, selectionStateChanged is only set to true, if the layerable was previously unselected and now is switched to the selected state.

-
See also
selectTest, deselectEvent
- -

Reimplemented in QCPAxis, QCPPolarAxisRadial, QCPLegend, QCPAbstractItem, QCPAbstractPlottable, QCPPolarGraph, QCPTextElement, and QCPAbstractLegendItem.

- -
-
- -

§ deselectEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayerable::deselectEvent (bool * selectionStateChanged)
-
-protectedvirtual
-
-

This event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to QCustomPlot::deselectAll. Subclasses should react to it by unsetting their selection appropriately.

-

just as in selectEvent, the output parameter selectionStateChanged (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively.

-
See also
selectTest, selectEvent
- -

Reimplemented in QCPAxis, QCPPolarAxisRadial, QCPLegend, QCPAbstractItem, QCPAbstractPlottable, QCPPolarGraph, QCPTextElement, and QCPAbstractLegendItem.

- -
-
- -

§ mousePressEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPLayerable::mousePressEvent (QMouseEvent * event,
const QVariant & details 
)
-
-protectedvirtual
-
-

This event gets called when the user presses a mouse button while the cursor is over the layerable. Whether a cursor is over the layerable is decided by a preceding call to selectTest.

-

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter details contains layerable-specific details about the hit, which were generated in the previous call to selectTest. For example, One-dimensional plottables like QCPGraph or QCPBars convey the clicked data point in the details parameter, as QCPDataSelection packed as QVariant. Multi-part objects convey the specific SelectablePart that was hit (e.g. QCPAxis::SelectablePart in the case of axes).

-

QCustomPlot uses an event propagation system that works the same as Qt's system. If your layerable doesn't reimplement the mousePressEvent or explicitly calls event->ignore() in its reimplementation, the event will be propagated to the next layerable in the stacking order.

-

Once a layerable has accepted the mousePressEvent, it is considered the mouse grabber and will receive all following calls to mouseMoveEvent or mouseReleaseEvent for this mouse interaction (a "mouse interaction" in this context ends with the release).

-

The default implementation does nothing except explicitly ignoring the event with event->ignore().

-
See also
mouseMoveEvent, mouseReleaseEvent, mouseDoubleClickEvent, wheelEvent
- -

Reimplemented in QCPAxis, QCPPolarAxisAngular, QCPPolarAxisRadial, QCPAxisRect, QCPColorScale, and QCPTextElement.

- -
-
- -

§ mouseMoveEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPLayerable::mouseMoveEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

This event gets called when the user moves the mouse while holding a mouse button, after this layerable has become the mouse grabber by accepting the preceding mousePressEvent.

-

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter startPos indicates the position where the initial mousePressEvent occurred, that started the mouse interaction.

-

The default implementation does nothing.

-
See also
mousePressEvent, mouseReleaseEvent, mouseDoubleClickEvent, wheelEvent
- -

Reimplemented in QCPAxis, QCPPolarAxisAngular, QCPPolarAxisRadial, QCPAxisRect, and QCPColorScale.

- -
-
- -

§ mouseReleaseEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPLayerable::mouseReleaseEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

This event gets called when the user releases the mouse button, after this layerable has become the mouse grabber by accepting the preceding mousePressEvent.

-

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter startPos indicates the position where the initial mousePressEvent occurred, that started the mouse interaction.

-

The default implementation does nothing.

-
See also
mousePressEvent, mouseMoveEvent, mouseDoubleClickEvent, wheelEvent
- -

Reimplemented in QCPAxis, QCPPolarAxisAngular, QCPPolarAxisRadial, QCPAxisRect, QCPColorScale, and QCPTextElement.

- -
-
- -

§ mouseDoubleClickEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPLayerable::mouseDoubleClickEvent (QMouseEvent * event,
const QVariant & details 
)
-
-protectedvirtual
-
-

This event gets called when the user presses the mouse button a second time in a double-click, while the cursor is over the layerable. Whether a cursor is over the layerable is decided by a preceding call to selectTest.

-

The mouseDoubleClickEvent is called instead of the second mousePressEvent. So in the case of a double-click, the event succession is pressEvent – releaseEvent – doubleClickEvent – releaseEvent.

-

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter details contains layerable-specific details about the hit, which were generated in the previous call to selectTest. For example, One-dimensional plottables like QCPGraph or QCPBars convey the clicked data point in the details parameter, as QCPDataSelection packed as QVariant. Multi-part objects convey the specific SelectablePart that was hit (e.g. QCPAxis::SelectablePart in the case of axes).

-

Similarly to mousePressEvent, once a layerable has accepted the mouseDoubleClickEvent, it is considered the mouse grabber and will receive all following calls to mouseMoveEvent and mouseReleaseEvent for this mouse interaction (a "mouse interaction" in this context ends with the release).

-

The default implementation does nothing except explicitly ignoring the event with event->ignore().

-
See also
mousePressEvent, mouseMoveEvent, mouseReleaseEvent, wheelEvent
- -

Reimplemented in QCPTextElement.

- -
-
- -

§ wheelEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayerable::wheelEvent (QWheelEvent * event)
-
-protectedvirtual
-
-

This event gets called when the user turns the mouse scroll wheel while the cursor is over the layerable. Whether a cursor is over the layerable is decided by a preceding call to selectTest.

-

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos().

-

The event->angleDelta() indicates how far the mouse wheel was turned, which is usually +/- 120 for single rotation steps. However, if the mouse wheel is turned rapidly, multiple steps may accumulate to one event, making the delta larger. On the other hand, if the wheel has very smooth steps or none at all, the delta may be smaller.

-

The default implementation does nothing.

-
See also
mousePressEvent, mouseMoveEvent, mouseReleaseEvent, mouseDoubleClickEvent
- -

Reimplemented in QCPAxis, QCPPolarAxisAngular, QCPPolarAxisRadial, QCPAxisRect, and QCPColorScale.

- -
-
- -

§ initializeParentPlot()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayerable::initializeParentPlot (QCustomPlotparentPlot)
-
-protected
-
-

Sets the parent plot of this layerable. Use this function once to set the parent plot if you have passed nullptr in the constructor. It can not be used to move a layerable from one QCustomPlot to another one.

-

Note that, unlike when passing a non nullptr parent plot in the constructor, this function does not make parentPlot the QObject-parent of this layerable. If you want this, call QObject::setParent(parentPlot) in addition to this function.

-

Further, you will probably want to set a layer (setLayer) after calling this function, to make the layerable appear on the QCustomPlot.

-

The parent plot change will be propagated to subclasses via a call to parentPlotInitialized so they can react accordingly (e.g. also initialize the parent plot of child layerables, like QCPLayout does).

- -
-
- -

§ setParentLayerable()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayerable::setParentLayerable (QCPLayerableparentLayerable)
-
-protected
-
-

Sets the parent layerable of this layerable to parentLayerable. Note that parentLayerable does not become the QObject-parent (for memory management) of this layerable.

-

The parent layerable has influence on the return value of the realVisibility method. Only layerables with a fully visible parent tree will return true for realVisibility, and thus be drawn.

-
See also
realVisibility
- -
-
- -

§ moveToLayer()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool QCPLayerable::moveToLayer (QCPLayerlayer,
bool prepend 
)
-
-protected
-
-

Moves this layerable object to layer. If prepend is true, this object will be prepended to the new layer's list, i.e. it will be drawn below the objects already on the layer. If it is false, the object will be appended.

-

Returns true on success, i.e. if layer is a valid layer.

- -
-
- -

§ applyAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPLayerable::applyAntialiasingHint (QCPPainterpainter,
bool localAntialiased,
QCP::AntialiasedElement overrideElement 
) const
-
-protected
-
-

Sets the QCPainter::setAntialiasing state on the provided painter, depending on the localAntialiased value as well as the overrides QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements. Which override enum this function takes into account is controlled via overrideElement.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layer.h
  • -
  • src/layer.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPLayerable__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPLayerable__inherit__graph.png deleted file mode 100644 index d01ef86a..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPLayerable__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPLayout.html b/third_party/qcustomplot/documentation/html/classQCPLayout.html deleted file mode 100644 index 6c053c1c..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPLayout.html +++ /dev/null @@ -1,771 +0,0 @@ - - - - - - -QCPLayout Class Reference - - - - -
- -
-
QCPLayout Class Referenceabstract
-
-
- -

The abstract base class for layouts. - More...

-
-Inheritance diagram for QCPLayout:
-
-
Inheritance graph
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPLayout ()
 
virtual void update (UpdatePhase phase)
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
virtual int elementCount () const =0
 
virtual QCPLayoutElementelementAt (int index) const =0
 
virtual QCPLayoutElementtakeAt (int index)=0
 
virtual bool take (QCPLayoutElement *element)=0
 
virtual void simplify ()
 
bool removeAt (int index)
 
bool remove (QCPLayoutElement *element)
 
void clear ()
 
- Public Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
virtual QSize minimumOuterSizeHint () const
 
virtual QSize maximumOuterSizeHint () const
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void updateLayout ()
 
void sizeConstraintsChanged () const
 
void adoptElement (QCPLayoutElement *el)
 
void releaseElement (QCPLayoutElement *el)
 
QVector< int > getSectionSizes (QVector< int > maxSizes, QVector< int > minSizes, QVector< double > stretchFactors, int totalSize) const
 
- Protected Functions inherited from QCPLayoutElement
virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
- Protected Functions inherited from QCPLayerable
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - -

-Protected Static Functions

static QSize getFinalMinimumOuterSize (const QCPLayoutElement *el)
 
static QSize getFinalMaximumOuterSize (const QCPLayoutElement *el)
 
- - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from QCPLayoutElement
enum  UpdatePhase
 
enum  SizeConstraintRect
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

The abstract base class for layouts.

-

This is an abstract base class for layout elements whose main purpose is to define the position and size of other child layout elements. In most cases, layouts don't draw anything themselves (but there are exceptions to this, e.g. QCPLegend).

-

QCPLayout derives from QCPLayoutElement, and thus can itself be nested in other layouts.

-

QCPLayout introduces a common interface for accessing and manipulating the child elements. Those functions are most notably elementCount, elementAt, takeAt, take, simplify, removeAt, remove and clear. Individual subclasses may add more functions to this interface which are more specialized to the form of the layout. For example, QCPLayoutGrid adds functions that take row and column indices to access cells of the layout grid more conveniently.

-

Since this is an abstract base class, you can't instantiate it directly. Rather use one of its subclasses like QCPLayoutGrid or QCPLayoutInset.

-

For a general introduction to the layout system, see the dedicated documentation page The Layout System.

-

Constructor & Destructor Documentation

- -

§ QCPLayout()

- -
-
- - - - - -
- - - - - - - -
QCPLayout::QCPLayout ()
-
-explicit
-
-

Creates an instance of QCPLayout and sets default values. Note that since QCPLayout is an abstract base class, it can't be instantiated directly.

- -
-
-

Member Function Documentation

- -

§ update()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayout::update (UpdatePhase phase)
-
-virtual
-
-

If phase is upLayout, calls updateLayout, which subclasses may reimplement to reposition and resize their cells.

-

Finally, the call is propagated down to all child QCPLayoutElements.

-

For details about this method and the update phases, see the documentation of QCPLayoutElement::update.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ elements()

- -
-
- - - - - -
- - - - - - - - -
QList< QCPLayoutElement * > QCPLayout::elements (bool recursive) const
-
-virtual
-
-

Returns a list of all child elements in this layout element. If recursive is true, all sub-child elements are included in the list, too.

-
Warning
There may be nullptr entries in the returned list. For example, QCPLayoutGrid may have empty cells which yield nullptr at the respective index.
- -

Reimplemented from QCPLayoutElement.

- -

Reimplemented in QCPLayoutGrid.

- -
-
- -

§ elementCount()

- -
-
- - - - - -
- - - - - - - -
int QCPLayout::elementCount () const
-
-pure virtual
-
-

Returns the number of elements/cells in the layout.

-
See also
elements, elementAt
- -

Implemented in QCPLayoutInset, and QCPLayoutGrid.

- -
-
- -

§ elementAt()

- -
-
- - - - - -
- - - - - - - - -
QCPLayoutElement * QCPLayout::elementAt (int index) const
-
-pure virtual
-
-

Returns the element in the cell with the given index. If index is invalid, returns nullptr.

-

Note that even if index is valid, the respective cell may be empty in some layouts (e.g. QCPLayoutGrid), so this function may return nullptr in those cases. You may use this function to check whether a cell is empty or not.

-
See also
elements, elementCount, takeAt
- -

Implemented in QCPLayoutInset, and QCPLayoutGrid.

- -
-
- -

§ takeAt()

- -
-
- - - - - -
- - - - - - - - -
QCPLayoutElement * QCPLayout::takeAt (int index)
-
-pure virtual
-
-

Removes the element with the given index from the layout and returns it.

-

If the index is invalid or the cell with that index is empty, returns nullptr.

-

Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use simplify.

-
See also
elementAt, take
- -

Implemented in QCPLayoutInset, and QCPLayoutGrid.

- -
-
- -

§ take()

- -
-
- - - - - -
- - - - - - - - -
bool QCPLayout::take (QCPLayoutElementelement)
-
-pure virtual
-
-

Removes the specified element from the layout and returns true on success.

-

If the element isn't in this layout, returns false.

-

Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use simplify.

-
See also
takeAt
- -

Implemented in QCPLayoutInset, and QCPLayoutGrid.

- -
-
- -

§ simplify()

- -
-
- - - - - -
- - - - - - - -
void QCPLayout::simplify ()
-
-virtual
-
-

Simplifies the layout by collapsing empty cells. The exact behavior depends on subclasses, the default implementation does nothing.

-

Not all layouts need simplification. For example, QCPLayoutInset doesn't use explicit simplification while QCPLayoutGrid does.

- -

Reimplemented in QCPLayoutInset, and QCPLayoutGrid.

- -
-
- -

§ removeAt()

- -
-
- - - - - - - - -
bool QCPLayout::removeAt (int index)
-
-

Removes and deletes the element at the provided index. Returns true on success. If index is invalid or points to an empty cell, returns false.

-

This function internally uses takeAt to remove the element from the layout and then deletes the returned element. Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use simplify.

-
See also
remove, takeAt
- -
-
- -

§ remove()

- -
-
- - - - - - - - -
bool QCPLayout::remove (QCPLayoutElementelement)
-
-

Removes and deletes the provided element. Returns true on success. If element is not in the layout, returns false.

-

This function internally uses takeAt to remove the element from the layout and then deletes the element. Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use simplify.

-
See also
removeAt, take
- -
-
- -

§ clear()

- -
-
- - - - - - - -
void QCPLayout::clear ()
-
-

Removes and deletes all layout elements in this layout. Finally calls simplify to make sure all empty cells are collapsed.

-
See also
remove, removeAt
- -
-
- -

§ updateLayout()

- -
-
- - - - - -
- - - - - - - -
void QCPLayout::updateLayout ()
-
-protectedvirtual
-
-

Subclasses reimplement this method to update the position and sizes of the child elements/cells via calling their QCPLayoutElement::setOuterRect. The default implementation does nothing.

-

The geometry used as a reference is the inner rect of this layout. Child elements should stay within that rect.

-

getSectionSizes may help with the reimplementation of this function.

-
See also
update
- -

Reimplemented in QCPLayoutInset, and QCPLayoutGrid.

- -
-
- -

§ sizeConstraintsChanged()

- -
-
- - - - - -
- - - - - - - -
void QCPLayout::sizeConstraintsChanged () const
-
-protected
-
-

Subclasses call this method to report changed (minimum/maximum) size constraints.

-

If the parent of this layout is again a QCPLayout, forwards the call to the parent's sizeConstraintsChanged. If the parent is a QWidget (i.e. is the QCustomPlot::plotLayout of QCustomPlot), calls QWidget::updateGeometry, so if the QCustomPlot widget is inside a Qt QLayout, it may update itself and resize cells accordingly.

- -
-
- -

§ adoptElement()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayout::adoptElement (QCPLayoutElementel)
-
-protected
-
-

Associates el with this layout. This is done by setting the QCPLayoutElement::layout, the QCPLayerable::parentLayerable and the QObject parent to this layout.

-

Further, if el didn't previously have a parent plot, calls QCPLayerable::initializeParentPlot on el to set the paret plot.

-

This method is used by subclass specific methods that add elements to the layout. Note that this method only changes properties in el. The removal from the old layout and the insertion into the new layout must be done additionally.

- -
-
- -

§ releaseElement()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayout::releaseElement (QCPLayoutElementel)
-
-protected
-
-

Disassociates el from this layout. This is done by setting the QCPLayoutElement::layout and the QCPLayerable::parentLayerable to zero. The QObject parent is set to the parent QCustomPlot.

-

This method is used by subclass specific methods that remove elements from the layout (e.g. take or takeAt). Note that this method only changes properties in el. The removal from the old layout must be done additionally.

- -
-
- -

§ getSectionSizes()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QVector< int > QCPLayout::getSectionSizes (QVector< int > maxSizes,
QVector< int > minSizes,
QVector< double > stretchFactors,
int totalSize 
) const
-
-protected
-
-

This is a helper function for the implementation of updateLayout in subclasses.

-

It calculates the sizes of one-dimensional sections with provided constraints on maximum section sizes, minimum section sizes, relative stretch factors and the final total size of all sections.

-

The QVector entries refer to the sections. Thus all QVectors must have the same size.

-

maxSizes gives the maximum allowed size of each section. If there shall be no maximum size imposed, set all vector values to Qt's QWIDGETSIZE_MAX.

-

minSizes gives the minimum allowed size of each section. If there shall be no minimum size imposed, set all vector values to zero. If the minSizes entries add up to a value greater than totalSize, sections will be scaled smaller than the proposed minimum sizes. (In other words, not exceeding the allowed total size is taken to be more important than not going below minimum section sizes.)

-

stretchFactors give the relative proportions of the sections to each other. If all sections shall be scaled equally, set all values equal. If the first section shall be double the size of each individual other section, set the first number of stretchFactors to double the value of the other individual values (e.g. {2, 1, 1, 1}).

-

totalSize is the value that the final section sizes will add up to. Due to rounding, the actual sum may differ slightly. If you want the section sizes to sum up to exactly that value, you could distribute the remaining difference on the sections.

-

The return value is a QVector containing the section sizes.

- -
-
- -

§ getFinalMinimumOuterSize()

- -
-
- - - - - -
- - - - - - - - -
QSize QCPLayout::getFinalMinimumOuterSize (const QCPLayoutElementel)
-
-staticprotected
-
-

This is a helper function for the implementation of subclasses.

-

It returns the minimum size that should finally be used for the outer rect of the passed layout element el.

-

It takes into account whether a manual minimum size is set (QCPLayoutElement::setMinimumSize), which size constraint is set (QCPLayoutElement::setSizeConstraintRect), as well as the minimum size hint, if no manual minimum size was set (QCPLayoutElement::minimumOuterSizeHint).

- -
-
- -

§ getFinalMaximumOuterSize()

- -
-
- - - - - -
- - - - - - - - -
QSize QCPLayout::getFinalMaximumOuterSize (const QCPLayoutElementel)
-
-staticprotected
-
-

This is a helper function for the implementation of subclasses.

-

It returns the maximum size that should finally be used for the outer rect of the passed layout element el.

-

It takes into account whether a manual maximum size is set (QCPLayoutElement::setMaximumSize), which size constraint is set (QCPLayoutElement::setSizeConstraintRect), as well as the maximum size hint, if no manual maximum size was set (QCPLayoutElement::maximumOuterSizeHint).

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layout.h
  • -
  • src/layout.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPLayoutElement.html b/third_party/qcustomplot/documentation/html/classQCPLayoutElement.html deleted file mode 100644 index 19388f85..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPLayoutElement.html +++ /dev/null @@ -1,934 +0,0 @@ - - - - - - -QCPLayoutElement Class Reference - - - - -
- -
-
QCPLayoutElement Class Reference
-
-
- -

The abstract base class for all objects that form the layout system. - More...

-
-Inheritance diagram for QCPLayoutElement:
-
-
Inheritance graph
- - - - - - - - - - - - - - -
- - - - - - -

-Public Types

enum  UpdatePhase
 
enum  SizeConstraintRect
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
virtual void update (UpdatePhase phase)
 
virtual QSize minimumOuterSizeHint () const
 
virtual QSize maximumOuterSizeHint () const
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
- Protected Functions inherited from QCPLayerable
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - -

-Additional Inherited Members

- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

The abstract base class for all objects that form the layout system.

-

This is an abstract base class. As such, it can't be instantiated directly, rather use one of its subclasses.

-

A Layout element is a rectangular object which can be placed in layouts. It has an outer rect (QCPLayoutElement::outerRect) and an inner rect (QCPLayoutElement::rect). The difference between outer and inner rect is called its margin. The margin can either be set to automatic or manual (setAutoMargins) on a per-side basis. If a side is set to manual, that margin can be set explicitly with setMargins and will stay fixed at that value. If it's set to automatic, the layout element subclass will control the value itself (via calculateAutoMargin).

-

Layout elements can be placed in layouts (base class QCPLayout) like QCPLayoutGrid. The top level layout is reachable via QCustomPlot::plotLayout, and is a QCPLayoutGrid. Since QCPLayout itself derives from QCPLayoutElement, layouts can be nested.

-

Thus in QCustomPlot one can divide layout elements into two categories: The ones that are invisible by themselves, because they don't draw anything. Their only purpose is to manage the position and size of other layout elements. This category of layout elements usually use QCPLayout as base class. Then there is the category of layout elements which actually draw something. For example, QCPAxisRect, QCPLegend and QCPTextElement are of this category. This does not necessarily mean that the latter category can't have child layout elements. QCPLegend for instance, actually derives from QCPLayoutGrid and the individual legend items are child layout elements in the grid layout.

-

Member Enumeration Documentation

- -

§ UpdatePhase

- -
-
-

Defines the phases of the update process, that happens just before a replot. At each phase, update is called with the according UpdatePhase value.

- - - - -
Enumerator
upPreparation 

Phase used for any type of preparation that needs to be done before margin calculation and layout.

-
upMargins 

Phase in which the margins are calculated and set.

-
upLayout 

Final phase in which the layout system places the rects of the elements.

-
- -
-
- -

§ SizeConstraintRect

- -
-
-

Defines to which rect of a layout element the size constraints that can be set via setMinimumSize and setMaximumSize apply. The outer rect (outerRect) includes the margins (e.g. in the case of a QCPAxisRect the axis labels), whereas the inner rect (rect) does not.

-
See also
setSizeConstraintRect
- - - -
Enumerator
scrInnerRect 

Minimum/Maximum size constraints apply to inner rect.

-
scrOuterRect 

Minimum/Maximum size constraints apply to outer rect, thus include layout element margins.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPLayoutElement()

- -
-
- - - - - -
- - - - - - - - -
QCPLayoutElement::QCPLayoutElement (QCustomPlotparentPlot = nullptr)
-
-explicit
-
-

Creates an instance of QCPLayoutElement and sets default values.

- -
-
-

Member Function Documentation

- -

§ layout()

- -
-
- - - - - -
- - - - - - - -
QCPLayout * QCPLayoutElement::layout () const
-
-inline
-
-

Returns the parent layout of this layout element.

- -
-
- -

§ rect()

- -
-
- - - - - -
- - - - - - - -
QRect QCPLayoutElement::rect () const
-
-inline
-
-

Returns the inner rect of this layout element. The inner rect is the outer rect (outerRect, setOuterRect) shrinked by the margins (setMargins, setAutoMargins).

-

In some cases, the area between outer and inner rect is left blank. In other cases the margin area is used to display peripheral graphics while the main content is in the inner rect. This is where automatic margin calculation becomes interesting because it allows the layout element to adapt the margins to the peripheral graphics it wants to draw. For example, QCPAxisRect draws the axis labels and tick labels in the margin area, thus needs to adjust the margins (if setAutoMargins is enabled) according to the space required by the labels of the axes.

-
See also
outerRect
- -
-
- -

§ outerRect()

- -
-
- - - - - -
- - - - - - - -
QRect QCPLayoutElement::outerRect () const
-
-inline
-
-

Returns the outer rect of this layout element. The outer rect is the inner rect expanded by the margins (setMargins, setAutoMargins). The outer rect is used (and set via setOuterRect) by the parent QCPLayout to control the size of this layout element.

-
See also
rect
- -
-
- -

§ setOuterRect()

- -
-
- - - - - - - - -
void QCPLayoutElement::setOuterRect (const QRect & rect)
-
-

Sets the outer rect of this layout element. If the layout element is inside a layout, the layout sets the position and size of this layout element using this function.

-

Calling this function externally has no effect, since the layout will overwrite any changes to the outer rect upon the next replot.

-

The layout element will adapt its inner rect by applying the margins inward to the outer rect.

-
See also
rect
- -
-
- -

§ setMargins()

- -
-
- - - - - - - - -
void QCPLayoutElement::setMargins (const QMargins & margins)
-
-

Sets the margins of this layout element. If setAutoMargins is disabled for some or all sides, this function is used to manually set the margin on those sides. Sides that are still set to be handled automatically are ignored and may have any value in margins.

-

The margin is the distance between the outer rect (controlled by the parent layout via setOuterRect) and the inner rect (which usually contains the main content of this layout element).

-
See also
setAutoMargins
- -
-
- -

§ setMinimumMargins()

- -
-
- - - - - - - - -
void QCPLayoutElement::setMinimumMargins (const QMargins & margins)
-
-

If setAutoMargins is enabled on some or all margins, this function is used to provide minimum values for those margins.

-

The minimum values are not enforced on margin sides that were set to be under manual control via setAutoMargins.

-
See also
setAutoMargins
- -
-
- -

§ setAutoMargins()

- -
-
- - - - - - - - -
void QCPLayoutElement::setAutoMargins (QCP::MarginSides sides)
-
-

Sets on which sides the margin shall be calculated automatically. If a side is calculated automatically, a minimum margin value may be provided with setMinimumMargins. If a side is set to be controlled manually, the value may be specified with setMargins.

-

Margin sides that are under automatic control may participate in a QCPMarginGroup (see setMarginGroup), to synchronize (align) it with other layout elements in the plot.

-
See also
setMinimumMargins, setMargins, QCP::MarginSide
- -
-
- -

§ setMinimumSize() [1/2]

- -
-
- - - - - - - - -
void QCPLayoutElement::setMinimumSize (const QSize & size)
-
-

Sets the minimum size of this layout element. A parent layout tries to respect the size here by changing row/column sizes in the layout accordingly.

-

If the parent layout size is not sufficient to satisfy all minimum size constraints of its child layout elements, the layout may set a size that is actually smaller than size. QCustomPlot propagates the layout's size constraints to the outside by setting its own minimum QWidget size accordingly, so violations of size should be exceptions.

-

Whether this constraint applies to the inner or the outer rect can be specified with setSizeConstraintRect (see rect and outerRect).

- -
-
- -

§ setMinimumSize() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutElement::setMinimumSize (int width,
int height 
)
-
-

This is an overloaded function.

-

Sets the minimum size of this layout element.

-

Whether this constraint applies to the inner or the outer rect can be specified with setSizeConstraintRect (see rect and outerRect).

- -
-
- -

§ setMaximumSize() [1/2]

- -
-
- - - - - - - - -
void QCPLayoutElement::setMaximumSize (const QSize & size)
-
-

Sets the maximum size of this layout element. A parent layout tries to respect the size here by changing row/column sizes in the layout accordingly.

-

Whether this constraint applies to the inner or the outer rect can be specified with setSizeConstraintRect (see rect and outerRect).

- -
-
- -

§ setMaximumSize() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutElement::setMaximumSize (int width,
int height 
)
-
-

This is an overloaded function.

-

Sets the maximum size of this layout element.

-

Whether this constraint applies to the inner or the outer rect can be specified with setSizeConstraintRect (see rect and outerRect).

- -
-
- -

§ setSizeConstraintRect()

- -
-
- - - - - - - - -
void QCPLayoutElement::setSizeConstraintRect (SizeConstraintRect constraintRect)
-
-

Sets to which rect of a layout element the size constraints apply. Size constraints can be set via setMinimumSize and setMaximumSize.

-

The outer rect (outerRect) includes the margins (e.g. in the case of a QCPAxisRect the axis labels), whereas the inner rect (rect) does not.

-
See also
setMinimumSize, setMaximumSize
- -
-
- -

§ setMarginGroup()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutElement::setMarginGroup (QCP::MarginSides sides,
QCPMarginGroupgroup 
)
-
-

Sets the margin group of the specified margin sides.

-

Margin groups allow synchronizing specified margins across layout elements, see the documentation of QCPMarginGroup.

-

To unset the margin group of sides, set group to nullptr.

-

Note that margin groups only work for margin sides that are set to automatic (setAutoMargins).

-
See also
QCP::MarginSide
- -
-
- -

§ update()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayoutElement::update (UpdatePhase phase)
-
-virtual
-
-

Updates the layout element and sub-elements. This function is automatically called before every replot by the parent layout element. It is called multiple times, once for every UpdatePhase. The phases are run through in the order of the enum values. For details about what happens at the different phases, see the documentation of UpdatePhase.

-

Layout elements that have child elements should call the update method of their child elements, and pass the current phase unchanged.

-

The default implementation executes the automatic margin mechanism in the upMargins phase. Subclasses should make sure to call the base class implementation.

- -

Reimplemented in QCPLayout, QCPPolarAxisAngular, QCPAxisRect, and QCPColorScale.

- -
-
- -

§ minimumOuterSizeHint()

- -
-
- - - - - -
- - - - - - - -
QSize QCPLayoutElement::minimumOuterSizeHint () const
-
-virtual
-
-

Returns the suggested minimum size this layout element (the outerRect) may be compressed to, if no manual minimum size is set.

-

if a minimum size (setMinimumSize) was not set manually, parent layouts use the returned size (usually indirectly through QCPLayout::getFinalMinimumOuterSize) to determine the minimum allowed size of this layout element.

-

A manual minimum size is considered set if it is non-zero.

-

The default implementation simply returns the sum of the horizontal margins for the width and the sum of the vertical margins for the height. Reimplementations may use their detailed knowledge about the layout element's content to provide size hints.

- -

Reimplemented in QCPLayoutGrid, QCPPlottableLegendItem, QCPTextElement, and QCPPolarLegendItem.

- -
-
- -

§ maximumOuterSizeHint()

- -
-
- - - - - -
- - - - - - - -
QSize QCPLayoutElement::maximumOuterSizeHint () const
-
-virtual
-
-

Returns the suggested maximum size this layout element (the outerRect) may be expanded to, if no manual maximum size is set.

-

if a maximum size (setMaximumSize) was not set manually, parent layouts use the returned size (usually indirectly through QCPLayout::getFinalMaximumOuterSize) to determine the maximum allowed size of this layout element.

-

A manual maximum size is considered set if it is smaller than Qt's QWIDGETSIZE_MAX.

-

The default implementation simply returns QWIDGETSIZE_MAX for both width and height, implying no suggested maximum size. Reimplementations may use their detailed knowledge about the layout element's content to provide size hints.

- -

Reimplemented in QCPLayoutGrid, and QCPTextElement.

- -
-
- -

§ elements()

- -
-
- - - - - -
- - - - - - - - -
QList< QCPLayoutElement * > QCPLayoutElement::elements (bool recursive) const
-
-virtual
-
-

Returns a list of all child elements in this layout element. If recursive is true, all sub-child elements are included in the list, too.

-
Warning
There may be nullptr entries in the returned list. For example, QCPLayoutGrid may have empty cells which yield nullptr at the respective index.
- -

Reimplemented in QCPLayoutGrid, QCPLayout, QCPPolarAxisAngular, and QCPAxisRect.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPLayoutElement::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

Layout elements are sensitive to events inside their outer rect. If pos is within the outer rect, this method returns a value corresponding to 0.99 times the parent plot's selection tolerance. However, layout elements are not selectable by default. So if onlySelectable is true, -1.0 is returned.

-

See QCPLayerable::selectTest for a general explanation of this virtual method.

-

QCPLayoutElement subclasses may reimplement this method to provide more specific selection test behaviour.

- -

Reimplemented from QCPLayerable.

- -

Reimplemented in QCPLayoutInset, QCPLegend, QCPPolarAxisAngular, QCPTextElement, and QCPAbstractLegendItem.

- -
-
- -

§ calculateAutoMargin()

- -
-
- - - - - -
- - - - - - - - -
int QCPLayoutElement::calculateAutoMargin (QCP::MarginSide side)
-
-protectedvirtual
-
-

Returns the margin size for this side. It is used if automatic margins is enabled for this side (see setAutoMargins). If a minimum margin was set with setMinimumMargins, the returned value will not be smaller than the specified minimum margin.

-

The default implementation just returns the respective manual margin (setMargins) or the minimum margin, whichever is larger.

- -

Reimplemented in QCPAxisRect.

- -
-
- -

§ layoutChanged()

- -
-
- - - - - -
- - - - - - - -
void QCPLayoutElement::layoutChanged ()
-
-protectedvirtual
-
-

This virtual method is called when this layout element was moved to a different QCPLayout, or when this layout element has changed its logical position (e.g. row and/or column) within the same QCPLayout. Subclasses may use this to react accordingly.

-

Since this method is called after the completion of the move, you can access the new parent layout via layout().

-

The default implementation does nothing.

- -

Reimplemented in QCPAxisRect.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
virtual void QCPLayoutElement::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-inlineprotectedvirtual
-
-

This function applies the default antialiasing setting to the specified painter, using the function applyAntialiasingHint. It is the antialiasing state the painter is put in, when draw is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the draw function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.

-

First example: QCPGraph has multiple entities that have an antialiasing setting: The graph line, fills and scatters. Those can be configured via QCPGraph::setAntialiased, QCPGraph::setAntialiasedFill and QCPGraph::setAntialiasedScatters. Consequently, there isn't only the QCPGraph::applyDefaultAntialiasingHint function (which corresponds to the graph line's antialiasing), but specialized ones like QCPGraph::applyFillAntialiasingHint and QCPGraph::applyScattersAntialiasingHint. So before drawing one of those entities, QCPGraph::draw calls the respective specialized applyAntialiasingHint function.

-

Second example: QCPItemLine consists only of a line so there is only one antialiasing setting which can be controlled with QCPItemLine::setAntialiased. (This function is inherited by all layerables. The specialized functions, as seen on QCPGraph, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal QCPItemLine::applyDefaultAntialiasingHint. The QCPItemLine::draw function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the draw function is called, and that's the state it wants to draw the line with.

- -

Implements QCPLayerable.

- -

Reimplemented in QCPPolarAxisAngular, QCPLegend, QCPAxisRect, QCPColorScale, QCPTextElement, and QCPAbstractLegendItem.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
virtual void QCPLayoutElement::draw (QCPPainterpainter)
-
-inlineprotectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implements QCPLayerable.

- -

Reimplemented in QCPPolarAxisAngular, QCPLegend, QCPAxisRect, QCPPlottableLegendItem, QCPTextElement, QCPAbstractLegendItem, and QCPPolarLegendItem.

- -
-
- -

§ parentPlotInitialized()

- -
-
- - - - - -
- - - - - - - - -
void QCPLayoutElement::parentPlotInitialized (QCustomPlotparentPlot)
-
-protectedvirtual
-
-

propagates the parent plot initialization to all child elements, by calling QCPLayerable::initializeParentPlot on them.

- -

Reimplemented from QCPLayerable.

- -

Reimplemented in QCPLegend.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layout.h
  • -
  • src/layout.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPLayoutElement__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPLayoutElement__inherit__graph.png deleted file mode 100644 index f24cc912..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPLayoutElement__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPLayoutGrid.html b/third_party/qcustomplot/documentation/html/classQCPLayoutGrid.html deleted file mode 100644 index fdb17434..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPLayoutGrid.html +++ /dev/null @@ -1,1232 +0,0 @@ - - - - - - -QCPLayoutGrid Class Reference - - - - -
- -
-
QCPLayoutGrid Class Reference
-
-
- -

A layout that arranges child elements in a grid. - More...

-
-Inheritance diagram for QCPLayoutGrid:
-
-
Inheritance graph
- - - - - - -
- - - - - - - - - -

-Public Types

enum  FillOrder
 
- Public Types inherited from QCPLayoutElement
enum  UpdatePhase
 
enum  SizeConstraintRect
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPLayoutGrid ()
 
int rowCount () const
 
int columnCount () const
 
-QList< double > columnStretchFactors () const
 
-QList< double > rowStretchFactors () const
 
-int columnSpacing () const
 
-int rowSpacing () const
 
-int wrap () const
 
-FillOrder fillOrder () const
 
void setColumnStretchFactor (int column, double factor)
 
void setColumnStretchFactors (const QList< double > &factors)
 
void setRowStretchFactor (int row, double factor)
 
void setRowStretchFactors (const QList< double > &factors)
 
void setColumnSpacing (int pixels)
 
void setRowSpacing (int pixels)
 
void setWrap (int count)
 
void setFillOrder (FillOrder order, bool rearrange=true)
 
virtual void updateLayout ()
 
virtual int elementCount () const
 
virtual QCPLayoutElementelementAt (int index) const
 
virtual QCPLayoutElementtakeAt (int index)
 
virtual bool take (QCPLayoutElement *element)
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
virtual void simplify ()
 
virtual QSize minimumOuterSizeHint () const
 
virtual QSize maximumOuterSizeHint () const
 
QCPLayoutElementelement (int row, int column) const
 
bool addElement (int row, int column, QCPLayoutElement *element)
 
bool addElement (QCPLayoutElement *element)
 
bool hasElement (int row, int column)
 
void expandTo (int newRowCount, int newColumnCount)
 
void insertRow (int newIndex)
 
void insertColumn (int newIndex)
 
int rowColToIndex (int row, int column) const
 
void indexToRowCol (int index, int &row, int &column) const
 
- Public Functions inherited from QCPLayout
 QCPLayout ()
 
virtual void update (UpdatePhase phase)
 
bool removeAt (int index)
 
bool remove (QCPLayoutElement *element)
 
void clear ()
 
- Public Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

void getMinimumRowColSizes (QVector< int > *minColWidths, QVector< int > *minRowHeights) const
 
void getMaximumRowColSizes (QVector< int > *maxColWidths, QVector< int > *maxRowHeights) const
 
- Protected Functions inherited from QCPLayout
void sizeConstraintsChanged () const
 
void adoptElement (QCPLayoutElement *el)
 
void releaseElement (QCPLayoutElement *el)
 
QVector< int > getSectionSizes (QVector< int > maxSizes, QVector< int > minSizes, QVector< double > stretchFactors, int totalSize) const
 
- Protected Functions inherited from QCPLayoutElement
virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
- Protected Functions inherited from QCPLayerable
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- Protected Static Functions inherited from QCPLayout
static QSize getFinalMinimumOuterSize (const QCPLayoutElement *el)
 
static QSize getFinalMaximumOuterSize (const QCPLayoutElement *el)
 
-

Detailed Description

-

A layout that arranges child elements in a grid.

-

Elements are laid out in a grid with configurable stretch factors (setColumnStretchFactor, setRowStretchFactor) and spacing (setColumnSpacing, setRowSpacing).

-

Elements can be added to cells via addElement. The grid is expanded if the specified row or column doesn't exist yet. Whether a cell contains a valid layout element can be checked with hasElement, that element can be retrieved with element. If rows and columns that only have empty cells shall be removed, call simplify. Removal of elements is either done by just adding the element to a different layout or by using the QCPLayout interface take or remove.

-

If you use addElement(QCPLayoutElement*) without explicit parameters for row and column, the grid layout will choose the position according to the current setFillOrder and the wrapping (setWrap).

-

Row and column insertion can be performed with insertRow and insertColumn.

-

Member Enumeration Documentation

- -

§ FillOrder

- -
-
- - - - -
enum QCPLayoutGrid::FillOrder
-
-

Defines in which direction the grid is filled when using addElement(QCPLayoutElement*). The column/row at which wrapping into the next row/column occurs can be specified with setWrap.

-
See also
setFillOrder
- - - -
Enumerator
foRowsFirst 

Rows are filled first, and a new element is wrapped to the next column if the row count would exceed setWrap.

-
foColumnsFirst 

Columns are filled first, and a new element is wrapped to the next row if the column count would exceed setWrap.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPLayoutGrid()

- -
-
- - - - - -
- - - - - - - -
QCPLayoutGrid::QCPLayoutGrid ()
-
-explicit
-
-

Creates an instance of QCPLayoutGrid and sets default values.

- -
-
-

Member Function Documentation

- -

§ rowCount()

- -
-
- - - - - -
- - - - - - - -
int QCPLayoutGrid::rowCount () const
-
-inline
-
-

Returns the number of rows in the layout.

-
See also
columnCount
- -
-
- -

§ columnCount()

- -
-
- - - - - -
- - - - - - - -
int QCPLayoutGrid::columnCount () const
-
-inline
-
-

Returns the number of columns in the layout.

-
See also
rowCount
- -
-
- -

§ setColumnStretchFactor()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutGrid::setColumnStretchFactor (int column,
double factor 
)
-
-

Sets the stretch factor of column.

-

Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights, regardless of the stretch factor. (see QCPLayoutElement::setMinimumSize, QCPLayoutElement::setMaximumSize, QCPLayoutElement::setSizeConstraintRect.)

-

The default stretch factor of newly created rows/columns is 1.

-
See also
setColumnStretchFactors, setRowStretchFactor
- -
-
- -

§ setColumnStretchFactors()

- -
-
- - - - - - - - -
void QCPLayoutGrid::setColumnStretchFactors (const QList< double > & factors)
-
-

Sets the stretch factors of all columns. factors must have the size columnCount.

-

Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights, regardless of the stretch factor. (see QCPLayoutElement::setMinimumSize, QCPLayoutElement::setMaximumSize, QCPLayoutElement::setSizeConstraintRect.)

-

The default stretch factor of newly created rows/columns is 1.

-
See also
setColumnStretchFactor, setRowStretchFactors
- -
-
- -

§ setRowStretchFactor()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutGrid::setRowStretchFactor (int row,
double factor 
)
-
-

Sets the stretch factor of row.

-

Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights, regardless of the stretch factor. (see QCPLayoutElement::setMinimumSize, QCPLayoutElement::setMaximumSize, QCPLayoutElement::setSizeConstraintRect.)

-

The default stretch factor of newly created rows/columns is 1.

-
See also
setColumnStretchFactors, setRowStretchFactor
- -
-
- -

§ setRowStretchFactors()

- -
-
- - - - - - - - -
void QCPLayoutGrid::setRowStretchFactors (const QList< double > & factors)
-
-

Sets the stretch factors of all rows. factors must have the size rowCount.

-

Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights, regardless of the stretch factor. (see QCPLayoutElement::setMinimumSize, QCPLayoutElement::setMaximumSize, QCPLayoutElement::setSizeConstraintRect.)

-

The default stretch factor of newly created rows/columns is 1.

-
See also
setRowStretchFactor, setColumnStretchFactors
- -
-
- -

§ setColumnSpacing()

- -
-
- - - - - - - - -
void QCPLayoutGrid::setColumnSpacing (int pixels)
-
-

Sets the gap that is left blank between columns to pixels.

-
See also
setRowSpacing
- -
-
- -

§ setRowSpacing()

- -
-
- - - - - - - - -
void QCPLayoutGrid::setRowSpacing (int pixels)
-
-

Sets the gap that is left blank between rows to pixels.

-
See also
setColumnSpacing
- -
-
- -

§ setWrap()

- -
-
- - - - - - - - -
void QCPLayoutGrid::setWrap (int count)
-
-

Sets the maximum number of columns or rows that are used, before new elements added with addElement(QCPLayoutElement*) will start to fill the next row or column, respectively. It depends on setFillOrder, whether rows or columns are wrapped.

-

If count is set to zero, no wrapping will ever occur.

-

If you wish to re-wrap the elements currently in the layout, call setFillOrder with rearrange set to true (the actual fill order doesn't need to be changed for the rearranging to be done).

-

Note that the method addElement(int row, int column, QCPLayoutElement *element) with explicitly stated row and column is not subject to wrapping and can place elements even beyond the specified wrapping point.

-
See also
setFillOrder
- -
-
- -

§ setFillOrder()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutGrid::setFillOrder (FillOrder order,
bool rearrange = true 
)
-
-

Sets the filling order and wrapping behaviour that is used when adding new elements with the method addElement(QCPLayoutElement*).

-

The specified order defines whether rows or columns are filled first. Using setWrap, you can control at which row/column count wrapping into the next column/row will occur. If you set it to zero, no wrapping will ever occur. Changing the fill order also changes the meaning of the linear index used e.g. in elementAt and takeAt. The default fill order for QCPLayoutGrid is foColumnsFirst.

-

If you want to have all current elements arranged in the new order, set rearrange to true. The elements will be rearranged in a way that tries to preserve their linear index. However, empty cells are skipped during build-up of the new cell order, which shifts the succeeding element's index. The rearranging is performed even if the specified order is already the current fill order. Thus this method can be used to re-wrap the current elements.

-

If rearrange is false, the current element arrangement is not changed, which means the linear indexes change (because the linear index is dependent on the fill order).

-

Note that the method addElement(int row, int column, QCPLayoutElement *element) with explicitly stated row and column is not subject to wrapping and can place elements even beyond the specified wrapping point.

-
See also
setWrap, addElement(QCPLayoutElement*)
- -
-
- -

§ updateLayout()

- -
-
- - - - - -
- - - - - - - -
void QCPLayoutGrid::updateLayout ()
-
-virtual
-
-

Subclasses reimplement this method to update the position and sizes of the child elements/cells via calling their QCPLayoutElement::setOuterRect. The default implementation does nothing.

-

The geometry used as a reference is the inner rect of this layout. Child elements should stay within that rect.

-

getSectionSizes may help with the reimplementation of this function.

-
See also
update
- -

Reimplemented from QCPLayout.

- -
-
- -

§ elementCount()

- -
-
- - - - - -
- - - - - - - -
virtual int QCPLayoutGrid::elementCount () const
-
-inlinevirtual
-
-

Returns the number of elements/cells in the layout.

-
See also
elements, elementAt
- -

Implements QCPLayout.

- -
-
- -

§ elementAt()

- -
-
- - - - - -
- - - - - - - - -
QCPLayoutElement * QCPLayoutGrid::elementAt (int index) const
-
-virtual
-
-

For general information about this virtual method, see the base class implementation.

-

Note that the association of the linear index to the row/column based cells depends on the current setting of setFillOrder.

-
See also
rowColToIndex
- -

Implements QCPLayout.

- -
-
- -

§ takeAt()

- -
-
- - - - - -
- - - - - - - - -
QCPLayoutElement * QCPLayoutGrid::takeAt (int index)
-
-virtual
-
-

For general information about this virtual method, see the base class implementation.

-

Note that the association of the linear index to the row/column based cells depends on the current setting of setFillOrder.

-
See also
rowColToIndex
- -

Implements QCPLayout.

- -
-
- -

§ take()

- -
-
- - - - - -
- - - - - - - - -
bool QCPLayoutGrid::take (QCPLayoutElementelement)
-
-virtual
-
-

Removes the specified element from the layout and returns true on success.

-

If the element isn't in this layout, returns false.

-

Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use simplify.

-
See also
takeAt
- -

Implements QCPLayout.

- -
-
- -

§ elements()

- -
-
- - - - - -
- - - - - - - - -
QList< QCPLayoutElement * > QCPLayoutGrid::elements (bool recursive) const
-
-virtual
-
-

Returns a list of all child elements in this layout element. If recursive is true, all sub-child elements are included in the list, too.

-
Warning
There may be nullptr entries in the returned list. For example, QCPLayoutGrid may have empty cells which yield nullptr at the respective index.
- -

Reimplemented from QCPLayout.

- -
-
- -

§ simplify()

- -
-
- - - - - -
- - - - - - - -
void QCPLayoutGrid::simplify ()
-
-virtual
-
-

Simplifies the layout by collapsing rows and columns which only contain empty cells.

- -

Reimplemented from QCPLayout.

- -
-
- -

§ minimumOuterSizeHint()

- -
-
- - - - - -
- - - - - - - -
QSize QCPLayoutGrid::minimumOuterSizeHint () const
-
-virtual
-
-

Returns the suggested minimum size this layout element (the outerRect) may be compressed to, if no manual minimum size is set.

-

if a minimum size (setMinimumSize) was not set manually, parent layouts use the returned size (usually indirectly through QCPLayout::getFinalMinimumOuterSize) to determine the minimum allowed size of this layout element.

-

A manual minimum size is considered set if it is non-zero.

-

The default implementation simply returns the sum of the horizontal margins for the width and the sum of the vertical margins for the height. Reimplementations may use their detailed knowledge about the layout element's content to provide size hints.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ maximumOuterSizeHint()

- -
-
- - - - - -
- - - - - - - -
QSize QCPLayoutGrid::maximumOuterSizeHint () const
-
-virtual
-
-

Returns the suggested maximum size this layout element (the outerRect) may be expanded to, if no manual maximum size is set.

-

if a maximum size (setMaximumSize) was not set manually, parent layouts use the returned size (usually indirectly through QCPLayout::getFinalMaximumOuterSize) to determine the maximum allowed size of this layout element.

-

A manual maximum size is considered set if it is smaller than Qt's QWIDGETSIZE_MAX.

-

The default implementation simply returns QWIDGETSIZE_MAX for both width and height, implying no suggested maximum size. Reimplementations may use their detailed knowledge about the layout element's content to provide size hints.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ element()

- -
-
- - - - - - - - - - - - - - - - - - -
QCPLayoutElement * QCPLayoutGrid::element (int row,
int column 
) const
-
-

Returns the element in the cell in row and column.

-

Returns nullptr if either the row/column is invalid or if the cell is empty. In those cases, a qDebug message is printed. To check whether a cell exists and isn't empty, use hasElement.

-
See also
addElement, hasElement
- -
-
- -

§ addElement() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool QCPLayoutGrid::addElement (int row,
int column,
QCPLayoutElementelement 
)
-
-

This is an overloaded function.

-

Adds the element to cell with row and column. If element is already in a layout, it is first removed from there. If row or column don't exist yet, the layout is expanded accordingly.

-

Returns true if the element was added successfully, i.e. if the cell at row and column didn't already have an element.

-

Use the overload of this method without explicit row/column index to place the element according to the configured fill order and wrapping settings.

-
See also
element, hasElement, take, remove
- -
-
- -

§ addElement() [2/2]

- -
-
- - - - - - - - -
bool QCPLayoutGrid::addElement (QCPLayoutElementelement)
-
-

This is an overloaded function.

-

Adds the element to the next empty cell according to the current fill order (setFillOrder) and wrapping (setWrap). If element is already in a layout, it is first removed from there. If necessary, the layout is expanded to hold the new element.

-

Returns true if the element was added successfully.

-
See also
setFillOrder, setWrap, element, hasElement, take, remove
- -
-
- -

§ hasElement()

- -
-
- - - - - - - - - - - - - - - - - - -
bool QCPLayoutGrid::hasElement (int row,
int column 
)
-
-

Returns whether the cell at row and column exists and contains a valid element, i.e. isn't empty.

-
See also
element
- -
-
- -

§ expandTo()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutGrid::expandTo (int newRowCount,
int newColumnCount 
)
-
-

Expands the layout to have newRowCount rows and newColumnCount columns. So the last valid row index will be newRowCount-1, the last valid column index will be newColumnCount-1.

-

If the current column/row count is already larger or equal to newColumnCount/newRowCount, this function does nothing in that dimension.

-

Newly created cells are empty, new rows and columns have the stretch factor 1.

-

Note that upon a call to addElement, the layout is expanded automatically to contain the specified row and column, using this function.

-
See also
simplify
- -
-
- -

§ insertRow()

- -
-
- - - - - - - - -
void QCPLayoutGrid::insertRow (int newIndex)
-
-

Inserts a new row with empty cells at the row index newIndex. Valid values for newIndex range from 0 (inserts a row at the top) to rowCount (appends a row at the bottom).

-
See also
insertColumn
- -
-
- -

§ insertColumn()

- -
-
- - - - - - - - -
void QCPLayoutGrid::insertColumn (int newIndex)
-
-

Inserts a new column with empty cells at the column index newIndex. Valid values for newIndex range from 0 (inserts a column at the left) to columnCount (appends a column at the right).

-
See also
insertRow
- -
-
- -

§ rowColToIndex()

- -
-
- - - - - - - - - - - - - - - - - - -
int QCPLayoutGrid::rowColToIndex (int row,
int column 
) const
-
-

Converts the given row and column to the linear index used by some methods of QCPLayoutGrid and QCPLayout.

-

The way the cells are indexed depends on setFillOrder. If it is foRowsFirst, the indices increase left to right and then top to bottom. If it is foColumnsFirst, the indices increase top to bottom and then left to right.

-

For the returned index to be valid, row and column must be valid indices themselves, i.e. greater or equal to zero and smaller than the current rowCount/columnCount.

-
See also
indexToRowCol
- -
-
- -

§ indexToRowCol()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPLayoutGrid::indexToRowCol (int index,
int & row,
int & column 
) const
-
-

Converts the linear index to row and column indices and writes the result to row and column.

-

The way the cells are indexed depends on setFillOrder. If it is foRowsFirst, the indices increase left to right and then top to bottom. If it is foColumnsFirst, the indices increase top to bottom and then left to right.

-

If there are no cells (i.e. column or row count is zero), sets row and column to -1.

-

For the retrieved row and column to be valid, the passed index must be valid itself, i.e. greater or equal to zero and smaller than the current elementCount.

-
See also
rowColToIndex
- -
-
- -

§ getMinimumRowColSizes()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPLayoutGrid::getMinimumRowColSizes (QVector< int > * minColWidths,
QVector< int > * minRowHeights 
) const
-
-protected
-
-

Places the minimum column widths and row heights into minColWidths and minRowHeights respectively.

-

The minimum height of a row is the largest minimum height of any element's outer rect in that row. The minimum width of a column is the largest minimum width of any element's outer rect in that column.

-

This is a helper function for updateLayout.

-
See also
getMaximumRowColSizes
- -
-
- -

§ getMaximumRowColSizes()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPLayoutGrid::getMaximumRowColSizes (QVector< int > * maxColWidths,
QVector< int > * maxRowHeights 
) const
-
-protected
-
-

Places the maximum column widths and row heights into maxColWidths and maxRowHeights respectively.

-

The maximum height of a row is the smallest maximum height of any element's outer rect in that row. The maximum width of a column is the smallest maximum width of any element's outer rect in that column.

-

This is a helper function for updateLayout.

-
See also
getMinimumRowColSizes
- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layout.h
  • -
  • src/layout.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPLayoutGrid__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPLayoutGrid__inherit__graph.png deleted file mode 100644 index be35cb1c..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPLayoutGrid__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPLayoutInset.html b/third_party/qcustomplot/documentation/html/classQCPLayoutInset.html deleted file mode 100644 index f28654fb..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPLayoutInset.html +++ /dev/null @@ -1,742 +0,0 @@ - - - - - - -QCPLayoutInset Class Reference - - - - -
- -
-
QCPLayoutInset Class Reference
-
-
- -

A layout that places child elements aligned to the border or arbitrarily positioned. - More...

-
-Inheritance diagram for QCPLayoutInset:
-
-
Inheritance graph
- - - - - -
- - - - - - - - - -

-Public Types

enum  InsetPlacement
 
- Public Types inherited from QCPLayoutElement
enum  UpdatePhase
 
enum  SizeConstraintRect
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPLayoutInset ()
 
InsetPlacement insetPlacement (int index) const
 
Qt::Alignment insetAlignment (int index) const
 
QRectF insetRect (int index) const
 
void setInsetPlacement (int index, InsetPlacement placement)
 
void setInsetAlignment (int index, Qt::Alignment alignment)
 
void setInsetRect (int index, const QRectF &rect)
 
virtual void updateLayout ()
 
virtual int elementCount () const
 
virtual QCPLayoutElementelementAt (int index) const
 
virtual QCPLayoutElementtakeAt (int index)
 
virtual bool take (QCPLayoutElement *element)
 
virtual void simplify ()
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
void addElement (QCPLayoutElement *element, Qt::Alignment alignment)
 
void addElement (QCPLayoutElement *element, const QRectF &rect)
 
- Public Functions inherited from QCPLayout
 QCPLayout ()
 
virtual void update (UpdatePhase phase)
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
bool removeAt (int index)
 
bool remove (QCPLayoutElement *element)
 
void clear ()
 
- Public Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
virtual QSize minimumOuterSizeHint () const
 
virtual QSize maximumOuterSizeHint () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- Protected Functions inherited from QCPLayout
void sizeConstraintsChanged () const
 
void adoptElement (QCPLayoutElement *el)
 
void releaseElement (QCPLayoutElement *el)
 
QVector< int > getSectionSizes (QVector< int > maxSizes, QVector< int > minSizes, QVector< double > stretchFactors, int totalSize) const
 
- Protected Functions inherited from QCPLayoutElement
virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
- Protected Functions inherited from QCPLayerable
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- Protected Static Functions inherited from QCPLayout
static QSize getFinalMinimumOuterSize (const QCPLayoutElement *el)
 
static QSize getFinalMaximumOuterSize (const QCPLayoutElement *el)
 
-

Detailed Description

-

A layout that places child elements aligned to the border or arbitrarily positioned.

-

Elements are placed either aligned to the border or at arbitrary position in the area of the layout. Which placement applies is controlled with the InsetPlacement (setInsetPlacement).

-

Elements are added via addElement(QCPLayoutElement *element, Qt::Alignment alignment) or addElement(QCPLayoutElement *element, const QRectF &rect). If the first method is used, the inset placement will default to ipBorderAligned and the element will be aligned according to the alignment parameter. The second method defaults to ipFree and allows placing elements at arbitrary position and size, defined by rect.

-

The alignment or rect can be set via setInsetAlignment or setInsetRect, respectively.

-

This is the layout that every QCPAxisRect has as QCPAxisRect::insetLayout.

-

Member Enumeration Documentation

- -

§ InsetPlacement

- -
-
-

Defines how the placement and sizing is handled for a certain element in a QCPLayoutInset.

- - - -
Enumerator
ipFree 

The element may be positioned/sized arbitrarily, see setInsetRect.

-
ipBorderAligned 

The element is aligned to one of the layout sides, see setInsetAlignment.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPLayoutInset()

- -
-
- - - - - -
- - - - - - - -
QCPLayoutInset::QCPLayoutInset ()
-
-explicit
-
-

Creates an instance of QCPLayoutInset and sets default values.

- -
-
-

Member Function Documentation

- -

§ insetPlacement()

- -
-
- - - - - - - - -
QCPLayoutInset::InsetPlacement QCPLayoutInset::insetPlacement (int index) const
-
-

Returns the placement type of the element with the specified index.

- -
-
- -

§ insetAlignment()

- -
-
- - - - - - - - -
Qt::Alignment QCPLayoutInset::insetAlignment (int index) const
-
-

Returns the alignment of the element with the specified index. The alignment only has a meaning, if the inset placement (setInsetPlacement) is ipBorderAligned.

- -
-
- -

§ insetRect()

- -
-
- - - - - - - - -
QRectF QCPLayoutInset::insetRect (int index) const
-
-

Returns the rect of the element with the specified index. The rect only has a meaning, if the inset placement (setInsetPlacement) is ipFree.

- -
-
- -

§ setInsetPlacement()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutInset::setInsetPlacement (int index,
QCPLayoutInset::InsetPlacement placement 
)
-
-

Sets the inset placement type of the element with the specified index to placement.

-
See also
InsetPlacement
- -
-
- -

§ setInsetAlignment()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutInset::setInsetAlignment (int index,
Qt::Alignment alignment 
)
-
-

If the inset placement (setInsetPlacement) is ipBorderAligned, this function is used to set the alignment of the element with the specified index to alignment.

-

alignment is an or combination of the following alignment flags: Qt::AlignLeft, Qt::AlignHCenter, Qt::AlighRight, Qt::AlignTop, Qt::AlignVCenter, Qt::AlignBottom. Any other alignment flags will be ignored.

- -
-
- -

§ setInsetRect()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutInset::setInsetRect (int index,
const QRectF & rect 
)
-
-

If the inset placement (setInsetPlacement) is ipFree, this function is used to set the position and size of the element with the specified index to rect.

-

rect is given in fractions of the whole inset layout rect. So an inset with rect (0, 0, 1, 1) will span the entire layout. An inset with rect (0.6, 0.1, 0.35, 0.35) will be in the top right corner of the layout, with 35% width and height of the parent layout.

-

Note that the minimum and maximum sizes of the embedded element (QCPLayoutElement::setMinimumSize, QCPLayoutElement::setMaximumSize) are enforced.

- -
-
- -

§ updateLayout()

- -
-
- - - - - -
- - - - - - - -
void QCPLayoutInset::updateLayout ()
-
-virtual
-
-

Subclasses reimplement this method to update the position and sizes of the child elements/cells via calling their QCPLayoutElement::setOuterRect. The default implementation does nothing.

-

The geometry used as a reference is the inner rect of this layout. Child elements should stay within that rect.

-

getSectionSizes may help with the reimplementation of this function.

-
See also
update
- -

Reimplemented from QCPLayout.

- -
-
- -

§ elementCount()

- -
-
- - - - - -
- - - - - - - -
int QCPLayoutInset::elementCount () const
-
-virtual
-
-

Returns the number of elements/cells in the layout.

-
See also
elements, elementAt
- -

Implements QCPLayout.

- -
-
- -

§ elementAt()

- -
-
- - - - - -
- - - - - - - - -
QCPLayoutElement * QCPLayoutInset::elementAt (int index) const
-
-virtual
-
-

Returns the element in the cell with the given index. If index is invalid, returns nullptr.

-

Note that even if index is valid, the respective cell may be empty in some layouts (e.g. QCPLayoutGrid), so this function may return nullptr in those cases. You may use this function to check whether a cell is empty or not.

-
See also
elements, elementCount, takeAt
- -

Implements QCPLayout.

- -
-
- -

§ takeAt()

- -
-
- - - - - -
- - - - - - - - -
QCPLayoutElement * QCPLayoutInset::takeAt (int index)
-
-virtual
-
-

Removes the element with the given index from the layout and returns it.

-

If the index is invalid or the cell with that index is empty, returns nullptr.

-

Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use simplify.

-
See also
elementAt, take
- -

Implements QCPLayout.

- -
-
- -

§ take()

- -
-
- - - - - -
- - - - - - - - -
bool QCPLayoutInset::take (QCPLayoutElementelement)
-
-virtual
-
-

Removes the specified element from the layout and returns true on success.

-

If the element isn't in this layout, returns false.

-

Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use simplify.

-
See also
takeAt
- -

Implements QCPLayout.

- -
-
- -

§ simplify()

- -
-
- - - - - -
- - - - - - - -
void QCPLayoutInset::simplify ()
-
-inlinevirtual
-
-

The QCPInsetLayout does not need simplification since it can never have empty cells due to its linear index structure. This method does nothing.

- -

Reimplemented from QCPLayout.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPLayoutInset::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

The inset layout is sensitive to events only at areas where its (visible) child elements are sensitive. If the selectTest method of any of the child elements returns a positive number for pos, this method returns a value corresponding to 0.99 times the parent plot's selection tolerance. The inset layout is not selectable itself by default. So if onlySelectable is true, -1.0 is returned.

-

See QCPLayerable::selectTest for a general explanation of this virtual method.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ addElement() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutInset::addElement (QCPLayoutElementelement,
Qt::Alignment alignment 
)
-
-

Adds the specified element to the layout as an inset aligned at the border (setInsetAlignment is initialized with ipBorderAligned). The alignment is set to alignment.

-

alignment is an or combination of the following alignment flags: Qt::AlignLeft, Qt::AlignHCenter, Qt::AlighRight, Qt::AlignTop, Qt::AlignVCenter, Qt::AlignBottom. Any other alignment flags will be ignored.

-
See also
addElement(QCPLayoutElement *element, const QRectF &rect)
- -
-
- -

§ addElement() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLayoutInset::addElement (QCPLayoutElementelement,
const QRectF & rect 
)
-
-

Adds the specified element to the layout as an inset with free positioning/sizing (setInsetAlignment is initialized with ipFree). The position and size is set to rect.

-

rect is given in fractions of the whole inset layout rect. So an inset with rect (0, 0, 1, 1) will span the entire layout. An inset with rect (0.6, 0.1, 0.35, 0.35) will be in the top right corner of the layout, with 35% width and height of the parent layout.

-
See also
addElement(QCPLayoutElement *element, Qt::Alignment alignment)
- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layout.h
  • -
  • src/layout.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPLayoutInset__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPLayoutInset__inherit__graph.png deleted file mode 100644 index 7c37206c..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPLayoutInset__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPLayout__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPLayout__inherit__graph.png deleted file mode 100644 index 69eb17f5..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPLayout__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPLegend.html b/third_party/qcustomplot/documentation/html/classQCPLegend.html deleted file mode 100644 index 28c0beb4..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPLegend.html +++ /dev/null @@ -1,1323 +0,0 @@ - - - - - - -QCPLegend Class Reference - - - - -
- -
-
QCPLegend Class Reference
-
-
- -

Manages a legend inside a QCustomPlot. - More...

-
-Inheritance diagram for QCPLegend:
-
-
Inheritance graph
- - - - - - -
- - - - - - - - - - - - -

-Public Types

enum  SelectablePart
 
- Public Types inherited from QCPLayoutGrid
enum  FillOrder
 
- Public Types inherited from QCPLayoutElement
enum  UpdatePhase
 
enum  SizeConstraintRect
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPLegend ()
 
-QPen borderPen () const
 
-QBrush brush () const
 
-QFont font () const
 
-QColor textColor () const
 
-QSize iconSize () const
 
-int iconTextPadding () const
 
-QPen iconBorderPen () const
 
-SelectableParts selectableParts () const
 
-SelectableParts selectedParts () const
 
-QPen selectedBorderPen () const
 
-QPen selectedIconBorderPen () const
 
-QBrush selectedBrush () const
 
-QFont selectedFont () const
 
-QColor selectedTextColor () const
 
void setBorderPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setFont (const QFont &font)
 
void setTextColor (const QColor &color)
 
void setIconSize (const QSize &size)
 
void setIconSize (int width, int height)
 
void setIconTextPadding (int padding)
 
void setIconBorderPen (const QPen &pen)
 
Q_SLOT void setSelectableParts (const SelectableParts &selectableParts)
 
Q_SLOT void setSelectedParts (const SelectableParts &selectedParts)
 
void setSelectedBorderPen (const QPen &pen)
 
void setSelectedIconBorderPen (const QPen &pen)
 
void setSelectedBrush (const QBrush &brush)
 
void setSelectedFont (const QFont &font)
 
void setSelectedTextColor (const QColor &color)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
QCPAbstractLegendItemitem (int index) const
 
QCPPlottableLegendItemitemWithPlottable (const QCPAbstractPlottable *plottable) const
 
int itemCount () const
 
bool hasItem (QCPAbstractLegendItem *item) const
 
bool hasItemWithPlottable (const QCPAbstractPlottable *plottable) const
 
bool addItem (QCPAbstractLegendItem *item)
 
bool removeItem (int index)
 
bool removeItem (QCPAbstractLegendItem *item)
 
void clearItems ()
 
QList< QCPAbstractLegendItem * > selectedItems () const
 
- Public Functions inherited from QCPLayoutGrid
 QCPLayoutGrid ()
 
int rowCount () const
 
int columnCount () const
 
-QList< double > columnStretchFactors () const
 
-QList< double > rowStretchFactors () const
 
-int columnSpacing () const
 
-int rowSpacing () const
 
-int wrap () const
 
-FillOrder fillOrder () const
 
void setColumnStretchFactor (int column, double factor)
 
void setColumnStretchFactors (const QList< double > &factors)
 
void setRowStretchFactor (int row, double factor)
 
void setRowStretchFactors (const QList< double > &factors)
 
void setColumnSpacing (int pixels)
 
void setRowSpacing (int pixels)
 
void setWrap (int count)
 
void setFillOrder (FillOrder order, bool rearrange=true)
 
virtual void updateLayout ()
 
virtual int elementCount () const
 
virtual QCPLayoutElementelementAt (int index) const
 
virtual QCPLayoutElementtakeAt (int index)
 
virtual bool take (QCPLayoutElement *element)
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
virtual void simplify ()
 
virtual QSize minimumOuterSizeHint () const
 
virtual QSize maximumOuterSizeHint () const
 
QCPLayoutElementelement (int row, int column) const
 
bool addElement (int row, int column, QCPLayoutElement *element)
 
bool addElement (QCPLayoutElement *element)
 
bool hasElement (int row, int column)
 
void expandTo (int newRowCount, int newColumnCount)
 
void insertRow (int newIndex)
 
void insertColumn (int newIndex)
 
int rowColToIndex (int row, int column) const
 
void indexToRowCol (int index, int &row, int &column) const
 
- Public Functions inherited from QCPLayout
 QCPLayout ()
 
virtual void update (UpdatePhase phase)
 
bool removeAt (int index)
 
bool remove (QCPLayoutElement *element)
 
void clear ()
 
- Public Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - -

-Signals

void selectionChanged (QCPLegend::SelectableParts parts)
 
-void selectableChanged (QCPLegend::SelectableParts parts)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual QCP::Interaction selectionCategory () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
QPen getBorderPen () const
 
QBrush getBrush () const
 
- Protected Functions inherited from QCPLayoutGrid
void getMinimumRowColSizes (QVector< int > *minColWidths, QVector< int > *minRowHeights) const
 
void getMaximumRowColSizes (QVector< int > *maxColWidths, QVector< int > *maxRowHeights) const
 
- Protected Functions inherited from QCPLayout
void sizeConstraintsChanged () const
 
void adoptElement (QCPLayoutElement *el)
 
void releaseElement (QCPLayoutElement *el)
 
QVector< int > getSectionSizes (QVector< int > maxSizes, QVector< int > minSizes, QVector< double > stretchFactors, int totalSize) const
 
- Protected Functions inherited from QCPLayoutElement
virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
- Protected Functions inherited from QCPLayerable
virtual QRect clipRect () const
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - -

-Additional Inherited Members

- Protected Static Functions inherited from QCPLayout
static QSize getFinalMinimumOuterSize (const QCPLayoutElement *el)
 
static QSize getFinalMaximumOuterSize (const QCPLayoutElement *el)
 
-

Detailed Description

-

Manages a legend inside a QCustomPlot.

-

A legend is a small box somewhere in the plot which lists plottables with their name and icon.

-

A legend is populated with legend items by calling QCPAbstractPlottable::addToLegend on the plottable, for which a legend item shall be created. In the case of the main legend (QCustomPlot::legend), simply adding plottables to the plot while QCustomPlot::setAutoAddPlottableToLegend is set to true (the default) creates corresponding legend items. The legend item associated with a certain plottable can be removed with QCPAbstractPlottable::removeFromLegend. However, QCPLegend also offers an interface to add and manipulate legend items directly: item, itemWithPlottable, itemCount, addItem, removeItem, etc.

-

Since QCPLegend derives from QCPLayoutGrid, it can be placed in any position a QCPLayoutElement may be positioned. The legend items are themselves QCPLayoutElements which are placed in the grid layout of the legend. QCPLegend only adds an interface specialized for handling child elements of type QCPAbstractLegendItem, as mentioned above. In principle, any other layout elements may also be added to a legend via the normal QCPLayoutGrid interface. See the special page about The Layout System for examples on how to add other elements to the legend and move it outside the axis rect.

-

Use the methods setFillOrder and setWrap inherited from QCPLayoutGrid to control in which order (column first or row first) the legend is filled up when calling addItem, and at which column or row wrapping occurs. The default fill order for legends is foRowsFirst.

-

By default, every QCustomPlot has one legend (QCustomPlot::legend) which is placed in the inset layout of the main axis rect (QCPAxisRect::insetLayout). To move the legend to another position inside the axis rect, use the methods of the QCPLayoutInset. To move the legend outside of the axis rect, place it anywhere else with the QCPLayout/QCPLayoutElement interface.

-

Member Enumeration Documentation

- -

§ SelectablePart

- -
-
- - - - -
enum QCPLegend::SelectablePart
-
-

Defines the selectable parts of a legend

-
See also
setSelectedParts, setSelectableParts
- - - - -
Enumerator
spNone 

0x000 None

-
spLegendBox 

0x001 The legend box (frame)

-
spItems 

0x002 Legend items individually (see selectedItems)

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPLegend()

- -
-
- - - - - -
- - - - - - - -
QCPLegend::QCPLegend ()
-
-explicit
-
-

Constructs a new QCPLegend instance with default values.

-

Note that by default, QCustomPlot already contains a legend ready to be used as QCustomPlot::legend

- -
-
-

Member Function Documentation

- -

§ setBorderPen()

- -
-
- - - - - - - - -
void QCPLegend::setBorderPen (const QPen & pen)
-
-

Sets the pen, the border of the entire legend is drawn with.

- -
-
- -

§ setBrush()

- -
-
- - - - - - - - -
void QCPLegend::setBrush (const QBrush & brush)
-
-

Sets the brush of the legend background.

- -
-
- -

§ setFont()

- -
-
- - - - - - - - -
void QCPLegend::setFont (const QFont & font)
-
-

Sets the default font of legend text. Legend items that draw text (e.g. the name of a graph) will use this font by default. However, a different font can be specified on a per-item-basis by accessing the specific legend item.

-

This function will also set font on all already existing legend items.

-
See also
QCPAbstractLegendItem::setFont
- -
-
- -

§ setTextColor()

- -
-
- - - - - - - - -
void QCPLegend::setTextColor (const QColor & color)
-
-

Sets the default color of legend text. Legend items that draw text (e.g. the name of a graph) will use this color by default. However, a different colors can be specified on a per-item-basis by accessing the specific legend item.

-

This function will also set color on all already existing legend items.

-
See also
QCPAbstractLegendItem::setTextColor
- -
-
- -

§ setIconSize() [1/2]

- -
-
- - - - - - - - -
void QCPLegend::setIconSize (const QSize & size)
-
-

Sets the size of legend icons. Legend items that draw an icon (e.g. a visual representation of the graph) will use this size by default.

- -
-
- -

§ setIconSize() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPLegend::setIconSize (int width,
int height 
)
-
-

This is an overloaded function.

- -
-
- -

§ setIconTextPadding()

- -
-
- - - - - - - - -
void QCPLegend::setIconTextPadding (int padding)
-
-

Sets the horizontal space in pixels between the legend icon and the text next to it. Legend items that draw an icon (e.g. a visual representation of the graph) and text (e.g. the name of the graph) will use this space by default.

- -
-
- -

§ setIconBorderPen()

- -
-
- - - - - - - - -
void QCPLegend::setIconBorderPen (const QPen & pen)
-
-

Sets the pen used to draw a border around each legend icon. Legend items that draw an icon (e.g. a visual representation of the graph) will use this pen by default.

-

If no border is wanted, set this to Qt::NoPen.

- -
-
- -

§ setSelectableParts()

- -
-
- - - - - - - - -
void QCPLegend::setSelectableParts (const SelectableParts & selectable)
-
-

Sets whether the user can (de-)select the parts in selectable by clicking on the QCustomPlot surface. (When QCustomPlot::setInteractions contains QCP::iSelectLegend.)

-

However, even when selectable is set to a value not allowing the selection of a specific part, it is still possible to set the selection of this part manually, by calling setSelectedParts directly.

-
See also
SelectablePart, setSelectedParts
- -
-
- -

§ setSelectedParts()

- -
-
- - - - - - - - -
void QCPLegend::setSelectedParts (const SelectableParts & selected)
-
-

Sets the selected state of the respective legend parts described by SelectablePart. When a part is selected, it uses a different pen/font and brush. If some legend items are selected and selected doesn't contain spItems, those items become deselected.

-

The entire selection mechanism is handled automatically when QCustomPlot::setInteractions contains iSelectLegend. You only need to call this function when you wish to change the selection state manually.

-

This function can change the selection state of a part even when setSelectableParts was set to a value that actually excludes the part.

-

emits the selectionChanged signal when selected is different from the previous selection state.

-

Note that it doesn't make sense to set the selected state spItems here when it wasn't set before, because there's no way to specify which exact items to newly select. Do this by calling QCPAbstractLegendItem::setSelected directly on the legend item you wish to select.

-
See also
SelectablePart, setSelectableParts, selectTest, setSelectedBorderPen, setSelectedIconBorderPen, setSelectedBrush, setSelectedFont
- -
-
- -

§ setSelectedBorderPen()

- -
-
- - - - - - - - -
void QCPLegend::setSelectedBorderPen (const QPen & pen)
-
-

When the legend box is selected, this pen is used to draw the border instead of the normal pen set via setBorderPen.

-
See also
setSelectedParts, setSelectableParts, setSelectedBrush
- -
-
- -

§ setSelectedIconBorderPen()

- -
-
- - - - - - - - -
void QCPLegend::setSelectedIconBorderPen (const QPen & pen)
-
-

Sets the pen legend items will use to draw their icon borders, when they are selected.

-
See also
setSelectedParts, setSelectableParts, setSelectedFont
- -
-
- -

§ setSelectedBrush()

- -
-
- - - - - - - - -
void QCPLegend::setSelectedBrush (const QBrush & brush)
-
-

When the legend box is selected, this brush is used to draw the legend background instead of the normal brush set via setBrush.

-
See also
setSelectedParts, setSelectableParts, setSelectedBorderPen
- -
-
- -

§ setSelectedFont()

- -
-
- - - - - - - - -
void QCPLegend::setSelectedFont (const QFont & font)
-
-

Sets the default font that is used by legend items when they are selected.

-

This function will also set font on all already existing legend items.

-
See also
setFont, QCPAbstractLegendItem::setSelectedFont
- -
-
- -

§ setSelectedTextColor()

- -
-
- - - - - - - - -
void QCPLegend::setSelectedTextColor (const QColor & color)
-
-

Sets the default text color that is used by legend items when they are selected.

-

This function will also set color on all already existing legend items.

-
See also
setTextColor, QCPAbstractLegendItem::setSelectedTextColor
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPLegend::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

Layout elements are sensitive to events inside their outer rect. If pos is within the outer rect, this method returns a value corresponding to 0.99 times the parent plot's selection tolerance. However, layout elements are not selectable by default. So if onlySelectable is true, -1.0 is returned.

-

See QCPLayerable::selectTest for a general explanation of this virtual method.

-

QCPLayoutElement subclasses may reimplement this method to provide more specific selection test behaviour.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ item()

- -
-
- - - - - - - - -
QCPAbstractLegendItem * QCPLegend::item (int index) const
-
-

Returns the item with index i. If non-legend items were added to the legend, and the element at the specified cell index is not a QCPAbstractLegendItem, returns nullptr.

-

Note that the linear index depends on the current fill order (setFillOrder).

-
See also
itemCount, addItem, itemWithPlottable
- -
-
- -

§ itemWithPlottable()

- -
-
- - - - - - - - -
QCPPlottableLegendItem * QCPLegend::itemWithPlottable (const QCPAbstractPlottableplottable) const
-
-

Returns the QCPPlottableLegendItem which is associated with plottable (e.g. a QCPGraph*). If such an item isn't in the legend, returns nullptr.

-
See also
hasItemWithPlottable
- -
-
- -

§ itemCount()

- -
-
- - - - - - - -
int QCPLegend::itemCount () const
-
-

Returns the number of items currently in the legend. It is identical to the base class QCPLayoutGrid::elementCount(), and unlike the other "item" interface methods of QCPLegend, doesn't only address elements which can be cast to QCPAbstractLegendItem.

-

Note that if empty cells are in the legend (e.g. by calling methods of the QCPLayoutGrid base class which allows creating empty cells), they are included in the returned count.

-
See also
item
- -
-
- -

§ hasItem()

- -
-
- - - - - - - - -
bool QCPLegend::hasItem (QCPAbstractLegendItemitem) const
-
-

Returns whether the legend contains item.

-
See also
hasItemWithPlottable
- -
-
- -

§ hasItemWithPlottable()

- -
-
- - - - - - - - -
bool QCPLegend::hasItemWithPlottable (const QCPAbstractPlottableplottable) const
-
-

Returns whether the legend contains a QCPPlottableLegendItem which is associated with plottable (e.g. a QCPGraph*). If such an item isn't in the legend, returns false.

-
See also
itemWithPlottable
- -
-
- -

§ addItem()

- -
-
- - - - - - - - -
bool QCPLegend::addItem (QCPAbstractLegendItemitem)
-
-

Adds item to the legend, if it's not present already. The element is arranged according to the current fill order (setFillOrder) and wrapping (setWrap).

-

Returns true on sucess, i.e. if the item wasn't in the list already and has been successfuly added.

-

The legend takes ownership of the item.

-
See also
removeItem, item, hasItem
- -
-
- -

§ removeItem() [1/2]

- -
-
- - - - - - - - -
bool QCPLegend::removeItem (int index)
-
-

This is an overloaded function.

-

Removes the item with the specified index from the legend and deletes it.

-

After successful removal, the legend is reordered according to the current fill order (setFillOrder) and wrapping (setWrap), so no empty cell remains where the removed item was. If you don't want this, rather use the raw element interface of QCPLayoutGrid.

-

Returns true, if successful. Unlike QCPLayoutGrid::removeAt, this method only removes elements derived from QCPAbstractLegendItem.

-
See also
itemCount, clearItems
- -
-
- -

§ removeItem() [2/2]

- -
-
- - - - - - - - -
bool QCPLegend::removeItem (QCPAbstractLegendItemitem)
-
-

This is an overloaded function.

-

Removes item from the legend and deletes it.

-

After successful removal, the legend is reordered according to the current fill order (setFillOrder) and wrapping (setWrap), so no empty cell remains where the removed item was. If you don't want this, rather use the raw element interface of QCPLayoutGrid.

-

Returns true, if successful.

-
See also
clearItems
- -
-
- -

§ clearItems()

- -
-
- - - - - - - -
void QCPLegend::clearItems ()
-
-

Removes all items from the legend.

- -
-
- -

§ selectedItems()

- -
-
- - - - - - - -
QList< QCPAbstractLegendItem * > QCPLegend::selectedItems () const
-
-

Returns the legend items that are currently selected. If no items are selected, the list is empty.

-
See also
QCPAbstractLegendItem::setSelected, setSelectable
- -
-
- -

§ selectionChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPLegend::selectionChanged (QCPLegend::SelectableParts selection)
-
-signal
-
-

This signal is emitted when the selection state of this legend has changed.

-
See also
setSelectedParts, setSelectableParts
- -
-
- -

§ parentPlotInitialized()

- -
-
- - - - - -
- - - - - - - - -
void QCPLegend::parentPlotInitialized (QCustomPlotparentPlot)
-
-protectedvirtual
-
-

propagates the parent plot initialization to all child elements, by calling QCPLayerable::initializeParentPlot on them.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ selectionCategory()

- -
-
- - - - - -
- - - - - - - -
QCP::Interaction QCPLegend::selectionCategory () const
-
-protectedvirtual
-
-

Returns the selection category this layerable shall belong to. The selection category is used in conjunction with QCustomPlot::setInteractions to control which objects are selectable and which aren't.

-

Subclasses that don't fit any of the normal QCP::Interaction values can use QCP::iSelectOther. This is what the default implementation returns.

-
See also
QCustomPlot::setInteractions
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPLegend::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

A convenience function to easily set the QPainter::Antialiased hint on the provided painter before drawing main legend elements.

-

This is the antialiasing state the painter passed to the draw method is in by default.

-

This function takes into account the local setting of the antialiasing flag as well as the overrides set with QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

-

For general information about this virtual method, see the base class implementation.

-
See also
setAntialiased
- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPLegend::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws the legend box with the provided painter. The individual legend items are layerables themselves, thus are drawn independently.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ selectEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPLegend::selectEvent (QMouseEvent * event,
bool additive,
const QVariant & details,
bool * selectionStateChanged 
)
-
-protectedvirtual
-
-

This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing.

-

event is the mouse event that caused the selection. additive indicates, whether the user was holding the multi-select-modifier while performing the selection (see QCustomPlot::setMultiSelectModifier). if additive is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected).

-

Every selectEvent is preceded by a call to selectTest, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent QCustomPlot). The details data you output from selectTest is fed back via details here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually details is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like QCPAxis). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked.

-

selectionStateChanged is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if additive is true, selectionStateChanged must also be set to true, because the selection toggles. If additive is false, selectionStateChanged is only set to true, if the layerable was previously unselected and now is switched to the selected state.

-
See also
selectTest, deselectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ deselectEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPLegend::deselectEvent (bool * selectionStateChanged)
-
-protectedvirtual
-
-

This event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to QCustomPlot::deselectAll. Subclasses should react to it by unsetting their selection appropriately.

-

just as in selectEvent, the output parameter selectionStateChanged (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively.

-
See also
selectTest, selectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ getBorderPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPLegend::getBorderPen () const
-
-protected
-
-

Returns the pen used to paint the border of the legend, taking into account the selection state of the legend box.

- -
-
- -

§ getBrush()

- -
-
- - - - - -
- - - - - - - -
QBrush QCPLegend::getBrush () const
-
-protected
-
-

Returns the brush used to paint the background of the legend, taking into account the selection state of the legend box.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layoutelements/layoutelement-legend.h
  • -
  • src/layoutelements/layoutelement-legend.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPLegend__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPLegend__inherit__graph.png deleted file mode 100644 index b9a03f2f..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPLegend__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPLineEnding.html b/third_party/qcustomplot/documentation/html/classQCPLineEnding.html deleted file mode 100644 index 948968db..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPLineEnding.html +++ /dev/null @@ -1,378 +0,0 @@ - - - - - - -QCPLineEnding Class Reference - - - - -
- -
-
QCPLineEnding Class Reference
-
-
- -

Handles the different ending decorations for line-like items. - More...

- - - - -

-Public Types

enum  EndingStyle
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPLineEnding ()
 
 QCPLineEnding (EndingStyle style, double width=8, double length=10, bool inverted=false)
 
-EndingStyle style () const
 
-double width () const
 
-double length () const
 
-bool inverted () const
 
void setStyle (EndingStyle style)
 
void setWidth (double width)
 
void setLength (double length)
 
void setInverted (bool inverted)
 
double boundingDistance () const
 
double realLength () const
 
void draw (QCPPainter *painter, const QCPVector2D &pos, const QCPVector2D &dir) const
 
void draw (QCPPainter *painter, const QCPVector2D &pos, double angle) const
 
-

Detailed Description

-

Handles the different ending decorations for line-like items.

-
-QCPLineEnding.png -
-The various ending styles currently supported
-

For every ending a line-like item has, an instance of this class exists. For example, QCPItemLine has two endings which can be set with QCPItemLine::setHead and QCPItemLine::setTail.

-

The styles themselves are defined via the enum QCPLineEnding::EndingStyle. Most decorations can be modified regarding width and length, see setWidth and setLength. The direction of the ending decoration (e.g. direction an arrow is pointing) is controlled by the line-like item. For example, when both endings of a QCPItemLine are set to be arrows, they will point to opposite directions, e.g. "outward". This can be changed by setInverted, which would make the respective arrow point inward.

-

Note that due to the overloaded QCPLineEnding constructor, you may directly specify a QCPLineEnding::EndingStyle where actually a QCPLineEnding is expected, e.g.

myItemLine->setHead(QCPLineEnding::esSpikeArrow);

Member Enumeration Documentation

- -

§ EndingStyle

- -
-
- - - - -
enum QCPLineEnding::EndingStyle
-
-

Defines the type of ending decoration for line-like items, e.g. an arrow.

-
-QCPLineEnding.png -
-

The width and length of these decorations can be controlled with the functions setWidth and setLength. Some decorations like esDisc, esSquare, esDiamond and esBar only support a width, the length property is ignored.

-
See also
QCPItemLine::setHead, QCPItemLine::setTail, QCPItemCurve::setHead, QCPItemCurve::setTail, QCPAxis::setLowerEnding, QCPAxis::setUpperEnding
- - - - - - - - - - - -
Enumerator
esNone 

No ending decoration.

-
esFlatArrow 

A filled arrow head with a straight/flat back (a triangle)

-
esSpikeArrow 

A filled arrow head with an indented back.

-
esLineArrow 

A non-filled arrow head with open back.

-
esDisc 

A filled circle.

-
esSquare 

A filled square.

-
esDiamond 

A filled diamond (45 degrees rotated square)

-
esBar 

A bar perpendicular to the line.

-
esHalfBar 

A bar perpendicular to the line, pointing out to only one side (to which side can be changed with setInverted)

-
esSkewedBar 

A bar that is skewed (skew controllable via setLength)

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPLineEnding() [1/2]

- -
-
- - - - - - - -
QCPLineEnding::QCPLineEnding ()
-
-

Creates a QCPLineEnding instance with default values (style esNone).

- -
-
- -

§ QCPLineEnding() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QCPLineEnding::QCPLineEnding (QCPLineEnding::EndingStyle style,
double width = 8,
double length = 10,
bool inverted = false 
)
-
-

Creates a QCPLineEnding instance with the specified values.

- -
-
-

Member Function Documentation

- -

§ setStyle()

- -
-
- - - - - - - - -
void QCPLineEnding::setStyle (QCPLineEnding::EndingStyle style)
-
-

Sets the style of the ending decoration.

- -
-
- -

§ setWidth()

- -
-
- - - - - - - - -
void QCPLineEnding::setWidth (double width)
-
-

Sets the width of the ending decoration, if the style supports it. On arrows, for example, the width defines the size perpendicular to the arrow's pointing direction.

-
See also
setLength
- -
-
- -

§ setLength()

- -
-
- - - - - - - - -
void QCPLineEnding::setLength (double length)
-
-

Sets the length of the ending decoration, if the style supports it. On arrows, for example, the length defines the size in pointing direction.

-
See also
setWidth
- -
-
- -

§ setInverted()

- -
-
- - - - - - - - -
void QCPLineEnding::setInverted (bool inverted)
-
-

Sets whether the ending decoration shall be inverted. For example, an arrow decoration will point inward when inverted is set to true.

-

Note that also the width direction is inverted. For symmetrical ending styles like arrows or discs, this doesn't make a difference. However, asymmetric styles like esHalfBar are affected by it, which can be used to control to which side the half bar points to.

- -
-
- -

§ boundingDistance()

- -
-
- - - - - - - -
double QCPLineEnding::boundingDistance () const
-
-

Returns the maximum pixel radius the ending decoration might cover, starting from the position the decoration is drawn at (typically a line ending/QCPItemPosition of an item).

-

This is relevant for clipping. Only omit painting of the decoration when the position where the decoration is supposed to be drawn is farther away from the clipping rect than the returned distance.

- -
-
- -

§ realLength()

- -
-
- - - - - - - -
double QCPLineEnding::realLength () const
-
-

Starting from the origin of this line ending (which is style specific), returns the length covered by the line ending symbol, in backward direction.

-

For example, the esSpikeArrow has a shorter real length than a esFlatArrow, even if both have the same setLength value, because the spike arrow has an inward curved back, which reduces the length along its center axis (the drawing origin for arrows is at the tip).

-

This function is used for precise, style specific placement of line endings, for example in QCPAxes.

- -
-
- -

§ draw() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPLineEnding::draw (QCPPainterpainter,
const QCPVector2Dpos,
const QCPVector2Ddir 
) const
-
-

Draws the line ending with the specified painter at the position pos. The direction of the line ending is controlled with dir.

- -
-
- -

§ draw() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPLineEnding::draw (QCPPainterpainter,
const QCPVector2Dpos,
double angle 
) const
-
-

This is an overloaded function.

-

Draws the line ending. The direction is controlled with the angle parameter in radians.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/lineending.h
  • -
  • src/lineending.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPMarginGroup.html b/third_party/qcustomplot/documentation/html/classQCPMarginGroup.html deleted file mode 100644 index aeb1199d..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPMarginGroup.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - -QCPMarginGroup Class Reference - - - - -
- -
-
QCPMarginGroup Class Reference
-
-
- -

A margin group allows synchronization of margin sides if working with multiple layout elements. - More...

- -

Inherits QObject.

- - - - - - - - - - -

-Public Functions

 QCPMarginGroup (QCustomPlot *parentPlot)
 
QList< QCPLayoutElement * > elements (QCP::MarginSide side) const
 
bool isEmpty () const
 
void clear ()
 
- - - - - - - -

-Protected Functions

virtual int commonMargin (QCP::MarginSide side) const
 
void addChild (QCP::MarginSide side, QCPLayoutElement *element)
 
void removeChild (QCP::MarginSide side, QCPLayoutElement *element)
 
-

Detailed Description

-

A margin group allows synchronization of margin sides if working with multiple layout elements.

-

QCPMarginGroup allows you to tie a margin side of two or more layout elements together, such that they will all have the same size, based on the largest required margin in the group.

-


-

-QCPMarginGroup.png -
-Demonstration of QCPMarginGroup
-


- In certain situations it is desirable that margins at specific sides are synchronized across layout elements. For example, if one QCPAxisRect is below another one in a grid layout, it will provide a cleaner look to the user if the left and right margins of the two axis rects are of the same size. The left axis of the top axis rect will then be at the same horizontal position as the left axis of the lower axis rect, making them appear aligned. The same applies for the right axes. This is what QCPMarginGroup makes possible.

-

To add/remove a specific side of a layout element to/from a margin group, use the QCPLayoutElement::setMarginGroup method. To completely break apart the margin group, either call clear, or just delete the margin group.

-

-Example

-

First create a margin group:

QCPMarginGroup *group = new QCPMarginGroup(customPlot);

Then set this group on the layout element sides:

customPlot->axisRect(0)->setMarginGroup(QCP::msLeft|QCP::msRight, group);
customPlot->axisRect(1)->setMarginGroup(QCP::msLeft|QCP::msRight, group);

Here, we've used the first two axis rects of the plot and synchronized their left margins with each other and their right margins with each other.

-

Constructor & Destructor Documentation

- -

§ QCPMarginGroup()

- -
-
- - - - - -
- - - - - - - - -
QCPMarginGroup::QCPMarginGroup (QCustomPlotparentPlot)
-
-explicit
-
-

Creates a new QCPMarginGroup instance in parentPlot.

- -
-
-

Member Function Documentation

- -

§ elements()

- -
-
- - - - - -
- - - - - - - - -
QList< QCPLayoutElement * > QCPMarginGroup::elements (QCP::MarginSide side) const
-
-inline
-
-

Returns a list of all layout elements that have their margin side associated with this margin group.

- -
-
- -

§ isEmpty()

- -
-
- - - - - - - -
bool QCPMarginGroup::isEmpty () const
-
-

Returns whether this margin group is empty. If this function returns true, no layout elements use this margin group to synchronize margin sides.

- -
-
- -

§ clear()

- -
-
- - - - - - - -
void QCPMarginGroup::clear ()
-
-

Clears this margin group. The synchronization of the margin sides that use this margin group is lifted and they will use their individual margin sizes again.

- -
-
- -

§ commonMargin()

- -
-
- - - - - -
- - - - - - - - -
int QCPMarginGroup::commonMargin (QCP::MarginSide side) const
-
-protectedvirtual
-
-

Returns the synchronized common margin for side. This is the margin value that will be used by the layout element on the respective side, if it is part of this margin group.

-

The common margin is calculated by requesting the automatic margin (QCPLayoutElement::calculateAutoMargin) of each element associated with side in this margin group, and choosing the largest returned value. (QCPLayoutElement::minimumMargins is taken into account, too.)

- -
-
- -

§ addChild()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPMarginGroup::addChild (QCP::MarginSide side,
QCPLayoutElementelement 
)
-
-protected
-
-

Adds element to the internal list of child elements, for the margin side.

-

This function does not modify the margin group property of element.

- -
-
- -

§ removeChild()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPMarginGroup::removeChild (QCP::MarginSide side,
QCPLayoutElementelement 
)
-
-protected
-
-

Removes element from the internal list of child elements, for the margin side.

-

This function does not modify the margin group property of element.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layout.h
  • -
  • src/layout.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlFbo.html b/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlFbo.html deleted file mode 100644 index 7f84bef1..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlFbo.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - -QCPPaintBufferGlFbo Class Reference - - - - -
- -
-
QCPPaintBufferGlFbo Class Reference
-
-
- -

A paint buffer based on OpenGL frame buffers objects, using hardware accelerated rendering. - More...

-
-Inheritance diagram for QCPPaintBufferGlFbo:
-
-
Inheritance graph
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPPaintBufferGlFbo (const QSize &size, double devicePixelRatio, QWeakPointer< QOpenGLContext > glContext, QWeakPointer< QOpenGLPaintDevice > glPaintDevice)
 
virtual QCPPainterstartPainting ()
 
virtual void donePainting ()
 
virtual void draw (QCPPainter *painter) const
 
void clear (const QColor &color)
 
- Public Functions inherited from QCPAbstractPaintBuffer
 QCPAbstractPaintBuffer (const QSize &size, double devicePixelRatio)
 
-QSize size () const
 
-bool invalidated () const
 
-double devicePixelRatio () const
 
void setSize (const QSize &size)
 
void setInvalidated (bool invalidated=true)
 
void setDevicePixelRatio (double ratio)
 
- - - -

-Protected Functions

virtual void reallocateBuffer ()
 
-

Detailed Description

-

A paint buffer based on OpenGL frame buffers objects, using hardware accelerated rendering.

-

This paint buffer is one of the OpenGL paint buffers which facilitate hardware accelerated plot rendering. It is based on OpenGL frame buffer objects (fbo) and is used in Qt versions 5.0 and higher. (See QCPPaintBufferGlPbuffer used in older Qt versions.)

-

The OpenGL paint buffers are used if QCustomPlot::setOpenGl is set to true, and if they are supported by the system.

-

Constructor & Destructor Documentation

- -

§ QCPPaintBufferGlFbo()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QCPPaintBufferGlFbo::QCPPaintBufferGlFbo (const QSize & size,
double devicePixelRatio,
QWeakPointer< QOpenGLContext > glContext,
QWeakPointer< QOpenGLPaintDevice > glPaintDevice 
)
-
-explicit
-
-

Creates a QCPPaintBufferGlFbo instance with the specified size and devicePixelRatio, if applicable.

-

All frame buffer objects shall share one OpenGL context and paint device, which need to be set up externally and passed via glContext and glPaintDevice. The set-up is done in QCustomPlot::setupOpenGl and the context and paint device are managed by the parent QCustomPlot instance.

- -
-
-

Member Function Documentation

- -

§ startPainting()

- -
-
- - - - - -
- - - - - - - -
QCPPainter * QCPPaintBufferGlFbo::startPainting ()
-
-virtual
-
-

Returns a QCPPainter which is ready to draw to this buffer. The ownership and thus the responsibility to delete the painter after the painting operations are complete is given to the caller of this method.

-

Once you are done using the painter, delete the painter and call donePainting.

-

While a painter generated with this method is active, you must not call setSize, setDevicePixelRatio or clear.

-

This method may return 0, if a painter couldn't be activated on the buffer. This usually indicates a problem with the respective painting backend.

- -

Implements QCPAbstractPaintBuffer.

- -
-
- -

§ donePainting()

- -
-
- - - - - -
- - - - - - - -
void QCPPaintBufferGlFbo::donePainting ()
-
-virtual
-
-

If you have acquired a QCPPainter to paint onto this paint buffer via startPainting, call this method as soon as you are done with the painting operations and have deleted the painter.

-

paint buffer subclasses may use this method to perform any type of cleanup that is necessary. The default implementation does nothing.

- -

Reimplemented from QCPAbstractPaintBuffer.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPPaintBufferGlFbo::draw (QCPPainterpainter) const
-
-virtual
-
-

Draws the contents of this buffer with the provided painter. This is the method that is used to finally join all paint buffers and draw them onto the screen.

- -

Implements QCPAbstractPaintBuffer.

- -
-
- -

§ clear()

- -
-
- - - - - -
- - - - - - - - -
void QCPPaintBufferGlFbo::clear (const QColor & color)
-
-virtual
-
-

Fills the entire buffer with the provided color. To have an empty transparent buffer, use the named color Qt::transparent.

-

This method must not be called if there is currently a painter (acquired with startPainting) active.

- -

Implements QCPAbstractPaintBuffer.

- -
-
- -

§ reallocateBuffer()

- -
-
- - - - - -
- - - - - - - -
void QCPPaintBufferGlFbo::reallocateBuffer ()
-
-protectedvirtual
-
-

Reallocates the internal buffer with the currently configured size (setSize) and device pixel ratio, if applicable (setDevicePixelRatio). It is called as soon as any of those properties are changed on this paint buffer.

-
Note
Subclasses of QCPAbstractPaintBuffer must call their reimplementation of this method in their constructor, to perform the first allocation (this can not be done by the base class because calling pure virtual methods in base class constructors is not possible).
- -

Implements QCPAbstractPaintBuffer.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/paintbuffer.h
  • -
  • src/paintbuffer.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlFbo__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlFbo__inherit__graph.png deleted file mode 100644 index 06b36f3c..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlFbo__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlPbuffer.html b/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlPbuffer.html deleted file mode 100644 index f3cc7600..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlPbuffer.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - -QCPPaintBufferGlPbuffer Class Reference - - - - -
- -
-
QCPPaintBufferGlPbuffer Class Reference
-
-
- -

A paint buffer based on OpenGL pixel buffers, using hardware accelerated rendering. - More...

-
-Inheritance diagram for QCPPaintBufferGlPbuffer:
-
-
Inheritance graph
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPPaintBufferGlPbuffer (const QSize &size, double devicePixelRatio, int multisamples)
 
virtual QCPPainterstartPainting ()
 
virtual void draw (QCPPainter *painter) const
 
void clear (const QColor &color)
 
- Public Functions inherited from QCPAbstractPaintBuffer
 QCPAbstractPaintBuffer (const QSize &size, double devicePixelRatio)
 
-QSize size () const
 
-bool invalidated () const
 
-double devicePixelRatio () const
 
void setSize (const QSize &size)
 
void setInvalidated (bool invalidated=true)
 
void setDevicePixelRatio (double ratio)
 
virtual void donePainting ()
 
- - - -

-Protected Functions

virtual void reallocateBuffer ()
 
-

Detailed Description

-

A paint buffer based on OpenGL pixel buffers, using hardware accelerated rendering.

-

This paint buffer is one of the OpenGL paint buffers which facilitate hardware accelerated plot rendering. It is based on OpenGL pixel buffers (pbuffer) and is used in Qt versions before 5.0. (See QCPPaintBufferGlFbo used in newer Qt versions.)

-

The OpenGL paint buffers are used if QCustomPlot::setOpenGl is set to true, and if they are supported by the system.

-

Constructor & Destructor Documentation

- -

§ QCPPaintBufferGlPbuffer()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPPaintBufferGlPbuffer::QCPPaintBufferGlPbuffer (const QSize & size,
double devicePixelRatio,
int multisamples 
)
-
-explicit
-
-

Creates a QCPPaintBufferGlPbuffer instance with the specified size and devicePixelRatio, if applicable.

-

The parameter multisamples defines how many samples are used per pixel. Higher values thus result in higher quality antialiasing. If the specified multisamples value exceeds the capability of the graphics hardware, the highest supported multisampling is used.

- -
-
-

Member Function Documentation

- -

§ startPainting()

- -
-
- - - - - -
- - - - - - - -
QCPPainter * QCPPaintBufferGlPbuffer::startPainting ()
-
-virtual
-
-

Returns a QCPPainter which is ready to draw to this buffer. The ownership and thus the responsibility to delete the painter after the painting operations are complete is given to the caller of this method.

-

Once you are done using the painter, delete the painter and call donePainting.

-

While a painter generated with this method is active, you must not call setSize, setDevicePixelRatio or clear.

-

This method may return 0, if a painter couldn't be activated on the buffer. This usually indicates a problem with the respective painting backend.

- -

Implements QCPAbstractPaintBuffer.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPPaintBufferGlPbuffer::draw (QCPPainterpainter) const
-
-virtual
-
-

Draws the contents of this buffer with the provided painter. This is the method that is used to finally join all paint buffers and draw them onto the screen.

- -

Implements QCPAbstractPaintBuffer.

- -
-
- -

§ clear()

- -
-
- - - - - -
- - - - - - - - -
void QCPPaintBufferGlPbuffer::clear (const QColor & color)
-
-virtual
-
-

Fills the entire buffer with the provided color. To have an empty transparent buffer, use the named color Qt::transparent.

-

This method must not be called if there is currently a painter (acquired with startPainting) active.

- -

Implements QCPAbstractPaintBuffer.

- -
-
- -

§ reallocateBuffer()

- -
-
- - - - - -
- - - - - - - -
void QCPPaintBufferGlPbuffer::reallocateBuffer ()
-
-protectedvirtual
-
-

Reallocates the internal buffer with the currently configured size (setSize) and device pixel ratio, if applicable (setDevicePixelRatio). It is called as soon as any of those properties are changed on this paint buffer.

-
Note
Subclasses of QCPAbstractPaintBuffer must call their reimplementation of this method in their constructor, to perform the first allocation (this can not be done by the base class because calling pure virtual methods in base class constructors is not possible).
- -

Implements QCPAbstractPaintBuffer.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/paintbuffer.h
  • -
  • src/paintbuffer.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlPbuffer__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlPbuffer__inherit__graph.png deleted file mode 100644 index cdfe0cbf..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPPaintBufferGlPbuffer__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPPaintBufferPixmap.html b/third_party/qcustomplot/documentation/html/classQCPPaintBufferPixmap.html deleted file mode 100644 index 9241651a..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPPaintBufferPixmap.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - -QCPPaintBufferPixmap Class Reference - - - - -
- -
-
QCPPaintBufferPixmap Class Reference
-
-
- -

A paint buffer based on QPixmap, using software raster rendering. - More...

-
-Inheritance diagram for QCPPaintBufferPixmap:
-
-
Inheritance graph
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPPaintBufferPixmap (const QSize &size, double devicePixelRatio)
 
virtual QCPPainterstartPainting ()
 
virtual void draw (QCPPainter *painter) const
 
void clear (const QColor &color)
 
- Public Functions inherited from QCPAbstractPaintBuffer
 QCPAbstractPaintBuffer (const QSize &size, double devicePixelRatio)
 
-QSize size () const
 
-bool invalidated () const
 
-double devicePixelRatio () const
 
void setSize (const QSize &size)
 
void setInvalidated (bool invalidated=true)
 
void setDevicePixelRatio (double ratio)
 
virtual void donePainting ()
 
- - - -

-Protected Functions

virtual void reallocateBuffer ()
 
-

Detailed Description

-

A paint buffer based on QPixmap, using software raster rendering.

-

This paint buffer is the default and fall-back paint buffer which uses software rendering and QPixmap as internal buffer. It is used if QCustomPlot::setOpenGl is false.

-

Constructor & Destructor Documentation

- -

§ QCPPaintBufferPixmap()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPPaintBufferPixmap::QCPPaintBufferPixmap (const QSize & size,
double devicePixelRatio 
)
-
-explicit
-
-

Creates a pixmap paint buffer instancen with the specified size and devicePixelRatio, if applicable.

- -
-
-

Member Function Documentation

- -

§ startPainting()

- -
-
- - - - - -
- - - - - - - -
QCPPainter * QCPPaintBufferPixmap::startPainting ()
-
-virtual
-
-

Returns a QCPPainter which is ready to draw to this buffer. The ownership and thus the responsibility to delete the painter after the painting operations are complete is given to the caller of this method.

-

Once you are done using the painter, delete the painter and call donePainting.

-

While a painter generated with this method is active, you must not call setSize, setDevicePixelRatio or clear.

-

This method may return 0, if a painter couldn't be activated on the buffer. This usually indicates a problem with the respective painting backend.

- -

Implements QCPAbstractPaintBuffer.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPPaintBufferPixmap::draw (QCPPainterpainter) const
-
-virtual
-
-

Draws the contents of this buffer with the provided painter. This is the method that is used to finally join all paint buffers and draw them onto the screen.

- -

Implements QCPAbstractPaintBuffer.

- -
-
- -

§ clear()

- -
-
- - - - - -
- - - - - - - - -
void QCPPaintBufferPixmap::clear (const QColor & color)
-
-virtual
-
-

Fills the entire buffer with the provided color. To have an empty transparent buffer, use the named color Qt::transparent.

-

This method must not be called if there is currently a painter (acquired with startPainting) active.

- -

Implements QCPAbstractPaintBuffer.

- -
-
- -

§ reallocateBuffer()

- -
-
- - - - - -
- - - - - - - -
void QCPPaintBufferPixmap::reallocateBuffer ()
-
-protectedvirtual
-
-

Reallocates the internal buffer with the currently configured size (setSize) and device pixel ratio, if applicable (setDevicePixelRatio). It is called as soon as any of those properties are changed on this paint buffer.

-
Note
Subclasses of QCPAbstractPaintBuffer must call their reimplementation of this method in their constructor, to perform the first allocation (this can not be done by the base class because calling pure virtual methods in base class constructors is not possible).
- -

Implements QCPAbstractPaintBuffer.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/paintbuffer.h
  • -
  • src/paintbuffer.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPaintBufferPixmap__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPPaintBufferPixmap__inherit__graph.png deleted file mode 100644 index 2230ad94..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPPaintBufferPixmap__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPPainter.html b/third_party/qcustomplot/documentation/html/classQCPPainter.html deleted file mode 100644 index a99b7fa4..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPPainter.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - -QCPPainter Class Reference - - - - -
- -
-
QCPPainter Class Reference
-
-
- -

QPainter subclass used internally. - More...

- -

Inherits QPainter.

- - - - -

-Public Types

enum  PainterMode
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPPainter ()
 
 QCPPainter (QPaintDevice *device)
 
-bool antialiasing () const
 
-PainterModes modes () const
 
void setAntialiasing (bool enabled)
 
void setMode (PainterMode mode, bool enabled=true)
 
void setModes (PainterModes modes)
 
bool begin (QPaintDevice *device)
 
void setPen (const QPen &pen)
 
void setPen (const QColor &color)
 
void setPen (Qt::PenStyle penStyle)
 
void drawLine (const QLineF &line)
 
-void drawLine (const QPointF &p1, const QPointF &p2)
 
void save ()
 
void restore ()
 
void makeNonCosmetic ()
 
-

Detailed Description

-

QPainter subclass used internally.

-

This QPainter subclass is used to provide some extended functionality e.g. for tweaking position consistency between antialiased and non-antialiased painting. Further it provides workarounds for QPainter quirks.

-
Warning
This class intentionally hides non-virtual functions of QPainter, e.g. setPen, save and restore. So while it is possible to pass a QCPPainter instance to a function that expects a QPainter pointer, some of the workarounds and tweaks will be unavailable to the function (because it will call the base class implementations of the functions actually hidden by QCPPainter).
-

Member Enumeration Documentation

- -

§ PainterMode

- -
-
- - - - -
enum QCPPainter::PainterMode
-
-

Defines special modes the painter can operate in. They disable or enable certain subsets of features/fixes/workarounds, depending on whether they are wanted on the respective output device.

- - - - - -
Enumerator
pmDefault 

0x00 Default mode for painting on screen devices

-
pmVectorized 

0x01 Mode for vectorized painting (e.g. PDF export). For example, this prevents some antialiasing fixes.

-
pmNoCaching 

0x02 Mode for all sorts of exports (e.g. PNG, PDF,...). For example, this prevents using cached pixmap labels

-
pmNonCosmetic 

0x04 Turns pen widths 0 to 1, i.e. disables cosmetic pens. (A cosmetic pen is always drawn with width 1 pixel in the vector image/pdf viewer, independent of zoom.)

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPPainter() [1/2]

- -
-
- - - - - - - -
QCPPainter::QCPPainter ()
-
-

Creates a new QCPPainter instance and sets default values

- -
-
- -

§ QCPPainter() [2/2]

- -
-
- - - - - -
- - - - - - - - -
QCPPainter::QCPPainter (QPaintDevice * device)
-
-explicit
-
-

Creates a new QCPPainter instance on the specified paint device and sets default values. Just like the analogous QPainter constructor, begins painting on device immediately.

-

Like begin, this method sets QPainter::NonCosmeticDefaultPen in Qt versions before Qt5.

- -
-
-

Member Function Documentation

- -

§ setAntialiasing()

- -
-
- - - - - - - - -
void QCPPainter::setAntialiasing (bool enabled)
-
-

Sets whether painting uses antialiasing or not. Use this method instead of using setRenderHint with QPainter::Antialiasing directly, as it allows QCPPainter to regain pixel exactness between antialiased and non-antialiased painting (Since Qt < 5.0 uses slightly different coordinate systems for AA/Non-AA painting).

- -
-
- -

§ setMode()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPPainter::setMode (QCPPainter::PainterMode mode,
bool enabled = true 
)
-
-

This is an overloaded function.

-

Sets the mode of the painter. This controls whether the painter shall adjust its fixes/workarounds optimized for certain output devices.

- -
-
- -

§ setModes()

- -
-
- - - - - - - - -
void QCPPainter::setModes (PainterModes modes)
-
-

Sets the mode of the painter. This controls whether the painter shall adjust its fixes/workarounds optimized for certain output devices.

- -
-
- -

§ begin()

- -
-
- - - - - - - - -
bool QCPPainter::begin (QPaintDevice * device)
-
-

Sets the QPainter::NonCosmeticDefaultPen in Qt versions before Qt5 after beginning painting on device. This is necessary to get cosmetic pen consistency across Qt versions, because since Qt5, all pens are non-cosmetic by default, and in Qt4 this render hint must be set to get that behaviour.

-

The Constructor QCPPainter(QPaintDevice *device) which directly starts painting also sets the render hint as appropriate.

-
Note
this function hides the non-virtual base class implementation.
- -
-
- -

§ setPen() [1/3]

- -
-
- - - - - - - - -
void QCPPainter::setPen (const QPen & pen)
-
-

Sets the pen of the painter and applies certain fixes to it, depending on the mode of this QCPPainter.

-
Note
this function hides the non-virtual base class implementation.
- -
-
- -

§ setPen() [2/3]

- -
-
- - - - - - - - -
void QCPPainter::setPen (const QColor & color)
-
-

This is an overloaded function.

-

Sets the pen (by color) of the painter and applies certain fixes to it, depending on the mode of this QCPPainter.

-
Note
this function hides the non-virtual base class implementation.
- -
-
- -

§ setPen() [3/3]

- -
-
- - - - - - - - -
void QCPPainter::setPen (Qt::PenStyle penStyle)
-
-

This is an overloaded function.

-

Sets the pen (by style) of the painter and applies certain fixes to it, depending on the mode of this QCPPainter.

-
Note
this function hides the non-virtual base class implementation.
- -
-
- -

§ drawLine()

- -
-
- - - - - - - - -
void QCPPainter::drawLine (const QLineF & line)
-
-

This is an overloaded function.

-

Works around a Qt bug introduced with Qt 4.8 which makes drawing QLineF unpredictable when antialiasing is disabled. Thus when antialiasing is disabled, it rounds the line to integer coordinates and then passes it to the original drawLine.

-
Note
this function hides the non-virtual base class implementation.
- -
-
- -

§ save()

- -
-
- - - - - - - -
void QCPPainter::save ()
-
-

Saves the painter (see QPainter::save). Since QCPPainter adds some new internal state to QPainter, the save/restore functions are reimplemented to also save/restore those members.

-
Note
this function hides the non-virtual base class implementation.
-
See also
restore
- -
-
- -

§ restore()

- -
-
- - - - - - - -
void QCPPainter::restore ()
-
-

Restores the painter (see QPainter::restore). Since QCPPainter adds some new internal state to QPainter, the save/restore functions are reimplemented to also save/restore those members.

-
Note
this function hides the non-virtual base class implementation.
-
See also
save
- -
-
- -

§ makeNonCosmetic()

- -
-
- - - - - - - -
void QCPPainter::makeNonCosmetic ()
-
-

Changes the pen width to 1 if it currently is 0. This function is called in the setPen overrides when the pmNonCosmetic mode is set.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/painter.h
  • -
  • src/painter.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPlottableInterface1D.html b/third_party/qcustomplot/documentation/html/classQCPPlottableInterface1D.html deleted file mode 100644 index db697485..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPPlottableInterface1D.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - -QCPPlottableInterface1D Class Reference - - - - -
- -
-
QCPPlottableInterface1D Class Referenceabstract
-
-
- -

Defines an abstract interface for one-dimensional plottables. - More...

-
-Inheritance diagram for QCPPlottableInterface1D:
-
-
Inheritance graph
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

virtual int dataCount () const =0
 
virtual double dataMainKey (int index) const =0
 
virtual double dataSortKey (int index) const =0
 
virtual double dataMainValue (int index) const =0
 
virtual QCPRange dataValueRange (int index) const =0
 
virtual QPointF dataPixelPosition (int index) const =0
 
virtual bool sortKeyIsMainKey () const =0
 
virtual QCPDataSelection selectTestRect (const QRectF &rect, bool onlySelectable) const =0
 
virtual int findBegin (double sortKey, bool expandedRange=true) const =0
 
virtual int findEnd (double sortKey, bool expandedRange=true) const =0
 
-

Detailed Description

-

Defines an abstract interface for one-dimensional plottables.

-

This class contains only pure virtual methods which define a common interface to the data of one-dimensional plottables.

-

For example, it is implemented by the template class QCPAbstractPlottable1D (the preferred base class for one-dimensional plottables). So if you use that template class as base class of your one-dimensional plottable, you won't have to care about implementing the 1d interface yourself.

-

If your plottable doesn't derive from QCPAbstractPlottable1D but still wants to provide a 1d interface (e.g. like QCPErrorBars does), you should inherit from both QCPAbstractPlottable and QCPPlottableInterface1D and accordingly reimplement the pure virtual methods of the 1d interface, matching your data container. Also, reimplement QCPAbstractPlottable::interface1D to return the this pointer.

-

If you have a QCPAbstractPlottable pointer, you can check whether it implements this interface by calling QCPAbstractPlottable::interface1D and testing it for a non-zero return value. If it indeed implements this interface, you may use it to access the plottable's data without needing to know the exact type of the plottable or its data point type.

-

Member Function Documentation

- -

§ dataCount()

- -
-
- - - - - -
- - - - - - - -
int QCPPlottableInterface1D::dataCount () const
-
-pure virtual
-
-
- -

§ dataMainKey()

- -
-
- - - - - -
- - - - - - - - -
double QCPPlottableInterface1D::dataMainKey (int index) const
-
-pure virtual
-
-

Returns the main key of the data point at the given index.

-

What the main key is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implemented in QCPErrorBars, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, and QCPAbstractPlottable1D< QCPCurveData >.

- -
-
- -

§ dataSortKey()

- -
-
- - - - - -
- - - - - - - - -
double QCPPlottableInterface1D::dataSortKey (int index) const
-
-pure virtual
-
-

Returns the sort key of the data point at the given index.

-

What the sort key is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implemented in QCPErrorBars, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, and QCPAbstractPlottable1D< QCPCurveData >.

- -
-
- -

§ dataMainValue()

- -
-
- - - - - -
- - - - - - - - -
double QCPPlottableInterface1D::dataMainValue (int index) const
-
-pure virtual
-
-

Returns the main value of the data point at the given index.

-

What the main value is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implemented in QCPErrorBars, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, and QCPAbstractPlottable1D< QCPCurveData >.

- -
-
- -

§ dataValueRange()

- -
-
- - - - - -
- - - - - - - - -
QCPRange QCPPlottableInterface1D::dataValueRange (int index) const
-
-pure virtual
-
-

Returns the value range of the data point at the given index.

-

What the value range is, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implemented in QCPErrorBars, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, and QCPAbstractPlottable1D< QCPCurveData >.

- -
-
- -

§ dataPixelPosition()

- -
-
- - - - - -
- - - - - - - - -
QPointF QCPPlottableInterface1D::dataPixelPosition (int index) const
-
-pure virtual
-
-

Returns the pixel position on the widget surface at which the data point at the given index appears.

-

Usually this corresponds to the point of dataMainKey/dataMainValue, in pixel coordinates. However, depending on the plottable, this might be a different apparent position than just a coord-to-pixel transform of those values. For example, QCPBars apparent data values can be shifted depending on their stacking, bar grouping or configured base value.

- -

Implemented in QCPBars, QCPErrorBars, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, and QCPAbstractPlottable1D< QCPCurveData >.

- -
-
- -

§ sortKeyIsMainKey()

- -
-
- - - - - -
- - - - - - - -
bool QCPPlottableInterface1D::sortKeyIsMainKey () const
-
-pure virtual
-
-

Returns whether the sort key (dataSortKey) is identical to the main key (dataMainKey).

-

What the sort and main keys are, is defined by the plottable's data type. See the QCPDataContainer DataType documentation for details about this naming convention.

- -

Implemented in QCPErrorBars, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, and QCPAbstractPlottable1D< QCPCurveData >.

- -
-
- -

§ selectTestRect()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPDataSelection QCPPlottableInterface1D::selectTestRect (const QRectF & rect,
bool onlySelectable 
) const
-
-pure virtual
-
-

Returns a data selection containing all the data points of this plottable which are contained (or hit by) rect. This is used mainly in the selection rect interaction for data selection (data selection mechanism).

-

If onlySelectable is true, an empty QCPDataSelection is returned if this plottable is not selectable (i.e. if QCPAbstractPlottable::setSelectable is QCP::stNone).

-
Note
rect must be a normalized rect (positive or zero width and height). This is especially important when using the rect of QCPSelectionRect::accepted, which is not necessarily normalized. Use QRect::normalized() when passing a rect which might not be normalized.
- -

Implemented in QCPBars, QCPFinancial, QCPErrorBars, QCPStatisticalBox, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, and QCPAbstractPlottable1D< QCPCurveData >.

- -
-
- -

§ findBegin()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int QCPPlottableInterface1D::findBegin (double sortKey,
bool expandedRange = true 
) const
-
-pure virtual
-
-

Returns the index of the data point with a (sort-)key that is equal to, just below, or just above sortKey. If expandedRange is true, the data point just below sortKey will be considered, otherwise the one just above.

-

This can be used in conjunction with findEnd to iterate over data points within a given key range, including or excluding the bounding data points that are just beyond the specified range.

-

If expandedRange is true but there are no data points below sortKey, 0 is returned.

-

If the container is empty, returns 0 (in that case, findEnd will also return 0, so a loop using these methods will not iterate over the index 0).

-
See also
findEnd, QCPDataContainer::findBegin
- -

Implemented in QCPErrorBars, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, and QCPAbstractPlottable1D< QCPCurveData >.

- -
-
- -

§ findEnd()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int QCPPlottableInterface1D::findEnd (double sortKey,
bool expandedRange = true 
) const
-
-pure virtual
-
-

Returns the index one after the data point with a (sort-)key that is equal to, just above, or just below sortKey. If expandedRange is true, the data point just above sortKey will be considered, otherwise the one just below.

-

This can be used in conjunction with findBegin to iterate over data points within a given key range, including the bounding data points that are just below and above the specified range.

-

If expandedRange is true but there are no data points above sortKey, the index just above the highest data point is returned.

-

If the container is empty, returns 0.

-
See also
findBegin, QCPDataContainer::findEnd
- -

Implemented in QCPErrorBars, QCPAbstractPlottable1D< DataType >, QCPAbstractPlottable1D< QCPFinancialData >, QCPAbstractPlottable1D< QCPStatisticalBoxData >, QCPAbstractPlottable1D< QCPGraphData >, QCPAbstractPlottable1D< QCPBarsData >, and QCPAbstractPlottable1D< QCPCurveData >.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • src/plottable1d.h
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPlottableInterface1D__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPPlottableInterface1D__inherit__graph.png deleted file mode 100644 index e5bcc82e..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPPlottableInterface1D__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPPlottableLegendItem.html b/third_party/qcustomplot/documentation/html/classQCPPlottableLegendItem.html deleted file mode 100644 index 251c4eba..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPPlottableLegendItem.html +++ /dev/null @@ -1,421 +0,0 @@ - - - - - - -QCPPlottableLegendItem Class Reference - - - - -
- -
-
QCPPlottableLegendItem Class Reference
-
-
- -

A legend item representing a plottable with an icon and the plottable name. - More...

-
-Inheritance diagram for QCPPlottableLegendItem:
-
-
Inheritance graph
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPPlottableLegendItem (QCPLegend *parent, QCPAbstractPlottable *plottable)
 
-QCPAbstractPlottableplottable ()
 
- Public Functions inherited from QCPAbstractLegendItem
 QCPAbstractLegendItem (QCPLegend *parent)
 
-QCPLegendparentLegend () const
 
-QFont font () const
 
-QColor textColor () const
 
-QFont selectedFont () const
 
-QColor selectedTextColor () const
 
-bool selectable () const
 
-bool selected () const
 
void setFont (const QFont &font)
 
void setTextColor (const QColor &color)
 
void setSelectedFont (const QFont &font)
 
void setSelectedTextColor (const QColor &color)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
virtual void update (UpdatePhase phase)
 
virtual QSize maximumOuterSizeHint () const
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual QSize minimumOuterSizeHint () const
 
QPen getIconBorderPen () const
 
QColor getTextColor () const
 
QFont getFont () const
 
- Protected Functions inherited from QCPAbstractLegendItem
virtual QCP::Interaction selectionCategory () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
- Protected Functions inherited from QCPLayoutElement
virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
- Protected Functions inherited from QCPLayerable
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from QCPLayoutElement
enum  UpdatePhase
 
enum  SizeConstraintRect
 
- Signals inherited from QCPAbstractLegendItem
void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A legend item representing a plottable with an icon and the plottable name.

-

This is the standard legend item for plottables. It displays an icon of the plottable next to the plottable name. The icon is drawn by the respective plottable itself (QCPAbstractPlottable::drawLegendIcon), and tries to give an intuitive symbol for the plottable. For example, the QCPGraph draws a centered horizontal line and/or a single scatter point in the middle.

-

Legend items of this type are always associated with one plottable (retrievable via the plottable() function and settable with the constructor). You may change the font of the plottable name with setFont. Icon padding and border pen is taken from the parent QCPLegend, see QCPLegend::setIconBorderPen and QCPLegend::setIconTextPadding.

-

The function QCPAbstractPlottable::addToLegend/QCPAbstractPlottable::removeFromLegend creates/removes legend items of this type.

-

Since QCPLegend is based on QCPLayoutGrid, a legend item itself is just a subclass of QCPLayoutElement. While it could be added to a legend (or any other layout) via the normal layout interface, QCPLegend has specialized functions for handling legend items conveniently, see the documentation of QCPLegend.

-

Constructor & Destructor Documentation

- -

§ QCPPlottableLegendItem()

- -
-
- - - - - - - - - - - - - - - - - - -
QCPPlottableLegendItem::QCPPlottableLegendItem (QCPLegendparent,
QCPAbstractPlottableplottable 
)
-
-

Creates a new legend item associated with plottable.

-

Once it's created, it can be added to the legend via QCPLegend::addItem.

-

A more convenient way of adding/removing a plottable to/from the legend is via the functions QCPAbstractPlottable::addToLegend and QCPAbstractPlottable::removeFromLegend.

- -
-
-

Member Function Documentation

- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPPlottableLegendItem::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws the item with painter. The size and position of the drawn legend item is defined by the parent layout (typically a QCPLegend) and the minimumOuterSizeHint and maximumOuterSizeHint of this legend item.

- -

Implements QCPAbstractLegendItem.

- -
-
- -

§ minimumOuterSizeHint()

- -
-
- - - - - -
- - - - - - - -
QSize QCPPlottableLegendItem::minimumOuterSizeHint () const
-
-protectedvirtual
-
-

Calculates and returns the size of this item. This includes the icon, the text and the padding in between.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ getIconBorderPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPPlottableLegendItem::getIconBorderPen () const
-
-protected
-
-

Returns the pen that shall be used to draw the icon border, taking into account the selection state of this item.

- -
-
- -

§ getTextColor()

- -
-
- - - - - -
- - - - - - - -
QColor QCPPlottableLegendItem::getTextColor () const
-
-protected
-
-

Returns the text color that shall be used to draw text, taking into account the selection state of this item.

- -
-
- -

§ getFont()

- -
-
- - - - - -
- - - - - - - -
QFont QCPPlottableLegendItem::getFont () const
-
-protected
-
-

Returns the font that shall be used to draw text, taking into account the selection state of this item.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layoutelements/layoutelement-legend.h
  • -
  • src/layoutelements/layoutelement-legend.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPlottableLegendItem__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPPlottableLegendItem__inherit__graph.png deleted file mode 100644 index f5005f76..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPPlottableLegendItem__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPPolarAxisAngular.html b/third_party/qcustomplot/documentation/html/classQCPPolarAxisAngular.html deleted file mode 100644 index 53cf4a1b..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPPolarAxisAngular.html +++ /dev/null @@ -1,2778 +0,0 @@ - - - - - - -QCPPolarAxisAngular Class Reference - - - - -
- -
-
QCPPolarAxisAngular Class Reference
-
-
- -

The main container for polar plots, representing the angular axis as a circle. - More...

-
-Inheritance diagram for QCPPolarAxisAngular:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - -

-Public Types

enum  SelectablePart
 
enum  LabelMode
 
- Public Types inherited from QCPLayoutElement
enum  UpdatePhase
 
enum  SizeConstraintRect
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPPolarAxisAngular (QCustomPlot *parentPlot)
 
-QPixmap background () const
 
-QBrush backgroundBrush () const
 
-bool backgroundScaled () const
 
-Qt::AspectRatioMode backgroundScaledMode () const
 
-bool rangeDrag () const
 
-bool rangeZoom () const
 
-double rangeZoomFactor () const
 
-const QCPRange range () const
 
-bool rangeReversed () const
 
-double angle () const
 
-QSharedPointer< QCPAxisTickerticker () const
 
-bool ticks () const
 
-bool tickLabels () const
 
-int tickLabelPadding () const
 
-QFont tickLabelFont () const
 
-QColor tickLabelColor () const
 
-double tickLabelRotation () const
 
-LabelMode tickLabelMode () const
 
-QString numberFormat () const
 
-int numberPrecision () const
 
-QVector< double > tickVector () const
 
-QVector< QString > tickVectorLabels () const
 
-int tickLengthIn () const
 
-int tickLengthOut () const
 
-bool subTicks () const
 
-int subTickLengthIn () const
 
-int subTickLengthOut () const
 
-QPen basePen () const
 
-QPen tickPen () const
 
-QPen subTickPen () const
 
-QFont labelFont () const
 
-QColor labelColor () const
 
-QString label () const
 
-int labelPadding () const
 
-SelectableParts selectedParts () const
 
-SelectableParts selectableParts () const
 
-QFont selectedTickLabelFont () const
 
-QFont selectedLabelFont () const
 
-QColor selectedTickLabelColor () const
 
-QColor selectedLabelColor () const
 
-QPen selectedBasePen () const
 
-QPen selectedTickPen () const
 
-QPen selectedSubTickPen () const
 
-QCPPolarGridgrid () const
 
void setBackground (const QPixmap &pm)
 
void setBackground (const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding)
 
void setBackground (const QBrush &brush)
 
void setBackgroundScaled (bool scaled)
 
void setBackgroundScaledMode (Qt::AspectRatioMode mode)
 
-void setRangeDrag (bool enabled)
 
-void setRangeZoom (bool enabled)
 
-void setRangeZoomFactor (double factor)
 
Q_SLOT void setRange (const QCPRange &range)
 
void setRange (double lower, double upper)
 
void setRange (double position, double size, Qt::AlignmentFlag alignment)
 
void setRangeLower (double lower)
 
void setRangeUpper (double upper)
 
void setRangeReversed (bool reversed)
 
-void setAngle (double degrees)
 
void setTicker (QSharedPointer< QCPAxisTicker > ticker)
 
void setTicks (bool show)
 
void setTickLabels (bool show)
 
void setTickLabelPadding (int padding)
 
void setTickLabelFont (const QFont &font)
 
void setTickLabelColor (const QColor &color)
 
void setTickLabelRotation (double degrees)
 
-void setTickLabelMode (LabelMode mode)
 
void setNumberFormat (const QString &formatCode)
 
void setNumberPrecision (int precision)
 
void setTickLength (int inside, int outside=0)
 
void setTickLengthIn (int inside)
 
void setTickLengthOut (int outside)
 
void setSubTicks (bool show)
 
void setSubTickLength (int inside, int outside=0)
 
void setSubTickLengthIn (int inside)
 
void setSubTickLengthOut (int outside)
 
void setBasePen (const QPen &pen)
 
void setTickPen (const QPen &pen)
 
void setSubTickPen (const QPen &pen)
 
void setLabelFont (const QFont &font)
 
void setLabelColor (const QColor &color)
 
void setLabel (const QString &str)
 
void setLabelPadding (int padding)
 
-void setLabelPosition (Qt::AlignmentFlag position)
 
void setSelectedTickLabelFont (const QFont &font)
 
void setSelectedLabelFont (const QFont &font)
 
void setSelectedTickLabelColor (const QColor &color)
 
void setSelectedLabelColor (const QColor &color)
 
void setSelectedBasePen (const QPen &pen)
 
void setSelectedTickPen (const QPen &pen)
 
void setSelectedSubTickPen (const QPen &pen)
 
Q_SLOT void setSelectableParts (const QCPPolarAxisAngular::SelectableParts &selectableParts)
 
Q_SLOT void setSelectedParts (const QCPPolarAxisAngular::SelectableParts &selectedParts)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const
 
virtual void update (UpdatePhase phase)
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
-bool removeGraph (QCPPolarGraph *graph)
 
int radialAxisCount () const
 
QCPPolarAxisRadialradialAxis (int index=0) const
 
QList< QCPPolarAxisRadial * > radialAxes () const
 
QCPPolarAxisRadialaddRadialAxis (QCPPolarAxisRadial *axis=0)
 
bool removeRadialAxis (QCPPolarAxisRadial *axis)
 
QCPLayoutInsetinsetLayout () const
 
-QRegion exactClipRegion () const
 
void moveRange (double diff)
 
void scaleRange (double factor)
 
void scaleRange (double factor, double center)
 
void rescale (bool onlyVisiblePlottables=false)
 
-double coordToAngleRad (double coord) const
 
-double angleRadToCoord (double angleRad) const
 
void pixelToCoord (QPointF pixelPos, double &angleCoord, double &radiusCoord) const
 
QPointF coordToPixel (double angleCoord, double radiusCoord) const
 
SelectablePart getPartAt (const QPointF &pos) const
 
int left () const
 
int right () const
 
int top () const
 
int bottom () const
 
int width () const
 
int height () const
 
QSize size () const
 
QPoint topLeft () const
 
QPoint topRight () const
 
QPoint bottomLeft () const
 
QPoint bottomRight () const
 
QPointF center () const
 
-double radius () const
 
- Public Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
virtual QSize minimumOuterSizeHint () const
 
virtual QSize maximumOuterSizeHint () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - -

-Signals

-void rangeChanged (const QCPRange &newRange)
 
-void rangeChanged (const QCPRange &newRange, const QCPRange &oldRange)
 
-void selectionChanged (const QCPPolarAxisAngular::SelectableParts &parts)
 
-void selectableChanged (const QCPPolarAxisAngular::SelectableParts &parts)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
virtual QCP::Interaction selectionCategory () const
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void wheelEvent (QWheelEvent *event)
 
-bool registerPolarGraph (QCPPolarGraph *graph)
 
void drawBackground (QCPPainter *painter, const QPointF &center, double radius)
 
void setupTickVectors ()
 
QPen getBasePen () const
 
QPen getTickPen () const
 
QPen getSubTickPen () const
 
QFont getTickLabelFont () const
 
QFont getLabelFont () const
 
QColor getTickLabelColor () const
 
QColor getLabelColor () const
 
- Protected Functions inherited from QCPLayoutElement
virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
- Protected Functions inherited from QCPLayerable
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
-

Detailed Description

-

The main container for polar plots, representing the angular axis as a circle.

-
Warning
In this QCustomPlot version, polar plots are a tech preview. Expect documentation and functionality to be incomplete, as well as changing public interfaces in the future.
-

Member Enumeration Documentation

- -

§ SelectablePart

- -
-
-

Defines the selectable parts of an axis.

See also
setSelectableParts, setSelectedParts
- - - - - -
Enumerator
spNone 

None of the selectable parts.

-
spAxis 

The axis backbone and tick marks.

-
spTickLabels 

Tick labels (numbers) of this axis (as a whole, not individually)

-
spAxisLabel 

The axis label.

-
- -
-
- -

§ LabelMode

- -
-
-

TODO

- -
-
-

Constructor & Destructor Documentation

- -

§ QCPPolarAxisAngular()

- -
-
- - - - - -
- - - - - - - - -
QCPPolarAxisAngular::QCPPolarAxisAngular (QCustomPlotparentPlot)
-
-explicit
-
-

Creates a QCPPolarAxis instance and sets default values. An axis is added for each of the four sides, the top and right axes are set invisible initially.

- -
-
-

Member Function Documentation

- -

§ setBackground() [1/3]

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setBackground (const QPixmap & pm)
-
-

Sets pm as the axis background pixmap. The axis background pixmap will be drawn inside the axis rect. Since axis rects place themselves on the "background" layer by default, the axis rect backgrounds are usually drawn below everything else.

-

For cases where the provided pixmap doesn't have the same size as the axis rect, scaling can be enabled with setBackgroundScaled and the scaling mode (i.e. whether and how the aspect ratio is preserved) can be set with setBackgroundScaledMode. To set all these options in one call, consider using the overloaded version of this function.

-

Below the pixmap, the axis rect may be optionally filled with a brush, if specified with setBackground(const QBrush &brush).

-
See also
setBackgroundScaled, setBackgroundScaledMode, setBackground(const QBrush &brush)
- -
-
- -

§ setBackground() [2/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPPolarAxisAngular::setBackground (const QPixmap & pm,
bool scaled,
Qt::AspectRatioMode mode = Qt::KeepAspectRatioByExpanding 
)
-
-

This is an overloaded function.

-

Allows setting the background pixmap of the axis rect, whether it shall be scaled and how it shall be scaled in one call.

-
See also
setBackground(const QPixmap &pm), setBackgroundScaled, setBackgroundScaledMode
- -
-
- -

§ setBackground() [3/3]

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setBackground (const QBrush & brush)
-
-

This is an overloaded function.

-

Sets brush as the background brush. The axis rect background will be filled with this brush. Since axis rects place themselves on the "background" layer by default, the axis rect backgrounds are usually drawn below everything else.

-

The brush will be drawn before (under) any background pixmap, which may be specified with setBackground(const QPixmap &pm).

-

To disable drawing of a background brush, set brush to Qt::NoBrush.

-
See also
setBackground(const QPixmap &pm)
- -
-
- -

§ setBackgroundScaled()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setBackgroundScaled (bool scaled)
-
-

Sets whether the axis background pixmap shall be scaled to fit the axis rect or not. If scaled is set to true, you may control whether and how the aspect ratio of the original pixmap is preserved with setBackgroundScaledMode.

-

Note that the scaled version of the original pixmap is buffered, so there is no performance penalty on replots. (Except when the axis rect dimensions are changed continuously.)

-
See also
setBackground, setBackgroundScaledMode
- -
-
- -

§ setBackgroundScaledMode()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setBackgroundScaledMode (Qt::AspectRatioMode mode)
-
-

If scaling of the axis background pixmap is enabled (setBackgroundScaled), use this function to define whether and how the aspect ratio of the original pixmap passed to setBackground is preserved.

See also
setBackground, setBackgroundScaled
- -
-
- -

§ setRange() [1/3]

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setRange (const QCPRangerange)
-
-

Sets the range of the axis.

-

This slot may be connected with the rangeChanged signal of another axis so this axis is always synchronized with the other axis range, when it changes.

-

To invert the direction of an axis, use setRangeReversed.

- -
-
- -

§ setRange() [2/3]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisAngular::setRange (double lower,
double upper 
)
-
-

This is an overloaded function.

-

Sets the lower and upper bound of the axis range.

-

To invert the direction of an axis, use setRangeReversed.

-

There is also a slot to set a range, see setRange(const QCPRange &range).

- -
-
- -

§ setRange() [3/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPPolarAxisAngular::setRange (double position,
double size,
Qt::AlignmentFlag alignment 
)
-
-

This is an overloaded function.

-

Sets the range of the axis.

-

The position coordinate indicates together with the alignment parameter, where the new range will be positioned. size defines the size of the new axis range. alignment may be Qt::AlignLeft, Qt::AlignRight or Qt::AlignCenter. This will cause the left border, right border, or center of the range to be aligned with position. Any other values of alignment will default to Qt::AlignCenter.

- -
-
- -

§ setRangeLower()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setRangeLower (double lower)
-
-

Sets the lower bound of the axis range. The upper bound is not changed.

See also
setRange
- -
-
- -

§ setRangeUpper()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setRangeUpper (double upper)
-
-

Sets the upper bound of the axis range. The lower bound is not changed.

See also
setRange
- -
-
- -

§ setRangeReversed()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setRangeReversed (bool reversed)
-
-

Sets whether the axis range (direction) is displayed reversed. Normally, the values on horizontal axes increase left to right, on vertical axes bottom to top. When reversed is set to true, the direction of increasing values is inverted.

-

Note that the range and data interface stays the same for reversed axes, e.g. the lower part of the setRange interface will still reference the mathematically smaller number than the upper part.

- -
-
- -

§ setTicker()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setTicker (QSharedPointer< QCPAxisTickerticker)
-
-

The axis ticker is responsible for generating the tick positions and tick labels. See the documentation of QCPAxisTicker for details on how to work with axis tickers.

-

You can change the tick positioning/labeling behaviour of this axis by setting a different QCPAxisTicker subclass using this method. If you only wish to modify the currently installed axis ticker, access it via ticker.

-

Since the ticker is stored in the axis as a shared pointer, multiple axes may share the same axis ticker simply by passing the same shared pointer to multiple axes.

-
See also
ticker
- -
-
- -

§ setTicks()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setTicks (bool show)
-
-

Sets whether tick marks are displayed.

-

Note that setting show to false does not imply that tick labels are invisible, too. To achieve that, see setTickLabels.

-
See also
setSubTicks
- -
-
- -

§ setTickLabels()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setTickLabels (bool show)
-
-

Sets whether tick labels are displayed. Tick labels are the numbers drawn next to tick marks.

- -
-
- -

§ setTickLabelPadding()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setTickLabelPadding (int padding)
-
-

Sets the distance between the axis base line (including any outward ticks) and the tick labels.

See also
setLabelPadding, setPadding
- -
-
- -

§ setTickLabelFont()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setTickLabelFont (const QFont & font)
-
-

Sets the font of the tick labels.

-
See also
setTickLabels, setTickLabelColor
- -
-
- -

§ setTickLabelColor()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setTickLabelColor (const QColor & color)
-
-

Sets the color of the tick labels.

-
See also
setTickLabels, setTickLabelFont
- -
-
- -

§ setTickLabelRotation()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setTickLabelRotation (double degrees)
-
-

Sets the rotation of the tick labels. If degrees is zero, the labels are drawn normally. Else, the tick labels are drawn rotated by degrees clockwise. The specified angle is bound to values from -90 to 90 degrees.

-

If degrees is exactly -90, 0 or 90, the tick labels are centered on the tick coordinate. For other angles, the label is drawn with an offset such that it seems to point toward or away from the tick mark.

- -
-
- -

§ setNumberFormat()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setNumberFormat (const QString & formatCode)
-
-

Sets the number format for the numbers in tick labels. This formatCode is an extended version of the format code used e.g. by QString::number() and QLocale::toString(). For reference about that, see the "Argument Formats" section in the detailed description of the QString class.

-

formatCode is a string of one, two or three characters. The first character is identical to the normal format code used by Qt. In short, this means: 'e'/'E' scientific format, 'f' fixed format, 'g'/'G' scientific or fixed, whichever is shorter.

-

The second and third characters are optional and specific to QCustomPlot:
- If the first char was 'e' or 'g', numbers are/might be displayed in the scientific format, e.g. "5.5e9", which might be visually unappealing in a plot. So when the second char of formatCode is set to 'b' (for "beautiful"), those exponential numbers are formatted in a more natural way, i.e. "5.5 -[multiplication sign] 10 [superscript] 9". By default, the multiplication sign is a centered dot. If instead a cross should be shown (as is usual in the USA), the third char of formatCode can be set to 'c'. The inserted multiplication signs are the UTF-8 characters 215 (0xD7) for the cross and 183 (0xB7) for the dot.

-

Examples for formatCode:

    -
  • g normal format code behaviour. If number is small, fixed format is used, if number is large, normal scientific format is used
  • -
  • gb If number is small, fixed format is used, if number is large, scientific format is used with beautifully typeset decimal powers and a dot as multiplication sign
  • -
  • ebc All numbers are in scientific format with beautifully typeset decimal power and a cross as multiplication sign
  • -
  • fb illegal format code, since fixed format doesn't support (or need) beautifully typeset decimal powers. Format code will be reduced to 'f'.
  • -
  • hello illegal format code, since first char is not 'e', 'E', 'f', 'g' or 'G'. Current format code will not be changed.
  • -
- -
-
- -

§ setNumberPrecision()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setNumberPrecision (int precision)
-
-

Sets the precision of the tick label numbers. See QLocale::toString(double i, char f, int prec) for details. The effect of precisions are most notably for number Formats starting with 'e', see setNumberFormat

- -
-
- -

§ setTickLength()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisAngular::setTickLength (int inside,
int outside = 0 
)
-
-

Sets the length of the ticks in pixels. inside is the length the ticks will reach inside the plot and outside is the length they will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setSubTickLength, setTickLengthIn, setTickLengthOut
- -
-
- -

§ setTickLengthIn()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setTickLengthIn (int inside)
-
-

Sets the length of the inward ticks in pixels. inside is the length the ticks will reach inside the plot.

-
See also
setTickLengthOut, setTickLength, setSubTickLength
- -
-
- -

§ setTickLengthOut()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setTickLengthOut (int outside)
-
-

Sets the length of the outward ticks in pixels. outside is the length the ticks will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setTickLengthIn, setTickLength, setSubTickLength
- -
-
- -

§ setSubTicks()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSubTicks (bool show)
-
-

Sets whether sub tick marks are displayed.

-

Sub ticks are only potentially visible if (major) ticks are also visible (see setTicks)

-
See also
setTicks
- -
-
- -

§ setSubTickLength()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisAngular::setSubTickLength (int inside,
int outside = 0 
)
-
-

Sets the length of the subticks in pixels. inside is the length the subticks will reach inside the plot and outside is the length they will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setTickLength, setSubTickLengthIn, setSubTickLengthOut
- -
-
- -

§ setSubTickLengthIn()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSubTickLengthIn (int inside)
-
-

Sets the length of the inward subticks in pixels. inside is the length the subticks will reach inside the plot.

-
See also
setSubTickLengthOut, setSubTickLength, setTickLength
- -
-
- -

§ setSubTickLengthOut()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSubTickLengthOut (int outside)
-
-

Sets the length of the outward subticks in pixels. outside is the length the subticks will reach outside the plot. If outside is greater than zero, the tick labels will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setSubTickLengthIn, setSubTickLength, setTickLength
- -
-
- -

§ setBasePen()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setBasePen (const QPen & pen)
-
-

Sets the pen, the axis base line is drawn with.

-
See also
setTickPen, setSubTickPen
- -
-
- -

§ setTickPen()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setTickPen (const QPen & pen)
-
-

Sets the pen, tick marks will be drawn with.

-
See also
setTickLength, setBasePen
- -
-
- -

§ setSubTickPen()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSubTickPen (const QPen & pen)
-
-

Sets the pen, subtick marks will be drawn with.

-
See also
setSubTickCount, setSubTickLength, setBasePen
- -
-
- -

§ setLabelFont()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setLabelFont (const QFont & font)
-
-

Sets the font of the axis label.

-
See also
setLabelColor
- -
-
- -

§ setLabelColor()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setLabelColor (const QColor & color)
-
-

Sets the color of the axis label.

-
See also
setLabelFont
- -
-
- -

§ setLabel()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setLabel (const QString & str)
-
-

Sets the text of the axis label that will be shown below/above or next to the axis, depending on its orientation. To disable axis labels, pass an empty string as str.

- -
-
- -

§ setLabelPadding()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setLabelPadding (int padding)
-
-

Sets the distance between the tick labels and the axis label.

-
See also
setTickLabelPadding, setPadding
- -
-
- -

§ setSelectedTickLabelFont()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSelectedTickLabelFont (const QFont & font)
-
-

Sets the font that is used for tick labels when they are selected.

-
See also
setTickLabelFont, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedLabelFont()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSelectedLabelFont (const QFont & font)
-
-

Sets the font that is used for the axis label when it is selected.

-
See also
setLabelFont, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedTickLabelColor()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSelectedTickLabelColor (const QColor & color)
-
-

Sets the color that is used for tick labels when they are selected.

-
See also
setTickLabelColor, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedLabelColor()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSelectedLabelColor (const QColor & color)
-
-

Sets the color that is used for the axis label when it is selected.

-
See also
setLabelColor, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedBasePen()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSelectedBasePen (const QPen & pen)
-
-

Sets the pen that is used to draw the axis base line when selected.

-
See also
setBasePen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedTickPen()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSelectedTickPen (const QPen & pen)
-
-

Sets the pen that is used to draw the (major) ticks when selected.

-
See also
setTickPen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedSubTickPen()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSelectedSubTickPen (const QPen & pen)
-
-

Sets the pen that is used to draw the subticks when selected.

-
See also
setSubTickPen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectableParts()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSelectableParts (const QCPPolarAxisAngular::SelectableParts & selectableParts)
-
-

Sets whether the user can (de-)select the parts in selectable by clicking on the QCustomPlot surface. (When QCustomPlot::setInteractions contains iSelectAxes.)

-

However, even when selectable is set to a value not allowing the selection of a specific part, it is still possible to set the selection of this part manually, by calling setSelectedParts directly.

-
See also
SelectablePart, setSelectedParts
- -
-
- -

§ setSelectedParts()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::setSelectedParts (const QCPPolarAxisAngular::SelectableParts & selectedParts)
-
-

Sets the selected state of the respective axis parts described by SelectablePart. When a part is selected, it uses a different pen/font.

-

The entire selection mechanism for axes is handled automatically when QCustomPlot::setInteractions contains iSelectAxes. You only need to call this function when you wish to change the selection state manually.

-

This function can change the selection state of a part, independent of the setSelectableParts setting.

-

emits the selectionChanged signal when selected is different from the previous selection state.

-
See also
SelectablePart, setSelectableParts, selectTest, setSelectedBasePen, setSelectedTickPen, setSelectedSubTickPen, setSelectedTickLabelFont, setSelectedLabelFont, setSelectedTickLabelColor, setSelectedLabelColor
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPPolarAxisAngular::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = 0 
) const
-
-virtual
-
-

Layout elements are sensitive to events inside their outer rect. If pos is within the outer rect, this method returns a value corresponding to 0.99 times the parent plot's selection tolerance. However, layout elements are not selectable by default. So if onlySelectable is true, -1.0 is returned.

-

See QCPLayerable::selectTest for a general explanation of this virtual method.

-

QCPLayoutElement subclasses may reimplement this method to provide more specific selection test behaviour.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ update()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisAngular::update (UpdatePhase phase)
-
-virtual
-
-

This method is called automatically upon replot and doesn't need to be called by users of QCPPolarAxisAngular.

-

Calls the base class implementation to update the margins (see QCPLayoutElement::update), and finally passes the rect to the inset layout (insetLayout) and calls its QCPInsetLayout::update function.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ elements()

- -
-
- - - - - -
- - - - - - - - -
QList< QCPLayoutElement * > QCPPolarAxisAngular::elements (bool recursive) const
-
-virtual
-
-

Returns a list of all child elements in this layout element. If recursive is true, all sub-child elements are included in the list, too.

-
Warning
There may be nullptr entries in the returned list. For example, QCPLayoutGrid may have empty cells which yield nullptr at the respective index.
- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ radialAxisCount()

- -
-
- - - - - - - -
int QCPPolarAxisAngular::radialAxisCount () const
-
-

Returns the number of axes on the axis rect side specified with type.

-
See also
axis
- -
-
- -

§ radialAxis()

- -
-
- - - - - - - - -
QCPPolarAxisRadial * QCPPolarAxisAngular::radialAxis (int index = 0) const
-
-

Returns the axis with the given index on the axis rect side specified with type.

-
See also
axisCount, axes
- -
-
- -

§ radialAxes()

- -
-
- - - - - - - -
QList< QCPPolarAxisRadial * > QCPPolarAxisAngular::radialAxes () const
-
-

Returns all axes on the axis rect sides specified with types.

-

types may be a single QCPAxis::AxisType or an or-combination, to get the axes of multiple sides.

-
See also
axis
- -
-
- -

§ addRadialAxis()

- -
-
- - - - - - - - -
QCPPolarAxisRadial * QCPPolarAxisAngular::addRadialAxis (QCPPolarAxisRadialaxis = 0)
-
-

Adds a new axis to the axis rect side specified with type, and returns it. If axis is 0, a new QCPAxis instance is created internally. QCustomPlot owns the returned axis, so if you want to remove an axis, use removeAxis instead of deleting it manually.

-

You may inject QCPAxis instances (or subclasses of QCPAxis) by setting axis to an axis that was previously created outside QCustomPlot. It is important to note that QCustomPlot takes ownership of the axis, so you may not delete it afterwards. Further, the axis must have been created with this axis rect as parent and with the same axis type as specified in type. If this is not the case, a debug output is generated, the axis is not added, and the method returns 0.

-

This method can not be used to move axis between axis rects. The same axis instance must not be added multiple times to the same or different axis rects.

-

If an axis rect side already contains one or more axes, the lower and upper endings of the new axis (QCPAxis::setLowerEnding, QCPAxis::setUpperEnding) are set to QCPLineEnding::esHalfBar.

-
See also
addAxes, setupFullAxesBox
- -
-
- -

§ removeRadialAxis()

- -
-
- - - - - - - - -
bool QCPPolarAxisAngular::removeRadialAxis (QCPPolarAxisRadialradialAxis)
-
-

Removes the specified axis from the axis rect and deletes it.

-

Returns true on success, i.e. if axis was a valid axis in this axis rect.

-
See also
addAxis
- -
-
- -

§ insetLayout()

- -
-
- - - - - -
- - - - - - - -
QCPLayoutInset * QCPPolarAxisAngular::insetLayout () const
-
-inline
-
-

Returns the inset layout of this axis rect. It can be used to place other layout elements (or even layouts with multiple other elements) inside/on top of an axis rect.

-
See also
QCPLayoutInset
- -
-
- -

§ moveRange()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::moveRange (double diff)
-
-

If the scale type (setScaleType) is stLinear, diff is added to the lower and upper bounds of the range. The range is simply moved by diff.

-

If the scale type is stLogarithmic, the range bounds are multiplied by diff. This corresponds to an apparent "linear" move in logarithmic scaling by a distance of log(diff).

- -
-
- -

§ scaleRange() [1/2]

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::scaleRange (double factor)
-
-

Scales the range of this axis by factor around the center of the current axis range. For example, if factor is 2.0, then the axis range will double its size, and the point at the axis range center won't have changed its position in the QCustomPlot widget (i.e. coordinates around the center will have moved symmetrically closer).

-

If you wish to scale around a different coordinate than the current axis range center, use the overload scaleRange(double factor, double center).

- -
-
- -

§ scaleRange() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisAngular::scaleRange (double factor,
double center 
)
-
-

This is an overloaded function.

-

Scales the range of this axis by factor around the coordinate center. For example, if factor is 2.0, center is 1.0, then the axis range will double its size, and the point at coordinate 1.0 won't have changed its position in the QCustomPlot widget (i.e. coordinates around 1.0 will have moved symmetrically closer to 1.0).

-
See also
scaleRange(double factor)
- -
-
- -

§ rescale()

- -
-
- - - - - - - - -
void QCPPolarAxisAngular::rescale (bool onlyVisiblePlottables = false)
-
-

Changes the axis range such that all plottables associated with this axis are fully visible in that dimension.

-
See also
QCPAbstractPlottable::rescaleAxes, QCustomPlot::rescaleAxes
- -
-
- -

§ pixelToCoord()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPPolarAxisAngular::pixelToCoord (QPointF pixelPos,
double & angleCoord,
double & radiusCoord 
) const
-
-

Transforms value, in pixel coordinates of the QCustomPlot widget, to axis coordinates.

- -
-
- -

§ coordToPixel()

- -
-
- - - - - - - - - - - - - - - - - - -
QPointF QCPPolarAxisAngular::coordToPixel (double angleCoord,
double radiusCoord 
) const
-
-

Transforms value, in coordinates of the axis, to pixel coordinates of the QCustomPlot widget.

- -
-
- -

§ getPartAt()

- -
-
- - - - - - - - -
QCPPolarAxisAngular::SelectablePart QCPPolarAxisAngular::getPartAt (const QPointF & pos) const
-
-

Returns the part of the axis that is hit by pos (in pixels). The return value of this function is independent of the user-selectable parts defined with setSelectableParts. Further, this function does not change the current selection state of the axis.

-

If the axis is not visible (setVisible), this function always returns spNone.

-
See also
setSelectedParts, setSelectableParts, QCustomPlot::setInteractions
- -
-
- -

§ left()

- -
-
- - - - - -
- - - - - - - -
int QCPPolarAxisAngular::left () const
-
-inline
-
-

Returns the pixel position of the left border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ right()

- -
-
- - - - - -
- - - - - - - -
int QCPPolarAxisAngular::right () const
-
-inline
-
-

Returns the pixel position of the right border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ top()

- -
-
- - - - - -
- - - - - - - -
int QCPPolarAxisAngular::top () const
-
-inline
-
-

Returns the pixel position of the top border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ bottom()

- -
-
- - - - - -
- - - - - - - -
int QCPPolarAxisAngular::bottom () const
-
-inline
-
-

Returns the pixel position of the bottom border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ width()

- -
-
- - - - - -
- - - - - - - -
int QCPPolarAxisAngular::width () const
-
-inline
-
-

Returns the pixel width of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ height()

- -
-
- - - - - -
- - - - - - - -
int QCPPolarAxisAngular::height () const
-
-inline
-
-

Returns the pixel height of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ size()

- -
-
- - - - - -
- - - - - - - -
QSize QCPPolarAxisAngular::size () const
-
-inline
-
-

Returns the pixel size of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ topLeft()

- -
-
- - - - - -
- - - - - - - -
QPoint QCPPolarAxisAngular::topLeft () const
-
-inline
-
-

Returns the top left corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ topRight()

- -
-
- - - - - -
- - - - - - - -
QPoint QCPPolarAxisAngular::topRight () const
-
-inline
-
-

Returns the top right corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ bottomLeft()

- -
-
- - - - - -
- - - - - - - -
QPoint QCPPolarAxisAngular::bottomLeft () const
-
-inline
-
-

Returns the bottom left corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ bottomRight()

- -
-
- - - - - -
- - - - - - - -
QPoint QCPPolarAxisAngular::bottomRight () const
-
-inline
-
-

Returns the bottom right corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ center()

- -
-
- - - - - -
- - - - - - - -
QPoint QCPPolarAxisAngular::center () const
-
-inline
-
-

Returns the center of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner rect.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisAngular::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

This function applies the default antialiasing setting to the specified painter, using the function applyAntialiasingHint. It is the antialiasing state the painter is put in, when draw is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the draw function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.

-

First example: QCPGraph has multiple entities that have an antialiasing setting: The graph line, fills and scatters. Those can be configured via QCPGraph::setAntialiased, QCPGraph::setAntialiasedFill and QCPGraph::setAntialiasedScatters. Consequently, there isn't only the QCPGraph::applyDefaultAntialiasingHint function (which corresponds to the graph line's antialiasing), but specialized ones like QCPGraph::applyFillAntialiasingHint and QCPGraph::applyScattersAntialiasingHint. So before drawing one of those entities, QCPGraph::draw calls the respective specialized applyAntialiasingHint function.

-

Second example: QCPItemLine consists only of a line so there is only one antialiasing setting which can be controlled with QCPItemLine::setAntialiased. (This function is inherited by all layerables. The specialized functions, as seen on QCPGraph, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal QCPItemLine::applyDefaultAntialiasingHint. The QCPItemLine::draw function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the draw function is called, and that's the state it wants to draw the line with.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisAngular::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ selectionCategory()

- -
-
- - - - - -
- - - - - - - -
QCP::Interaction QCPPolarAxisAngular::selectionCategory () const
-
-protectedvirtual
-
-

Returns the selection category this layerable shall belong to. The selection category is used in conjunction with QCustomPlot::setInteractions to control which objects are selectable and which aren't.

-

Subclasses that don't fit any of the normal QCP::Interaction values can use QCP::iSelectOther. This is what the default implementation returns.

-
See also
QCustomPlot::setInteractions
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mousePressEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisAngular::mousePressEvent (QMouseEvent * event,
const QVariant & details 
)
-
-protectedvirtual
-
-

Event handler for when a mouse button is pressed on the axis rect. If the left mouse button is pressed, the range dragging interaction is initialized (the actual range manipulation happens in the mouseMoveEvent).

-

The mDragging flag is set to true and some anchor points are set that are needed to determine the distance the mouse was dragged in the mouse move/release events later.

-
See also
mouseMoveEvent, mouseReleaseEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseMoveEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisAngular::mouseMoveEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

Event handler for when the mouse is moved on the axis rect. If range dragging was activated in a preceding mousePressEvent, the range is moved accordingly.

-
See also
mousePressEvent, mouseReleaseEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseReleaseEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisAngular::mouseReleaseEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

This event gets called when the user releases the mouse button, after this layerable has become the mouse grabber by accepting the preceding mousePressEvent.

-

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter startPos indicates the position where the initial mousePressEvent occurred, that started the mouse interaction.

-

The default implementation does nothing.

-
See also
mousePressEvent, mouseMoveEvent, mouseDoubleClickEvent, wheelEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ wheelEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisAngular::wheelEvent (QWheelEvent * event)
-
-protectedvirtual
-
-

Event handler for mouse wheel events. If rangeZoom is Qt::Horizontal, Qt::Vertical or both, the ranges of the axes defined as rangeZoomHorzAxis and rangeZoomVertAxis are scaled. The center of the scaling operation is the current cursor position inside the axis rect. The scaling factor is dependent on the mouse wheel delta (which direction the wheel was rotated) to provide a natural zooming feel. The Strength of the zoom can be controlled via setRangeZoomFactor.

-

Note, that event->delta() is usually +/-120 for single rotation steps. However, if the mouse wheel is turned rapidly, many steps may bunch up to one event, so the event->delta() may then be multiples of 120. This is taken into account here, by calculating wheelSteps and using it as exponent of the range zoom factor. This takes care of the wheel direction automatically, by inverting the factor, when the wheel step is negative (f^-1 = 1/f).

- -

Reimplemented from QCPLayerable.

- -
-
- -

§ drawBackground()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPPolarAxisAngular::drawBackground (QCPPainterpainter,
const QPointF & center,
double radius 
)
-
-protected
-
-

Draws the background of this axis rect. It may consist of a background fill (a QBrush) and a pixmap.

-

If a brush was given via setBackground(const QBrush &brush), this function first draws an according filling inside the axis rect with the provided painter.

-

Then, if a pixmap was provided via setBackground, this function buffers the scaled version depending on setBackgroundScaled and setBackgroundScaledMode and then draws it inside the axis rect with the provided painter. The scaled version is buffered in mScaledBackgroundPixmap to prevent expensive rescaling at every redraw. It is only updated, when the axis rect has changed in a way that requires a rescale of the background pixmap (this is dependent on the setBackgroundScaledMode), or when a differend axis background pixmap was set.

-
See also
setBackground, setBackgroundScaled, setBackgroundScaledMode
- -
-
- -

§ setupTickVectors()

- -
-
- - - - - -
- - - - - - - -
void QCPPolarAxisAngular::setupTickVectors ()
-
-protected
-
-

Prepares the internal tick vector, sub tick vector and tick label vector. This is done by calling QCPAxisTicker::generate on the currently installed ticker.

-

If a change in the label text/count is detected, the cached axis margin is invalidated to make sure the next margin calculation recalculates the label sizes and returns an up-to-date value.

- -
-
- -

§ getBasePen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPPolarAxisAngular::getBasePen () const
-
-protected
-
-

Returns the pen that is used to draw the axis base line. Depending on the selection state, this is either mSelectedBasePen or mBasePen.

- -
-
- -

§ getTickPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPPolarAxisAngular::getTickPen () const
-
-protected
-
-

Returns the pen that is used to draw the (major) ticks. Depending on the selection state, this is either mSelectedTickPen or mTickPen.

- -
-
- -

§ getSubTickPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPPolarAxisAngular::getSubTickPen () const
-
-protected
-
-

Returns the pen that is used to draw the subticks. Depending on the selection state, this is either mSelectedSubTickPen or mSubTickPen.

- -
-
- -

§ getTickLabelFont()

- -
-
- - - - - -
- - - - - - - -
QFont QCPPolarAxisAngular::getTickLabelFont () const
-
-protected
-
-

Returns the font that is used to draw the tick labels. Depending on the selection state, this is either mSelectedTickLabelFont or mTickLabelFont.

- -
-
- -

§ getLabelFont()

- -
-
- - - - - -
- - - - - - - -
QFont QCPPolarAxisAngular::getLabelFont () const
-
-protected
-
-

Returns the font that is used to draw the axis label. Depending on the selection state, this is either mSelectedLabelFont or mLabelFont.

- -
-
- -

§ getTickLabelColor()

- -
-
- - - - - -
- - - - - - - -
QColor QCPPolarAxisAngular::getTickLabelColor () const
-
-protected
-
-

Returns the color that is used to draw the tick labels. Depending on the selection state, this is either mSelectedTickLabelColor or mTickLabelColor.

- -
-
- -

§ getLabelColor()

- -
-
- - - - - -
- - - - - - - -
QColor QCPPolarAxisAngular::getLabelColor () const
-
-protected
-
-

Returns the color that is used to draw the axis label. Depending on the selection state, this is either mSelectedLabelColor or mLabelColor.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/polar/layoutelement-angularaxis.h
  • -
  • src/polar/layoutelement-angularaxis.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPolarAxisAngular__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPPolarAxisAngular__inherit__graph.png deleted file mode 100644 index 055794d1..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPPolarAxisAngular__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPPolarAxisRadial.html b/third_party/qcustomplot/documentation/html/classQCPPolarAxisRadial.html deleted file mode 100644 index 489e5511..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPPolarAxisRadial.html +++ /dev/null @@ -1,2303 +0,0 @@ - - - - - - -QCPPolarAxisRadial Class Reference - - - - -
- -
-
QCPPolarAxisRadial Class Reference
-
-
- -

The radial axis inside a radial plot. - More...

-
-Inheritance diagram for QCPPolarAxisRadial:
-
-
Inheritance graph
- - - -
- - - - - - - - - - -

-Public Types

enum  AngleReference
 
enum  ScaleType
 
enum  SelectablePart
 
enum  LabelMode
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPPolarAxisRadial (QCPPolarAxisAngular *parent)
 
-bool rangeDrag () const
 
-bool rangeZoom () const
 
-double rangeZoomFactor () const
 
-QCPPolarAxisAngularangularAxis () const
 
-ScaleType scaleType () const
 
-const QCPRange range () const
 
-bool rangeReversed () const
 
-double angle () const
 
-AngleReference angleReference () const
 
QSharedPointer< QCPAxisTickerticker () const
 
-bool ticks () const
 
-bool tickLabels () const
 
-int tickLabelPadding () const
 
-QFont tickLabelFont () const
 
-QColor tickLabelColor () const
 
-double tickLabelRotation () const
 
-LabelMode tickLabelMode () const
 
-QString numberFormat () const
 
-int numberPrecision () const
 
-QVector< double > tickVector () const
 
-QVector< double > subTickVector () const
 
-QVector< QString > tickVectorLabels () const
 
-int tickLengthIn () const
 
-int tickLengthOut () const
 
-bool subTicks () const
 
-int subTickLengthIn () const
 
-int subTickLengthOut () const
 
-QPen basePen () const
 
-QPen tickPen () const
 
-QPen subTickPen () const
 
-QFont labelFont () const
 
-QColor labelColor () const
 
-QString label () const
 
-int labelPadding () const
 
-SelectableParts selectedParts () const
 
-SelectableParts selectableParts () const
 
-QFont selectedTickLabelFont () const
 
-QFont selectedLabelFont () const
 
-QColor selectedTickLabelColor () const
 
-QColor selectedLabelColor () const
 
-QPen selectedBasePen () const
 
-QPen selectedTickPen () const
 
-QPen selectedSubTickPen () const
 
-void setRangeDrag (bool enabled)
 
-void setRangeZoom (bool enabled)
 
-void setRangeZoomFactor (double factor)
 
Q_SLOT void setScaleType (QCPPolarAxisRadial::ScaleType type)
 
Q_SLOT void setRange (const QCPRange &range)
 
void setRange (double lower, double upper)
 
void setRange (double position, double size, Qt::AlignmentFlag alignment)
 
void setRangeLower (double lower)
 
void setRangeUpper (double upper)
 
void setRangeReversed (bool reversed)
 
-void setAngle (double degrees)
 
-void setAngleReference (AngleReference reference)
 
void setTicker (QSharedPointer< QCPAxisTicker > ticker)
 
void setTicks (bool show)
 
void setTickLabels (bool show)
 
void setTickLabelPadding (int padding)
 
void setTickLabelFont (const QFont &font)
 
void setTickLabelColor (const QColor &color)
 
void setTickLabelRotation (double degrees)
 
-void setTickLabelMode (LabelMode mode)
 
void setNumberFormat (const QString &formatCode)
 
void setNumberPrecision (int precision)
 
void setTickLength (int inside, int outside=0)
 
void setTickLengthIn (int inside)
 
void setTickLengthOut (int outside)
 
void setSubTicks (bool show)
 
void setSubTickLength (int inside, int outside=0)
 
void setSubTickLengthIn (int inside)
 
void setSubTickLengthOut (int outside)
 
void setBasePen (const QPen &pen)
 
void setTickPen (const QPen &pen)
 
void setSubTickPen (const QPen &pen)
 
void setLabelFont (const QFont &font)
 
void setLabelColor (const QColor &color)
 
void setLabel (const QString &str)
 
void setLabelPadding (int padding)
 
void setSelectedTickLabelFont (const QFont &font)
 
void setSelectedLabelFont (const QFont &font)
 
void setSelectedTickLabelColor (const QColor &color)
 
void setSelectedLabelColor (const QColor &color)
 
void setSelectedBasePen (const QPen &pen)
 
void setSelectedTickPen (const QPen &pen)
 
void setSelectedSubTickPen (const QPen &pen)
 
Q_SLOT void setSelectableParts (const QCPPolarAxisRadial::SelectableParts &selectableParts)
 
Q_SLOT void setSelectedParts (const QCPPolarAxisRadial::SelectableParts &selectedParts)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const
 
void moveRange (double diff)
 
void scaleRange (double factor)
 
void scaleRange (double factor, double center)
 
void rescale (bool onlyVisiblePlottables=false)
 
void pixelToCoord (QPointF pixelPos, double &angleCoord, double &radiusCoord) const
 
QPointF coordToPixel (double angleCoord, double radiusCoord) const
 
-double coordToRadius (double coord) const
 
-double radiusToCoord (double radius) const
 
SelectablePart getPartAt (const QPointF &pos) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - -

-Signals

void rangeChanged (const QCPRange &newRange)
 
void rangeChanged (const QCPRange &newRange, const QCPRange &oldRange)
 
void scaleTypeChanged (QCPPolarAxisRadial::ScaleType scaleType)
 
void selectionChanged (const QCPPolarAxisRadial::SelectableParts &parts)
 
void selectableChanged (const QCPPolarAxisRadial::SelectableParts &parts)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
virtual QCP::Interaction selectionCategory () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void wheelEvent (QWheelEvent *event)
 
-void updateGeometry (const QPointF &center, double radius)
 
void setupTickVectors ()
 
QPen getBasePen () const
 
QPen getTickPen () const
 
QPen getSubTickPen () const
 
QFont getTickLabelFont () const
 
QFont getLabelFont () const
 
QColor getTickLabelColor () const
 
QColor getLabelColor () const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual QRect clipRect () const
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
-

Detailed Description

-

The radial axis inside a radial plot.

-
Warning
In this QCustomPlot version, polar plots are a tech preview. Expect documentation and functionality to be incomplete, as well as changing public interfaces in the future.
-

Each axis holds an instance of QCPAxisTicker which is used to generate the tick coordinates and tick labels. You can access the currently installed ticker or set a new one (possibly one of the specialized subclasses, or your own subclass) via setTicker. For details, see the documentation of QCPAxisTicker.

-

Member Enumeration Documentation

- -

§ AngleReference

- -
-
-

Defines the reference of the angle at which a radial axis is tilted (setAngle).

- - - -
Enumerator
arAbsolute 

The axis tilt is given in absolute degrees. The zero is to the right and positive angles are measured counter-clockwise.

-
arAngularAxis 

The axis tilt is measured in the angular coordinate system given by the parent angular axis.

-
- -
-
- -

§ ScaleType

- -
-
-

Defines the scale of an axis.

See also
setScaleType
- - - -
Enumerator
stLinear 

Linear scaling.

-
stLogarithmic 

Logarithmic scaling with correspondingly transformed axis coordinates (possibly also setTicker to a QCPAxisTickerLog instance).

-
- -
-
- -

§ SelectablePart

- -
-
-

Defines the selectable parts of an axis.

See also
setSelectableParts, setSelectedParts
- - - - - -
Enumerator
spNone 

None of the selectable parts.

-
spAxis 

The axis backbone and tick marks.

-
spTickLabels 

Tick labels (numbers) of this axis (as a whole, not individually)

-
spAxisLabel 

The axis label.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPPolarAxisRadial()

- -
-
- - - - - -
- - - - - - - - -
QCPPolarAxisRadial::QCPPolarAxisRadial (QCPPolarAxisAngularparent)
-
-explicit
-
-

Constructs an Axis instance of Type type for the axis rect parent.

-

Usually it isn't necessary to instantiate axes directly, because you can let QCustomPlot create them for you with QCPAxisRect::addAxis. If you want to use own QCPAxis-subclasses however, create them manually and then inject them also via QCPAxisRect::addAxis.

- -
-
-

Member Function Documentation

- -

§ ticker()

- -
-
- - - - - -
- - - - - - - -
QSharedPointer< QCPAxisTicker > QCPPolarAxisRadial::ticker () const
-
-inline
-
-

Returns a modifiable shared pointer to the currently installed axis ticker. The axis ticker is responsible for generating the tick positions and tick labels of this axis. You can access the QCPAxisTicker with this method and modify basic properties such as the approximate tick count (QCPAxisTicker::setTickCount).

-

You can gain more control over the axis ticks by setting a different QCPAxisTicker subclass, see the documentation there. A new axis ticker can be set with setTicker.

-

Since the ticker is stored in the axis as a shared pointer, multiple axes may share the same axis ticker simply by passing the same shared pointer to multiple axes.

-
See also
setTicker
- -
-
- -

§ setScaleType()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setScaleType (QCPPolarAxisRadial::ScaleType type)
-
-

Sets whether the axis uses a linear scale or a logarithmic scale.

-

Note that this method controls the coordinate transformation. For logarithmic scales, you will likely also want to use a logarithmic tick spacing and labeling, which can be achieved by setting the axis ticker to an instance of QCPAxisTickerLog :

-
customPlot->xAxis->setScaleType(QCPAxis::stLogarithmic);
customPlot->xAxis->setTicker(QSharedPointer<QCPAxisTickerLog>(new QCPAxisTickerLog));

See the documentation of QCPAxisTickerLog about the details of logarithmic axis tick creation.

-

setNumberPrecision

- -
-
- -

§ setRange() [1/3]

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setRange (const QCPRangerange)
-
-

Sets the range of the axis.

-

This slot may be connected with the rangeChanged signal of another axis so this axis is always synchronized with the other axis range, when it changes.

-

To invert the direction of an axis, use setRangeReversed.

- -
-
- -

§ setRange() [2/3]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisRadial::setRange (double lower,
double upper 
)
-
-

This is an overloaded function.

-

Sets the lower and upper bound of the axis range.

-

To invert the direction of an axis, use setRangeReversed.

-

There is also a slot to set a range, see setRange(const QCPRange &range).

- -
-
- -

§ setRange() [3/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPPolarAxisRadial::setRange (double position,
double size,
Qt::AlignmentFlag alignment 
)
-
-

This is an overloaded function.

-

Sets the range of the axis.

-

The position coordinate indicates together with the alignment parameter, where the new range will be positioned. size defines the size of the new axis range. alignment may be Qt::AlignLeft, Qt::AlignRight or Qt::AlignCenter. This will cause the left border, right border, or center of the range to be aligned with position. Any other values of alignment will default to Qt::AlignCenter.

- -
-
- -

§ setRangeLower()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setRangeLower (double lower)
-
-

Sets the lower bound of the axis range. The upper bound is not changed.

See also
setRange
- -
-
- -

§ setRangeUpper()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setRangeUpper (double upper)
-
-

Sets the upper bound of the axis range. The lower bound is not changed.

See also
setRange
- -
-
- -

§ setRangeReversed()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setRangeReversed (bool reversed)
-
-

Sets whether the axis range (direction) is displayed reversed. Normally, the values on horizontal axes increase left to right, on vertical axes bottom to top. When reversed is set to true, the direction of increasing values is inverted.

-

Note that the range and data interface stays the same for reversed axes, e.g. the lower part of the setRange interface will still reference the mathematically smaller number than the upper part.

- -
-
- -

§ setTicker()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setTicker (QSharedPointer< QCPAxisTickerticker)
-
-

The axis ticker is responsible for generating the tick positions and tick labels. See the documentation of QCPAxisTicker for details on how to work with axis tickers.

-

You can change the tick positioning/labeling behaviour of this axis by setting a different QCPAxisTicker subclass using this method. If you only wish to modify the currently installed axis ticker, access it via ticker.

-

Since the ticker is stored in the axis as a shared pointer, multiple axes may share the same axis ticker simply by passing the same shared pointer to multiple axes.

-
See also
ticker
- -
-
- -

§ setTicks()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setTicks (bool show)
-
-

Sets whether tick marks are displayed.

-

Note that setting show to false does not imply that tick labels are invisible, too. To achieve that, see setTickLabels.

-
See also
setSubTicks
- -
-
- -

§ setTickLabels()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setTickLabels (bool show)
-
-

Sets whether tick labels are displayed. Tick labels are the numbers drawn next to tick marks.

- -
-
- -

§ setTickLabelPadding()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setTickLabelPadding (int padding)
-
-

Sets the distance between the axis base line (including any outward ticks) and the tick labels.

See also
setLabelPadding, setPadding
- -
-
- -

§ setTickLabelFont()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setTickLabelFont (const QFont & font)
-
-

Sets the font of the tick labels.

-
See also
setTickLabels, setTickLabelColor
- -
-
- -

§ setTickLabelColor()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setTickLabelColor (const QColor & color)
-
-

Sets the color of the tick labels.

-
See also
setTickLabels, setTickLabelFont
- -
-
- -

§ setTickLabelRotation()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setTickLabelRotation (double degrees)
-
-

Sets the rotation of the tick labels. If degrees is zero, the labels are drawn normally. Else, the tick labels are drawn rotated by degrees clockwise. The specified angle is bound to values from -90 to 90 degrees.

-

If degrees is exactly -90, 0 or 90, the tick labels are centered on the tick coordinate. For other angles, the label is drawn with an offset such that it seems to point toward or away from the tick mark.

- -
-
- -

§ setNumberFormat()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setNumberFormat (const QString & formatCode)
-
-

Sets the number format for the numbers in tick labels. This formatCode is an extended version of the format code used e.g. by QString::number() and QLocale::toString(). For reference about that, see the "Argument Formats" section in the detailed description of the QString class.

-

formatCode is a string of one, two or three characters. The first character is identical to the normal format code used by Qt. In short, this means: 'e'/'E' scientific format, 'f' fixed format, 'g'/'G' scientific or fixed, whichever is shorter.

-

The second and third characters are optional and specific to QCustomPlot:
-If the first char was 'e' or 'g', numbers are/might be displayed in the scientific format, e.g. "5.5e9", which is ugly in a plot. So when the second char of formatCode is set to 'b' (for "beautiful"), those exponential numbers are formatted in a more natural way, i.e. "5.5 -[multiplication sign] 10 [superscript] 9". By default, the multiplication sign is a centered dot. If instead a cross should be shown (as is usual in the USA), the third char of formatCode can be set to 'c'. The inserted multiplication signs are the UTF-8 characters 215 (0xD7) for the cross and 183 (0xB7) for the dot.

-

Examples for formatCode:

    -
  • g normal format code behaviour. If number is small, fixed format is used, if number is large, normal scientific format is used
  • -
  • gb If number is small, fixed format is used, if number is large, scientific format is used with beautifully typeset decimal powers and a dot as multiplication sign
  • -
  • ebc All numbers are in scientific format with beautifully typeset decimal power and a cross as multiplication sign
  • -
  • fb illegal format code, since fixed format doesn't support (or need) beautifully typeset decimal powers. Format code will be reduced to 'f'.
  • -
  • hello illegal format code, since first char is not 'e', 'E', 'f', 'g' or 'G'. Current format code will not be changed.
  • -
- -
-
- -

§ setNumberPrecision()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setNumberPrecision (int precision)
-
-

Sets the precision of the tick label numbers. See QLocale::toString(double i, char f, int prec) for details. The effect of precisions are most notably for number Formats starting with 'e', see setNumberFormat

- -
-
- -

§ setTickLength()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisRadial::setTickLength (int inside,
int outside = 0 
)
-
-

Sets the length of the ticks in pixels. inside is the length the ticks will reach inside the plot and outside is the length they will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setSubTickLength, setTickLengthIn, setTickLengthOut
- -
-
- -

§ setTickLengthIn()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setTickLengthIn (int inside)
-
-

Sets the length of the inward ticks in pixels. inside is the length the ticks will reach inside the plot.

-
See also
setTickLengthOut, setTickLength, setSubTickLength
- -
-
- -

§ setTickLengthOut()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setTickLengthOut (int outside)
-
-

Sets the length of the outward ticks in pixels. outside is the length the ticks will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setTickLengthIn, setTickLength, setSubTickLength
- -
-
- -

§ setSubTicks()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSubTicks (bool show)
-
-

Sets whether sub tick marks are displayed.

-

Sub ticks are only potentially visible if (major) ticks are also visible (see setTicks)

-
See also
setTicks
- -
-
- -

§ setSubTickLength()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisRadial::setSubTickLength (int inside,
int outside = 0 
)
-
-

Sets the length of the subticks in pixels. inside is the length the subticks will reach inside the plot and outside is the length they will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setTickLength, setSubTickLengthIn, setSubTickLengthOut
- -
-
- -

§ setSubTickLengthIn()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSubTickLengthIn (int inside)
-
-

Sets the length of the inward subticks in pixels. inside is the length the subticks will reach inside the plot.

-
See also
setSubTickLengthOut, setSubTickLength, setTickLength
- -
-
- -

§ setSubTickLengthOut()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSubTickLengthOut (int outside)
-
-

Sets the length of the outward subticks in pixels. outside is the length the subticks will reach outside the plot. If outside is greater than zero, the tick labels will increase their distance to the axis accordingly, so they won't collide with the ticks.

-
See also
setSubTickLengthIn, setSubTickLength, setTickLength
- -
-
- -

§ setBasePen()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setBasePen (const QPen & pen)
-
-

Sets the pen, the axis base line is drawn with.

-
See also
setTickPen, setSubTickPen
- -
-
- -

§ setTickPen()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setTickPen (const QPen & pen)
-
-

Sets the pen, tick marks will be drawn with.

-
See also
setTickLength, setBasePen
- -
-
- -

§ setSubTickPen()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSubTickPen (const QPen & pen)
-
-

Sets the pen, subtick marks will be drawn with.

-
See also
setSubTickCount, setSubTickLength, setBasePen
- -
-
- -

§ setLabelFont()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setLabelFont (const QFont & font)
-
-

Sets the font of the axis label.

-
See also
setLabelColor
- -
-
- -

§ setLabelColor()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setLabelColor (const QColor & color)
-
-

Sets the color of the axis label.

-
See also
setLabelFont
- -
-
- -

§ setLabel()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setLabel (const QString & str)
-
-

Sets the text of the axis label that will be shown below/above or next to the axis, depending on its orientation. To disable axis labels, pass an empty string as str.

- -
-
- -

§ setLabelPadding()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setLabelPadding (int padding)
-
-

Sets the distance between the tick labels and the axis label.

-
See also
setTickLabelPadding, setPadding
- -
-
- -

§ setSelectedTickLabelFont()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSelectedTickLabelFont (const QFont & font)
-
-

Sets the font that is used for tick labels when they are selected.

-
See also
setTickLabelFont, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedLabelFont()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSelectedLabelFont (const QFont & font)
-
-

Sets the font that is used for the axis label when it is selected.

-
See also
setLabelFont, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedTickLabelColor()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSelectedTickLabelColor (const QColor & color)
-
-

Sets the color that is used for tick labels when they are selected.

-
See also
setTickLabelColor, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedLabelColor()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSelectedLabelColor (const QColor & color)
-
-

Sets the color that is used for the axis label when it is selected.

-
See also
setLabelColor, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedBasePen()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSelectedBasePen (const QPen & pen)
-
-

Sets the pen that is used to draw the axis base line when selected.

-
See also
setBasePen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedTickPen()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSelectedTickPen (const QPen & pen)
-
-

Sets the pen that is used to draw the (major) ticks when selected.

-
See also
setTickPen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectedSubTickPen()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSelectedSubTickPen (const QPen & pen)
-
-

Sets the pen that is used to draw the subticks when selected.

-
See also
setSubTickPen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions
- -
-
- -

§ setSelectableParts()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSelectableParts (const QCPPolarAxisRadial::SelectableParts & selectableParts)
-
-

Sets whether the user can (de-)select the parts in selectable by clicking on the QCustomPlot surface. (When QCustomPlot::setInteractions contains iSelectAxes.)

-

However, even when selectable is set to a value not allowing the selection of a specific part, it is still possible to set the selection of this part manually, by calling setSelectedParts directly.

-
See also
SelectablePart, setSelectedParts
- -
-
- -

§ setSelectedParts()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::setSelectedParts (const QCPPolarAxisRadial::SelectableParts & selectedParts)
-
-

Sets the selected state of the respective axis parts described by SelectablePart. When a part is selected, it uses a different pen/font.

-

The entire selection mechanism for axes is handled automatically when QCustomPlot::setInteractions contains iSelectAxes. You only need to call this function when you wish to change the selection state manually.

-

This function can change the selection state of a part, independent of the setSelectableParts setting.

-

emits the selectionChanged signal when selected is different from the previous selection state.

-
See also
SelectablePart, setSelectableParts, selectTest, setSelectedBasePen, setSelectedTickPen, setSelectedSubTickPen, setSelectedTickLabelFont, setSelectedLabelFont, setSelectedTickLabelColor, setSelectedLabelColor
- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPPolarAxisRadial::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = 0 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ moveRange()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::moveRange (double diff)
-
-

If the scale type (setScaleType) is stLinear, diff is added to the lower and upper bounds of the range. The range is simply moved by diff.

-

If the scale type is stLogarithmic, the range bounds are multiplied by diff. This corresponds to an apparent "linear" move in logarithmic scaling by a distance of log(diff).

- -
-
- -

§ scaleRange() [1/2]

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::scaleRange (double factor)
-
-

Scales the range of this axis by factor around the center of the current axis range. For example, if factor is 2.0, then the axis range will double its size, and the point at the axis range center won't have changed its position in the QCustomPlot widget (i.e. coordinates around the center will have moved symmetrically closer).

-

If you wish to scale around a different coordinate than the current axis range center, use the overload scaleRange(double factor, double center).

- -
-
- -

§ scaleRange() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisRadial::scaleRange (double factor,
double center 
)
-
-

This is an overloaded function.

-

Scales the range of this axis by factor around the coordinate center. For example, if factor is 2.0, center is 1.0, then the axis range will double its size, and the point at coordinate 1.0 won't have changed its position in the QCustomPlot widget (i.e. coordinates around 1.0 will have moved symmetrically closer to 1.0).

-
See also
scaleRange(double factor)
- -
-
- -

§ rescale()

- -
-
- - - - - - - - -
void QCPPolarAxisRadial::rescale (bool onlyVisiblePlottables = false)
-
-

Changes the axis range such that all plottables associated with this axis are fully visible in that dimension.

-
See also
QCPAbstractPlottable::rescaleAxes, QCustomPlot::rescaleAxes
- -
-
- -

§ pixelToCoord()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPPolarAxisRadial::pixelToCoord (QPointF pixelPos,
double & angleCoord,
double & radiusCoord 
) const
-
-

Transforms value, in pixel coordinates of the QCustomPlot widget, to axis coordinates.

- -
-
- -

§ coordToPixel()

- -
-
- - - - - - - - - - - - - - - - - - -
QPointF QCPPolarAxisRadial::coordToPixel (double angleCoord,
double radiusCoord 
) const
-
-

Transforms value, in coordinates of the axis, to pixel coordinates of the QCustomPlot widget.

- -
-
- -

§ getPartAt()

- -
-
- - - - - - - - -
QCPPolarAxisRadial::SelectablePart QCPPolarAxisRadial::getPartAt (const QPointF & pos) const
-
-

Returns the part of the axis that is hit by pos (in pixels). The return value of this function is independent of the user-selectable parts defined with setSelectableParts. Further, this function does not change the current selection state of the axis.

-

If the axis is not visible (setVisible), this function always returns spNone.

-
See also
setSelectedParts, setSelectableParts, QCustomPlot::setInteractions
- -
-
- -

§ rangeChanged [1/2]

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisRadial::rangeChanged (const QCPRangenewRange)
-
-signal
-
-

This signal is emitted when the range of this axis has changed. You can connect it to the setRange slot of another axis to communicate the new range to the other axis, in order for it to be synchronized.

-

You may also manipulate/correct the range with setRange in a slot connected to this signal. This is useful if for example a maximum range span shall not be exceeded, or if the lower/upper range shouldn't go beyond certain values (see QCPRange::bounded). For example, the following slot would limit the x axis to ranges between 0 and 10:

customPlot->xAxis->setRange(newRange.bounded(0, 10))
-
-
- -

§ rangeChanged [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisRadial::rangeChanged (const QCPRangenewRange,
const QCPRangeoldRange 
)
-
-signal
-
-

This is an overloaded function.

-

Additionally to the new range, this signal also provides the previous range held by the axis as oldRange.

- -
-
- -

§ scaleTypeChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisRadial::scaleTypeChanged (QCPPolarAxisRadial::ScaleType scaleType)
-
-signal
-
-

This signal is emitted when the scale type changes, by calls to setScaleType

- -
-
- -

§ selectionChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisRadial::selectionChanged (const QCPPolarAxisRadial::SelectableParts & parts)
-
-signal
-
-

This signal is emitted when the selection state of this axis has changed, either by user interaction or by a direct call to setSelectedParts.

- -
-
- -

§ selectableChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisRadial::selectableChanged (const QCPPolarAxisRadial::SelectableParts & parts)
-
-signal
-
-

This signal is emitted when the selectability changes, by calls to setSelectableParts

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisRadial::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

A convenience function to easily set the QPainter::Antialiased hint on the provided painter before drawing axis lines.

-

This is the antialiasing state the painter passed to the draw method is in by default.

-

This function takes into account the local setting of the antialiasing flag as well as the overrides set with QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

-

For general information about this virtual method, see the base class implementation.

-
See also
setAntialiased
- -

Implements QCPLayerable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisRadial::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws the axis with the specified painter, using the internal QCPAxisPainterPrivate instance.

-

For general information about this virtual method, see the base class implementation.

- -

Implements QCPLayerable.

- -
-
- -

§ selectionCategory()

- -
-
- - - - - -
- - - - - - - -
QCP::Interaction QCPPolarAxisRadial::selectionCategory () const
-
-protectedvirtual
-
-

Returns the selection category this layerable shall belong to. The selection category is used in conjunction with QCustomPlot::setInteractions to control which objects are selectable and which aren't.

-

Subclasses that don't fit any of the normal QCP::Interaction values can use QCP::iSelectOther. This is what the default implementation returns.

-
See also
QCustomPlot::setInteractions
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ selectEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPPolarAxisRadial::selectEvent (QMouseEvent * event,
bool additive,
const QVariant & details,
bool * selectionStateChanged 
)
-
-protectedvirtual
-
-

This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing.

-

event is the mouse event that caused the selection. additive indicates, whether the user was holding the multi-select-modifier while performing the selection (see QCustomPlot::setMultiSelectModifier). if additive is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected).

-

Every selectEvent is preceded by a call to selectTest, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent QCustomPlot). The details data you output from selectTest is fed back via details here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually details is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like QCPAxis). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked.

-

selectionStateChanged is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if additive is true, selectionStateChanged must also be set to true, because the selection toggles. If additive is false, selectionStateChanged is only set to true, if the layerable was previously unselected and now is switched to the selected state.

-
See also
selectTest, deselectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ deselectEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisRadial::deselectEvent (bool * selectionStateChanged)
-
-protectedvirtual
-
-

This event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to QCustomPlot::deselectAll. Subclasses should react to it by unsetting their selection appropriately.

-

just as in selectEvent, the output parameter selectionStateChanged (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively.

-
See also
selectTest, selectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mousePressEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisRadial::mousePressEvent (QMouseEvent * event,
const QVariant & details 
)
-
-protectedvirtual
-
-

This mouse event reimplementation provides the functionality to let the user drag individual axes exclusively, by startig the drag on top of the axis.

-

For the axis to accept this event and perform the single axis drag, the parent QCPAxisRect must be configured accordingly, i.e. it must allow range dragging in the orientation of this axis (QCPAxisRect::setRangeDrag) and this axis must be a draggable axis (QCPAxisRect::setRangeDragAxes)

-

For general information about this virtual method, see the base class implementation.

-
Note
The dragging of possibly multiple axes at once by starting the drag anywhere in the axis rect is handled by the axis rect's mouse event, e.g. QCPAxisRect::mousePressEvent.
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseMoveEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisRadial::mouseMoveEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

This mouse event reimplementation provides the functionality to let the user drag individual axes exclusively, by startig the drag on top of the axis.

-

For general information about this virtual method, see the base class implementation.

-
Note
The dragging of possibly multiple axes at once by starting the drag anywhere in the axis rect is handled by the axis rect's mouse event, e.g. QCPAxisRect::mousePressEvent.
-
See also
QCPAxis::mousePressEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseReleaseEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPPolarAxisRadial::mouseReleaseEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-protectedvirtual
-
-

This mouse event reimplementation provides the functionality to let the user drag individual axes exclusively, by startig the drag on top of the axis.

-

For general information about this virtual method, see the base class implementation.

-
Note
The dragging of possibly multiple axes at once by starting the drag anywhere in the axis rect is handled by the axis rect's mouse event, e.g. QCPAxisRect::mousePressEvent.
-
See also
QCPAxis::mousePressEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ wheelEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarAxisRadial::wheelEvent (QWheelEvent * event)
-
-protectedvirtual
-
-

This mouse event reimplementation provides the functionality to let the user zoom individual axes exclusively, by performing the wheel event on top of the axis.

-

For the axis to accept this event and perform the single axis zoom, the parent QCPAxisRect must be configured accordingly, i.e. it must allow range zooming in the orientation of this axis (QCPAxisRect::setRangeZoom) and this axis must be a zoomable axis (QCPAxisRect::setRangeZoomAxes)

-

For general information about this virtual method, see the base class implementation.

-
Note
The zooming of possibly multiple axes at once by performing the wheel event anywhere in the axis rect is handled by the axis rect's mouse event, e.g. QCPAxisRect::wheelEvent.
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ setupTickVectors()

- -
-
- - - - - -
- - - - - - - -
void QCPPolarAxisRadial::setupTickVectors ()
-
-protected
-
-

Prepares the internal tick vector, sub tick vector and tick label vector. This is done by calling QCPAxisTicker::generate on the currently installed ticker.

-

If a change in the label text/count is detected, the cached axis margin is invalidated to make sure the next margin calculation recalculates the label sizes and returns an up-to-date value.

- -
-
- -

§ getBasePen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPPolarAxisRadial::getBasePen () const
-
-protected
-
-

Returns the pen that is used to draw the axis base line. Depending on the selection state, this is either mSelectedBasePen or mBasePen.

- -
-
- -

§ getTickPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPPolarAxisRadial::getTickPen () const
-
-protected
-
-

Returns the pen that is used to draw the (major) ticks. Depending on the selection state, this is either mSelectedTickPen or mTickPen.

- -
-
- -

§ getSubTickPen()

- -
-
- - - - - -
- - - - - - - -
QPen QCPPolarAxisRadial::getSubTickPen () const
-
-protected
-
-

Returns the pen that is used to draw the subticks. Depending on the selection state, this is either mSelectedSubTickPen or mSubTickPen.

- -
-
- -

§ getTickLabelFont()

- -
-
- - - - - -
- - - - - - - -
QFont QCPPolarAxisRadial::getTickLabelFont () const
-
-protected
-
-

Returns the font that is used to draw the tick labels. Depending on the selection state, this is either mSelectedTickLabelFont or mTickLabelFont.

- -
-
- -

§ getLabelFont()

- -
-
- - - - - -
- - - - - - - -
QFont QCPPolarAxisRadial::getLabelFont () const
-
-protected
-
-

Returns the font that is used to draw the axis label. Depending on the selection state, this is either mSelectedLabelFont or mLabelFont.

- -
-
- -

§ getTickLabelColor()

- -
-
- - - - - -
- - - - - - - -
QColor QCPPolarAxisRadial::getTickLabelColor () const
-
-protected
-
-

Returns the color that is used to draw the tick labels. Depending on the selection state, this is either mSelectedTickLabelColor or mTickLabelColor.

- -
-
- -

§ getLabelColor()

- -
-
- - - - - -
- - - - - - - -
QColor QCPPolarAxisRadial::getLabelColor () const
-
-protected
-
-

Returns the color that is used to draw the axis label. Depending on the selection state, this is either mSelectedLabelColor or mLabelColor.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/polar/radialaxis.h
  • -
  • src/polar/radialaxis.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPolarAxisRadial__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPPolarAxisRadial__inherit__graph.png deleted file mode 100644 index bff72596..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPPolarAxisRadial__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPPolarGraph.html b/third_party/qcustomplot/documentation/html/classQCPPolarGraph.html deleted file mode 100644 index 1ba15b9f..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPPolarGraph.html +++ /dev/null @@ -1,1136 +0,0 @@ - - - - - - -QCPPolarGraph Class Reference - - - - -
- -
-
QCPPolarGraph Class Reference
-
-
- -

A radial graph used to display data in polar plots. - More...

-
-Inheritance diagram for QCPPolarGraph:
-
-
Inheritance graph
- - - -
- - - - -

-Public Types

enum  LineStyle
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPPolarGraph (QCPPolarAxisAngular *keyAxis, QCPPolarAxisRadial *valueAxis)
 
-QString name () const
 
-bool antialiasedFill () const
 
-bool antialiasedScatters () const
 
-QPen pen () const
 
-QBrush brush () const
 
-bool periodic () const
 
-QCPPolarAxisAngularkeyAxis () const
 
-QCPPolarAxisRadialvalueAxis () const
 
-QCP::SelectionType selectable () const
 
-bool selected () const
 
-QCPDataSelection selection () const
 
-QSharedPointer< QCPGraphDataContainerdata () const
 
-LineStyle lineStyle () const
 
-QCPScatterStyle scatterStyle () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
-void setPeriodic (bool enabled)
 
void setKeyAxis (QCPPolarAxisAngular *axis)
 
void setValueAxis (QCPPolarAxisRadial *axis)
 
Q_SLOT void setSelectable (QCP::SelectionType selectable)
 
Q_SLOT void setSelection (QCPDataSelection selection)
 
void setData (QSharedPointer< QCPGraphDataContainer > data)
 
void setData (const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
 
void setLineStyle (LineStyle ls)
 
void setScatterStyle (const QCPScatterStyle &style)
 
-void addData (const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
 
-void addData (double key, double value)
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
-const QPointF coordsToPixels (double key, double value) const
 
-void pixelsToCoords (double x, double y, double &key, double &value) const
 
-void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
-void rescaleAxes (bool onlyEnlarge=false) const
 
-void rescaleKeyAxis (bool onlyEnlarge=false) const
 
-void rescaleValueAxis (bool onlyEnlarge=false, bool inKeyRange=false) const
 
-bool addToLegend (QCPLegend *legend)
 
-bool addToLegend ()
 
-bool removeFromLegend (QCPLegend *legend) const
 
-bool removeFromLegend () const
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const
 
-virtual QCPPlottableInterface1Dinterface1D ()
 
-virtual QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const
 
-virtual QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - -

-Signals

-void selectionChanged (bool selected)
 
-void selectionChanged (const QCPDataSelection &selection)
 
-void selectableChanged (QCP::SelectionType selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual QRect clipRect () const
 
virtual void draw (QCPPainter *painter)
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void drawLinePlot (QCPPainter *painter, const QVector< QPointF > &lines) const
 
virtual void drawFill (QCPPainter *painter, QVector< QPointF > *lines) const
 
virtual void drawScatterPlot (QCPPainter *painter, const QVector< QPointF > &scatters, const QCPScatterStyle &style) const
 
-virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const
 
-void applyFillAntialiasingHint (QCPPainter *painter) const
 
-void applyScattersAntialiasingHint (QCPPainter *painter) const
 
-double pointDistance (const QPointF &pixelPoint, QCPGraphDataContainer::const_iterator &closestData) const
 
-virtual int dataCount () const
 
-void getDataSegments (QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
 
-void drawPolyline (QCPPainter *painter, const QVector< QPointF > &lineData) const
 
-void getVisibleDataBounds (QCPGraphDataContainer::const_iterator &begin, QCPGraphDataContainer::const_iterator &end, const QCPDataRange &rangeRestriction) const
 
void getLines (QVector< QPointF > *lines, const QCPDataRange &dataRange) const
 
-void getScatters (QVector< QPointF > *scatters, const QCPDataRange &dataRange) const
 
-void getOptimizedLineData (QVector< QCPGraphData > *lineData, const QCPGraphDataContainer::const_iterator &begin, const QCPGraphDataContainer::const_iterator &end) const
 
-void getOptimizedScatterData (QVector< QCPGraphData > *scatterData, QCPGraphDataContainer::const_iterator begin, QCPGraphDataContainer::const_iterator end) const
 
QVector< QPointF > dataToLines (const QVector< QCPGraphData > &data) const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
-

Detailed Description

-

A radial graph used to display data in polar plots.

-
Warning
In this QCustomPlot version, polar plots are a tech preview. Expect documentation and functionality to be incomplete, as well as changing public interfaces in the future.
-

Member Enumeration Documentation

- -

§ LineStyle

- -
-
- - - - -
enum QCPPolarGraph::LineStyle
-
-

Defines how the graph's line is represented visually in the plot. The line is drawn with the current pen of the graph (setPen).

See also
setLineStyle
- - - -
Enumerator
lsNone 

data points are not connected with any lines (e.g. data only represented with symbols according to the scatter style, see setScatterStyle)

-
lsLine 

data points are connected by a straight line

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPPolarGraph()

- -
-
- - - - - - - - - - - - - - - - - - -
QCPPolarGraph::QCPPolarGraph (QCPPolarAxisAngularkeyAxis,
QCPPolarAxisRadialvalueAxis 
)
-
-

Constructs a graph which uses keyAxis as its angular and valueAxis as its radial axis. keyAxis and valueAxis must reside in the same QCustomPlot, and the radial axis must be associated with the angular axis. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though.

-

The created QCPPolarGraph is automatically registered with the QCustomPlot instance inferred from keyAxis. This QCustomPlot instance takes ownership of the QCPPolarGraph, so do not delete it manually but use QCPPolarAxisAngular::removeGraph() instead.

-

To directly create a QCPPolarGraph inside a plot, you shoud use the QCPPolarAxisAngular::addGraph method.

- -
-
-

Member Function Documentation

- -

§ setName()

- -
-
- - - - - - - - -
void QCPPolarGraph::setName (const QString & name)
-
-

The name is the textual representation of this plottable as it is displayed in the legend (QCPLegend). It may contain any UTF-8 characters, including newlines.

- -
-
- -

§ setAntialiasedFill()

- -
-
- - - - - - - - -
void QCPPolarGraph::setAntialiasedFill (bool enabled)
-
-

Sets whether fills of this plottable are drawn antialiased or not.

-

Note that this setting may be overridden by QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

- -
-
- -

§ setAntialiasedScatters()

- -
-
- - - - - - - - -
void QCPPolarGraph::setAntialiasedScatters (bool enabled)
-
-

Sets whether the scatter symbols of this plottable are drawn antialiased or not.

-

Note that this setting may be overridden by QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

- -
-
- -

§ setPen()

- -
-
- - - - - - - - -
void QCPPolarGraph::setPen (const QPen & pen)
-
-

The pen is used to draw basic lines that make up the plottable representation in the plot.

-

For example, the QCPGraph subclass draws its graph lines with this pen.

-
See also
setBrush
- -
-
- -

§ setBrush()

- -
-
- - - - - - - - -
void QCPPolarGraph::setBrush (const QBrush & brush)
-
-

The brush is used to draw basic fills of the plottable representation in the plot. The Fill can be a color, gradient or texture, see the usage of QBrush.

-

For example, the QCPGraph subclass draws the fill under the graph with this brush, when it's not set to Qt::NoBrush.

-
See also
setPen
- -
-
- -

§ setKeyAxis()

- -
-
- - - - - - - - -
void QCPPolarGraph::setKeyAxis (QCPPolarAxisAngularaxis)
-
-

The key axis of a plottable can be set to any axis of a QCustomPlot, as long as it is orthogonal to the plottable's value axis. This function performs no checks to make sure this is the case. The typical mathematical choice is to use the x-axis (QCustomPlot::xAxis) as key axis and the y-axis (QCustomPlot::yAxis) as value axis.

-

Normally, the key and value axes are set in the constructor of the plottable (or QCustomPlot::addGraph when working with QCPGraphs through the dedicated graph interface).

-
See also
setValueAxis
- -
-
- -

§ setValueAxis()

- -
-
- - - - - - - - -
void QCPPolarGraph::setValueAxis (QCPPolarAxisRadialaxis)
-
-

The value axis of a plottable can be set to any axis of a QCustomPlot, as long as it is orthogonal to the plottable's key axis. This function performs no checks to make sure this is the case. The typical mathematical choice is to use the x-axis (QCustomPlot::xAxis) as key axis and the y-axis (QCustomPlot::yAxis) as value axis.

-

Normally, the key and value axes are set in the constructor of the plottable (or QCustomPlot::addGraph when working with QCPGraphs through the dedicated graph interface).

-
See also
setKeyAxis
- -
-
- -

§ setSelectable()

- -
-
- - - - - - - - -
void QCPPolarGraph::setSelectable (QCP::SelectionType selectable)
-
-

Sets whether and to which granularity this plottable can be selected.

-

A selection can happen by clicking on the QCustomPlot surface (When QCustomPlot::setInteractions contains QCP::iSelectPlottables), by dragging a selection rect (When QCustomPlot::setSelectionRectMode is QCP::srmSelect), or programmatically by calling setSelection.

-
See also
setSelection, QCP::SelectionType
- -
-
- -

§ setSelection()

- -
-
- - - - - - - - -
void QCPPolarGraph::setSelection (QCPDataSelection selection)
-
-

Sets which data ranges of this plottable are selected. Selected data ranges are drawn differently (e.g. color) in the plot. This can be controlled via the selection decorator (see selectionDecorator).

-

The entire selection mechanism for plottables is handled automatically when QCustomPlot::setInteractions contains iSelectPlottables. You only need to call this function when you wish to change the selection state programmatically.

-

Using setSelectable you can further specify for each plottable whether and to which granularity it is selectable. If selection is not compatible with the current QCP::SelectionType set via setSelectable, the resulting selection will be adjusted accordingly (see QCPDataSelection::enforceType).

-

emits the selectionChanged signal when selected is different from the previous selection state.

-
See also
setSelectable, selectTest
- -
-
- -

§ setData() [1/2]

- -
-
- - - - - - - - -
void QCPPolarGraph::setData (QSharedPointer< QCPGraphDataContainerdata)
-
-

This is an overloaded function.

-

Replaces the current data container with the provided data container.

-

Since a QSharedPointer is used, multiple QCPPolarGraphs may share the same data container safely. Modifying the data in the container will then affect all graphs that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers:

If you do not wish to share containers, but create a copy from an existing container, rather use the QCPDataContainer<DataType>::set method on the graph's data container directly:

See also
addData
- -
-
- -

§ setData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPPolarGraph::setData (const QVector< double > & keys,
const QVector< double > & values,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Replaces the current data with the provided points in keys and values. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

If you can guarantee that the passed data points are sorted by keys in ascending order, you can set alreadySorted to true, to improve performance by saving a sorting run.

-
See also
addData
- -
-
- -

§ setLineStyle()

- -
-
- - - - - - - - -
void QCPPolarGraph::setLineStyle (LineStyle ls)
-
-

Sets how the single data points are connected in the plot. For scatter-only plots, set ls to lsNone and setScatterStyle to the desired scatter style.

-
See also
setScatterStyle
- -
-
- -

§ setScatterStyle()

- -
-
- - - - - - - - -
void QCPPolarGraph::setScatterStyle (const QCPScatterStylestyle)
-
-

Sets the visual appearance of single data points in the plot. If set to QCPScatterStyle::ssNone, no scatter points are drawn (e.g. for line-only-plots with appropriate line style).

-
See also
QCPScatterStyle, setLineStyle
- -
-
- -

§ coordsToPixels()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPPolarGraph::coordsToPixels (double key,
double value,
double & x,
double & y 
) const
-
-

Use this method to set an own QCPSelectionDecorator (subclass) instance. This allows you to customize the visual representation of selected data ranges further than by using the default QCPSelectionDecorator.

-

The plottable takes ownership of the decorator.

-

The currently set decorator can be accessed via selectionDecorator.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPPolarGraph::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = 0 
) const
-
-virtual
-
-

This function is used to decide whether a click hits a layerable object or not.

-

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

-

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

-

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

-

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.

-

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

-

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

-

You may pass nullptr as details to indicate that you are not interested in those selection details.

-
See also
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ clipRect()

- -
-
- - - - - -
- - - - - - - -
QRect QCPPolarGraph::clipRect () const
-
-protectedvirtual
-
-

Returns the clipping rectangle of this layerable object. By default, this is the viewport of the parent QCustomPlot. Specific subclasses may reimplement this function to provide different clipping rects.

-

The returned clipping rect is set on the painter before the draw function of the respective object is called.

- -

Reimplemented from QCPLayerable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarGraph::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implements QCPLayerable.

- -
-
- -

§ selectionCategory()

- -
-
- - - - - -
- - - - - - - -
QCP::Interaction QCPPolarGraph::selectionCategory () const
-
-protectedvirtual
-
-

Returns the selection category this layerable shall belong to. The selection category is used in conjunction with QCustomPlot::setInteractions to control which objects are selectable and which aren't.

-

Subclasses that don't fit any of the normal QCP::Interaction values can use QCP::iSelectOther. This is what the default implementation returns.

-
See also
QCustomPlot::setInteractions
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarGraph::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

This function applies the default antialiasing setting to the specified painter, using the function applyAntialiasingHint. It is the antialiasing state the painter is put in, when draw is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the draw function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.

-

First example: QCPGraph has multiple entities that have an antialiasing setting: The graph line, fills and scatters. Those can be configured via QCPGraph::setAntialiased, QCPGraph::setAntialiasedFill and QCPGraph::setAntialiasedScatters. Consequently, there isn't only the QCPGraph::applyDefaultAntialiasingHint function (which corresponds to the graph line's antialiasing), but specialized ones like QCPGraph::applyFillAntialiasingHint and QCPGraph::applyScattersAntialiasingHint. So before drawing one of those entities, QCPGraph::draw calls the respective specialized applyAntialiasingHint function.

-

Second example: QCPItemLine consists only of a line so there is only one antialiasing setting which can be controlled with QCPItemLine::setAntialiased. (This function is inherited by all layerables. The specialized functions, as seen on QCPGraph, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal QCPItemLine::applyDefaultAntialiasingHint. The QCPItemLine::draw function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the draw function is called, and that's the state it wants to draw the line with.

- -

Implements QCPLayerable.

- -
-
- -

§ selectEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPPolarGraph::selectEvent (QMouseEvent * event,
bool additive,
const QVariant & details,
bool * selectionStateChanged 
)
-
-protectedvirtual
-
-

This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing.

-

event is the mouse event that caused the selection. additive indicates, whether the user was holding the multi-select-modifier while performing the selection (see QCustomPlot::setMultiSelectModifier). if additive is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected).

-

Every selectEvent is preceded by a call to selectTest, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent QCustomPlot). The details data you output from selectTest is fed back via details here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually details is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like QCPAxis). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked.

-

selectionStateChanged is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if additive is true, selectionStateChanged must also be set to true, because the selection toggles. If additive is false, selectionStateChanged is only set to true, if the layerable was previously unselected and now is switched to the selected state.

-
See also
selectTest, deselectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ deselectEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarGraph::deselectEvent (bool * selectionStateChanged)
-
-protectedvirtual
-
-

This event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to QCustomPlot::deselectAll. Subclasses should react to it by unsetting their selection appropriately.

-

just as in selectEvent, the output parameter selectionStateChanged (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively.

-
See also
selectTest, selectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ drawLinePlot()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPPolarGraph::drawLinePlot (QCPPainterpainter,
const QVector< QPointF > & lines 
) const
-
-protectedvirtual
-
-

Draws lines between the points in lines, given in pixel coordinates.

-
See also
drawScatterPlot, drawImpulsePlot, QCPAbstractPlottable1D::drawPolyline
- -
-
- -

§ drawFill()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPPolarGraph::drawFill (QCPPainterpainter,
QVector< QPointF > * lines 
) const
-
-protectedvirtual
-
-

Draws the fill of the graph using the specified painter, with the currently set brush.

-

Depending on whether a normal fill or a channel fill (setChannelFillGraph) is needed, getFillPolygon or getChannelFillPolygon are used to find the according fill polygons.

-

In order to handle NaN Data points correctly (the fill needs to be split into disjoint areas), this method first determines a list of non-NaN segments with getNonNanSegments, on which to operate. In the channel fill case, getOverlappingSegments is used to consolidate the non-NaN segments of the two involved graphs, before passing the overlapping pairs to getChannelFillPolygon.

-

Pass the points of this graph's line as lines, in pixel coordinates.

-
See also
drawLinePlot, drawImpulsePlot, drawScatterPlot
- -
-
- -

§ drawScatterPlot()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPPolarGraph::drawScatterPlot (QCPPainterpainter,
const QVector< QPointF > & scatters,
const QCPScatterStylestyle 
) const
-
-protectedvirtual
-
-

Draws scatter symbols at every point passed in scatters, given in pixel coordinates. The scatters will be drawn with painter and have the appearance as specified in style.

-
See also
drawLinePlot, drawImpulsePlot
- -
-
- -

§ getLines()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPPolarGraph::getLines (QVector< QPointF > * lines,
const QCPDataRangedataRange 
) const
-
-protected
-
-

This method retrieves an optimized set of data points via getOptimizedLineData, an branches out to the line style specific functions such as dataToLines, dataToStepLeftLines, etc. according to the line style of the graph.

-

lines will be filled with points in pixel coordinates, that can be drawn with the according draw functions like drawLinePlot and drawImpulsePlot. The points returned in lines aren't necessarily the original data points. For example, step line styles require additional points to form the steps when drawn. If the line style of the graph is lsNone, the lines vector will be empty.

-

dataRange specifies the beginning and ending data indices that will be taken into account for conversion. In this function, the specified range may exceed the total data bounds without harm: a correspondingly trimmed data range will be used. This takes the burden off the user of this function to check for valid indices in dataRange, e.g. when extending ranges coming from getDataSegments.

-
See also
getScatters
- -
-
- -

§ dataToLines()

- -
-
- - - - - -
- - - - - - - - -
QVector< QPointF > QCPPolarGraph::dataToLines (const QVector< QCPGraphData > & data) const
-
-protected
-
-

Takes raw data points in plot coordinates as data, and returns a vector containing pixel coordinate points which are suitable for drawing the line style lsLine.

-

The source of data is usually getOptimizedLineData, and this method is called in getLines if the line style is set accordingly.

-
See also
dataToStepLeftLines, dataToStepRightLines, dataToStepCenterLines, dataToImpulseLines, getLines, drawLinePlot
- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/polar/polargraph.h
  • -
  • src/polar/polargraph.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPolarGraph__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPPolarGraph__inherit__graph.png deleted file mode 100644 index e7a59141..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPPolarGraph__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPPolarGrid.html b/third_party/qcustomplot/documentation/html/classQCPPolarGrid.html deleted file mode 100644 index e1bd6048..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPPolarGrid.html +++ /dev/null @@ -1,375 +0,0 @@ - - - - - - -QCPPolarGrid Class Reference - - - - -
- -
-
QCPPolarGrid Class Reference
-
-
- -

The grid in both angular and radial dimensions for polar plots. - More...

-
-Inheritance diagram for QCPPolarGrid:
-
-
Inheritance graph
- - - -
- - - - -

-Public Types

enum  GridType
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPPolarGrid (QCPPolarAxisAngular *parentAxis)
 
-QCPPolarAxisRadialradialAxis () const
 
-GridTypes type () const
 
-GridTypes subGridType () const
 
-bool antialiasedSubGrid () const
 
-bool antialiasedZeroLine () const
 
-QPen angularPen () const
 
-QPen angularSubGridPen () const
 
-QPen radialPen () const
 
-QPen radialSubGridPen () const
 
-QPen radialZeroLinePen () const
 
-void setRadialAxis (QCPPolarAxisRadial *axis)
 
-void setType (GridTypes type)
 
-void setSubGridType (GridTypes type)
 
void setAntialiasedSubGrid (bool enabled)
 
void setAntialiasedZeroLine (bool enabled)
 
void setAngularPen (const QPen &pen)
 
void setAngularSubGridPen (const QPen &pen)
 
-void setRadialPen (const QPen &pen)
 
-void setRadialSubGridPen (const QPen &pen)
 
-void setRadialZeroLinePen (const QPen &pen)
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
-void drawRadialGrid (QCPPainter *painter, const QPointF &center, const QVector< double > &coords, const QPen &pen, const QPen &zeroPen=Qt::NoPen)
 
-void drawAngularGrid (QCPPainter *painter, const QPointF &center, double radius, const QVector< QPointF > &ticksCosSin, const QPen &pen)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - -

-Additional Inherited Members

- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

The grid in both angular and radial dimensions for polar plots.

-
Warning
In this QCustomPlot version, polar plots are a tech preview. Expect documentation and functionality to be incomplete, as well as changing public interfaces in the future.
-

Member Enumeration Documentation

- -

§ GridType

- -
-
- - - - -
enum QCPPolarGrid::GridType
-
-

TODO

- -
-
-

Constructor & Destructor Documentation

- -

§ QCPPolarGrid()

- -
-
- - - - - -
- - - - - - - - -
QCPPolarGrid::QCPPolarGrid (QCPPolarAxisAngularparentAxis)
-
-explicit
-
-

Creates a QCPPolarGrid instance and sets default values.

-

You shouldn't instantiate grids on their own, since every axis brings its own grid.

- -
-
-

Member Function Documentation

- -

§ setAntialiasedSubGrid()

- -
-
- - - - - - - - -
void QCPPolarGrid::setAntialiasedSubGrid (bool enabled)
-
-

Sets whether sub grid lines are drawn antialiased.

- -
-
- -

§ setAntialiasedZeroLine()

- -
-
- - - - - - - - -
void QCPPolarGrid::setAntialiasedZeroLine (bool enabled)
-
-

Sets whether zero lines are drawn antialiased.

- -
-
- -

§ setAngularPen()

- -
-
- - - - - - - - -
void QCPPolarGrid::setAngularPen (const QPen & pen)
-
-

Sets the pen with which (major) grid lines are drawn.

- -
-
- -

§ setAngularSubGridPen()

- -
-
- - - - - - - - -
void QCPPolarGrid::setAngularSubGridPen (const QPen & pen)
-
-

Sets the pen with which sub grid lines are drawn.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarGrid::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

A convenience function to easily set the QPainter::Antialiased hint on the provided painter before drawing the major grid lines.

-

This is the antialiasing state the painter passed to the draw method is in by default.

-

This function takes into account the local setting of the antialiasing flag as well as the overrides set with QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

-
See also
setAntialiased
- -

Implements QCPLayerable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarGrid::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

Draws grid lines and sub grid lines at the positions of (sub) ticks of the parent axis, spanning over the complete axis rect. Also draws the zero line, if appropriate (setZeroLinePen).

- -

Implements QCPLayerable.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/polar/polargrid.h
  • -
  • src/polar/polargrid.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPolarGrid__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPPolarGrid__inherit__graph.png deleted file mode 100644 index 9b06718f..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPPolarGrid__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPPolarLegendItem.html b/third_party/qcustomplot/documentation/html/classQCPPolarLegendItem.html deleted file mode 100644 index 66845475..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPPolarLegendItem.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - -QCPPolarLegendItem Class Reference - - - - -
- -
-
QCPPolarLegendItem Class Reference
-
-
- -

A legend item for polar plots. - More...

-
-Inheritance diagram for QCPPolarLegendItem:
-
-
Inheritance graph
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

QCPPolarLegendItem (QCPLegend *parent, QCPPolarGraph *graph)
 
-QCPPolarGraphpolarGraph ()
 
- Public Functions inherited from QCPAbstractLegendItem
 QCPAbstractLegendItem (QCPLegend *parent)
 
-QCPLegendparentLegend () const
 
-QFont font () const
 
-QColor textColor () const
 
-QFont selectedFont () const
 
-QColor selectedTextColor () const
 
-bool selectable () const
 
-bool selected () const
 
void setFont (const QFont &font)
 
void setTextColor (const QColor &color)
 
void setSelectedFont (const QFont &font)
 
void setSelectedTextColor (const QColor &color)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
- Public Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
virtual void update (UpdatePhase phase)
 
virtual QSize maximumOuterSizeHint () const
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual QSize minimumOuterSizeHint () const
 
-QPen getIconBorderPen () const
 
-QColor getTextColor () const
 
-QFont getFont () const
 
- Protected Functions inherited from QCPAbstractLegendItem
virtual QCP::Interaction selectionCategory () const
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
- Protected Functions inherited from QCPLayoutElement
virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
- Protected Functions inherited from QCPLayerable
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from QCPLayoutElement
enum  UpdatePhase
 
enum  SizeConstraintRect
 
- Signals inherited from QCPAbstractLegendItem
void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A legend item for polar plots.

-
Warning
In this QCustomPlot version, polar plots are a tech preview. Expect documentation and functionality to be incomplete, as well as changing public interfaces in the future.
-

Member Function Documentation

- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPPolarLegendItem::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implements QCPAbstractLegendItem.

- -
-
- -

§ minimumOuterSizeHint()

- -
-
- - - - - -
- - - - - - - -
QSize QCPPolarLegendItem::minimumOuterSizeHint () const
-
-protectedvirtual
-
-

Returns the suggested minimum size this layout element (the outerRect) may be compressed to, if no manual minimum size is set.

-

if a minimum size (setMinimumSize) was not set manually, parent layouts use the returned size (usually indirectly through QCPLayout::getFinalMinimumOuterSize) to determine the minimum allowed size of this layout element.

-

A manual minimum size is considered set if it is non-zero.

-

The default implementation simply returns the sum of the horizontal margins for the width and the sum of the vertical margins for the height. Reimplementations may use their detailed knowledge about the layout element's content to provide size hints.

- -

Reimplemented from QCPLayoutElement.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/polar/polargraph.h
  • -
  • src/polar/polargraph.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPPolarLegendItem__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPPolarLegendItem__inherit__graph.png deleted file mode 100644 index f41fde90..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPPolarLegendItem__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPRange.html b/third_party/qcustomplot/documentation/html/classQCPRange.html deleted file mode 100644 index ba9f83cd..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPRange.html +++ /dev/null @@ -1,937 +0,0 @@ - - - - - - -QCPRange Class Reference - - - - - -
- -

Represents the range an axis is encompassing. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPRange ()
 
 QCPRange (double lower, double upper)
 
-bool operator== (const QCPRange &other) const
 
-bool operator!= (const QCPRange &other) const
 
QCPRangeoperator+= (const double &value)
 
QCPRangeoperator-= (const double &value)
 
QCPRangeoperator*= (const double &value)
 
QCPRangeoperator/= (const double &value)
 
double size () const
 
double center () const
 
void normalize ()
 
void expand (const QCPRange &otherRange)
 
void expand (double includeCoord)
 
QCPRange expanded (const QCPRange &otherRange) const
 
QCPRange expanded (double includeCoord) const
 
QCPRange bounded (double lowerBound, double upperBound) const
 
QCPRange sanitizedForLogScale () const
 
QCPRange sanitizedForLinScale () const
 
bool contains (double value) const
 
- - - - - -

-Public Members

-double lower
 
-double upper
 
- - - - - -

-Static Public Functions

static bool validRange (double lower, double upper)
 
static bool validRange (const QCPRange &range)
 
- - - - - -

-Static Public Members

static const double minRange = 1e-280
 
static const double maxRange = 1e250
 
- - - - - - - - - - - - - -

-Friends

const QCPRange operator+ (const QCPRange &, double)
 
const QCPRange operator+ (double, const QCPRange &)
 
const QCPRange operator- (const QCPRange &range, double value)
 
const QCPRange operator* (const QCPRange &range, double value)
 
const QCPRange operator* (double value, const QCPRange &range)
 
const QCPRange operator/ (const QCPRange &range, double value)
 
- - - - -

-Related Non-Members

(Note that these are not member functions.)

-
QDebug operator<< (QDebug d, const QCPRange &range)
 
-

Detailed Description

-

Represents the range an axis is encompassing.

-

contains a lower and upper double value and provides convenience input, output and modification functions.

-
See also
QCPAxis::setRange
-

Constructor & Destructor Documentation

- -

§ QCPRange() [1/2]

- -
-
- - - - - - - -
QCPRange::QCPRange ()
-
-

Constructs a range with lower and upper set to zero.

- -
-
- -

§ QCPRange() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
QCPRange::QCPRange (double lower,
double upper 
)
-
-

This is an overloaded function.

-

Constructs a range with the specified lower and upper values.

-

The resulting range will be normalized (see normalize), so if lower is not numerically smaller than upper, they will be swapped.

- -
-
-

Member Function Documentation

- -

§ operator+=()

- -
-
- - - - - -
- - - - - - - - -
QCPRange & QCPRange::operator+= (const double & value)
-
-inline
-
-

Adds value to both boundaries of the range.

- -
-
- -

§ operator-=()

- -
-
- - - - - -
- - - - - - - - -
QCPRange & QCPRange::operator-= (const double & value)
-
-inline
-
-

Subtracts value from both boundaries of the range.

- -
-
- -

§ operator*=()

- -
-
- - - - - -
- - - - - - - - -
QCPRange & QCPRange::operator*= (const double & value)
-
-inline
-
-

Multiplies both boundaries of the range by value.

- -
-
- -

§ operator/=()

- -
-
- - - - - -
- - - - - - - - -
QCPRange & QCPRange::operator/= (const double & value)
-
-inline
-
-

Divides both boundaries of the range by value.

- -
-
- -

§ size()

- -
-
- - - - - -
- - - - - - - -
double QCPRange::size () const
-
-inline
-
-

Returns the size of the range, i.e. upper-lower

- -
-
- -

§ center()

- -
-
- - - - - -
- - - - - - - -
double QCPRange::center () const
-
-inline
-
-

Returns the center of the range, i.e. (upper+lower)*0.5

- -
-
- -

§ normalize()

- -
-
- - - - - -
- - - - - - - -
void QCPRange::normalize ()
-
-inline
-
-

Makes sure lower is numerically smaller than upper. If this is not the case, the values are swapped.

- -
-
- -

§ expand() [1/2]

- -
-
- - - - - - - - -
void QCPRange::expand (const QCPRangeotherRange)
-
-

This is an overloaded function.

-

Expands this range such that otherRange is contained in the new range. It is assumed that both this range and otherRange are normalized (see normalize).

-

If this range contains NaN as lower or upper bound, it will be replaced by the respective bound of otherRange.

-

If otherRange is already inside the current range, this function does nothing.

-
See also
expanded
- -
-
- -

§ expand() [2/2]

- -
-
- - - - - - - - -
void QCPRange::expand (double includeCoord)
-
-

This is an overloaded function.

-

Expands this range such that includeCoord is contained in the new range. It is assumed that this range is normalized (see normalize).

-

If this range contains NaN as lower or upper bound, the respective bound will be set to includeCoord.

-

If includeCoord is already inside the current range, this function does nothing.

-
See also
expand
- -
-
- -

§ expanded() [1/2]

- -
-
- - - - - - - - -
QCPRange QCPRange::expanded (const QCPRangeotherRange) const
-
-

This is an overloaded function.

-

Returns an expanded range that contains this and otherRange. It is assumed that both this range and otherRange are normalized (see normalize).

-

If this range contains NaN as lower or upper bound, the returned range's bound will be taken from otherRange.

-
See also
expand
- -
-
- -

§ expanded() [2/2]

- -
-
- - - - - - - - -
QCPRange QCPRange::expanded (double includeCoord) const
-
-

This is an overloaded function.

-

Returns an expanded range that includes the specified includeCoord. It is assumed that this range is normalized (see normalize).

-

If this range contains NaN as lower or upper bound, the returned range's bound will be set to includeCoord.

-
See also
expand
- -
-
- -

§ bounded()

- -
-
- - - - - - - - - - - - - - - - - - -
QCPRange QCPRange::bounded (double lowerBound,
double upperBound 
) const
-
-

Returns this range, possibly modified to not exceed the bounds provided as lowerBound and upperBound. If possible, the size of the current range is preserved in the process.

-

If the range shall only be bounded at the lower side, you can set upperBound to QCPRange::maxRange. If it shall only be bounded at the upper side, set lowerBound to -QCPRange::maxRange.

- -
-
- -

§ sanitizedForLogScale()

- -
-
- - - - - - - -
QCPRange QCPRange::sanitizedForLogScale () const
-
-

Returns a sanitized version of the range. Sanitized means for logarithmic scales, that the range won't span the positive and negative sign domain, i.e. contain zero. Further lower will always be numerically smaller (or equal) to upper.

-

If the original range does span positive and negative sign domains or contains zero, the returned range will try to approximate the original range as good as possible. If the positive interval of the original range is wider than the negative interval, the returned range will only contain the positive interval, with lower bound set to rangeFac or rangeFac *upper, whichever is closer to zero. Same procedure is used if the negative interval is wider than the positive interval, this time by changing the upper bound.

- -
-
- -

§ sanitizedForLinScale()

- -
-
- - - - - - - -
QCPRange QCPRange::sanitizedForLinScale () const
-
-

Returns a sanitized version of the range. Sanitized means for linear scales, that lower will always be numerically smaller (or equal) to upper.

- -
-
- -

§ contains()

- -
-
- - - - - -
- - - - - - - - -
bool QCPRange::contains (double value) const
-
-inline
-
-

Returns true when value lies within or exactly on the borders of the range.

- -
-
- -

§ validRange() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool QCPRange::validRange (double lower,
double upper 
)
-
-static
-
-

Checks, whether the specified range is within valid bounds, which are defined as QCPRange::maxRange and QCPRange::minRange. A valid range means:

    -
  • range bounds within -maxRange and maxRange
  • -
  • range size above minRange
  • -
  • range size below maxRange
  • -
- -
-
- -

§ validRange() [2/2]

- -
-
- - - - - -
- - - - - - - - -
bool QCPRange::validRange (const QCPRangerange)
-
-static
-
-

This is an overloaded function. Checks, whether the specified range is within valid bounds, which are defined as QCPRange::maxRange and QCPRange::minRange. A valid range means:

    -
  • range bounds within -maxRange and maxRange
  • -
  • range size above minRange
  • -
  • range size below maxRange
  • -
- -
-
-

Field Documentation

- -

§ minRange

- -
-
- - - - - -
- - - - -
const double QCPRange::minRange = 1e-280
-
-static
-
-

Minimum range size (upper - lower) the range changing functions will accept. Smaller intervals would cause errors due to the 11-bit exponent of double precision numbers, corresponding to a minimum magnitude of roughly 1e-308.

-
Warning
Do not use this constant to indicate "arbitrarily small" values in plotting logic (as values that will appear in the plot)! It is intended only as a bound to compare against, e.g. to prevent axis ranges from obtaining underflowing ranges.
-
See also
validRange, maxRange
- -
-
- -

§ maxRange

- -
-
- - - - - -
- - - - -
const double QCPRange::maxRange = 1e250
-
-static
-
-

Maximum values (negative and positive) the range will accept in range-changing functions. Larger absolute values would cause errors due to the 11-bit exponent of double precision numbers, corresponding to a maximum magnitude of roughly 1e308.

-
Warning
Do not use this constant to indicate "arbitrarily large" values in plotting logic (as values that will appear in the plot)! It is intended only as a bound to compare against, e.g. to prevent axis ranges from obtaining overflowing ranges.
-
See also
validRange, minRange
- -
-
-

Friends And Related Function Documentation

- -

§ operator+ [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPRange operator+ (const QCPRangerange,
double value 
)
-
-friend
-
-

Adds value to both boundaries of the range.

- -
-
- -

§ operator+ [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPRange operator+ (double value,
const QCPRangerange 
)
-
-friend
-
-

Adds value to both boundaries of the range.

- -
-
- -

§ operator-

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPRange operator- (const QCPRangerange,
double value 
)
-
-friend
-
-

Subtracts value from both boundaries of the range.

- -
-
- -

§ operator* [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPRange operator* (const QCPRangerange,
double value 
)
-
-friend
-
-

Multiplies both boundaries of the range by value.

- -
-
- -

§ operator* [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPRange operator* (double value,
const QCPRangerange 
)
-
-friend
-
-

Multiplies both boundaries of the range by value.

- -
-
- -

§ operator/

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
const QCPRange operator/ (const QCPRangerange,
double value 
)
-
-friend
-
-

Divides both boundaries of the range by value.

- -
-
- -

§ operator<<()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QDebug operator<< (QDebug d,
const QCPRangerange 
)
-
-related
-
-

Prints range in a human readable format to the qDebug output.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/axis/range.h
  • -
  • src/axis/range.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPScatterStyle.html b/third_party/qcustomplot/documentation/html/classQCPScatterStyle.html deleted file mode 100644 index f9a41c37..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPScatterStyle.html +++ /dev/null @@ -1,806 +0,0 @@ - - - - - - -QCPScatterStyle Class Reference - - - - -
- -
-
QCPScatterStyle Class Reference
-
-
- -

Represents the visual appearance of scatter points. - More...

- - - - - - -

-Public Types

enum  ScatterProperty
 
enum  ScatterShape
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPScatterStyle ()
 
 QCPScatterStyle (ScatterShape shape, double size=6)
 
 QCPScatterStyle (ScatterShape shape, const QColor &color, double size)
 
 QCPScatterStyle (ScatterShape shape, const QColor &color, const QColor &fill, double size)
 
 QCPScatterStyle (ScatterShape shape, const QPen &pen, const QBrush &brush, double size)
 
 QCPScatterStyle (const QPixmap &pixmap)
 
 QCPScatterStyle (const QPainterPath &customPath, const QPen &pen, const QBrush &brush=Qt::NoBrush, double size=6)
 
-double size () const
 
-ScatterShape shape () const
 
-QPen pen () const
 
-QBrush brush () const
 
-QPixmap pixmap () const
 
-QPainterPath customPath () const
 
void setFromOther (const QCPScatterStyle &other, ScatterProperties properties)
 
void setSize (double size)
 
void setShape (ScatterShape shape)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setPixmap (const QPixmap &pixmap)
 
void setCustomPath (const QPainterPath &customPath)
 
bool isNone () const
 
bool isPenDefined () const
 
void undefinePen ()
 
void applyTo (QCPPainter *painter, const QPen &defaultPen) const
 
void drawShape (QCPPainter *painter, const QPointF &pos) const
 
void drawShape (QCPPainter *painter, double x, double y) const
 
-

Detailed Description

-

Represents the visual appearance of scatter points.

-

This class holds information about shape, color and size of scatter points. In plottables like QCPGraph it is used to store how scatter points shall be drawn. For example, QCPGraph::setScatterStyle takes a QCPScatterStyle instance.

-

A scatter style consists of a shape (setShape), a line color (setPen) and possibly a fill (setBrush), if the shape provides a fillable area. Further, the size of the shape can be controlled with setSize.

-

-Specifying a scatter style

-

You can set all these configurations either by calling the respective functions on an instance:

QCPScatterStyle myScatter;
myScatter.setPen(QPen(Qt::blue));
myScatter.setBrush(Qt::white);
myScatter.setSize(5);
customPlot->graph(0)->setScatterStyle(myScatter);

Or you can use one of the various constructors that take different parameter combinations, making it easy to specify a scatter style in a single call, like so:

customPlot->graph(0)->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssCircle, Qt::blue, Qt::white, 5));

-Leaving the color/pen up to the plottable

-

There are two constructors which leave the pen undefined: QCPScatterStyle() and QCPScatterStyle(ScatterShape shape, double size). If those constructors are used, a call to isPenDefined will return false. It leads to scatter points that inherit the pen from the plottable that uses the scatter style. Thus, if such a scatter style is passed to QCPGraph, the line color of the graph (QCPGraph::setPen) will be used by the scatter points. This makes it very convenient to set up typical scatter settings:

-
customPlot->graph(0)->setScatterStyle(QCPScatterStyle::ssPlus);

Notice that it wasn't even necessary to explicitly call a QCPScatterStyle constructor. This works because QCPScatterStyle provides a constructor that can transform a ScatterShape directly into a QCPScatterStyle instance (that's the QCPScatterStyle(ScatterShape shape, double size) constructor with a default for size). In those cases, C++ allows directly supplying a ScatterShape, where actually a QCPScatterStyle is expected.

-

-Custom shapes and pixmaps

-

QCPScatterStyle supports drawing custom shapes and arbitrary pixmaps as scatter points.

-

For custom shapes, you can provide a QPainterPath with the desired shape to the setCustomPath function or call the constructor that takes a painter path. The scatter shape will automatically be set to ssCustom.

-

For pixmaps, you call setPixmap with the desired QPixmap. Alternatively you can use the constructor that takes a QPixmap. The scatter shape will automatically be set to ssPixmap. Note that setSize does not influence the appearance of the pixmap.

-

Member Enumeration Documentation

- -

§ ScatterProperty

- -
-
-

Represents the various properties of a scatter style instance. For example, this enum is used to specify which properties of QCPSelectionDecorator::setScatterStyle will be used when highlighting selected data points.

-

Specific scatter properties can be transferred between QCPScatterStyle instances via setFromOther.

- - - - - - - -
Enumerator
spNone 

0x00 None

-
spPen 

0x01 The pen property, see setPen

-
spBrush 

0x02 The brush property, see setBrush

-
spSize 

0x04 The size property, see setSize

-
spShape 

0x08 The shape property, see setShape

-
spAll 

0xFF All properties

-
- -
-
- -

§ ScatterShape

- -
-
-

Defines the shape used for scatter points.

-

On plottables/items that draw scatters, the sizes of these visualizations (with exception of ssDot and ssPixmap) can be controlled with the setSize function. Scatters are drawn with the pen and brush specified with setPen and setBrush.

- - - - - - - - - - - - - - - - - - - -
Enumerator
ssNone 

no scatter symbols are drawn (e.g. in QCPGraph, data only represented with lines)

-
ssDot 
-ssDot.png -
-

a single pixel (use ssDisc or ssCircle if you want a round shape with a certain radius)

-
ssCross 
-ssCross.png -
-

a cross

-
ssPlus 
-ssPlus.png -
-

a plus

-
ssCircle 
-ssCircle.png -
-

a circle

-
ssDisc 
-ssDisc.png -
-

a circle which is filled with the pen's color (not the brush as with ssCircle)

-
ssSquare 
-ssSquare.png -
-

a square

-
ssDiamond 
-ssDiamond.png -
-

a diamond

-
ssStar 
-ssStar.png -
-

a star with eight arms, i.e. a combination of cross and plus

-
ssTriangle 
-ssTriangle.png -
-

an equilateral triangle, standing on baseline

-
ssTriangleInverted 
-ssTriangleInverted.png -
-

an equilateral triangle, standing on corner

-
ssCrossSquare 
-ssCrossSquare.png -
-

a square with a cross inside

-
ssPlusSquare 
-ssPlusSquare.png -
-

a square with a plus inside

-
ssCrossCircle 
-ssCrossCircle.png -
-

a circle with a cross inside

-
ssPlusCircle 
-ssPlusCircle.png -
-

a circle with a plus inside

-
ssPeace 
-ssPeace.png -
-

a circle, with one vertical and two downward diagonal lines

-
ssPixmap 

a custom pixmap specified by setPixmap, centered on the data point coordinates

-
ssCustom 

custom painter operations are performed per scatter (As QPainterPath, see setCustomPath)

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPScatterStyle() [1/7]

- -
-
- - - - - - - -
QCPScatterStyle::QCPScatterStyle ()
-
-

Creates a new QCPScatterStyle instance with size set to 6. No shape, pen or brush is defined.

-

Since the pen is undefined (isPenDefined returns false), the scatter color will be inherited from the plottable that uses this scatter style.

- -
-
- -

§ QCPScatterStyle() [2/7]

- -
-
- - - - - - - - - - - - - - - - - - -
QCPScatterStyle::QCPScatterStyle (ScatterShape shape,
double size = 6 
)
-
-

Creates a new QCPScatterStyle instance with shape set to shape and size to size. No pen or brush is defined.

-

Since the pen is undefined (isPenDefined returns false), the scatter color will be inherited from the plottable that uses this scatter style.

- -
-
- -

§ QCPScatterStyle() [3/7]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPScatterStyle::QCPScatterStyle (ScatterShape shape,
const QColor & color,
double size 
)
-
-

Creates a new QCPScatterStyle instance with shape set to shape, the pen color set to color, and size to size. No brush is defined, i.e. the scatter point will not be filled.

- -
-
- -

§ QCPScatterStyle() [4/7]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QCPScatterStyle::QCPScatterStyle (ScatterShape shape,
const QColor & color,
const QColor & fill,
double size 
)
-
-

Creates a new QCPScatterStyle instance with shape set to shape, the pen color set to color, the brush color to fill (with a solid pattern), and size to size.

- -
-
- -

§ QCPScatterStyle() [5/7]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QCPScatterStyle::QCPScatterStyle (ScatterShape shape,
const QPen & pen,
const QBrush & brush,
double size 
)
-
-

Creates a new QCPScatterStyle instance with shape set to shape, the pen set to pen, the brush to brush, and size to size.

-
Warning
In some cases it might be tempting to directly use a pen style like Qt::NoPen as pen and a color like Qt::blue as brush. Notice however, that the corresponding call
-QCPScatterStyle(QCPScatterShape::ssCircle, Qt::NoPen, Qt::blue, 5)
-doesn't necessarily lead C++ to use this constructor in some cases, but might mistake Qt::NoPen for a QColor and use the QCPScatterStyle(ScatterShape shape, const QColor &color, const QColor &fill, double size) constructor instead (which will lead to an unexpected look of the scatter points). To prevent this, be more explicit with the parameter types. For example, use QBrush(Qt::blue) instead of just Qt::blue, to clearly point out to the compiler that this constructor is wanted.
- -
-
- -

§ QCPScatterStyle() [6/7]

- -
-
- - - - - - - - -
QCPScatterStyle::QCPScatterStyle (const QPixmap & pixmap)
-
-

Creates a new QCPScatterStyle instance which will show the specified pixmap. The scatter shape is set to ssPixmap.

- -
-
- -

§ QCPScatterStyle() [7/7]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QCPScatterStyle::QCPScatterStyle (const QPainterPath & customPath,
const QPen & pen,
const QBrush & brush = Qt::NoBrush,
double size = 6 
)
-
-

Creates a new QCPScatterStyle instance with a custom shape that is defined via customPath. The scatter shape is set to ssCustom.

-

The custom shape line will be drawn with pen and filled with brush. The size has a slightly different meaning than for built-in scatter points: The custom path will be drawn scaled by a factor of size/6.0. Since the default size is 6, the custom path will appear in its original size by default. To for example double the size of the path, set size to 12.

- -
-
-

Member Function Documentation

- -

§ setFromOther()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPScatterStyle::setFromOther (const QCPScatterStyleother,
ScatterProperties properties 
)
-
-

Copies the specified properties from the other scatter style to this scatter style.

- -
-
- -

§ setSize()

- -
-
- - - - - - - - -
void QCPScatterStyle::setSize (double size)
-
-

Sets the size (pixel diameter) of the drawn scatter points to size.

-
See also
setShape
- -
-
- -

§ setShape()

- -
-
- - - - - - - - -
void QCPScatterStyle::setShape (QCPScatterStyle::ScatterShape shape)
-
-

Sets the shape to shape.

-

Note that the calls setPixmap and setCustomPath automatically set the shape to ssPixmap and ssCustom, respectively.

-
See also
setSize
- -
-
- -

§ setPen()

- -
-
- - - - - - - - -
void QCPScatterStyle::setPen (const QPen & pen)
-
-

Sets the pen that will be used to draw scatter points to pen.

-

If the pen was previously undefined (see isPenDefined), the pen is considered defined after a call to this function, even if pen is Qt::NoPen. If you have defined a pen previously by calling this function and now wish to undefine the pen, call undefinePen.

-
See also
setBrush
- -
-
- -

§ setBrush()

- -
-
- - - - - - - - -
void QCPScatterStyle::setBrush (const QBrush & brush)
-
-

Sets the brush that will be used to fill scatter points to brush. Note that not all scatter shapes have fillable areas. For example, ssPlus does not while ssCircle does.

-
See also
setPen
- -
-
- -

§ setPixmap()

- -
-
- - - - - - - - -
void QCPScatterStyle::setPixmap (const QPixmap & pixmap)
-
-

Sets the pixmap that will be drawn as scatter point to pixmap.

-

Note that setSize does not influence the appearance of the pixmap.

-

The scatter shape is automatically set to ssPixmap.

- -
-
- -

§ setCustomPath()

- -
-
- - - - - - - - -
void QCPScatterStyle::setCustomPath (const QPainterPath & customPath)
-
-

Sets the custom shape that will be drawn as scatter point to customPath.

-

The scatter shape is automatically set to ssCustom.

- -
-
- -

§ isNone()

- -
-
- - - - - -
- - - - - - - -
bool QCPScatterStyle::isNone () const
-
-inline
-
-

Returns whether the scatter shape is ssNone.

-
See also
setShape
- -
-
- -

§ isPenDefined()

- -
-
- - - - - -
- - - - - - - -
bool QCPScatterStyle::isPenDefined () const
-
-inline
-
-

Returns whether a pen has been defined for this scatter style.

-

The pen is undefined if a constructor is called that does not carry pen as parameter. Those are QCPScatterStyle() and QCPScatterStyle(ScatterShape shape, double size). If the pen is undefined, the pen of the respective plottable will be used for drawing scatters.

-

If a pen was defined for this scatter style instance, and you now wish to undefine the pen, call undefinePen.

-
See also
setPen
- -
-
- -

§ undefinePen()

- -
-
- - - - - - - -
void QCPScatterStyle::undefinePen ()
-
-

Sets this scatter style to have an undefined pen (see isPenDefined for what an undefined pen implies).

-

A call to setPen will define a pen.

- -
-
- -

§ applyTo()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPScatterStyle::applyTo (QCPPainterpainter,
const QPen & defaultPen 
) const
-
-

Applies the pen and the brush of this scatter style to painter. If this scatter style has an undefined pen (isPenDefined), sets the pen of painter to defaultPen instead.

-

This function is used by plottables (or any class that wants to draw scatters) just before a number of scatters with this style shall be drawn with the painter.

-
See also
drawShape
- -
-
- -

§ drawShape() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPScatterStyle::drawShape (QCPPainterpainter,
const QPointF & pos 
) const
-
-

Draws the scatter shape with painter at position pos.

-

This function does not modify the pen or the brush on the painter, as applyTo is meant to be called before scatter points are drawn with drawShape.

-
See also
applyTo
- -
-
- -

§ drawShape() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPScatterStyle::drawShape (QCPPainterpainter,
double x,
double y 
) const
-
-

This is an overloaded function. Draws the scatter shape with painter at position x and y.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/scatterstyle.h
  • -
  • src/scatterstyle.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPSelectionDecorator.html b/third_party/qcustomplot/documentation/html/classQCPSelectionDecorator.html deleted file mode 100644 index 8a96b091..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPSelectionDecorator.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - -QCPSelectionDecorator Class Reference - - - - -
- -
-
QCPSelectionDecorator Class Reference
-
-
- -

Controls how a plottable's data selection is drawn. - More...

-
-Inheritance diagram for QCPSelectionDecorator:
-
-
Inheritance graph
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPSelectionDecorator ()
 
-QPen pen () const
 
-QBrush brush () const
 
-QCPScatterStyle scatterStyle () const
 
-QCPScatterStyle::ScatterProperties usedScatterProperties () const
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setScatterStyle (const QCPScatterStyle &scatterStyle, QCPScatterStyle::ScatterProperties usedProperties=QCPScatterStyle::spPen)
 
void setUsedScatterProperties (const QCPScatterStyle::ScatterProperties &properties)
 
void applyPen (QCPPainter *painter) const
 
void applyBrush (QCPPainter *painter) const
 
QCPScatterStyle getFinalScatterStyle (const QCPScatterStyle &unselectedStyle) const
 
virtual void copyFrom (const QCPSelectionDecorator *other)
 
virtual void drawDecoration (QCPPainter *painter, QCPDataSelection selection)
 
- - - -

-Protected Functions

virtual bool registerWithPlottable (QCPAbstractPlottable *plottable)
 
-

Detailed Description

-

Controls how a plottable's data selection is drawn.

-

Each QCPAbstractPlottable instance has one QCPSelectionDecorator (accessible via QCPAbstractPlottable::selectionDecorator) and uses it when drawing selected segments of its data.

-

The selection decorator controls both pen (setPen) and brush (setBrush), as well as the scatter style (setScatterStyle) if the plottable draws scatters. Since a QCPScatterStyle is itself composed of different properties such as color shape and size, the decorator allows specifying exactly which of those properties shall be used for the selected data point, via setUsedScatterProperties.

-

A QCPSelectionDecorator subclass instance can be passed to a plottable via QCPAbstractPlottable::setSelectionDecorator, allowing greater customizability of the appearance of selected segments.

-

Use copyFrom to easily transfer the settings of one decorator to another one. This is especially useful since plottables take ownership of the passed selection decorator, and thus the same decorator instance can not be passed to multiple plottables.

-

Selection decorators can also themselves perform drawing operations by reimplementing drawDecoration, which is called by the plottable's draw method. The base class QCPSelectionDecorator does not make use of this however. For example, QCPSelectionDecoratorBracket draws brackets around selected data segments.

-

Constructor & Destructor Documentation

- -

§ QCPSelectionDecorator()

- -
-
- - - - - - - -
QCPSelectionDecorator::QCPSelectionDecorator ()
-
-

Creates a new QCPSelectionDecorator instance with default values

- -
-
-

Member Function Documentation

- -

§ setPen()

- -
-
- - - - - - - - -
void QCPSelectionDecorator::setPen (const QPen & pen)
-
-

Sets the pen that will be used by the parent plottable to draw selected data segments.

- -
-
- -

§ setBrush()

- -
-
- - - - - - - - -
void QCPSelectionDecorator::setBrush (const QBrush & brush)
-
-

Sets the brush that will be used by the parent plottable to draw selected data segments.

- -
-
- -

§ setScatterStyle()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCPSelectionDecorator::setScatterStyle (const QCPScatterStylescatterStyle,
QCPScatterStyle::ScatterProperties usedProperties = QCPScatterStyle::spPen 
)
-
-

Sets the scatter style that will be used by the parent plottable to draw scatters in selected data segments.

-

usedProperties specifies which parts of the passed scatterStyle will be used by the plottable. The used properties can also be changed via setUsedScatterProperties.

- -
-
- -

§ setUsedScatterProperties()

- -
-
- - - - - - - - -
void QCPSelectionDecorator::setUsedScatterProperties (const QCPScatterStyle::ScatterProperties & properties)
-
-

Use this method to define which properties of the scatter style (set via setScatterStyle) will be used for selected data segments. All properties of the scatter style that are not specified in properties will remain as specified in the plottable's original scatter style.

-
See also
QCPScatterStyle::ScatterProperty
- -
-
- -

§ applyPen()

- -
-
- - - - - - - - -
void QCPSelectionDecorator::applyPen (QCPPainterpainter) const
-
-

Sets the pen of painter to the pen of this selection decorator.

-
See also
applyBrush, getFinalScatterStyle
- -
-
- -

§ applyBrush()

- -
-
- - - - - - - - -
void QCPSelectionDecorator::applyBrush (QCPPainterpainter) const
-
-

Sets the brush of painter to the brush of this selection decorator.

-
See also
applyPen, getFinalScatterStyle
- -
-
- -

§ getFinalScatterStyle()

- -
-
- - - - - - - - -
QCPScatterStyle QCPSelectionDecorator::getFinalScatterStyle (const QCPScatterStyleunselectedStyle) const
-
-

Returns the scatter style that the parent plottable shall use for selected scatter points. The plottable's original (unselected) scatter style must be passed as unselectedStyle. Depending on the setting of setUsedScatterProperties, the returned scatter style is a mixture of this selecion decorator's scatter style (setScatterStyle), and unselectedStyle.

-
See also
applyPen, applyBrush, setScatterStyle
- -
-
- -

§ copyFrom()

- -
-
- - - - - -
- - - - - - - - -
void QCPSelectionDecorator::copyFrom (const QCPSelectionDecoratorother)
-
-virtual
-
-

Copies all properties (e.g. color, fill, scatter style) of the other selection decorator to this selection decorator.

- -
-
- -

§ drawDecoration()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPSelectionDecorator::drawDecoration (QCPPainterpainter,
QCPDataSelection selection 
)
-
-virtual
-
-

This method is called by all plottables' draw methods to allow custom selection decorations to be drawn. Use the passed painter to perform the drawing operations. selection carries the data selection for which the decoration shall be drawn.

-

The default base class implementation of QCPSelectionDecorator has no special decoration, so this method does nothing.

- -

Reimplemented in QCPSelectionDecoratorBracket.

- -
-
- -

§ registerWithPlottable()

- -
-
- - - - - -
- - - - - - - - -
bool QCPSelectionDecorator::registerWithPlottable (QCPAbstractPlottableplottable)
-
-protectedvirtual
-
-

This method is called as soon as a selection decorator is associated with a plottable, by a call to QCPAbstractPlottable::setSelectionDecorator. This way the selection decorator can obtain a pointer to the plottable that uses it (e.g. to access data points via the QCPAbstractPlottable::interface1D interface).

-

If the selection decorator was already added to a different plottable before, this method aborts the registration and returns false.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/plottable.h
  • -
  • src/plottable.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPSelectionDecoratorBracket.html b/third_party/qcustomplot/documentation/html/classQCPSelectionDecoratorBracket.html deleted file mode 100644 index 66dc41ae..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPSelectionDecoratorBracket.html +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - -QCPSelectionDecoratorBracket Class Reference - - - - -
- -
-
QCPSelectionDecoratorBracket Class Reference
-
-
- -

A selection decorator which draws brackets around each selected data segment. - More...

-
-Inheritance diagram for QCPSelectionDecoratorBracket:
-
-
Inheritance graph
- - - -
- - - - -

-Public Types

enum  BracketStyle
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPSelectionDecoratorBracket ()
 
-QPen bracketPen () const
 
-QBrush bracketBrush () const
 
-int bracketWidth () const
 
-int bracketHeight () const
 
-BracketStyle bracketStyle () const
 
-bool tangentToData () const
 
-int tangentAverage () const
 
void setBracketPen (const QPen &pen)
 
void setBracketBrush (const QBrush &brush)
 
void setBracketWidth (int width)
 
void setBracketHeight (int height)
 
void setBracketStyle (BracketStyle style)
 
void setTangentToData (bool enabled)
 
void setTangentAverage (int pointCount)
 
virtual void drawBracket (QCPPainter *painter, int direction) const
 
virtual void drawDecoration (QCPPainter *painter, QCPDataSelection selection)
 
- Public Functions inherited from QCPSelectionDecorator
 QCPSelectionDecorator ()
 
-QPen pen () const
 
-QBrush brush () const
 
-QCPScatterStyle scatterStyle () const
 
-QCPScatterStyle::ScatterProperties usedScatterProperties () const
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setScatterStyle (const QCPScatterStyle &scatterStyle, QCPScatterStyle::ScatterProperties usedProperties=QCPScatterStyle::spPen)
 
void setUsedScatterProperties (const QCPScatterStyle::ScatterProperties &properties)
 
void applyPen (QCPPainter *painter) const
 
void applyBrush (QCPPainter *painter) const
 
QCPScatterStyle getFinalScatterStyle (const QCPScatterStyle &unselectedStyle) const
 
virtual void copyFrom (const QCPSelectionDecorator *other)
 
- - - - - - - - -

-Protected Functions

double getTangentAngle (const QCPPlottableInterface1D *interface1d, int dataIndex, int direction) const
 
QPointF getPixelCoordinates (const QCPPlottableInterface1D *interface1d, int dataIndex) const
 
- Protected Functions inherited from QCPSelectionDecorator
virtual bool registerWithPlottable (QCPAbstractPlottable *plottable)
 
-

Detailed Description

-

A selection decorator which draws brackets around each selected data segment.

-

Additionally to the regular highlighting of selected segments via color, fill and scatter style, this QCPSelectionDecorator subclass draws markers at the begin and end of each selected data segment of the plottable.

-

The shape of the markers can be controlled with setBracketStyle, setBracketWidth and setBracketHeight. The color/fill can be controlled with setBracketPen and setBracketBrush.

-

To introduce custom bracket styles, it is only necessary to sublcass QCPSelectionDecoratorBracket and reimplement drawBracket. The rest will be managed by the base class.

-

Member Enumeration Documentation

- -

§ BracketStyle

- -
-
-

Defines which shape is drawn at the boundaries of selected data ranges.

-

Some of the bracket styles further allow specifying a height and/or width, see setBracketHeight and setBracketWidth.

- - - - - - -
Enumerator
bsSquareBracket 

A square bracket is drawn.

-
bsHalfEllipse 

A half ellipse is drawn. The size of the ellipse is given by the bracket width/height properties.

-
bsEllipse 

An ellipse is drawn. The size of the ellipse is given by the bracket width/height properties.

-
bsPlus 

A plus is drawn.

-
bsUserStyle 

Start custom bracket styles at this index when subclassing and reimplementing drawBracket.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCPSelectionDecoratorBracket()

- -
-
- - - - - - - -
QCPSelectionDecoratorBracket::QCPSelectionDecoratorBracket ()
-
-

Creates a new QCPSelectionDecoratorBracket instance with default values.

- -
-
-

Member Function Documentation

- -

§ setBracketPen()

- -
-
- - - - - - - - -
void QCPSelectionDecoratorBracket::setBracketPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the brackets at the beginning and end of each selected data segment.

- -
-
- -

§ setBracketBrush()

- -
-
- - - - - - - - -
void QCPSelectionDecoratorBracket::setBracketBrush (const QBrush & brush)
-
-

Sets the brush that will be used to draw the brackets at the beginning and end of each selected data segment.

- -
-
- -

§ setBracketWidth()

- -
-
- - - - - - - - -
void QCPSelectionDecoratorBracket::setBracketWidth (int width)
-
-

Sets the width of the drawn bracket. The width dimension is always parallel to the key axis of the data, or the tangent direction of the current data slope, if setTangentToData is enabled.

- -
-
- -

§ setBracketHeight()

- -
-
- - - - - - - - -
void QCPSelectionDecoratorBracket::setBracketHeight (int height)
-
-

Sets the height of the drawn bracket. The height dimension is always perpendicular to the key axis of the data, or the tangent direction of the current data slope, if setTangentToData is enabled.

- -
-
- -

§ setBracketStyle()

- -
-
- - - - - - - - -
void QCPSelectionDecoratorBracket::setBracketStyle (QCPSelectionDecoratorBracket::BracketStyle style)
-
-

Sets the shape that the bracket/marker will have.

-
See also
setBracketWidth, setBracketHeight
- -
-
- -

§ setTangentToData()

- -
-
- - - - - - - - -
void QCPSelectionDecoratorBracket::setTangentToData (bool enabled)
-
-

Sets whether the brackets will be rotated such that they align with the slope of the data at the position that they appear in.

-

For noisy data, it might be more visually appealing to average the slope over multiple data points. This can be configured via setTangentAverage.

- -
-
- -

§ setTangentAverage()

- -
-
- - - - - - - - -
void QCPSelectionDecoratorBracket::setTangentAverage (int pointCount)
-
-

Controls over how many data points the slope shall be averaged, when brackets shall be aligned with the data (if setTangentToData is true).

-

From the position of the bracket, pointCount points towards the selected data range will be taken into account. The smallest value of pointCount is 1, which is effectively equivalent to disabling setTangentToData.

- -
-
- -

§ drawBracket()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPSelectionDecoratorBracket::drawBracket (QCPPainterpainter,
int direction 
) const
-
-virtual
-
-

Draws the bracket shape with painter. The parameter direction is either -1 or 1 and indicates whether the bracket shall point to the left or the right (i.e. is a closing or opening bracket, respectively).

-

The passed painter already contains all transformations that are necessary to position and rotate the bracket appropriately. Painting operations can be performed as if drawing upright brackets on flat data with horizontal key axis, with (0, 0) being the center of the bracket.

-

If you wish to sublcass QCPSelectionDecoratorBracket in order to provide custom bracket shapes (see QCPSelectionDecoratorBracket::bsUserStyle), this is the method you should reimplement.

- -
-
- -

§ drawDecoration()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPSelectionDecoratorBracket::drawDecoration (QCPPainterpainter,
QCPDataSelection selection 
)
-
-virtual
-
-

Draws the bracket decoration on the data points at the begin and end of each selected data segment given in seletion.

-

It uses the method drawBracket to actually draw the shapes.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPSelectionDecorator.

- -
-
- -

§ getTangentAngle()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPSelectionDecoratorBracket::getTangentAngle (const QCPPlottableInterface1Dinterface1d,
int dataIndex,
int direction 
) const
-
-protected
-
-

If setTangentToData is enabled, brackets need to be rotated according to the data slope. This method returns the angle in radians by which a bracket at the given dataIndex must be rotated.

-

The parameter direction must be set to either -1 or 1, representing whether it is an opening or closing bracket. Since for slope calculation multiple data points are required, this defines the direction in which the algorithm walks, starting at dataIndex, to average those data points. (see setTangentToData and setTangentAverage)

-

interface1d is the interface to the plottable's data which is used to query data coordinates.

- -
-
- -

§ getPixelCoordinates()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QPointF QCPSelectionDecoratorBracket::getPixelCoordinates (const QCPPlottableInterface1Dinterface1d,
int dataIndex 
) const
-
-protected
-
-

Returns the pixel coordinates of the data point at dataIndex, using interface1d to access the data points.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/selectiondecorator-bracket.h
  • -
  • src/selectiondecorator-bracket.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPSelectionDecoratorBracket__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPSelectionDecoratorBracket__inherit__graph.png deleted file mode 100644 index 427ef31e..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPSelectionDecoratorBracket__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPSelectionDecorator__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPSelectionDecorator__inherit__graph.png deleted file mode 100644 index b7179edf..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPSelectionDecorator__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPSelectionRect.html b/third_party/qcustomplot/documentation/html/classQCPSelectionRect.html deleted file mode 100644 index 6fc3732c..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPSelectionRect.html +++ /dev/null @@ -1,608 +0,0 @@ - - - - - - -QCPSelectionRect Class Reference - - - - -
- -
-
QCPSelectionRect Class Reference
-
-
- -

Provides rect/rubber-band data selection and range zoom interaction. - More...

-
-Inheritance diagram for QCPSelectionRect:
-
-
Inheritance graph
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPSelectionRect (QCustomPlot *parentPlot)
 
-QRect rect () const
 
QCPRange range (const QCPAxis *axis) const
 
-QPen pen () const
 
-QBrush brush () const
 
bool isActive () const
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
Q_SLOT void cancel ()
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
bool realVisibility () const
 
- - - - - - - - - - - - -

-Signals

void started (QMouseEvent *event)
 
void changed (const QRect &rect, QMouseEvent *event)
 
void canceled (const QRect &rect, QInputEvent *event)
 
void accepted (const QRect &rect, QMouseEvent *event)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void startSelection (QMouseEvent *event)
 
virtual void moveSelection (QMouseEvent *event)
 
virtual void endSelection (QMouseEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
-

Detailed Description

-

Provides rect/rubber-band data selection and range zoom interaction.

-

QCPSelectionRect is used by QCustomPlot when the QCustomPlot::setSelectionRectMode is not QCP::srmNone. When the user drags the mouse across the plot, the current selection rect instance (QCustomPlot::setSelectionRect) is forwarded these events and makes sure an according rect shape is drawn. At the begin, during, and after completion of the interaction, it emits the corresponding signals started, changed, canceled, and accepted.

-

The QCustomPlot instance connects own slots to the current selection rect instance, in order to react to an accepted selection rect interaction accordingly.

-

isActive can be used to check whether the selection rect is currently active. An ongoing selection interaction can be cancelled programmatically via calling cancel at any time.

-

The appearance of the selection rect can be controlled via setPen and setBrush.

-

If you wish to provide custom behaviour, e.g. a different visual representation of the selection rect (QCPSelectionRect::draw), you can subclass QCPSelectionRect and pass an instance of your subclass to QCustomPlot::setSelectionRect.

-

Constructor & Destructor Documentation

- -

§ QCPSelectionRect()

- -
-
- - - - - -
- - - - - - - - -
QCPSelectionRect::QCPSelectionRect (QCustomPlotparentPlot)
-
-explicit
-
-

Creates a new QCPSelectionRect instance. To make QCustomPlot use the selection rect instance, pass it to QCustomPlot::setSelectionRect. parentPlot should be set to the same QCustomPlot widget.

- -
-
-

Member Function Documentation

- -

§ range()

- -
-
- - - - - - - - -
QCPRange QCPSelectionRect::range (const QCPAxisaxis) const
-
-

A convenience function which returns the coordinate range of the provided axis, that this selection rect currently encompasses.

- -
-
- -

§ isActive()

- -
-
- - - - - -
- - - - - - - -
bool QCPSelectionRect::isActive () const
-
-inline
-
-

Returns true if there is currently a selection going on, i.e. the user has started dragging a selection rect, but hasn't released the mouse button yet.

-
See also
cancel
- -
-
- -

§ setPen()

- -
-
- - - - - - - - -
void QCPSelectionRect::setPen (const QPen & pen)
-
-

Sets the pen that will be used to draw the selection rect outline.

-
See also
setBrush
- -
-
- -

§ setBrush()

- -
-
- - - - - - - - -
void QCPSelectionRect::setBrush (const QBrush & brush)
-
-

Sets the brush that will be used to fill the selection rect. By default the selection rect is not filled, i.e. brush is Qt::NoBrush.

-
See also
setPen
- -
-
- -

§ cancel()

- -
-
- - - - - - - -
void QCPSelectionRect::cancel ()
-
-

If there is currently a selection interaction going on (isActive), the interaction is canceled. The selection rect will emit the canceled signal.

- -
-
- -

§ started

- -
-
- - - - - -
- - - - - - - - -
void QCPSelectionRect::started (QMouseEvent * event)
-
-signal
-
-

This signal is emitted when a selection rect interaction was initiated, i.e. the user just started dragging the selection rect with the mouse.

- -
-
- -

§ changed

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPSelectionRect::changed (const QRect & rect,
QMouseEvent * event 
)
-
-signal
-
-

This signal is emitted while the selection rect interaction is ongoing and the rect has changed its size due to the user moving the mouse.

-

Note that rect may have a negative width or height, if the selection is being dragged to the upper or left side of the selection rect origin.

- -
-
- -

§ canceled

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPSelectionRect::canceled (const QRect & rect,
QInputEvent * event 
)
-
-signal
-
-

This signal is emitted when the selection interaction was cancelled. Note that event is nullptr if the selection interaction was cancelled programmatically, by a call to cancel.

-

The user may cancel the selection interaction by pressing the escape key. In this case, event holds the respective input event.

-

Note that rect may have a negative width or height, if the selection is being dragged to the upper or left side of the selection rect origin.

- -
-
- -

§ accepted

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPSelectionRect::accepted (const QRect & rect,
QMouseEvent * event 
)
-
-signal
-
-

This signal is emitted when the selection interaction was completed by the user releasing the mouse button.

-

Note that rect may have a negative width or height, if the selection is being dragged to the upper or left side of the selection rect origin.

- -
-
- -

§ startSelection()

- -
-
- - - - - -
- - - - - - - - -
void QCPSelectionRect::startSelection (QMouseEvent * event)
-
-protectedvirtual
-
-

This method is called by QCustomPlot to indicate that a selection rect interaction was initiated. The default implementation sets the selection rect to active, initializes the selection rect geometry and emits the started signal.

- -
-
- -

§ moveSelection()

- -
-
- - - - - -
- - - - - - - - -
void QCPSelectionRect::moveSelection (QMouseEvent * event)
-
-protectedvirtual
-
-

This method is called by QCustomPlot to indicate that an ongoing selection rect interaction needs to update its geometry. The default implementation updates the rect and emits the changed signal.

- -
-
- -

§ endSelection()

- -
-
- - - - - -
- - - - - - - - -
void QCPSelectionRect::endSelection (QMouseEvent * event)
-
-protectedvirtual
-
-

This method is called by QCustomPlot to indicate that an ongoing selection rect interaction has finished by the user releasing the mouse button. The default implementation deactivates the selection rect and emits the accepted signal.

- -
-
- -

§ keyPressEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPSelectionRect::keyPressEvent (QKeyEvent * event)
-
-protectedvirtual
-
-

This method is called by QCustomPlot when a key has been pressed by the user while the selection rect interaction is active. The default implementation allows to cancel the interaction by hitting the escape key.

- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPSelectionRect::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

This function applies the default antialiasing setting to the specified painter, using the function applyAntialiasingHint. It is the antialiasing state the painter is put in, when draw is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the draw function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.

-

First example: QCPGraph has multiple entities that have an antialiasing setting: The graph line, fills and scatters. Those can be configured via QCPGraph::setAntialiased, QCPGraph::setAntialiasedFill and QCPGraph::setAntialiasedScatters. Consequently, there isn't only the QCPGraph::applyDefaultAntialiasingHint function (which corresponds to the graph line's antialiasing), but specialized ones like QCPGraph::applyFillAntialiasingHint and QCPGraph::applyScattersAntialiasingHint. So before drawing one of those entities, QCPGraph::draw calls the respective specialized applyAntialiasingHint function.

-

Second example: QCPItemLine consists only of a line so there is only one antialiasing setting which can be controlled with QCPItemLine::setAntialiased. (This function is inherited by all layerables. The specialized functions, as seen on QCPGraph, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal QCPItemLine::applyDefaultAntialiasingHint. The QCPItemLine::draw function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the draw function is called, and that's the state it wants to draw the line with.

- -

Implements QCPLayerable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPSelectionRect::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

If the selection rect is active (isActive), draws the selection rect defined by mRect.

-

For general information about this virtual method, see the base class implementation.

- -

Implements QCPLayerable.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/selectionrect.h
  • -
  • src/selectionrect.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPSelectionRect__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPSelectionRect__inherit__graph.png deleted file mode 100644 index 99591dfd..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPSelectionRect__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPStatisticalBox.html b/third_party/qcustomplot/documentation/html/classQCPStatisticalBox.html deleted file mode 100644 index 8add91fa..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPStatisticalBox.html +++ /dev/null @@ -1,1151 +0,0 @@ - - - - - - -QCPStatisticalBox Class Reference - - - - -
- -
-
QCPStatisticalBox Class Reference
-
-
- -

A plottable representing a single statistical box in a plot. - More...

-
-Inheritance diagram for QCPStatisticalBox:
-
-
Inheritance graph
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPStatisticalBox (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
QSharedPointer< QCPStatisticalBoxDataContainerdata () const
 
-double width () const
 
-double whiskerWidth () const
 
-QPen whiskerPen () const
 
-QPen whiskerBarPen () const
 
-bool whiskerAntialiased () const
 
-QPen medianPen () const
 
-QCPScatterStyle outlierStyle () const
 
void setData (QSharedPointer< QCPStatisticalBoxDataContainer > data)
 
void setData (const QVector< double > &keys, const QVector< double > &minimum, const QVector< double > &lowerQuartile, const QVector< double > &median, const QVector< double > &upperQuartile, const QVector< double > &maximum, bool alreadySorted=false)
 
void setWidth (double width)
 
void setWhiskerWidth (double width)
 
void setWhiskerPen (const QPen &pen)
 
void setWhiskerBarPen (const QPen &pen)
 
void setWhiskerAntialiased (bool enabled)
 
void setMedianPen (const QPen &pen)
 
void setOutlierStyle (const QCPScatterStyle &style)
 
void addData (const QVector< double > &keys, const QVector< double > &minimum, const QVector< double > &lowerQuartile, const QVector< double > &median, const QVector< double > &upperQuartile, const QVector< double > &maximum, bool alreadySorted=false)
 
void addData (double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector< double > &outliers=QVector< double >())
 
virtual QCPDataSelection selectTestRect (const QRectF &rect, bool onlySelectable) const
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
virtual QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const
 
virtual QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const
 
- Public Functions inherited from QCPAbstractPlottable1D< QCPStatisticalBoxData >
 QCPAbstractPlottable1D (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
virtual int dataCount () const
 
virtual double dataMainKey (int index) const
 
virtual double dataSortKey (int index) const
 
virtual double dataMainValue (int index) const
 
virtual QCPRange dataValueRange (int index) const
 
virtual QPointF dataPixelPosition (int index) const
 
virtual bool sortKeyIsMainKey () const
 
virtual int findBegin (double sortKey, bool expandedRange=true) const
 
virtual int findEnd (double sortKey, bool expandedRange=true) const
 
virtual QCPPlottableInterface1Dinterface1D ()
 
- Public Functions inherited from QCPAbstractPlottable
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
-QString name () const
 
-bool antialiasedFill () const
 
-bool antialiasedScatters () const
 
-QPen pen () const
 
-QBrush brush () const
 
-QCPAxiskeyAxis () const
 
-QCPAxisvalueAxis () const
 
-QCP::SelectionType selectable () const
 
bool selected () const
 
QCPDataSelection selection () const
 
QCPSelectionDecoratorselectionDecorator () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (QCP::SelectionType selectable)
 
Q_SLOT void setSelection (QCPDataSelection selection)
 
void setSelectionDecorator (QCPSelectionDecorator *decorator)
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false, bool inKeyRange=false) const
 
bool addToLegend (QCPLegend *legend)
 
bool addToLegend ()
 
bool removeFromLegend (QCPLegend *legend) const
 
bool removeFromLegend () const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void draw (QCPPainter *painter)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const
 
virtual void drawStatisticalBox (QCPPainter *painter, QCPStatisticalBoxDataContainer::const_iterator it, const QCPScatterStyle &outlierStyle) const
 
void getVisibleDataBounds (QCPStatisticalBoxDataContainer::const_iterator &begin, QCPStatisticalBoxDataContainer::const_iterator &end) const
 
QRectF getQuartileBox (QCPStatisticalBoxDataContainer::const_iterator it) const
 
QVector< QLineF > getWhiskerBackboneLines (QCPStatisticalBoxDataContainer::const_iterator it) const
 
QVector< QLineF > getWhiskerBarLines (QCPStatisticalBoxDataContainer::const_iterator it) const
 
- Protected Functions inherited from QCPAbstractPlottable1D< QCPStatisticalBoxData >
void getDataSegments (QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
 
void drawPolyline (QCPPainter *painter, const QVector< QPointF > &lineData) const
 
- Protected Functions inherited from QCPAbstractPlottable
virtual QRect clipRect () const
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
- Protected Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - - - - - - -

-Additional Inherited Members

- Signals inherited from QCPAbstractPlottable
void selectionChanged (bool selected)
 
void selectionChanged (const QCPDataSelection &selection)
 
void selectableChanged (QCP::SelectionType selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
-

Detailed Description

-

A plottable representing a single statistical box in a plot.

-
-QCPStatisticalBox.png -
-

To plot data, assign it with the setData or addData functions. Alternatively, you can also access and modify the data via the data method, which returns a pointer to the internal QCPStatisticalBoxDataContainer.

-

Additionally each data point can itself have a list of outliers, drawn as scatter points at the key coordinate of the respective statistical box data point. They can either be set by using the respective addData method or accessing the individual data points through data, and setting the QVector<double> outliers of the data points directly.

-

-Changing the appearance

-

The appearance of each data point box, ranging from the lower to the upper quartile, is controlled via setPen and setBrush. You may change the width of the boxes with setWidth in plot coordinates.

-

Each data point's visual representation also consists of two whiskers. Whiskers are the lines which reach from the upper quartile to the maximum, and from the lower quartile to the minimum. The appearance of the whiskers can be modified with: setWhiskerPen, setWhiskerBarPen, setWhiskerWidth. The whisker width is the width of the bar perpendicular to the whisker at the top (for maximum) and bottom (for minimum). If the whisker pen is changed, make sure to set the capStyle to Qt::FlatCap. Otherwise the backbone line might exceed the whisker bars by a few pixels due to the pen cap being not perfectly flat.

-

The median indicator line inside the box has its own pen, setMedianPen.

-

The outlier data points are drawn as normal scatter points. Their look can be controlled with setOutlierStyle

-

-Usage

-

Like all data representing objects in QCustomPlot, the QCPStatisticalBox is a plottable (QCPAbstractPlottable). So the plottable-interface of QCustomPlot applies (QCustomPlot::plottable, QCustomPlot::removePlottable, etc.)

-

Usually, you first create an instance:

QCPStatisticalBox *newStatistical = new QCPStatisticalBox(customPlot->xAxis, customPlot->yAxis);

which registers it with the QCustomPlot instance of the passed axes. Note that this QCustomPlot instance takes ownership of the plottable, so do not delete it manually but use QCustomPlot::removePlottable() instead. The newly created plottable can be modified, e.g.:

newStatistical->setName("Measurement Series 1");
newStatistical->addData(1000, 1, 3, 4, 5, 7);

Constructor & Destructor Documentation

- -

§ QCPStatisticalBox()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPStatisticalBox::QCPStatisticalBox (QCPAxiskeyAxis,
QCPAxisvalueAxis 
)
-
-explicit
-
-

Constructs a statistical box which uses keyAxis as its key axis ("x") and valueAxis as its value axis ("y"). keyAxis and valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though.

-

The created QCPStatisticalBox is automatically registered with the QCustomPlot instance inferred from keyAxis. This QCustomPlot instance takes ownership of the QCPStatisticalBox, so do not delete it manually but use QCustomPlot::removePlottable() instead.

- -
-
-

Member Function Documentation

- -

§ data()

- -
-
- - - - - -
- - - - - - - -
QSharedPointer< QCPStatisticalBoxDataContainer > QCPStatisticalBox::data () const
-
-inline
-
-

Returns a shared pointer to the internal data storage of type QCPStatisticalBoxDataContainer. You may use it to directly manipulate the data, which may be more convenient and faster than using the regular setData or addData methods.

- -
-
- -

§ setData() [1/2]

- -
-
- - - - - - - - -
void QCPStatisticalBox::setData (QSharedPointer< QCPStatisticalBoxDataContainerdata)
-
-

This is an overloaded function.

-

Replaces the current data container with the provided data container.

-

Since a QSharedPointer is used, multiple QCPStatisticalBoxes may share the same data container safely. Modifying the data in the container will then affect all statistical boxes that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers:

statBox2->setData(statBox1->data()); // statBox1 and statBox2 now share data container

If you do not wish to share containers, but create a copy from an existing container, rather use the QCPDataContainer<DataType>::set method on the statistical box data container directly:

statBox2->data()->set(*statBox1->data()); // statBox2 now has copy of statBox1's data in its container
See also
addData
- -
-
- -

§ setData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPStatisticalBox::setData (const QVector< double > & keys,
const QVector< double > & minimum,
const QVector< double > & lowerQuartile,
const QVector< double > & median,
const QVector< double > & upperQuartile,
const QVector< double > & maximum,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Replaces the current data with the provided points in keys, minimum, lowerQuartile, median, upperQuartile and maximum. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

If you can guarantee that the passed data points are sorted by keys in ascending order, you can set alreadySorted to true, to improve performance by saving a sorting run.

-
See also
addData
- -
-
- -

§ setWidth()

- -
-
- - - - - - - - -
void QCPStatisticalBox::setWidth (double width)
-
-

Sets the width of the boxes in key coordinates.

-
See also
setWhiskerWidth
- -
-
- -

§ setWhiskerWidth()

- -
-
- - - - - - - - -
void QCPStatisticalBox::setWhiskerWidth (double width)
-
-

Sets the width of the whiskers in key coordinates.

-

Whiskers are the lines which reach from the upper quartile to the maximum, and from the lower quartile to the minimum.

-
See also
setWidth
- -
-
- -

§ setWhiskerPen()

- -
-
- - - - - - - - -
void QCPStatisticalBox::setWhiskerPen (const QPen & pen)
-
-

Sets the pen used for drawing the whisker backbone.

-

Whiskers are the lines which reach from the upper quartile to the maximum, and from the lower quartile to the minimum.

-

Make sure to set the capStyle of the passed pen to Qt::FlatCap. Otherwise the backbone line might exceed the whisker bars by a few pixels due to the pen cap being not perfectly flat.

-
See also
setWhiskerBarPen
- -
-
- -

§ setWhiskerBarPen()

- -
-
- - - - - - - - -
void QCPStatisticalBox::setWhiskerBarPen (const QPen & pen)
-
-

Sets the pen used for drawing the whisker bars. Those are the lines parallel to the key axis at each end of the whisker backbone.

-

Whiskers are the lines which reach from the upper quartile to the maximum, and from the lower quartile to the minimum.

-
See also
setWhiskerPen
- -
-
- -

§ setWhiskerAntialiased()

- -
-
- - - - - - - - -
void QCPStatisticalBox::setWhiskerAntialiased (bool enabled)
-
-

Sets whether the statistical boxes whiskers are drawn with antialiasing or not.

-

Note that antialiasing settings may be overridden by QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

- -
-
- -

§ setMedianPen()

- -
-
- - - - - - - - -
void QCPStatisticalBox::setMedianPen (const QPen & pen)
-
-

Sets the pen used for drawing the median indicator line inside the statistical boxes.

- -
-
- -

§ setOutlierStyle()

- -
-
- - - - - - - - -
void QCPStatisticalBox::setOutlierStyle (const QCPScatterStylestyle)
-
-

Sets the appearance of the outlier data points.

-

Outliers can be specified with the method addData(double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector<double> &outliers)

- -
-
- -

§ addData() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPStatisticalBox::addData (const QVector< double > & keys,
const QVector< double > & minimum,
const QVector< double > & lowerQuartile,
const QVector< double > & median,
const QVector< double > & upperQuartile,
const QVector< double > & maximum,
bool alreadySorted = false 
)
-
-

This is an overloaded function.

-

Adds the provided points in keys, minimum, lowerQuartile, median, upperQuartile and maximum to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

-

If you can guarantee that the passed data points are sorted by keys in ascending order, you can set alreadySorted to true, to improve performance by saving a sorting run.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

- -
-
- -

§ addData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPStatisticalBox::addData (double key,
double minimum,
double lowerQuartile,
double median,
double upperQuartile,
double maximum,
const QVector< double > & outliers = QVector<double>() 
)
-
-

This is an overloaded function.

-

Adds the provided data point as key, minimum, lowerQuartile, median, upperQuartile and maximum to the current data.

-

Alternatively, you can also access and modify the data directly via the data method, which returns a pointer to the internal data container.

- -
-
- -

§ selectTestRect()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPDataSelection QCPStatisticalBox::selectTestRect (const QRectF & rect,
bool onlySelectable 
) const
-
-virtual
-
- -

-

Returns a data selection containing all the data points of this plottable which are contained (or hit by) rect. This is used mainly in the selection rect interaction for data selection (data selection mechanism).

-

If onlySelectable is true, an empty QCPDataSelection is returned if this plottable is not selectable (i.e. if QCPAbstractPlottable::setSelectable is QCP::stNone).

-
Note
rect must be a normalized rect (positive or zero width and height). This is especially important when using the rect of QCPSelectionRect::accepted, which is not necessarily normalized. Use QRect::normalized() when passing a rect which might not be normalized.
- -

Reimplemented from QCPAbstractPlottable1D< QCPStatisticalBoxData >.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPStatisticalBox::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

Implements a selectTest specific to this plottable's point geometry.

-

If details is not 0, it will be set to a QCPDataSelection, describing the closest data point to pos.

-

For general information about this virtual method, see the base class implementation. QCPAbstractPlottable::selectTest

- -

Reimplemented from QCPAbstractPlottable1D< QCPStatisticalBoxData >.

- -
-
- -

§ getKeyRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QCPRange QCPStatisticalBox::getKeyRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth 
) const
-
-virtual
-
-

Returns the coordinate range that all data in this plottable span in the key axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getValueRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ getValueRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPRange QCPStatisticalBox::getValueRange (bool & foundRange,
QCP::SignDomain inSignDomain = QCP::sdBoth,
const QCPRangeinKeyRange = QCPRange() 
) const
-
-virtual
-
-

Returns the coordinate range that the data points in the specified key range (inKeyRange) span in the value axis dimension. For logarithmic plots, one can set inSignDomain to either QCP::sdNegative or QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set inSignDomain to QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set inSignDomain to QCP::sdBoth (default). foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data).

-

If inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys.

-

Note that foundRange is not the same as QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case foundRange would return true, but the returned range is not a valid range in terms of QCPRange::validRange.

-
See also
rescaleAxes, getKeyRange
- -

Implements QCPAbstractPlottable.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPStatisticalBox::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ drawLegendIcon()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPStatisticalBox::drawLegendIcon (QCPPainterpainter,
const QRectF & rect 
) const
-
-protectedvirtual
-
-

called by QCPLegend::draw (via QCPPlottableLegendItem::draw) to create a graphical representation of this plottable inside rect, next to the plottable name.

-

The passed painter has its cliprect set to rect, so painting outside of rect won't appear outside the legend icon border.

- -

Implements QCPAbstractPlottable.

- -
-
- -

§ drawStatisticalBox()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCPStatisticalBox::drawStatisticalBox (QCPPainterpainter,
QCPStatisticalBoxDataContainer::const_iterator it,
const QCPScatterStyleoutlierStyle 
) const
-
-protectedvirtual
-
-

Draws the graphical representation of a single statistical box with the data given by the iterator it with the provided painter.

-

If the statistical box has a set of outlier data points, they are drawn with outlierStyle.

-
See also
getQuartileBox, getWhiskerBackboneLines, getWhiskerBarLines
- -
-
- -

§ getVisibleDataBounds()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPStatisticalBox::getVisibleDataBounds (QCPStatisticalBoxDataContainer::const_iterator & begin,
QCPStatisticalBoxDataContainer::const_iterator & end 
) const
-
-protected
-
-

called by draw to determine which data (key) range is visible at the current key axis range setting, so only that needs to be processed. It also takes into account the bar width.

-

begin returns an iterator to the lowest data point that needs to be taken into account when plotting. Note that in order to get a clean plot all the way to the edge of the axis rect, lower may still be just outside the visible range.

-

end returns an iterator one higher than the highest visible data point. Same as before, end may also lie just outside of the visible range.

-

if the plottable contains no data, both begin and end point to constEnd.

- -
-
- -

§ getQuartileBox()

- -
-
- - - - - -
- - - - - - - - -
QRectF QCPStatisticalBox::getQuartileBox (QCPStatisticalBoxDataContainer::const_iterator it) const
-
-protected
-
-

Returns the box in plot coordinates (keys in x, values in y of the returned rect) that covers the value range from the lower to the upper quartile, of the data given by it.

-
See also
drawStatisticalBox, getWhiskerBackboneLines, getWhiskerBarLines
- -
-
- -

§ getWhiskerBackboneLines()

- -
-
- - - - - -
- - - - - - - - -
QVector< QLineF > QCPStatisticalBox::getWhiskerBackboneLines (QCPStatisticalBoxDataContainer::const_iterator it) const
-
-protected
-
-

Returns the whisker backbones (keys in x, values in y of the returned lines) that cover the value range from the minimum to the lower quartile, and from the upper quartile to the maximum of the data given by it.

-
See also
drawStatisticalBox, getQuartileBox, getWhiskerBarLines
- -
-
- -

§ getWhiskerBarLines()

- -
-
- - - - - -
- - - - - - - - -
QVector< QLineF > QCPStatisticalBox::getWhiskerBarLines (QCPStatisticalBoxDataContainer::const_iterator it) const
-
-protected
-
-

Returns the whisker bars (keys in x, values in y of the returned lines) that are placed at the end of the whisker backbones, at the minimum and maximum of the data given by it.

-
See also
drawStatisticalBox, getQuartileBox, getWhiskerBackboneLines
- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPStatisticalBoxData.html b/third_party/qcustomplot/documentation/html/classQCPStatisticalBoxData.html deleted file mode 100644 index 70a9ee62..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPStatisticalBoxData.html +++ /dev/null @@ -1,352 +0,0 @@ - - - - - - -QCPStatisticalBoxData Class Reference - - - - -
- -
-
QCPStatisticalBoxData Class Reference
-
-
- -

Holds the data of one single data point for QCPStatisticalBox. - More...

- - - - - - - - - - - - - - -

-Public Functions

 QCPStatisticalBoxData ()
 
 QCPStatisticalBoxData (double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector< double > &outliers=QVector< double >())
 
double sortKey () const
 
double mainKey () const
 
double mainValue () const
 
QCPRange valueRange () const
 
- - - - - - - - - - - - - - - -

-Public Members

-double key
 
-double minimum
 
-double lowerQuartile
 
-double median
 
-double upperQuartile
 
-double maximum
 
-QVector< double > outliers
 
- - - - - -

-Static Public Functions

static QCPStatisticalBoxData fromSortKey (double sortKey)
 
static bool sortKeyIsMainKey ()
 
-

Detailed Description

-

Holds the data of one single data point for QCPStatisticalBox.

-

The stored data is:

-
    -
  • key: coordinate on the key axis of this data point (this is the mainKey and the sortKey)
  • -
-
    -
  • minimum: the position of the lower whisker, typically the minimum measurement of the sample that's not considered an outlier.
  • -
-
    -
  • lowerQuartile: the lower end of the box. The lower and the upper quartiles are the two statistical quartiles around the median of the sample, they should contain 50% of the sample data.
  • -
-
    -
  • median: the value of the median mark inside the quartile box. The median separates the sample data in half (50% of the sample data is below/above the median). (This is the mainValue)
  • -
-
    -
  • upperQuartile: the upper end of the box. The lower and the upper quartiles are the two statistical quartiles around the median of the sample, they should contain 50% of the sample data.
  • -
-
    -
  • maximum: the position of the upper whisker, typically the maximum measurement of the sample that's not considered an outlier.
  • -
- -

The container for storing multiple data points is QCPStatisticalBoxDataContainer. It is a typedef for QCPDataContainer with QCPStatisticalBoxData as the DataType template parameter. See the documentation there for an explanation regarding the data type's generic methods.

-
See also
QCPStatisticalBoxDataContainer
-

Constructor & Destructor Documentation

- -

§ QCPStatisticalBoxData() [1/2]

- -
-
- - - - - - - -
QCPStatisticalBoxData::QCPStatisticalBoxData ()
-
-

Constructs a data point with key and all values set to zero.

- -
-
- -

§ QCPStatisticalBoxData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QCPStatisticalBoxData::QCPStatisticalBoxData (double key,
double minimum,
double lowerQuartile,
double median,
double upperQuartile,
double maximum,
const QVector< double > & outliers = QVector<double>() 
)
-
-

Constructs a data point with the specified key, minimum, lowerQuartile, median, upperQuartile, maximum and optionally a number of outliers.

- -
-
-

Member Function Documentation

- -

§ sortKey()

- -
-
- - - - - -
- - - - - - - -
double QCPStatisticalBoxData::sortKey () const
-
-inline
-
-

Returns the key member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ fromSortKey()

- -
-
- - - - - -
- - - - - - - - -
static QCPStatisticalBoxData QCPStatisticalBoxData::fromSortKey (double sortKey)
-
-inlinestatic
-
-

Returns a data point with the specified sortKey. All other members are set to zero.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ sortKeyIsMainKey()

- -
-
- - - - - -
- - - - - - - -
static static bool QCPStatisticalBoxData::sortKeyIsMainKey ()
-
-inlinestatic
-
-

Since the member key is both the data point key coordinate and the data ordering parameter, this method returns true.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ mainKey()

- -
-
- - - - - -
- - - - - - - -
double QCPStatisticalBoxData::mainKey () const
-
-inline
-
-

Returns the key member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ mainValue()

- -
-
- - - - - -
- - - - - - - -
double QCPStatisticalBoxData::mainValue () const
-
-inline
-
-

Returns the median member of this data point.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
- -

§ valueRange()

- -
-
- - - - - -
- - - - - - - -
QCPRange QCPStatisticalBoxData::valueRange () const
-
-inline
-
-

Returns a QCPRange spanning from the minimum to the maximum member of this statistical box data point, possibly further expanded by outliers.

-

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPStatisticalBox__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPStatisticalBox__inherit__graph.png deleted file mode 100644 index 99f13a51..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPStatisticalBox__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPTextElement.html b/third_party/qcustomplot/documentation/html/classQCPTextElement.html deleted file mode 100644 index db7551fa..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPTextElement.html +++ /dev/null @@ -1,1126 +0,0 @@ - - - - - - -QCPTextElement Class Reference - - - - -
- -
-
QCPTextElement Class Reference
-
-
- -

A layout element displaying a text. - More...

-
-Inheritance diagram for QCPTextElement:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPTextElement (QCustomPlot *parentPlot)
 
 QCPTextElement (QCustomPlot *parentPlot, const QString &text)
 
 QCPTextElement (QCustomPlot *parentPlot, const QString &text, double pointSize)
 
 QCPTextElement (QCustomPlot *parentPlot, const QString &text, const QString &fontFamily, double pointSize)
 
 QCPTextElement (QCustomPlot *parentPlot, const QString &text, const QFont &font)
 
-QString text () const
 
-int textFlags () const
 
-QFont font () const
 
-QColor textColor () const
 
-QFont selectedFont () const
 
-QColor selectedTextColor () const
 
-bool selectable () const
 
-bool selected () const
 
void setText (const QString &text)
 
void setTextFlags (int flags)
 
void setFont (const QFont &font)
 
void setTextColor (const QColor &color)
 
void setSelectedFont (const QFont &font)
 
void setSelectedTextColor (const QColor &color)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
- Public Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
QCPLayoutlayout () const
 
QRect rect () const
 
QRect outerRect () const
 
-QMargins margins () const
 
-QMargins minimumMargins () const
 
-QCP::MarginSides autoMargins () const
 
-QSize minimumSize () const
 
-QSize maximumSize () const
 
-SizeConstraintRect sizeConstraintRect () const
 
-QCPMarginGroupmarginGroup (QCP::MarginSide side) const
 
-QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
 
void setOuterRect (const QRect &rect)
 
void setMargins (const QMargins &margins)
 
void setMinimumMargins (const QMargins &margins)
 
void setAutoMargins (QCP::MarginSides sides)
 
void setMinimumSize (const QSize &size)
 
void setMinimumSize (int width, int height)
 
void setMaximumSize (const QSize &size)
 
void setMaximumSize (int width, int height)
 
void setSizeConstraintRect (SizeConstraintRect constraintRect)
 
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
 
virtual void update (UpdatePhase phase)
 
virtual QList< QCPLayoutElement * > elements (bool recursive) const
 
- Public Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
-bool visible () const
 
-QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
-QCPLayerlayer () const
 
-bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- - - - - - - - - - - - -

-Signals

void selectionChanged (bool selected)
 
-void selectableChanged (bool selectable)
 
void clicked (QMouseEvent *event)
 
void doubleClicked (QMouseEvent *event)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
virtual QSize minimumOuterSizeHint () const
 
virtual QSize maximumOuterSizeHint () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
QFont mainFont () const
 
QColor mainTextColor () const
 
- Protected Functions inherited from QCPLayoutElement
virtual int calculateAutoMargin (QCP::MarginSide side)
 
virtual void layoutChanged ()
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
- Protected Functions inherited from QCPLayerable
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- - - - - - -

-Additional Inherited Members

- Public Types inherited from QCPLayoutElement
enum  UpdatePhase
 
enum  SizeConstraintRect
 
-

Detailed Description

-

A layout element displaying a text.

-

The text may be specified with setText, the formatting can be controlled with setFont, setTextColor, and setTextFlags.

-

A text element can be added as follows:

customPlot->plotLayout()->insertRow(0); // inserts an empty row above the default axis rect
customPlot->plotLayout()->addElement(0, 0, new QCPTextElement(customPlot, "Your Text"));

Constructor & Destructor Documentation

- -

§ QCPTextElement() [1/5]

- -
-
- - - - - -
- - - - - - - - -
QCPTextElement::QCPTextElement (QCustomPlotparentPlot)
-
-explicit
-
-

This is an overloaded function.

-

Creates a new QCPTextElement instance and sets default values. The initial text is empty (setText).

- -
-
- -

§ QCPTextElement() [2/5]

- -
-
- - - - - - - - - - - - - - - - - - -
QCPTextElement::QCPTextElement (QCustomPlotparentPlot,
const QString & text 
)
-
-

This is an overloaded function.

-

Creates a new QCPTextElement instance and sets default values.

-

The initial text is set to text.

- -
-
- -

§ QCPTextElement() [3/5]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPTextElement::QCPTextElement (QCustomPlotparentPlot,
const QString & text,
double pointSize 
)
-
-

This is an overloaded function.

-

Creates a new QCPTextElement instance and sets default values.

-

The initial text is set to text with pointSize.

- -
-
- -

§ QCPTextElement() [4/5]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QCPTextElement::QCPTextElement (QCustomPlotparentPlot,
const QString & text,
const QString & fontFamily,
double pointSize 
)
-
-

This is an overloaded function.

-

Creates a new QCPTextElement instance and sets default values.

-

The initial text is set to text with pointSize and the specified fontFamily.

- -
-
- -

§ QCPTextElement() [5/5]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPTextElement::QCPTextElement (QCustomPlotparentPlot,
const QString & text,
const QFont & font 
)
-
-

This is an overloaded function.

-

Creates a new QCPTextElement instance and sets default values.

-

The initial text is set to text with the specified font.

- -
-
-

Member Function Documentation

- -

§ setText()

- -
-
- - - - - - - - -
void QCPTextElement::setText (const QString & text)
-
-

Sets the text that will be displayed to text. Multiple lines can be created by insertion of "\n".

-
See also
setFont, setTextColor, setTextFlags
- -
-
- -

§ setTextFlags()

- -
-
- - - - - - - - -
void QCPTextElement::setTextFlags (int flags)
-
-

Sets options for text alignment and wrapping behaviour. flags is a bitwise OR-combination of Qt::AlignmentFlag and Qt::TextFlag enums.

-

Possible enums are:

    -
  • Qt::AlignLeft
  • -
  • Qt::AlignRight
  • -
  • Qt::AlignHCenter
  • -
  • Qt::AlignJustify
  • -
  • Qt::AlignTop
  • -
  • Qt::AlignBottom
  • -
  • Qt::AlignVCenter
  • -
  • Qt::AlignCenter
  • -
  • Qt::TextDontClip
  • -
  • Qt::TextSingleLine
  • -
  • Qt::TextExpandTabs
  • -
  • Qt::TextShowMnemonic
  • -
  • Qt::TextWordWrap
  • -
  • Qt::TextIncludeTrailingSpaces
  • -
- -
-
- -

§ setFont()

- -
-
- - - - - - - - -
void QCPTextElement::setFont (const QFont & font)
-
-

Sets the font of the text.

-
See also
setTextColor, setSelectedFont
- -
-
- -

§ setTextColor()

- -
-
- - - - - - - - -
void QCPTextElement::setTextColor (const QColor & color)
-
-

Sets the color of the text.

-
See also
setFont, setSelectedTextColor
- -
-
- -

§ setSelectedFont()

- -
-
- - - - - - - - -
void QCPTextElement::setSelectedFont (const QFont & font)
-
-

Sets the font of the text that will be used if the text element is selected (setSelected).

-
See also
setFont
- -
-
- -

§ setSelectedTextColor()

- -
-
- - - - - - - - -
void QCPTextElement::setSelectedTextColor (const QColor & color)
-
-

Sets the color of the text that will be used if the text element is selected (setSelected).

-
See also
setTextColor
- -
-
- -

§ setSelectable()

- -
-
- - - - - - - - -
void QCPTextElement::setSelectable (bool selectable)
-
-

Sets whether the user may select this text element.

-

Note that even when selectable is set to false, the selection state may be changed programmatically via setSelected.

- -
-
- -

§ setSelected()

- -
-
- - - - - - - - -
void QCPTextElement::setSelected (bool selected)
-
-

Sets the selection state of this text element to selected. If the selection has changed, selectionChanged is emitted.

-

Note that this function can change the selection state independently of the current setSelectable state.

- -
-
- -

§ selectTest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
double QCPTextElement::selectTest (const QPointF & pos,
bool onlySelectable,
QVariant * details = nullptr 
) const
-
-virtual
-
-

Returns 0.99*selectionTolerance (see QCustomPlot::setSelectionTolerance) when pos is within the bounding box of the text element's text. Note that this bounding box is updated in the draw call.

-

If pos is outside the text's bounding box or if onlySelectable is true and this text element is not selectable (setSelectable), returns -1.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ mousePressEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPTextElement::mousePressEvent (QMouseEvent * event,
const QVariant & details 
)
-
-virtual
-
-

Accepts the mouse event in order to emit the according click signal in the mouseReleaseEvent.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseReleaseEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPTextElement::mouseReleaseEvent (QMouseEvent * event,
const QPointF & startPos 
)
-
-virtual
-
-

Emits the clicked signal if the cursor hasn't moved by more than a few pixels since the mousePressEvent.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mouseDoubleClickEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCPTextElement::mouseDoubleClickEvent (QMouseEvent * event,
const QVariant & details 
)
-
-virtual
-
-

Emits the doubleClicked signal.

-

For general information about this virtual method, see the base class implementation.

- -

Reimplemented from QCPLayerable.

- -
-
- -

§ selectionChanged

- -
-
- - - - - -
- - - - - - - - -
void QCPTextElement::selectionChanged (bool selected)
-
-signal
-
-

This signal is emitted when the selection state has changed to selected, either by user interaction or by a direct call to setSelected.

-
See also
setSelected, setSelectable
- -
-
- -

§ clicked

- -
-
- - - - - -
- - - - - - - - -
void QCPTextElement::clicked (QMouseEvent * event)
-
-signal
-
-

This signal is emitted when the text element is clicked.

-
See also
doubleClicked, selectTest
- -
-
- -

§ doubleClicked

- -
-
- - - - - -
- - - - - - - - -
void QCPTextElement::doubleClicked (QMouseEvent * event)
-
-signal
-
-

This signal is emitted when the text element is double clicked.

-
See also
clicked, selectTest
- -
-
- -

§ applyDefaultAntialiasingHint()

- -
-
- - - - - -
- - - - - - - - -
void QCPTextElement::applyDefaultAntialiasingHint (QCPPainterpainter) const
-
-protectedvirtual
-
-

This function applies the default antialiasing setting to the specified painter, using the function applyAntialiasingHint. It is the antialiasing state the painter is put in, when draw is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the draw function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.

-

First example: QCPGraph has multiple entities that have an antialiasing setting: The graph line, fills and scatters. Those can be configured via QCPGraph::setAntialiased, QCPGraph::setAntialiasedFill and QCPGraph::setAntialiasedScatters. Consequently, there isn't only the QCPGraph::applyDefaultAntialiasingHint function (which corresponds to the graph line's antialiasing), but specialized ones like QCPGraph::applyFillAntialiasingHint and QCPGraph::applyScattersAntialiasingHint. So before drawing one of those entities, QCPGraph::draw calls the respective specialized applyAntialiasingHint function.

-

Second example: QCPItemLine consists only of a line so there is only one antialiasing setting which can be controlled with QCPItemLine::setAntialiased. (This function is inherited by all layerables. The specialized functions, as seen on QCPGraph, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal QCPItemLine::applyDefaultAntialiasingHint. The QCPItemLine::draw function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the draw function is called, and that's the state it wants to draw the line with.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCPTextElement::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the layerable with the specified painter. It is only called by QCustomPlot, if the layerable is visible (setVisible).

-

Before this function is called, the painter's antialiasing state is set via applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to clipRect.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ minimumOuterSizeHint()

- -
-
- - - - - -
- - - - - - - -
QSize QCPTextElement::minimumOuterSizeHint () const
-
-protectedvirtual
-
-

Returns the suggested minimum size this layout element (the outerRect) may be compressed to, if no manual minimum size is set.

-

if a minimum size (setMinimumSize) was not set manually, parent layouts use the returned size (usually indirectly through QCPLayout::getFinalMinimumOuterSize) to determine the minimum allowed size of this layout element.

-

A manual minimum size is considered set if it is non-zero.

-

The default implementation simply returns the sum of the horizontal margins for the width and the sum of the vertical margins for the height. Reimplementations may use their detailed knowledge about the layout element's content to provide size hints.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ maximumOuterSizeHint()

- -
-
- - - - - -
- - - - - - - -
QSize QCPTextElement::maximumOuterSizeHint () const
-
-protectedvirtual
-
-

Returns the suggested maximum size this layout element (the outerRect) may be expanded to, if no manual maximum size is set.

-

if a maximum size (setMaximumSize) was not set manually, parent layouts use the returned size (usually indirectly through QCPLayout::getFinalMaximumOuterSize) to determine the maximum allowed size of this layout element.

-

A manual maximum size is considered set if it is smaller than Qt's QWIDGETSIZE_MAX.

-

The default implementation simply returns QWIDGETSIZE_MAX for both width and height, implying no suggested maximum size. Reimplementations may use their detailed knowledge about the layout element's content to provide size hints.

- -

Reimplemented from QCPLayoutElement.

- -
-
- -

§ selectEvent()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void QCPTextElement::selectEvent (QMouseEvent * event,
bool additive,
const QVariant & details,
bool * selectionStateChanged 
)
-
-protectedvirtual
-
-

This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing.

-

event is the mouse event that caused the selection. additive indicates, whether the user was holding the multi-select-modifier while performing the selection (see QCustomPlot::setMultiSelectModifier). if additive is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected).

-

Every selectEvent is preceded by a call to selectTest, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent QCustomPlot). The details data you output from selectTest is fed back via details here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually details is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like QCPAxis). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked.

-

selectionStateChanged is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if additive is true, selectionStateChanged must also be set to true, because the selection toggles. If additive is false, selectionStateChanged is only set to true, if the layerable was previously unselected and now is switched to the selected state.

-
See also
selectTest, deselectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ deselectEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCPTextElement::deselectEvent (bool * selectionStateChanged)
-
-protectedvirtual
-
-

This event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to QCustomPlot::deselectAll. Subclasses should react to it by unsetting their selection appropriately.

-

just as in selectEvent, the output parameter selectionStateChanged (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively.

-
See also
selectTest, selectEvent
- -

Reimplemented from QCPLayerable.

- -
-
- -

§ mainFont()

- -
-
- - - - - -
- - - - - - - -
QFont QCPTextElement::mainFont () const
-
-protected
-
-

Returns the main font to be used. This is mSelectedFont if setSelected is set to true, else mFont is returned.

- -
-
- -

§ mainTextColor()

- -
-
- - - - - -
- - - - - - - -
QColor QCPTextElement::mainTextColor () const
-
-protected
-
-

Returns the main color to be used. This is mSelectedTextColor if setSelected is set to true, else mTextColor is returned.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/layoutelements/layoutelement-textelement.h
  • -
  • src/layoutelements/layoutelement-textelement.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCPTextElement__inherit__graph.png b/third_party/qcustomplot/documentation/html/classQCPTextElement__inherit__graph.png deleted file mode 100644 index a3624ef7..00000000 Binary files a/third_party/qcustomplot/documentation/html/classQCPTextElement__inherit__graph.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/classQCPVector2D.html b/third_party/qcustomplot/documentation/html/classQCPVector2D.html deleted file mode 100644 index 10f97c6a..00000000 --- a/third_party/qcustomplot/documentation/html/classQCPVector2D.html +++ /dev/null @@ -1,722 +0,0 @@ - - - - - - -QCPVector2D Class Reference - - - - -
- -
-
QCPVector2D Class Reference
-
-
- -

Represents two doubles as a mathematical 2D vector. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCPVector2D ()
 
 QCPVector2D (double x, double y)
 
 QCPVector2D (const QPoint &point)
 
 QCPVector2D (const QPointF &point)
 
-double x () const
 
-double y () const
 
-double & rx ()
 
-double & ry ()
 
void setX (double x)
 
void setY (double y)
 
double length () const
 
double lengthSquared () const
 
double angle () const
 
QPoint toPoint () const
 
QPointF toPointF () const
 
bool isNull () const
 
void normalize ()
 
QCPVector2D normalized () const
 
QCPVector2D perpendicular () const
 
double dot (const QCPVector2D &vec) const
 
double distanceSquaredToLine (const QCPVector2D &start, const QCPVector2D &end) const
 
double distanceSquaredToLine (const QLineF &line) const
 
double distanceToStraightLine (const QCPVector2D &base, const QCPVector2D &direction) const
 
QCPVector2Doperator*= (double factor)
 
QCPVector2Doperator/= (double divisor)
 
QCPVector2Doperator+= (const QCPVector2D &vector)
 
QCPVector2Doperator-= (const QCPVector2D &vector)
 
- - - - - - - - - - - - - -

-Friends

-const QCPVector2D operator* (double factor, const QCPVector2D &vec)
 
-const QCPVector2D operator* (const QCPVector2D &vec, double factor)
 
-const QCPVector2D operator/ (const QCPVector2D &vec, double divisor)
 
-const QCPVector2D operator+ (const QCPVector2D &vec1, const QCPVector2D &vec2)
 
-const QCPVector2D operator- (const QCPVector2D &vec1, const QCPVector2D &vec2)
 
-const QCPVector2D operator- (const QCPVector2D &vec)
 
- - - - -

-Related Non-Members

(Note that these are not member functions.)

-
QDebug operator<< (QDebug d, const QCPVector2D &vec)
 
-

Detailed Description

-

Represents two doubles as a mathematical 2D vector.

-

This class acts as a replacement for QVector2D with the advantage of double precision instead of single, and some convenience methods tailored for the QCustomPlot library.

-

Constructor & Destructor Documentation

- -

§ QCPVector2D() [1/4]

- -
-
- - - - - - - -
QCPVector2D::QCPVector2D ()
-
-

Creates a QCPVector2D object and initializes the x and y coordinates to 0.

- -
-
- -

§ QCPVector2D() [2/4]

- -
-
- - - - - - - - - - - - - - - - - - -
QCPVector2D::QCPVector2D (double x,
double y 
)
-
-

Creates a QCPVector2D object and initializes the x and y coordinates with the specified values.

- -
-
- -

§ QCPVector2D() [3/4]

- -
-
- - - - - - - - -
QCPVector2D::QCPVector2D (const QPoint & point)
-
-

Creates a QCPVector2D object and initializes the x and y coordinates respective coordinates of the specified point.

- -
-
- -

§ QCPVector2D() [4/4]

- -
-
- - - - - - - - -
QCPVector2D::QCPVector2D (const QPointF & point)
-
-

Creates a QCPVector2D object and initializes the x and y coordinates respective coordinates of the specified point.

- -
-
-

Member Function Documentation

- -

§ setX()

- -
-
- - - - - -
- - - - - - - - -
void QCPVector2D::setX (double x)
-
-inline
-
-

Sets the x coordinate of this vector to x.

-
See also
setY
- -
-
- -

§ setY()

- -
-
- - - - - -
- - - - - - - - -
void QCPVector2D::setY (double y)
-
-inline
-
-

Sets the y coordinate of this vector to y.

-
See also
setX
- -
-
- -

§ length()

- -
-
- - - - - -
- - - - - - - -
double QCPVector2D::length () const
-
-inline
-
-

Returns the length of this vector.

-
See also
lengthSquared
- -
-
- -

§ lengthSquared()

- -
-
- - - - - -
- - - - - - - -
double QCPVector2D::lengthSquared () const
-
-inline
-
-

Returns the squared length of this vector. In some situations, e.g. when just trying to find the shortest vector of a group, this is faster than calculating length, because it avoids calculation of a square root.

-
See also
length
- -
-
- -

§ angle()

- -
-
- - - - - -
- - - - - - - -
double QCPVector2D::angle () const
-
-inline
-
-

Returns the angle of the vector in radians. The angle is measured between the positive x line and the vector, counter-clockwise in a mathematical coordinate system (y axis upwards positive). In screen/widget coordinates where the y axis is inverted, the angle appears clockwise.

- -
-
- -

§ toPoint()

- -
-
- - - - - -
- - - - - - - -
QPoint QCPVector2D::toPoint () const
-
-inline
-
-

Returns a QPoint which has the x and y coordinates of this vector, truncating any floating point information.

-
See also
toPointF
- -
-
- -

§ toPointF()

- -
-
- - - - - -
- - - - - - - -
QPointF QCPVector2D::toPointF () const
-
-inline
-
-

Returns a QPointF which has the x and y coordinates of this vector.

-
See also
toPoint
- -
-
- -

§ isNull()

- -
-
- - - - - -
- - - - - - - -
bool QCPVector2D::isNull () const
-
-inline
-
-

Returns whether this vector is null. A vector is null if qIsNull returns true for both x and y coordinates, i.e. if both are binary equal to 0.

- -
-
- -

§ normalize()

- -
-
- - - - - - - -
void QCPVector2D::normalize ()
-
-

Normalizes this vector. After this operation, the length of the vector is equal to 1.

-

If the vector has both entries set to zero, this method does nothing.

-
See also
normalized, length, lengthSquared
- -
-
- -

§ normalized()

- -
-
- - - - - - - -
QCPVector2D QCPVector2D::normalized () const
-
-

Returns a normalized version of this vector. The length of the returned vector is equal to 1.

-

If the vector has both entries set to zero, this method returns the vector unmodified.

-
See also
normalize, length, lengthSquared
- -
-
- -

§ perpendicular()

- -
-
- - - - - -
- - - - - - - -
QCPVector2D QCPVector2D::perpendicular () const
-
-inline
-
-

Returns a vector perpendicular to this vector, with the same length.

- -
-
- -

§ dot()

- -
-
- - - - - -
- - - - - - - - -
double QCPVector2D::dot (const QCPVector2Dvec) const
-
-inline
-
-

Returns the dot/scalar product of this vector with the specified vector vec.

- -
-
- -

§ distanceSquaredToLine() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - -
double QCPVector2D::distanceSquaredToLine (const QCPVector2Dstart,
const QCPVector2Dend 
) const
-
-

This is an overloaded function.

-

Returns the squared shortest distance of this vector (interpreted as a point) to the finite line segment given by start and end.

-
See also
distanceToStraightLine
- -
-
- -

§ distanceSquaredToLine() [2/2]

- -
-
- - - - - - - - -
double QCPVector2D::distanceSquaredToLine (const QLineF & line) const
-
-

This is an overloaded function.

-

Returns the squared shortest distance of this vector (interpreted as a point) to the finite line segment given by line.

-
See also
distanceToStraightLine
- -
-
- -

§ distanceToStraightLine()

- -
-
- - - - - - - - - - - - - - - - - - -
double QCPVector2D::distanceToStraightLine (const QCPVector2Dbase,
const QCPVector2Ddirection 
) const
-
-

Returns the shortest distance of this vector (interpreted as a point) to the infinite straight line given by a base point and a direction vector.

-
See also
distanceSquaredToLine
- -
-
- -

§ operator*=()

- -
-
- - - - - - - - -
QCPVector2D & QCPVector2D::operator*= (double factor)
-
-

Scales this vector by the given factor, i.e. the x and y components are multiplied by factor.

- -
-
- -

§ operator/=()

- -
-
- - - - - - - - -
QCPVector2D & QCPVector2D::operator/= (double divisor)
-
-

Scales this vector by the given divisor, i.e. the x and y components are divided by divisor.

- -
-
- -

§ operator+=()

- -
-
- - - - - - - - -
QCPVector2D & QCPVector2D::operator+= (const QCPVector2Dvector)
-
-

Adds the given vector to this vector component-wise.

- -
-
- -

§ operator-=()

- -
-
- - - - - - - - -
QCPVector2D & QCPVector2D::operator-= (const QCPVector2Dvector)
-
-

subtracts the given vector from this vector component-wise.

- -
-
-

Friends And Related Function Documentation

- -

§ operator<<()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
QDebug operator<< (QDebug d,
const QCPVector2Dvec 
)
-
-related
-
-

Prints vec in a human readable format to the qDebug output.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • src/vector2d.h
  • -
  • src/vector2d.cpp
  • -
-
- - diff --git a/third_party/qcustomplot/documentation/html/classQCustomPlot.html b/third_party/qcustomplot/documentation/html/classQCustomPlot.html deleted file mode 100644 index b098938e..00000000 --- a/third_party/qcustomplot/documentation/html/classQCustomPlot.html +++ /dev/null @@ -1,4068 +0,0 @@ - - - - - - -QCustomPlot Class Reference - - - - -
- -
-
QCustomPlot Class Reference
-
-
- -

The central class of the library. This is the QWidget which displays the plot and interacts with the user. - More...

- -

Inherits QWidget.

- - - - - - -

-Public Types

enum  LayerInsertMode
 
enum  RefreshPriority
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Functions

 QCustomPlot (QWidget *parent=nullptr)
 
-QRect viewport () const
 
-double bufferDevicePixelRatio () const
 
-QPixmap background () const
 
-bool backgroundScaled () const
 
-Qt::AspectRatioMode backgroundScaledMode () const
 
QCPLayoutGridplotLayout () const
 
-QCP::AntialiasedElements antialiasedElements () const
 
-QCP::AntialiasedElements notAntialiasedElements () const
 
-bool autoAddPlottableToLegend () const
 
-const QCP::Interactions interactions () const
 
-int selectionTolerance () const
 
-bool noAntialiasingOnDrag () const
 
-QCP::PlottingHints plottingHints () const
 
-Qt::KeyboardModifier multiSelectModifier () const
 
-QCP::SelectionRectMode selectionRectMode () const
 
QCPSelectionRectselectionRect () const
 
-bool openGl () const
 
void setViewport (const QRect &rect)
 
void setBufferDevicePixelRatio (double ratio)
 
void setBackground (const QPixmap &pm)
 
void setBackground (const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding)
 
void setBackground (const QBrush &brush)
 
void setBackgroundScaled (bool scaled)
 
void setBackgroundScaledMode (Qt::AspectRatioMode mode)
 
void setAntialiasedElements (const QCP::AntialiasedElements &antialiasedElements)
 
void setAntialiasedElement (QCP::AntialiasedElement antialiasedElement, bool enabled=true)
 
void setNotAntialiasedElements (const QCP::AntialiasedElements &notAntialiasedElements)
 
void setNotAntialiasedElement (QCP::AntialiasedElement notAntialiasedElement, bool enabled=true)
 
void setAutoAddPlottableToLegend (bool on)
 
void setInteractions (const QCP::Interactions &interactions)
 
void setInteraction (const QCP::Interaction &interaction, bool enabled=true)
 
void setSelectionTolerance (int pixels)
 
void setNoAntialiasingOnDrag (bool enabled)
 
void setPlottingHints (const QCP::PlottingHints &hints)
 
void setPlottingHint (QCP::PlottingHint hint, bool enabled=true)
 
void setMultiSelectModifier (Qt::KeyboardModifier modifier)
 
void setSelectionRectMode (QCP::SelectionRectMode mode)
 
void setSelectionRect (QCPSelectionRect *selectionRect)
 
void setOpenGl (bool enabled, int multisampling=16)
 
QCPAbstractPlottableplottable (int index)
 
QCPAbstractPlottableplottable ()
 
bool removePlottable (QCPAbstractPlottable *plottable)
 
bool removePlottable (int index)
 
int clearPlottables ()
 
int plottableCount () const
 
QList< QCPAbstractPlottable * > selectedPlottables () const
 
template<class PlottableType >
PlottableType * plottableAt (const QPointF &pos, bool onlySelectable=false, int *dataIndex=nullptr) const
 
QCPAbstractPlottableplottableAt (const QPointF &pos, bool onlySelectable=false, int *dataIndex=nullptr) const
 
bool hasPlottable (QCPAbstractPlottable *plottable) const
 
QCPGraphgraph (int index) const
 
QCPGraphgraph () const
 
QCPGraphaddGraph (QCPAxis *keyAxis=nullptr, QCPAxis *valueAxis=nullptr)
 
bool removeGraph (QCPGraph *graph)
 
bool removeGraph (int index)
 
int clearGraphs ()
 
int graphCount () const
 
QList< QCPGraph * > selectedGraphs () const
 
QCPAbstractItemitem (int index) const
 
QCPAbstractItemitem () const
 
bool removeItem (QCPAbstractItem *item)
 
bool removeItem (int index)
 
int clearItems ()
 
int itemCount () const
 
QList< QCPAbstractItem * > selectedItems () const
 
template<class ItemType >
ItemType * itemAt (const QPointF &pos, bool onlySelectable=false) const
 
QCPAbstractItemitemAt (const QPointF &pos, bool onlySelectable=false) const
 
bool hasItem (QCPAbstractItem *item) const
 
QCPLayerlayer (const QString &name) const
 
QCPLayerlayer (int index) const
 
QCPLayercurrentLayer () const
 
bool setCurrentLayer (const QString &name)
 
bool setCurrentLayer (QCPLayer *layer)
 
int layerCount () const
 
bool addLayer (const QString &name, QCPLayer *otherLayer=nullptr, LayerInsertMode insertMode=limAbove)
 
bool removeLayer (QCPLayer *layer)
 
bool moveLayer (QCPLayer *layer, QCPLayer *otherLayer, LayerInsertMode insertMode=limAbove)
 
int axisRectCount () const
 
QCPAxisRectaxisRect (int index=0) const
 
QList< QCPAxisRect * > axisRects () const
 
QCPLayoutElementlayoutElementAt (const QPointF &pos) const
 
QCPAxisRectaxisRectAt (const QPointF &pos) const
 
Q_SLOT void rescaleAxes (bool onlyVisiblePlottables=false)
 
QList< QCPAxis * > selectedAxes () const
 
QList< QCPLegend * > selectedLegends () const
 
Q_SLOT void deselectAll ()
 
bool savePdf (const QString &fileName, int width=0, int height=0, QCP::ExportPen exportPen=QCP::epAllowCosmetic, const QString &pdfCreator=QString(), const QString &pdfTitle=QString())
 
bool savePng (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
 
bool saveJpg (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
 
bool saveBmp (const QString &fileName, int width=0, int height=0, double scale=1.0, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
 
bool saveRastered (const QString &fileName, int width, int height, double scale, const char *format, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
 
QPixmap toPixmap (int width=0, int height=0, double scale=1.0)
 
void toPainter (QCPPainter *painter, int width=0, int height=0)
 
Q_SLOT void replot (QCustomPlot::RefreshPriority refreshPriority=QCustomPlot::rpRefreshHint)
 
double replotTime (bool average=false) const
 
- - - - - - - - - - - -

-Public Members

QCPAxisxAxis
 
QCPAxisyAxis
 
QCPAxisxAxis2
 
QCPAxisyAxis2
 
QCPLegendlegend
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Signals

void mouseDoubleClick (QMouseEvent *event)
 
void mousePress (QMouseEvent *event)
 
void mouseMove (QMouseEvent *event)
 
void mouseRelease (QMouseEvent *event)
 
void mouseWheel (QWheelEvent *event)
 
void plottableClick (QCPAbstractPlottable *plottable, int dataIndex, QMouseEvent *event)
 
void plottableDoubleClick (QCPAbstractPlottable *plottable, int dataIndex, QMouseEvent *event)
 
void itemClick (QCPAbstractItem *item, QMouseEvent *event)
 
void itemDoubleClick (QCPAbstractItem *item, QMouseEvent *event)
 
void axisClick (QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event)
 
void axisDoubleClick (QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event)
 
void legendClick (QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event)
 
void legendDoubleClick (QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event)
 
void selectionChangedByUser ()
 
void beforeReplot ()
 
void afterLayout ()
 
void afterReplot ()
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Functions

virtual QSize minimumSizeHint () const
 
virtual QSize sizeHint () const
 
virtual void paintEvent (QPaintEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void draw (QCPPainter *painter)
 
virtual void updateLayout ()
 
virtual void axisRemoved (QCPAxis *axis)
 
virtual void legendRemoved (QCPLegend *legend)
 
virtual Q_SLOT void processRectSelection (QRect rect, QMouseEvent *event)
 
virtual Q_SLOT void processRectZoom (QRect rect, QMouseEvent *event)
 
virtual Q_SLOT void processPointSelection (QMouseEvent *event)
 
bool registerPlottable (QCPAbstractPlottable *plottable)
 
bool registerGraph (QCPGraph *graph)
 
bool registerItem (QCPAbstractItem *item)
 
void updateLayerIndices () const
 
QCPLayerablelayerableAt (const QPointF &pos, bool onlySelectable, QVariant *selectionDetails=nullptr) const
 
QList< QCPLayerable * > layerableListAt (const QPointF &pos, bool onlySelectable, QList< QVariant > *selectionDetails=nullptr) const
 
void drawBackground (QCPPainter *painter)
 
void setupPaintBuffers ()
 
QCPAbstractPaintBuffercreatePaintBuffer ()
 
bool hasInvalidatedPaintBuffers ()
 
bool setupOpenGl ()
 
void freeOpenGl ()
 
-

Detailed Description

-

The central class of the library. This is the QWidget which displays the plot and interacts with the user.

-

For tutorials on how to use QCustomPlot, see the website
-https://www.qcustomplot.com/

-

Member Enumeration Documentation

- -

§ LayerInsertMode

- -
-
-

Defines how a layer should be inserted relative to an other layer.

-
See also
addLayer, moveLayer
- - - -
Enumerator
limBelow 

Layer is inserted below other layer.

-
limAbove 

Layer is inserted above other layer.

-
- -
-
- -

§ RefreshPriority

- -
-
-

Defines with what timing the QCustomPlot surface is refreshed after a replot.

-
See also
replot
- - - - - -
Enumerator
rpImmediateRefresh 

Replots immediately and repaints the widget immediately by calling QWidget::repaint() after the replot.

-
rpQueuedRefresh 

Replots immediately, but queues the widget repaint, by calling QWidget::update() after the replot. This way multiple redundant widget repaints can be avoided.

-
rpRefreshHint 

Whether to use immediate or queued refresh depends on whether the plotting hint QCP::phImmediateRefresh is set, see setPlottingHints.

-
rpQueuedReplot 

Queues the entire replot for the next event loop iteration. This way multiple redundant replots can be avoided. The actual replot is then done with rpRefreshHint priority.

-
- -
-
-

Constructor & Destructor Documentation

- -

§ QCustomPlot()

- -
-
- - - - - -
- - - - - - - - -
QCustomPlot::QCustomPlot (QWidget * parent = nullptr)
-
-explicit
-
-

Constructs a QCustomPlot and sets reasonable default values.

- -
-
-

Member Function Documentation

- -

§ plotLayout()

- -
-
- - - - - -
- - - - - - - -
QCPLayoutGrid * QCustomPlot::plotLayout () const
-
-inline
-
-

Returns the top level layout of this QCustomPlot instance. It is a QCPLayoutGrid, initially containing just one cell with the main QCPAxisRect inside.

- -
-
- -

§ selectionRect()

- -
-
- - - - - -
- - - - - - - -
QCPSelectionRect * QCustomPlot::selectionRect () const
-
-inline
-
-

Allows access to the currently used QCPSelectionRect instance (or subclass thereof), that is used to handle and draw selection rect interactions (see setSelectionRectMode).

-
See also
setSelectionRect
- -
-
- -

§ setViewport()

- -
-
- - - - - - - - -
void QCustomPlot::setViewport (const QRect & rect)
-
-

Sets the viewport of this QCustomPlot. Usually users of QCustomPlot don't need to change the viewport manually.

-

The viewport is the area in which the plot is drawn. All mechanisms, e.g. margin calculation take the viewport to be the outer border of the plot. The viewport normally is the rect() of the QCustomPlot widget, i.e. a rect with top left (0, 0) and size of the QCustomPlot widget.

-

Don't confuse the viewport with the axis rect (QCustomPlot::axisRect). An axis rect is typically an area enclosed by four axes, where the graphs/plottables are drawn in. The viewport is larger and contains also the axes themselves, their tick numbers, their labels, or even additional axis rects, color scales and other layout elements.

-

This function is used to allow arbitrary size exports with toPixmap, savePng, savePdf, etc. by temporarily changing the viewport size.

- -
-
- -

§ setBufferDevicePixelRatio()

- -
-
- - - - - - - - -
void QCustomPlot::setBufferDevicePixelRatio (double ratio)
-
-

Sets the device pixel ratio used by the paint buffers of this QCustomPlot instance.

-

Normally, this doesn't need to be set manually, because it is initialized with the regular QWidget::devicePixelRatio which is configured by Qt to fit the display device (e.g. 1 for normal displays, 2 for High-DPI displays).

-

Device pixel ratios are supported by Qt only for Qt versions since 5.4. If this method is called when QCustomPlot is being used with older Qt versions, outputs an according qDebug message and leaves the internal buffer device pixel ratio at 1.0.

- -
-
- -

§ setBackground() [1/3]

- -
-
- - - - - - - - -
void QCustomPlot::setBackground (const QPixmap & pm)
-
-

Sets pm as the viewport background pixmap (see setViewport). The pixmap is always drawn below all other objects in the plot.

-

For cases where the provided pixmap doesn't have the same size as the viewport, scaling can be enabled with setBackgroundScaled and the scaling mode (whether and how the aspect ratio is preserved) can be set with setBackgroundScaledMode. To set all these options in one call, consider using the overloaded version of this function.

-

If a background brush was set with setBackground(const QBrush &brush), the viewport will first be filled with that brush, before drawing the background pixmap. This can be useful for background pixmaps with translucent areas.

-
See also
setBackgroundScaled, setBackgroundScaledMode
- -
-
- -

§ setBackground() [2/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCustomPlot::setBackground (const QPixmap & pm,
bool scaled,
Qt::AspectRatioMode mode = Qt::KeepAspectRatioByExpanding 
)
-
-

This is an overloaded function.

-

Allows setting the background pixmap of the viewport, whether it shall be scaled and how it shall be scaled in one call.

-
See also
setBackground(const QPixmap &pm), setBackgroundScaled, setBackgroundScaledMode
- -
-
- -

§ setBackground() [3/3]

- -
-
- - - - - - - - -
void QCustomPlot::setBackground (const QBrush & brush)
-
-

Sets the background brush of the viewport (see setViewport).

-

Before drawing everything else, the background is filled with brush. If a background pixmap was set with setBackground(const QPixmap &pm), this brush will be used to fill the viewport before the background pixmap is drawn. This can be useful for background pixmaps with translucent areas.

-

Set brush to Qt::NoBrush or Qt::Transparent to leave background transparent. This can be useful for exporting to image formats which support transparency, e.g. savePng.

-
See also
setBackgroundScaled, setBackgroundScaledMode
- -
-
- -

§ setBackgroundScaled()

- -
-
- - - - - - - - -
void QCustomPlot::setBackgroundScaled (bool scaled)
-
-

Sets whether the viewport background pixmap shall be scaled to fit the viewport. If scaled is set to true, control whether and how the aspect ratio of the original pixmap is preserved with setBackgroundScaledMode.

-

Note that the scaled version of the original pixmap is buffered, so there is no performance penalty on replots. (Except when the viewport dimensions are changed continuously.)

-
See also
setBackground, setBackgroundScaledMode
- -
-
- -

§ setBackgroundScaledMode()

- -
-
- - - - - - - - -
void QCustomPlot::setBackgroundScaledMode (Qt::AspectRatioMode mode)
-
-

If scaling of the viewport background pixmap is enabled (setBackgroundScaled), use this function to define whether and how the aspect ratio of the original pixmap is preserved.

-
See also
setBackground, setBackgroundScaled
- -
-
- -

§ setAntialiasedElements()

- -
-
- - - - - - - - -
void QCustomPlot::setAntialiasedElements (const QCP::AntialiasedElements & antialiasedElements)
-
-

Sets which elements are forcibly drawn antialiased as an or combination of QCP::AntialiasedElement.

-

This overrides the antialiasing settings for whole element groups, normally controlled with the setAntialiasing function on the individual elements. If an element is neither specified in setAntialiasedElements nor in setNotAntialiasedElements, the antialiasing setting on each individual element instance is used.

-

For example, if antialiasedElements contains QCP::aePlottables, all plottables will be drawn antialiased, no matter what the specific QCPAbstractPlottable::setAntialiased value was set to.

-

if an element in antialiasedElements is already set in setNotAntialiasedElements, it is removed from there.

-
See also
setNotAntialiasedElements
- -
-
- -

§ setAntialiasedElement()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCustomPlot::setAntialiasedElement (QCP::AntialiasedElement antialiasedElement,
bool enabled = true 
)
-
-

Sets whether the specified antialiasedElement is forcibly drawn antialiased.

-

See setAntialiasedElements for details.

-
See also
setNotAntialiasedElement
- -
-
- -

§ setNotAntialiasedElements()

- -
-
- - - - - - - - -
void QCustomPlot::setNotAntialiasedElements (const QCP::AntialiasedElements & notAntialiasedElements)
-
-

Sets which elements are forcibly drawn not antialiased as an or combination of QCP::AntialiasedElement.

-

This overrides the antialiasing settings for whole element groups, normally controlled with the setAntialiasing function on the individual elements. If an element is neither specified in setAntialiasedElements nor in setNotAntialiasedElements, the antialiasing setting on each individual element instance is used.

-

For example, if notAntialiasedElements contains QCP::aePlottables, no plottables will be drawn antialiased, no matter what the specific QCPAbstractPlottable::setAntialiased value was set to.

-

if an element in notAntialiasedElements is already set in setAntialiasedElements, it is removed from there.

-
See also
setAntialiasedElements
- -
-
- -

§ setNotAntialiasedElement()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCustomPlot::setNotAntialiasedElement (QCP::AntialiasedElement notAntialiasedElement,
bool enabled = true 
)
-
-

Sets whether the specified notAntialiasedElement is forcibly drawn not antialiased.

-

See setNotAntialiasedElements for details.

-
See also
setAntialiasedElement
- -
-
- -

§ setAutoAddPlottableToLegend()

- -
-
- - - - - - - - -
void QCustomPlot::setAutoAddPlottableToLegend (bool on)
-
-

If set to true, adding a plottable (e.g. a graph) to the QCustomPlot automatically also adds the plottable to the legend (QCustomPlot::legend).

-
See also
addGraph, QCPLegend::addItem
- -
-
- -

§ setInteractions()

- -
-
- - - - - - - - -
void QCustomPlot::setInteractions (const QCP::Interactions & interactions)
-
-

Sets the possible interactions of this QCustomPlot as an or-combination of QCP::Interaction enums. There are the following types of interactions:

-

Axis range manipulation is controlled via QCP::iRangeDrag and QCP::iRangeZoom. When the respective interaction is enabled, the user may drag axes ranges and zoom with the mouse wheel. For details how to control which axes the user may drag/zoom and in what orientations, see QCPAxisRect::setRangeDrag, QCPAxisRect::setRangeZoom, QCPAxisRect::setRangeDragAxes, QCPAxisRect::setRangeZoomAxes.

-

Plottable data selection is controlled by QCP::iSelectPlottables. If QCP::iSelectPlottables is set, the user may select plottables (graphs, curves, bars,...) and their data by clicking on them or in their vicinity (setSelectionTolerance). Whether the user can actually select a plottable and its data can further be restricted with the QCPAbstractPlottable::setSelectable method on the specific plottable. For details, see the special page about the data selection mechanism. To retrieve a list of all currently selected plottables, call selectedPlottables. If you're only interested in QCPGraphs, you may use the convenience function selectedGraphs.

-

Item selection is controlled by QCP::iSelectItems. If QCP::iSelectItems is set, the user may select items (QCPItemLine, QCPItemText,...) by clicking on them or in their vicinity. To find out whether a specific item is selected, call QCPAbstractItem::selected(). To retrieve a list of all currently selected items, call selectedItems.

-

Axis selection is controlled with QCP::iSelectAxes. If QCP::iSelectAxes is set, the user may select parts of the axes by clicking on them. What parts exactly (e.g. Axis base line, tick labels, axis label) are selectable can be controlled via QCPAxis::setSelectableParts for each axis. To retrieve a list of all axes that currently contain selected parts, call selectedAxes. Which parts of an axis are selected, can be retrieved with QCPAxis::selectedParts().

-

Legend selection is controlled with QCP::iSelectLegend. If this is set, the user may select the legend itself or individual items by clicking on them. What parts exactly are selectable can be controlled via QCPLegend::setSelectableParts. To find out whether the legend or any of its child items are selected, check the value of QCPLegend::selectedParts. To find out which child items are selected, call QCPLegend::selectedItems.

-

All other selectable elements The selection of all other selectable objects (e.g. QCPTextElement, or your own layerable subclasses) is controlled with QCP::iSelectOther. If set, the user may select those objects by clicking on them. To find out which are currently selected, you need to check their selected state explicitly.

-

If the selection state has changed by user interaction, the selectionChangedByUser signal is emitted. Each selectable object additionally emits an individual selectionChanged signal whenever their selection state has changed, i.e. not only by user interaction.

-

To allow multiple objects to be selected by holding the selection modifier (setMultiSelectModifier), set the flag QCP::iMultiSelect.

-
Note
In addition to the selection mechanism presented here, QCustomPlot always emits corresponding signals, when an object is clicked or double clicked. see plottableClick and plottableDoubleClick for example.
-
See also
setInteraction, setSelectionTolerance
- -
-
- -

§ setInteraction()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCustomPlot::setInteraction (const QCP::Interactioninteraction,
bool enabled = true 
)
-
-

Sets the single interaction of this QCustomPlot to enabled.

-

For details about the interaction system, see setInteractions.

-
See also
setInteractions
- -
-
- -

§ setSelectionTolerance()

- -
-
- - - - - - - - -
void QCustomPlot::setSelectionTolerance (int pixels)
-
-

Sets the tolerance that is used to decide whether a click selects an object (e.g. a plottable) or not.

-

If the user clicks in the vicinity of the line of e.g. a QCPGraph, it's only regarded as a potential selection when the minimum distance between the click position and the graph line is smaller than pixels. Objects that are defined by an area (e.g. QCPBars) only react to clicks directly inside the area and ignore this selection tolerance. In other words, it only has meaning for parts of objects that are too thin to exactly hit with a click and thus need such a tolerance.

-
See also
setInteractions, QCPLayerable::selectTest
- -
-
- -

§ setNoAntialiasingOnDrag()

- -
-
- - - - - - - - -
void QCustomPlot::setNoAntialiasingOnDrag (bool enabled)
-
-

Sets whether antialiasing is disabled for this QCustomPlot while the user is dragging axes ranges. If many objects, especially plottables, are drawn antialiased, this greatly improves performance during dragging. Thus it creates a more responsive user experience. As soon as the user stops dragging, the last replot is done with normal antialiasing, to restore high image quality.

-
See also
setAntialiasedElements, setNotAntialiasedElements
- -
-
- -

§ setPlottingHints()

- -
-
- - - - - - - - -
void QCustomPlot::setPlottingHints (const QCP::PlottingHints & hints)
-
-

Sets the plotting hints for this QCustomPlot instance as an or combination of QCP::PlottingHint.

-
See also
setPlottingHint
- -
-
- -

§ setPlottingHint()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCustomPlot::setPlottingHint (QCP::PlottingHint hint,
bool enabled = true 
)
-
-

Sets the specified plotting hint to enabled.

-
See also
setPlottingHints
- -
-
- -

§ setMultiSelectModifier()

- -
-
- - - - - - - - -
void QCustomPlot::setMultiSelectModifier (Qt::KeyboardModifier modifier)
-
-

Sets the keyboard modifier that will be recognized as multi-select-modifier.

-

If QCP::iMultiSelect is specified in setInteractions, the user may select multiple objects (or data points) by clicking on them one after the other while holding down modifier.

-

By default the multi-select-modifier is set to Qt::ControlModifier.

-
See also
setInteractions
- -
-
- -

§ setSelectionRectMode()

- -
-
- - - - - - - - -
void QCustomPlot::setSelectionRectMode (QCP::SelectionRectMode mode)
-
-

Sets how QCustomPlot processes mouse click-and-drag interactions by the user.

-

If mode is QCP::srmNone, the mouse drag is forwarded to the underlying objects. For example, QCPAxisRect may process a mouse drag by dragging axis ranges, see QCPAxisRect::setRangeDrag. If mode is not QCP::srmNone, the current selection rect (selectionRect) becomes activated and allows e.g. rect zooming and data point selection.

-

If you wish to provide your user both with axis range dragging and data selection/range zooming, use this method to switch between the modes just before the interaction is processed, e.g. in reaction to the mousePress or mouseMove signals. For example you could check whether the user is holding a certain keyboard modifier, and then decide which mode shall be set.

-

If a selection rect interaction is currently active, and mode is set to QCP::srmNone, the interaction is canceled (QCPSelectionRect::cancel). Switching between any of the other modes will keep the selection rect active. Upon completion of the interaction, the behaviour is as defined by the currently set mode, not the mode that was set when the interaction started.

-
See also
setInteractions, setSelectionRect, QCPSelectionRect
- -
-
- -

§ setSelectionRect()

- -
-
- - - - - - - - -
void QCustomPlot::setSelectionRect (QCPSelectionRectselectionRect)
-
-

Sets the QCPSelectionRect instance that QCustomPlot will use if mode is not QCP::srmNone and the user performs a click-and-drag interaction. QCustomPlot takes ownership of the passed selectionRect. It can be accessed later via selectionRect.

-

This method is useful if you wish to replace the default QCPSelectionRect instance with an instance of a QCPSelectionRect subclass, to introduce custom behaviour of the selection rect.

-
See also
setSelectionRectMode
- -
-
- -

§ setOpenGl()

- -
-
- - - - - - - - - - - - - - - - - - -
void QCustomPlot::setOpenGl (bool enabled,
int multisampling = 16 
)
-
-
Warning
This is still an experimental feature and its performance depends on the system that it runs on. Having multiple QCustomPlot widgets in one application with enabled OpenGL rendering might cause context conflicts on some systems.
-

This method allows to enable OpenGL plot rendering, for increased plotting performance of graphically demanding plots (thick lines, translucent fills, etc.).

-

If enabled is set to true, QCustomPlot will try to initialize OpenGL and, if successful, continue plotting with hardware acceleration. The parameter multisampling controls how many samples will be used per pixel, it essentially controls the antialiasing quality. If multisampling is set too high for the current graphics hardware, the maximum allowed value will be used.

-

You can test whether switching to OpenGL rendering was successful by checking whether the according getter QCustomPlot::openGl() returns true. If the OpenGL initialization fails, rendering continues with the regular software rasterizer, and an according qDebug output is generated.

-

If switching to OpenGL was successful, this method disables label caching (setPlottingHint(QCP::phCacheLabels, false)) and turns on QCustomPlot's antialiasing override for all elements (setAntialiasedElements(QCP::aeAll)), leading to a higher quality output. The antialiasing override allows for pixel-grid aligned drawing in the OpenGL paint device. As stated before, in OpenGL rendering the actual antialiasing of the plot is controlled with multisampling. If enabled is set to false, the antialiasing/label caching settings are restored to what they were before OpenGL was enabled, if they weren't altered in the meantime.

-
Note
OpenGL support is only enabled if QCustomPlot is compiled with the macro QCUSTOMPLOT_USE_OPENGL defined. This define must be set before including the QCustomPlot header both during compilation of the QCustomPlot library as well as when compiling your application. It is best to just include the line DEFINES += QCUSTOMPLOT_USE_OPENGL in the respective qmake project files.
-
-If you are using a Qt version before 5.0, you must also add the module "opengl" to your QT variable in the qmake project files. For Qt versions 5.0 and higher, QCustomPlot switches to a newer OpenGL interface which is already in the "gui" module.
- -
-
- -

§ plottable() [1/2]

- -
-
- - - - - - - - -
QCPAbstractPlottable * QCustomPlot::plottable (int index)
-
-

Returns the plottable with index. If the index is invalid, returns nullptr.

-

There is an overloaded version of this function with no parameter which returns the last added plottable, see QCustomPlot::plottable()

-
See also
plottableCount
- -
-
- -

§ plottable() [2/2]

- -
-
- - - - - - - -
QCPAbstractPlottable * QCustomPlot::plottable ()
-
-

This is an overloaded function.

-

Returns the last plottable that was added to the plot. If there are no plottables in the plot, returns nullptr.

-
See also
plottableCount
- -
-
- -

§ removePlottable() [1/2]

- -
-
- - - - - - - - -
bool QCustomPlot::removePlottable (QCPAbstractPlottableplottable)
-
-

Removes the specified plottable from the plot and deletes it. If necessary, the corresponding legend item is also removed from the default legend (QCustomPlot::legend).

-

Returns true on success.

-
See also
clearPlottables
- -
-
- -

§ removePlottable() [2/2]

- -
-
- - - - - - - - -
bool QCustomPlot::removePlottable (int index)
-
-

This is an overloaded function.

-

Removes and deletes the plottable by its index.

- -
-
- -

§ clearPlottables()

- -
-
- - - - - - - -
int QCustomPlot::clearPlottables ()
-
-

Removes all plottables from the plot and deletes them. Corresponding legend items are also removed from the default legend (QCustomPlot::legend).

-

Returns the number of plottables removed.

-
See also
removePlottable
- -
-
- -

§ plottableCount()

- -
-
- - - - - - - -
int QCustomPlot::plottableCount () const
-
-

Returns the number of currently existing plottables in the plot

-
See also
plottable
- -
-
- -

§ selectedPlottables()

- -
-
- - - - - - - -
QList< QCPAbstractPlottable * > QCustomPlot::selectedPlottables () const
-
-

Returns a list of the selected plottables. If no plottables are currently selected, the list is empty.

-

There is a convenience function if you're only interested in selected graphs, see selectedGraphs.

-
See also
setInteractions, QCPAbstractPlottable::setSelectable, QCPAbstractPlottable::setSelection
- -
-
- -

§ plottableAt() [1/2]

- -
-
-
-template<class PlottableType >
- - - - - - - - - - - - - - - - - - - - - - - - -
PlottableType * QCustomPlot::plottableAt (const QPointF & pos,
bool onlySelectable = false,
int * dataIndex = nullptr 
) const
-
-

Returns the plottable at the pixel position pos. The plottable type (a QCPAbstractPlottable subclass) that shall be taken into consideration can be specified via the template parameter.

-

Plottables that only consist of single lines (like graphs) have a tolerance band around them, see setSelectionTolerance. If multiple plottables come into consideration, the one closest to pos is returned.

-

If onlySelectable is true, only plottables that are selectable (QCPAbstractPlottable::setSelectable) are considered.

-

if dataIndex is non-null, it is set to the index of the plottable's data point that is closest to pos.

-

If there is no plottable of the specified type at pos, returns nullptr.

-
See also
itemAt, layoutElementAt
- -
-
- -

§ plottableAt() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPAbstractPlottable * QCustomPlot::plottableAt (const QPointF & pos,
bool onlySelectable = false,
int * dataIndex = nullptr 
) const
-
-

Returns any plottable at the pixel position pos. Since it can capture all plottables, the return type is the abstract base class of all plottables, QCPAbstractPlottable.

-

For details, and if you wish to specify a certain plottable type (e.g. QCPGraph), see the template method plottableAt<PlottableType>()

-
See also
plottableAt<PlottableType>(), itemAt, layoutElementAt
- -
-
- -

§ hasPlottable()

- -
-
- - - - - - - - -
bool QCustomPlot::hasPlottable (QCPAbstractPlottableplottable) const
-
-

Returns whether this QCustomPlot instance contains the plottable.

- -
-
- -

§ graph() [1/2]

- -
-
- - - - - - - - -
QCPGraph * QCustomPlot::graph (int index) const
-
-

Returns the graph with index. If the index is invalid, returns nullptr.

-

There is an overloaded version of this function with no parameter which returns the last created graph, see QCustomPlot::graph()

-
See also
graphCount, addGraph
- -
-
- -

§ graph() [2/2]

- -
-
- - - - - - - -
QCPGraph * QCustomPlot::graph () const
-
-

This is an overloaded function.

-

Returns the last graph, that was created with addGraph. If there are no graphs in the plot, returns nullptr.

-
See also
graphCount, addGraph
- -
-
- -

§ addGraph()

- -
-
- - - - - - - - - - - - - - - - - - -
QCPGraph * QCustomPlot::addGraph (QCPAxiskeyAxis = nullptr,
QCPAxisvalueAxis = nullptr 
)
-
-

Creates a new graph inside the plot. If keyAxis and valueAxis are left unspecified (0), the bottom (xAxis) is used as key and the left (yAxis) is used as value axis. If specified, keyAxis and valueAxis must reside in this QCustomPlot.

-

keyAxis will be used as key axis (typically "x") and valueAxis as value axis (typically "y") for the graph.

-

Returns a pointer to the newly created graph, or nullptr if adding the graph failed.

-
See also
graph, graphCount, removeGraph, clearGraphs
- -
-
- -

§ removeGraph() [1/2]

- -
-
- - - - - - - - -
bool QCustomPlot::removeGraph (QCPGraphgraph)
-
-

Removes the specified graph from the plot and deletes it. If necessary, the corresponding legend item is also removed from the default legend (QCustomPlot::legend). If any other graphs in the plot have a channel fill set towards the removed graph, the channel fill property of those graphs is reset to nullptr (no channel fill).

-

Returns true on success.

-
See also
clearGraphs
- -
-
- -

§ removeGraph() [2/2]

- -
-
- - - - - - - - -
bool QCustomPlot::removeGraph (int index)
-
-

This is an overloaded function.

-

Removes and deletes the graph by its index.

- -
-
- -

§ clearGraphs()

- -
-
- - - - - - - -
int QCustomPlot::clearGraphs ()
-
-

Removes all graphs from the plot and deletes them. Corresponding legend items are also removed from the default legend (QCustomPlot::legend).

-

Returns the number of graphs removed.

-
See also
removeGraph
- -
-
- -

§ graphCount()

- -
-
- - - - - - - -
int QCustomPlot::graphCount () const
-
-

Returns the number of currently existing graphs in the plot

-
See also
graph, addGraph
- -
-
- -

§ selectedGraphs()

- -
-
- - - - - - - -
QList< QCPGraph * > QCustomPlot::selectedGraphs () const
-
-

Returns a list of the selected graphs. If no graphs are currently selected, the list is empty.

-

If you are not only interested in selected graphs but other plottables like QCPCurve, QCPBars, etc., use selectedPlottables.

-
See also
setInteractions, selectedPlottables, QCPAbstractPlottable::setSelectable, QCPAbstractPlottable::setSelection
- -
-
- -

§ item() [1/2]

- -
-
- - - - - - - - -
QCPAbstractItem * QCustomPlot::item (int index) const
-
-

Returns the item with index. If the index is invalid, returns nullptr.

-

There is an overloaded version of this function with no parameter which returns the last added item, see QCustomPlot::item()

-
See also
itemCount
- -
-
- -

§ item() [2/2]

- -
-
- - - - - - - -
QCPAbstractItem * QCustomPlot::item () const
-
-

This is an overloaded function.

-

Returns the last item that was added to this plot. If there are no items in the plot, returns nullptr.

-
See also
itemCount
- -
-
- -

§ removeItem() [1/2]

- -
-
- - - - - - - - -
bool QCustomPlot::removeItem (QCPAbstractItemitem)
-
-

Removes the specified item from the plot and deletes it.

-

Returns true on success.

-
See also
clearItems
- -
-
- -

§ removeItem() [2/2]

- -
-
- - - - - - - - -
bool QCustomPlot::removeItem (int index)
-
-

This is an overloaded function.

-

Removes and deletes the item by its index.

- -
-
- -

§ clearItems()

- -
-
- - - - - - - -
int QCustomPlot::clearItems ()
-
-

Removes all items from the plot and deletes them.

-

Returns the number of items removed.

-
See also
removeItem
- -
-
- -

§ itemCount()

- -
-
- - - - - - - -
int QCustomPlot::itemCount () const
-
-

Returns the number of currently existing items in the plot

-
See also
item
- -
-
- -

§ selectedItems()

- -
-
- - - - - - - -
QList< QCPAbstractItem * > QCustomPlot::selectedItems () const
-
-

Returns a list of the selected items. If no items are currently selected, the list is empty.

-
See also
setInteractions, QCPAbstractItem::setSelectable, QCPAbstractItem::setSelected
- -
-
- -

§ itemAt() [1/2]

- -
-
-
-template<class ItemType >
- - - - - - - - - - - - - - - - - - -
ItemType * QCustomPlot::itemAt (const QPointF & pos,
bool onlySelectable = false 
) const
-
-

Returns the item at the pixel position pos. The item type (a QCPAbstractItem subclass) that shall be taken into consideration can be specified via the template parameter. Items that only consist of single lines (e.g. QCPItemLine or QCPItemCurve) have a tolerance band around them, see setSelectionTolerance. If multiple items come into consideration, the one closest to pos is returned.

-

If onlySelectable is true, only items that are selectable (QCPAbstractItem::setSelectable) are considered.

-

If there is no item at pos, returns nullptr.

-
See also
plottableAt, layoutElementAt
- -
-
- -

§ itemAt() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
QCPAbstractItem * QCustomPlot::itemAt (const QPointF & pos,
bool onlySelectable = false 
) const
-
-

Returns the item at the pixel position pos. Since it can capture all items, the return type is the abstract base class of all items, QCPAbstractItem.

-

For details, and if you wish to specify a certain item type (e.g. QCPItemLine), see the template method itemAt<ItemType>()

-
See also
itemAt<ItemType>(), plottableAt, layoutElementAt
- -
-
- -

§ hasItem()

- -
-
- - - - - - - - -
bool QCustomPlot::hasItem (QCPAbstractItemitem) const
-
-

Returns whether this QCustomPlot contains the item.

-
See also
item
- -
-
- -

§ layer() [1/2]

- -
-
- - - - - - - - -
QCPLayer * QCustomPlot::layer (const QString & name) const
-
-

Returns the layer with the specified name. If there is no layer with the specified name, nullptr is returned.

-

Layer names are case-sensitive.

-
See also
addLayer, moveLayer, removeLayer
- -
-
- -

§ layer() [2/2]

- -
-
- - - - - - - - -
QCPLayer * QCustomPlot::layer (int index) const
-
-

This is an overloaded function.

-

Returns the layer by index. If the index is invalid, nullptr is returned.

-
See also
addLayer, moveLayer, removeLayer
- -
-
- -

§ currentLayer()

- -
-
- - - - - - - -
QCPLayer * QCustomPlot::currentLayer () const
-
-

Returns the layer that is set as current layer (see setCurrentLayer).

- -
-
- -

§ setCurrentLayer() [1/2]

- -
-
- - - - - - - - -
bool QCustomPlot::setCurrentLayer (const QString & name)
-
-

Sets the layer with the specified name to be the current layer. All layerables (QCPLayerable), e.g. plottables and items, are created on the current layer.

-

Returns true on success, i.e. if there is a layer with the specified name in the QCustomPlot.

-

Layer names are case-sensitive.

-
See also
addLayer, moveLayer, removeLayer, QCPLayerable::setLayer
- -
-
- -

§ setCurrentLayer() [2/2]

- -
-
- - - - - - - - -
bool QCustomPlot::setCurrentLayer (QCPLayerlayer)
-
-

This is an overloaded function.

-

Sets the provided layer to be the current layer.

-

Returns true on success, i.e. when layer is a valid layer in the QCustomPlot.

-
See also
addLayer, moveLayer, removeLayer
- -
-
- -

§ layerCount()

- -
-
- - - - - - - -
int QCustomPlot::layerCount () const
-
-

Returns the number of currently existing layers in the plot

-
See also
layer, addLayer
- -
-
- -

§ addLayer()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool QCustomPlot::addLayer (const QString & name,
QCPLayerotherLayer = nullptr,
QCustomPlot::LayerInsertMode insertMode = limAbove 
)
-
-

Adds a new layer to this QCustomPlot instance. The new layer will have the name name, which must be unique. Depending on insertMode, it is positioned either below or above otherLayer.

-

Returns true on success, i.e. if there is no other layer named name and otherLayer is a valid layer inside this QCustomPlot.

-

If otherLayer is 0, the highest layer in the QCustomPlot will be used.

-

For an explanation of what layers are in QCustomPlot, see the documentation of QCPLayer.

-
See also
layer, moveLayer, removeLayer
- -
-
- -

§ removeLayer()

- -
-
- - - - - - - - -
bool QCustomPlot::removeLayer (QCPLayerlayer)
-
-

Removes the specified layer and returns true on success.

-

All layerables (e.g. plottables and items) on the removed layer will be moved to the layer below layer. If layer is the bottom layer, the layerables are moved to the layer above. In both cases, the total rendering order of all layerables in the QCustomPlot is preserved.

-

If layer is the current layer (setCurrentLayer), the layer below (or above, if bottom layer) becomes the new current layer.

-

It is not possible to remove the last layer of the plot.

-
See also
layer, addLayer, moveLayer
- -
-
- -

§ moveLayer()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool QCustomPlot::moveLayer (QCPLayerlayer,
QCPLayerotherLayer,
QCustomPlot::LayerInsertMode insertMode = limAbove 
)
-
-

Moves the specified layer either above or below otherLayer. Whether it's placed above or below is controlled with insertMode.

-

Returns true on success, i.e. when both layer and otherLayer are valid layers in the QCustomPlot.

-
See also
layer, addLayer, moveLayer
- -
-
- -

§ axisRectCount()

- -
-
- - - - - - - -
int QCustomPlot::axisRectCount () const
-
-

Returns the number of axis rects in the plot.

-

All axis rects can be accessed via QCustomPlot::axisRect().

-

Initially, only one axis rect exists in the plot.

-
See also
axisRect, axisRects
- -
-
- -

§ axisRect()

- -
-
- - - - - - - - -
QCPAxisRect * QCustomPlot::axisRect (int index = 0) const
-
-

Returns the axis rect with index.

-

Initially, only one axis rect (with index 0) exists in the plot. If multiple axis rects were added, all of them may be accessed with this function in a linear fashion (even when they are nested in a layout hierarchy or inside other axis rects via QCPAxisRect::insetLayout).

-

The order of the axis rects is given by the fill order of the QCPLayout that is holding them. For example, if the axis rects are in the top level grid layout (accessible via QCustomPlot::plotLayout), they are ordered from left to right, top to bottom, if the layout's default setFillOrder of foColumnsFirst wasn't changed.

-

If you want to access axis rects by their row and column index, use the layout interface. For example, use QCPLayoutGrid::element of the top level grid layout, and qobject_cast the returned layout element to QCPAxisRect. (See also The Layout System.)

-
See also
axisRectCount, axisRects, QCPLayoutGrid::setFillOrder
- -
-
- -

§ axisRects()

- -
-
- - - - - - - -
QList< QCPAxisRect * > QCustomPlot::axisRects () const
-
-

Returns all axis rects in the plot.

-

The order of the axis rects is given by the fill order of the QCPLayout that is holding them. For example, if the axis rects are in the top level grid layout (accessible via QCustomPlot::plotLayout), they are ordered from left to right, top to bottom, if the layout's default setFillOrder of foColumnsFirst wasn't changed.

-
See also
axisRectCount, axisRect, QCPLayoutGrid::setFillOrder
- -
-
- -

§ layoutElementAt()

- -
-
- - - - - - - - -
QCPLayoutElement * QCustomPlot::layoutElementAt (const QPointF & pos) const
-
-

Returns the layout element at pixel position pos. If there is no element at that position, returns nullptr.

-

Only visible elements are used. If QCPLayoutElement::setVisible on the element itself or on any of its parent elements is set to false, it will not be considered.

-
See also
itemAt, plottableAt
- -
-
- -

§ axisRectAt()

- -
-
- - - - - - - - -
QCPAxisRect * QCustomPlot::axisRectAt (const QPointF & pos) const
-
-

Returns the layout element of type QCPAxisRect at pixel position pos. This method ignores other layout elements even if they are visually in front of the axis rect (e.g. a QCPLegend). If there is no axis rect at that position, returns nullptr.

-

Only visible axis rects are used. If QCPLayoutElement::setVisible on the axis rect itself or on any of its parent elements is set to false, it will not be considered.

-
See also
layoutElementAt
- -
-
- -

§ rescaleAxes()

- -
-
- - - - - - - - -
void QCustomPlot::rescaleAxes (bool onlyVisiblePlottables = false)
-
-

Rescales the axes such that all plottables (like graphs) in the plot are fully visible.

-

if onlyVisiblePlottables is set to true, only the plottables that have their visibility set to true (QCPLayerable::setVisible), will be used to rescale the axes.

-
See also
QCPAbstractPlottable::rescaleAxes, QCPAxis::rescale
- -
-
- -

§ selectedAxes()

- -
-
- - - - - - - -
QList< QCPAxis * > QCustomPlot::selectedAxes () const
-
-

Returns the axes that currently have selected parts, i.e. whose selection state is not QCPAxis::spNone.

-
See also
selectedPlottables, selectedLegends, setInteractions, QCPAxis::setSelectedParts, QCPAxis::setSelectableParts
- -
-
- -

§ selectedLegends()

- -
-
- - - - - - - -
QList< QCPLegend * > QCustomPlot::selectedLegends () const
-
-

Returns the legends that currently have selected parts, i.e. whose selection state is not QCPLegend::spNone.

-
See also
selectedPlottables, selectedAxes, setInteractions, QCPLegend::setSelectedParts, QCPLegend::setSelectableParts, QCPLegend::selectedItems
- -
-
- -

§ deselectAll()

- -
-
- - - - - - - -
void QCustomPlot::deselectAll ()
-
-

Deselects all layerables (plottables, items, axes, legends,...) of the QCustomPlot.

-

Since calling this function is not a user interaction, this does not emit the selectionChangedByUser signal. The individual selectionChanged signals are emitted though, if the objects were previously selected.

-
See also
setInteractions, selectedPlottables, selectedItems, selectedAxes, selectedLegends
- -
-
- -

§ savePdf()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool QCustomPlot::savePdf (const QString & fileName,
int width = 0,
int height = 0,
QCP::ExportPen exportPen = QCP::epAllowCosmetic,
const QString & pdfCreator = QString(),
const QString & pdfTitle = QString() 
)
-
-

Saves a PDF with the vectorized plot to the file fileName. The axis ratio as well as the scale of texts and lines will be derived from the specified width and height. This means, the output will look like the normal on-screen output of a QCustomPlot widget with the corresponding pixel width and height. If either width or height is zero, the exported image will have the same dimensions as the QCustomPlot widget currently has.

-

Setting exportPen to QCP::epNoCosmetic allows to disable the use of cosmetic pens when drawing to the PDF file. Cosmetic pens are pens with numerical width 0, which are always drawn as a one pixel wide line, no matter what zoom factor is set in the PDF-Viewer. For more information about cosmetic pens, see the QPainter and QPen documentation.

-

The objects of the plot will appear in the current selection state. If you don't want any selected objects to be painted in their selected look, deselect everything with deselectAll before calling this function.

-

Returns true on success.

-
Warning
    -
  • If you plan on editing the exported PDF file with a vector graphics editor like Inkscape, it is advised to set exportPen to QCP::epNoCosmetic to avoid losing those cosmetic lines (which might be quite many, because cosmetic pens are the default for e.g. axes and tick marks).
  • -
  • If calling this function inside the constructor of the parent of the QCustomPlot widget (i.e. the MainWindow constructor, if QCustomPlot is inside the MainWindow), always provide explicit non-zero widths and heights. If you leave width or height as 0 (default), this function uses the current width and height of the QCustomPlot widget. However, in Qt, these aren't defined yet inside the constructor, so you would get an image that has strange widths/heights.
  • -
-pdfCreator and pdfTitle may be used to set the according metadata fields in the resulting PDF file.
-
Note
On Android systems, this method does nothing and issues an according qDebug warning message. This is also the case if for other reasons the define flag QT_NO_PRINTER is set.
-
See also
savePng, saveBmp, saveJpg, saveRastered
- -
-
- -

§ savePng()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool QCustomPlot::savePng (const QString & fileName,
int width = 0,
int height = 0,
double scale = 1.0,
int quality = -1,
int resolution = 96,
QCP::ResolutionUnit resolutionUnit = QCP::ruDotsPerInch 
)
-
-

Saves a PNG image file to fileName on disc. The output plot will have the dimensions width and height in pixels, multiplied by scale. If either width or height is zero, the current width and height of the QCustomPlot widget is used instead. Line widths and texts etc. are not scaled up when larger widths/heights are used. If you want that effect, use the scale parameter.

-

For example, if you set both width and height to 100 and scale to 2, you will end up with an image file of size 200*200 in which all graphical elements are scaled up by factor 2 (line widths, texts, etc.). This scaling is not done by stretching a 100*100 image, the result will have full 200*200 pixel resolution.

-

If you use a high scaling factor, it is recommended to enable antialiasing for all elements by temporarily setting QCustomPlot::setAntialiasedElements to QCP::aeAll as this allows QCustomPlot to place objects with sub-pixel accuracy.

-

image compression can be controlled with the quality parameter which must be between 0 and 100 or -1 to use the default setting.

-

The resolution will be written to the image file header and has no direct consequence for the quality or the pixel size. However, if opening the image with a tool which respects the metadata, it will be able to scale the image to match either a given size in real units of length (inch, centimeters, etc.), or the target display DPI. You can specify in which units resolution is given, by setting resolutionUnit. The resolution is converted to the format's expected resolution unit internally.

-

Returns true on success. If this function fails, most likely the PNG format isn't supported by the system, see Qt docs about QImageWriter::supportedImageFormats().

-

The objects of the plot will appear in the current selection state. If you don't want any selected objects to be painted in their selected look, deselect everything with deselectAll before calling this function.

-

If you want the PNG to have a transparent background, call setBackground(const QBrush &brush) with no brush (Qt::NoBrush) or a transparent color (Qt::transparent), before saving.

-
Warning
If calling this function inside the constructor of the parent of the QCustomPlot widget (i.e. the MainWindow constructor, if QCustomPlot is inside the MainWindow), always provide explicit non-zero widths and heights. If you leave width or height as 0 (default), this function uses the current width and height of the QCustomPlot widget. However, in Qt, these aren't defined yet inside the constructor, so you would get an image that has strange widths/heights.
-
See also
savePdf, saveBmp, saveJpg, saveRastered
- -
-
- -

§ saveJpg()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool QCustomPlot::saveJpg (const QString & fileName,
int width = 0,
int height = 0,
double scale = 1.0,
int quality = -1,
int resolution = 96,
QCP::ResolutionUnit resolutionUnit = QCP::ruDotsPerInch 
)
-
-

Saves a JPEG image file to fileName on disc. The output plot will have the dimensions width and height in pixels, multiplied by scale. If either width or height is zero, the current width and height of the QCustomPlot widget is used instead. Line widths and texts etc. are not scaled up when larger widths/heights are used. If you want that effect, use the scale parameter.

-

For example, if you set both width and height to 100 and scale to 2, you will end up with an image file of size 200*200 in which all graphical elements are scaled up by factor 2 (line widths, texts, etc.). This scaling is not done by stretching a 100*100 image, the result will have full 200*200 pixel resolution.

-

If you use a high scaling factor, it is recommended to enable antialiasing for all elements by temporarily setting QCustomPlot::setAntialiasedElements to QCP::aeAll as this allows QCustomPlot to place objects with sub-pixel accuracy.

-

image compression can be controlled with the quality parameter which must be between 0 and 100 or -1 to use the default setting.

-

The resolution will be written to the image file header and has no direct consequence for the quality or the pixel size. However, if opening the image with a tool which respects the metadata, it will be able to scale the image to match either a given size in real units of length (inch, centimeters, etc.), or the target display DPI. You can specify in which units resolution is given, by setting resolutionUnit. The resolution is converted to the format's expected resolution unit internally.

-

Returns true on success. If this function fails, most likely the JPEG format isn't supported by the system, see Qt docs about QImageWriter::supportedImageFormats().

-

The objects of the plot will appear in the current selection state. If you don't want any selected objects to be painted in their selected look, deselect everything with deselectAll before calling this function.

-
Warning
If calling this function inside the constructor of the parent of the QCustomPlot widget (i.e. the MainWindow constructor, if QCustomPlot is inside the MainWindow), always provide explicit non-zero widths and heights. If you leave width or height as 0 (default), this function uses the current width and height of the QCustomPlot widget. However, in Qt, these aren't defined yet inside the constructor, so you would get an image that has strange widths/heights.
-
See also
savePdf, savePng, saveBmp, saveRastered
- -
-
- -

§ saveBmp()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool QCustomPlot::saveBmp (const QString & fileName,
int width = 0,
int height = 0,
double scale = 1.0,
int resolution = 96,
QCP::ResolutionUnit resolutionUnit = QCP::ruDotsPerInch 
)
-
-

Saves a BMP image file to fileName on disc. The output plot will have the dimensions width and height in pixels, multiplied by scale. If either width or height is zero, the current width and height of the QCustomPlot widget is used instead. Line widths and texts etc. are not scaled up when larger widths/heights are used. If you want that effect, use the scale parameter.

-

For example, if you set both width and height to 100 and scale to 2, you will end up with an image file of size 200*200 in which all graphical elements are scaled up by factor 2 (line widths, texts, etc.). This scaling is not done by stretching a 100*100 image, the result will have full 200*200 pixel resolution.

-

If you use a high scaling factor, it is recommended to enable antialiasing for all elements by temporarily setting QCustomPlot::setAntialiasedElements to QCP::aeAll as this allows QCustomPlot to place objects with sub-pixel accuracy.

-

The resolution will be written to the image file header and has no direct consequence for the quality or the pixel size. However, if opening the image with a tool which respects the metadata, it will be able to scale the image to match either a given size in real units of length (inch, centimeters, etc.), or the target display DPI. You can specify in which units resolution is given, by setting resolutionUnit. The resolution is converted to the format's expected resolution unit internally.

-

Returns true on success. If this function fails, most likely the BMP format isn't supported by the system, see Qt docs about QImageWriter::supportedImageFormats().

-

The objects of the plot will appear in the current selection state. If you don't want any selected objects to be painted in their selected look, deselect everything with deselectAll before calling this function.

-
Warning
If calling this function inside the constructor of the parent of the QCustomPlot widget (i.e. the MainWindow constructor, if QCustomPlot is inside the MainWindow), always provide explicit non-zero widths and heights. If you leave width or height as 0 (default), this function uses the current width and height of the QCustomPlot widget. However, in Qt, these aren't defined yet inside the constructor, so you would get an image that has strange widths/heights.
-
See also
savePdf, savePng, saveJpg, saveRastered
- -
-
- -

§ saveRastered()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool QCustomPlot::saveRastered (const QString & fileName,
int width,
int height,
double scale,
const char * format,
int quality = -1,
int resolution = 96,
QCP::ResolutionUnit resolutionUnit = QCP::ruDotsPerInch 
)
-
-

Saves the plot to a rastered image file fileName in the image format format. The plot is sized to width and height in pixels and scaled with scale. (width 100 and scale 2.0 lead to a full resolution file with width 200.) If the format supports compression, quality may be between 0 and 100 to control it.

-

Returns true on success. If this function fails, most likely the given format isn't supported by the system, see Qt docs about QImageWriter::supportedImageFormats().

-

The resolution will be written to the image file header (if the file format supports this) and has no direct consequence for the quality or the pixel size. However, if opening the image with a tool which respects the metadata, it will be able to scale the image to match either a given size in real units of length (inch, centimeters, etc.), or the target display DPI. You can specify in which units resolution is given, by setting resolutionUnit. The resolution is converted to the format's expected resolution unit internally.

-
See also
saveBmp, saveJpg, savePng, savePdf
- -
-
- -

§ toPixmap()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
QPixmap QCustomPlot::toPixmap (int width = 0,
int height = 0,
double scale = 1.0 
)
-
-

Renders the plot to a pixmap and returns it.

-

The plot is sized to width and height in pixels and scaled with scale. (width 100 and scale 2.0 lead to a full resolution pixmap with width 200.)

-
See also
toPainter, saveRastered, saveBmp, savePng, saveJpg, savePdf
- -
-
- -

§ toPainter()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCustomPlot::toPainter (QCPPainterpainter,
int width = 0,
int height = 0 
)
-
-

Renders the plot using the passed painter.

-

The plot is sized to width and height in pixels. If the painter's scale is not 1.0, the resulting plot will appear scaled accordingly.

-
Note
If you are restricted to using a QPainter (instead of QCPPainter), create a temporary QPicture and open a QCPPainter on it. Then call toPainter with this QCPPainter. After ending the paint operation on the picture, draw it with the QPainter. This will reproduce the painter actions the QCPPainter took, with a QPainter.
-
See also
toPixmap
- -
-
- -

§ replot()

- -
-
- - - - - - - - -
void QCustomPlot::replot (QCustomPlot::RefreshPriority refreshPriority = QCustomPlot::rpRefreshHint)
-
-

Causes a complete replot into the internal paint buffer(s). Finally, the widget surface is refreshed with the new buffer contents. This is the method that must be called to make changes to the plot, e.g. on the axis ranges or data points of graphs, visible.

-

The parameter refreshPriority can be used to fine-tune the timing of the replot. For example if your application calls replot very quickly in succession (e.g. multiple independent functions change some aspects of the plot and each wants to make sure the change gets replotted), it is advisable to set refreshPriority to QCustomPlot::rpQueuedReplot. This way, the actual replotting is deferred to the next event loop iteration. Multiple successive calls of replot with this priority will only cause a single replot, avoiding redundant replots and improving performance.

-

Under a few circumstances, QCustomPlot causes a replot by itself. Those are resize events of the QCustomPlot widget and user interactions (object selection and range dragging/zooming).

-

Before the replot happens, the signal beforeReplot is emitted. After the replot, afterReplot is emitted. It is safe to mutually connect the replot slot with any of those two signals on two QCustomPlots to make them replot synchronously, it won't cause an infinite recursion.

-

If a layer is in mode QCPLayer::lmBuffered (QCPLayer::setMode), it is also possible to replot only that specific layer via QCPLayer::replot. See the documentation there for details.

-
See also
replotTime
- -
-
- -

§ replotTime()

- -
-
- - - - - - - - -
double QCustomPlot::replotTime (bool average = false) const
-
-

Returns the time in milliseconds that the last replot took. If average is set to true, an exponential moving average over the last couple of replots is returned.

-
See also
replot
- -
-
- -

§ mouseDoubleClick

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::mouseDoubleClick (QMouseEvent * event)
-
-signal
-
-

This signal is emitted when the QCustomPlot receives a mouse double click event.

- -
-
- -

§ mousePress

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::mousePress (QMouseEvent * event)
-
-signal
-
-

This signal is emitted when the QCustomPlot receives a mouse press event.

-

It is emitted before QCustomPlot handles any other mechanism like range dragging. So a slot connected to this signal can still influence the behaviour e.g. with QCPAxisRect::setRangeDrag or QCPAxisRect::setRangeDragAxes.

- -
-
- -

§ mouseMove

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::mouseMove (QMouseEvent * event)
-
-signal
-
-

This signal is emitted when the QCustomPlot receives a mouse move event.

-

It is emitted before QCustomPlot handles any other mechanism like range dragging. So a slot connected to this signal can still influence the behaviour e.g. with QCPAxisRect::setRangeDrag or QCPAxisRect::setRangeDragAxes.

-
Warning
It is discouraged to change the drag-axes with QCPAxisRect::setRangeDragAxes here, because the dragging starting point was saved the moment the mouse was pressed. Thus it only has a meaning for the range drag axes that were set at that moment. If you want to change the drag axes, consider doing this in the mousePress signal instead.
- -
-
- -

§ mouseRelease

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::mouseRelease (QMouseEvent * event)
-
-signal
-
-

This signal is emitted when the QCustomPlot receives a mouse release event.

-

It is emitted before QCustomPlot handles any other mechanisms like object selection. So a slot connected to this signal can still influence the behaviour e.g. with setInteractions or QCPAbstractPlottable::setSelectable.

- -
-
- -

§ mouseWheel

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::mouseWheel (QWheelEvent * event)
-
-signal
-
-

This signal is emitted when the QCustomPlot receives a mouse wheel event.

-

It is emitted before QCustomPlot handles any other mechanisms like range zooming. So a slot connected to this signal can still influence the behaviour e.g. with QCPAxisRect::setRangeZoom, QCPAxisRect::setRangeZoomAxes or QCPAxisRect::setRangeZoomFactor.

- -
-
- -

§ plottableClick

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCustomPlot::plottableClick (QCPAbstractPlottableplottable,
int dataIndex,
QMouseEvent * event 
)
-
-signal
-
-

This signal is emitted when a plottable is clicked.

-

event is the mouse event that caused the click and plottable is the plottable that received the click. The parameter dataIndex indicates the data point that was closest to the click position.

-
See also
plottableDoubleClick
- -
-
- -

§ plottableDoubleClick

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCustomPlot::plottableDoubleClick (QCPAbstractPlottableplottable,
int dataIndex,
QMouseEvent * event 
)
-
-signal
-
-

This signal is emitted when a plottable is double clicked.

-

event is the mouse event that caused the click and plottable is the plottable that received the click. The parameter dataIndex indicates the data point that was closest to the click position.

-
See also
plottableClick
- -
-
- -

§ itemClick

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCustomPlot::itemClick (QCPAbstractItemitem,
QMouseEvent * event 
)
-
-signal
-
-

This signal is emitted when an item is clicked.

-

event is the mouse event that caused the click and item is the item that received the click.

-
See also
itemDoubleClick
- -
-
- -

§ itemDoubleClick

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCustomPlot::itemDoubleClick (QCPAbstractItemitem,
QMouseEvent * event 
)
-
-signal
-
-

This signal is emitted when an item is double clicked.

-

event is the mouse event that caused the click and item is the item that received the click.

-
See also
itemClick
- -
-
- -

§ axisClick

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCustomPlot::axisClick (QCPAxisaxis,
QCPAxis::SelectablePart part,
QMouseEvent * event 
)
-
-signal
-
-

This signal is emitted when an axis is clicked.

-

event is the mouse event that caused the click, axis is the axis that received the click and part indicates the part of the axis that was clicked.

-
See also
axisDoubleClick
- -
-
- -

§ axisDoubleClick

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCustomPlot::axisDoubleClick (QCPAxisaxis,
QCPAxis::SelectablePart part,
QMouseEvent * event 
)
-
-signal
-
-

This signal is emitted when an axis is double clicked.

-

event is the mouse event that caused the click, axis is the axis that received the click and part indicates the part of the axis that was clicked.

-
See also
axisClick
- -
-
- -

§ legendClick

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCustomPlot::legendClick (QCPLegendlegend,
QCPAbstractLegendItemitem,
QMouseEvent * event 
)
-
-signal
-
-

This signal is emitted when a legend (item) is clicked.

-

event is the mouse event that caused the click, legend is the legend that received the click and item is the legend item that received the click. If only the legend and no item is clicked, item is nullptr. This happens for a click inside the legend padding or the space between two items.

-
See also
legendDoubleClick
- -
-
- -

§ legendDoubleClick

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void QCustomPlot::legendDoubleClick (QCPLegendlegend,
QCPAbstractLegendItemitem,
QMouseEvent * event 
)
-
-signal
-
-

This signal is emitted when a legend (item) is double clicked.

-

event is the mouse event that caused the click, legend is the legend that received the click and item is the legend item that received the click. If only the legend and no item is clicked, item is nullptr. This happens for a click inside the legend padding or the space between two items.

-
See also
legendClick
- -
-
- -

§ selectionChangedByUser

- -
-
- - - - - -
- - - - - - - -
void QCustomPlot::selectionChangedByUser ()
-
-signal
-
-

This signal is emitted after the user has changed the selection in the QCustomPlot, e.g. by clicking. It is not emitted when the selection state of an object has changed programmatically by a direct call to setSelected()/setSelection() on an object or by calling deselectAll.

-

In addition to this signal, selectable objects also provide individual signals, for example QCPAxis::selectionChanged or QCPAbstractPlottable::selectionChanged. Note that those signals are emitted even if the selection state is changed programmatically.

-

See the documentation of setInteractions for details about the selection mechanism.

-
See also
selectedPlottables, selectedGraphs, selectedItems, selectedAxes, selectedLegends
- -
-
- -

§ beforeReplot

- -
-
- - - - - -
- - - - - - - -
void QCustomPlot::beforeReplot ()
-
-signal
-
-

This signal is emitted immediately before a replot takes place (caused by a call to the slot replot).

-

It is safe to mutually connect the replot slot with this signal on two QCustomPlots to make them replot synchronously, it won't cause an infinite recursion.

-
See also
replot, afterReplot, afterLayout
- -
-
- -

§ afterLayout

- -
-
- - - - - -
- - - - - - - -
void QCustomPlot::afterLayout ()
-
-signal
-
-

This signal is emitted immediately after the layout step has been completed, which occurs right before drawing the plot. This is typically during a call to replot, and in such cases this signal is emitted in between the signals beforeReplot and afterReplot. Unlike those signals however, this signal is also emitted during off-screen painting, such as when calling toPixmap or savePdf.

-

The layout step queries all layouts and layout elements in the plot for their proposed size and arranges the objects accordingly as preparation for the subsequent drawing step. Through this signal, you have the opportunity to update certain things in your plot that depend crucially on the exact dimensions/positioning of layout elements such as axes and axis rects.

-
Warning
However, changing any parameters of this QCustomPlot instance which would normally affect the layouting (e.g. axis range order of magnitudes, tick label sizes, etc.) will not issue a second run of the layout step. It will propagate directly to the draw step and may cause graphical inconsistencies such as overlapping objects, if sizes or positions have changed.
-
See also
updateLayout, beforeReplot, afterReplot
- -
-
- -

§ afterReplot

- -
-
- - - - - -
- - - - - - - -
void QCustomPlot::afterReplot ()
-
-signal
-
-

This signal is emitted immediately after a replot has taken place (caused by a call to the slot replot).

-

It is safe to mutually connect the replot slot with this signal on two QCustomPlots to make them replot synchronously, it won't cause an infinite recursion.

-
See also
replot, beforeReplot, afterLayout
- -
-
- -

§ minimumSizeHint()

- -
-
- - - - - -
- - - - - - - -
QSize QCustomPlot::minimumSizeHint () const
-
-protectedvirtual
-
-

Returns a minimum size hint that corresponds to the minimum size of the top level layout (plotLayout). To prevent QCustomPlot from being collapsed to size/width zero, set a minimum size (setMinimumSize) either on the whole QCustomPlot or on any layout elements inside the plot. This is especially important, when placed in a QLayout where other components try to take in as much space as possible (e.g. QMdiArea).

- -
-
- -

§ sizeHint()

- -
-
- - - - - -
- - - - - - - -
QSize QCustomPlot::sizeHint () const
-
-protectedvirtual
-
-

Returns a size hint that is the same as minimumSizeHint.

- -
-
- -

§ paintEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::paintEvent (QPaintEvent * event)
-
-protectedvirtual
-
-

Event handler for when the QCustomPlot widget needs repainting. This does not cause a replot, but draws the internal buffer on the widget surface.

- -
-
- -

§ resizeEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::resizeEvent (QResizeEvent * event)
-
-protectedvirtual
-
-

Event handler for a resize of the QCustomPlot widget. The viewport (which becomes the outer rect of mPlotLayout) is resized appropriately. Finally a replot is performed.

- -
-
- -

§ mouseDoubleClickEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::mouseDoubleClickEvent (QMouseEvent * event)
-
-protectedvirtual
-
-

Event handler for when a double click occurs. Emits the mouseDoubleClick signal, then determines the layerable under the cursor and forwards the event to it. Finally, emits the specialized signals when certain objecs are clicked (e.g. plottableDoubleClick, axisDoubleClick, etc.).

-
See also
mousePressEvent, mouseReleaseEvent
- -
-
- -

§ mousePressEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::mousePressEvent (QMouseEvent * event)
-
-protectedvirtual
-
-

Event handler for when a mouse button is pressed. Emits the mousePress signal.

-

If the current setSelectionRectMode is not QCP::srmNone, passes the event to the selection rect. Otherwise determines the layerable under the cursor and forwards the event to it.

-
See also
mouseMoveEvent, mouseReleaseEvent
- -
-
- -

§ mouseMoveEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::mouseMoveEvent (QMouseEvent * event)
-
-protectedvirtual
-
-

Event handler for when the cursor is moved. Emits the mouseMove signal.

-

If the selection rect (setSelectionRect) is currently active, the event is forwarded to it in order to update the rect geometry.

-

Otherwise, if a layout element has mouse capture focus (a mousePressEvent happened on top of the layout element before), the mouseMoveEvent is forwarded to that element.

-
See also
mousePressEvent, mouseReleaseEvent
- -
-
- -

§ mouseReleaseEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::mouseReleaseEvent (QMouseEvent * event)
-
-protectedvirtual
-
-

Event handler for when a mouse button is released. Emits the mouseRelease signal.

-

If the mouse was moved less than a certain threshold in any direction since the mousePressEvent, it is considered a click which causes the selection mechanism (if activated via setInteractions) to possibly change selection states accordingly. Further, specialized mouse click signals are emitted (e.g. plottableClick, axisClick, etc.)

-

If a layerable is the mouse capturer (a mousePressEvent happened on top of the layerable before), the mouseReleaseEvent is forwarded to that element.

-
See also
mousePressEvent, mouseMoveEvent
- -
-
- -

§ wheelEvent()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::wheelEvent (QWheelEvent * event)
-
-protectedvirtual
-
-

Event handler for mouse wheel events. First, the mouseWheel signal is emitted. Then determines the affected layerable and forwards the event to it.

- -
-
- -

§ draw()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::draw (QCPPainterpainter)
-
-protectedvirtual
-
-

This function draws the entire plot, including background pixmap, with the specified painter. It does not make use of the paint buffers like replot, so this is the function typically used by saving/exporting methods such as savePdf or toPainter.

-

Note that it does not fill the background with the background brush (as the user may specify with setBackground(const QBrush &brush)), this is up to the respective functions calling this method.

- -
-
- -

§ updateLayout()

- -
-
- - - - - -
- - - - - - - -
void QCustomPlot::updateLayout ()
-
-protectedvirtual
-
-

Performs the layout update steps defined by QCPLayoutElement::UpdatePhase, by calling QCPLayoutElement::update on the main plot layout.

-

Here, the layout elements calculate their positions and margins, and prepare for the following draw call.

- -
-
- -

§ axisRemoved()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::axisRemoved (QCPAxisaxis)
-
-protectedvirtual
-
-

This method is used by QCPAxisRect::removeAxis to report removed axes to the QCustomPlot so it may clear its QCustomPlot::xAxis, yAxis, xAxis2 and yAxis2 members accordingly.

- -
-
- -

§ legendRemoved()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::legendRemoved (QCPLegendlegend)
-
-protectedvirtual
-
-

This method is used by the QCPLegend destructor to report legend removal to the QCustomPlot so it may clear its QCustomPlot::legend member accordingly.

- -
-
- -

§ processRectSelection()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCustomPlot::processRectSelection (QRect rect,
QMouseEvent * event 
)
-
-protectedvirtual
-
-

This slot is connected to the selection rect's QCPSelectionRect::accepted signal when setSelectionRectMode is set to QCP::srmSelect.

-

First, it determines which axis rect was the origin of the selection rect judging by the starting point of the selection. Then it goes through the plottables (QCPAbstractPlottable1D to be precise) associated with that axis rect and finds the data points that are in rect. It does this by querying their QCPAbstractPlottable1D::selectTestRect method.

-

Then, the actual selection is done by calling the plottables' QCPAbstractPlottable::selectEvent, placing the found selected data points in the details parameter as QVariant(QCPDataSelection). All plottables that weren't touched by rect receive a QCPAbstractPlottable::deselectEvent.

-
See also
processRectZoom
- -
-
- -

§ processRectZoom()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void QCustomPlot::processRectZoom (QRect rect,
QMouseEvent * event 
)
-
-protectedvirtual
-
-

This slot is connected to the selection rect's QCPSelectionRect::accepted signal when setSelectionRectMode is set to QCP::srmZoom.

-

It determines which axis rect was the origin of the selection rect judging by the starting point of the selection, and then zooms the axes defined via QCPAxisRect::setRangeZoomAxes to the provided rect (see QCPAxisRect::zoom).

-
See also
processRectSelection
- -
-
- -

§ processPointSelection()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::processPointSelection (QMouseEvent * event)
-
-protectedvirtual
-
-

This method is called when a simple left mouse click was detected on the QCustomPlot surface.

-

It first determines the layerable that was hit by the click, and then calls its QCPLayerable::selectEvent. All other layerables receive a QCPLayerable::deselectEvent (unless the multi-select modifier was pressed, see setMultiSelectModifier).

-

In this method the hit layerable is determined a second time using layerableAt (after the one in mousePressEvent), because we want onlySelectable set to true this time. This implies that the mouse event grabber (mMouseEventLayerable) may be a different one from the clicked layerable determined here. For example, if a non-selectable layerable is in front of a selectable layerable at the click position, the front layerable will receive mouse events but the selectable one in the back will receive the QCPLayerable::selectEvent.

-
See also
processRectSelection, QCPLayerable::selectTest
- -
-
- -

§ registerPlottable()

- -
-
- - - - - -
- - - - - - - - -
bool QCustomPlot::registerPlottable (QCPAbstractPlottableplottable)
-
-protected
-
-

Registers the specified plottable with this QCustomPlot and, if setAutoAddPlottableToLegend is enabled, adds it to the legend (QCustomPlot::legend). QCustomPlot takes ownership of the plottable.

-

Returns true on success, i.e. when plottable isn't already in this plot and the parent plot of plottable is this QCustomPlot.

-

This method is called automatically in the QCPAbstractPlottable base class constructor.

- -
-
- -

§ registerGraph()

- -
-
- - - - - -
- - - - - - - - -
bool QCustomPlot::registerGraph (QCPGraphgraph)
-
-protected
-
-

In order to maintain the simplified graph interface of QCustomPlot, this method is called by the QCPGraph constructor to register itself with this QCustomPlot's internal graph list. Returns true on success, i.e. if graph is valid and wasn't already registered with this QCustomPlot.

-

This graph specific registration happens in addition to the call to registerPlottable by the QCPAbstractPlottable base class.

- -
-
- -

§ registerItem()

- -
-
- - - - - -
- - - - - - - - -
bool QCustomPlot::registerItem (QCPAbstractItemitem)
-
-protected
-
-

Registers the specified item with this QCustomPlot. QCustomPlot takes ownership of the item.

-

Returns true on success, i.e. when item wasn't already in the plot and the parent plot of item is this QCustomPlot.

-

This method is called automatically in the QCPAbstractItem base class constructor.

- -
-
- -

§ updateLayerIndices()

- -
-
- - - - - -
- - - - - - - -
void QCustomPlot::updateLayerIndices () const
-
-protected
-
-

Assigns all layers their index (QCPLayer::mIndex) in the mLayers list. This method is thus called after every operation that changes the layer indices, like layer removal, layer creation, layer moving.

- -
-
- -

§ layerableAt()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QCPLayerable * QCustomPlot::layerableAt (const QPointF & pos,
bool onlySelectable,
QVariant * selectionDetails = nullptr 
) const
-
-protected
-
-

Returns the top-most layerable at pixel position pos. If onlySelectable is set to true, only those layerables that are selectable will be considered. (Layerable subclasses communicate their selectability via the QCPLayerable::selectTest method, by returning -1.)

-

selectionDetails is an output parameter that contains selection specifics of the affected layerable. This is useful if the respective layerable shall be given a subsequent QCPLayerable::selectEvent (like in mouseReleaseEvent). selectionDetails usually contains information about which part of the layerable was hit, in multi-part layerables (e.g. QCPAxis::SelectablePart). If the layerable is a plottable, selectionDetails contains a QCPDataSelection instance with the single data point which is closest to pos.

-
See also
layerableListAt, layoutElementAt, axisRectAt
- -
-
- -

§ layerableListAt()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
QList< QCPLayerable * > QCustomPlot::layerableListAt (const QPointF & pos,
bool onlySelectable,
QList< QVariant > * selectionDetails = nullptr 
) const
-
-protected
-
-

Returns the layerables at pixel position pos. If onlySelectable is set to true, only those layerables that are selectable will be considered. (Layerable subclasses communicate their selectability via the QCPLayerable::selectTest method, by returning -1.)

-

The returned list is sorted by the layerable/drawing order such that the layerable that appears on top in the plot is at index 0 of the returned list. If you only need to know the top layerable, rather use layerableAt.

-

selectionDetails is an output parameter that contains selection specifics of the affected layerable. This is useful if the respective layerable shall be given a subsequent QCPLayerable::selectEvent (like in mouseReleaseEvent). selectionDetails usually contains information about which part of the layerable was hit, in multi-part layerables (e.g. QCPAxis::SelectablePart). If the layerable is a plottable, selectionDetails contains a QCPDataSelection instance with the single data point which is closest to pos.

-
See also
layerableAt, layoutElementAt, axisRectAt
- -
-
- -

§ drawBackground()

- -
-
- - - - - -
- - - - - - - - -
void QCustomPlot::drawBackground (QCPPainterpainter)
-
-protected
-
-

Draws the viewport background pixmap of the plot.

-

If a pixmap was provided via setBackground, this function buffers the scaled version depending on setBackgroundScaled and setBackgroundScaledMode and then draws it inside the viewport with the provided painter. The scaled version is buffered in mScaledBackgroundPixmap to prevent expensive rescaling at every redraw. It is only updated, when the axis rect has changed in a way that requires a rescale of the background pixmap (this is dependent on the setBackgroundScaledMode), or when a differend axis background pixmap was set.

-

Note that this function does not draw a fill with the background brush (setBackground(const QBrush &brush)) beneath the pixmap.

-
See also
setBackground, setBackgroundScaled, setBackgroundScaledMode
- -
-
- -

§ setupPaintBuffers()

- -
-
- - - - - -
- - - - - - - -
void QCustomPlot::setupPaintBuffers ()
-
-protected
-
-

Goes through the layers and makes sure this QCustomPlot instance holds the correct number of paint buffers and that they have the correct configuration (size, pixel ratio, etc.). Allocations, reallocations and deletions of paint buffers are performed as necessary. It also associates the paint buffers with the layers, so they draw themselves into the right buffer when QCPLayer::drawToPaintBuffer is called. This means it associates adjacent QCPLayer::lmLogical layers to a mutual paint buffer and creates dedicated paint buffers for layers in QCPLayer::lmBuffered mode.

-

This method uses createPaintBuffer to create new paint buffers.

-

After this method, the paint buffers are empty (filled with Qt::transparent) and invalidated (so an attempt to replot only a single buffered layer causes a full replot).

-

This method is called in every replot call, prior to actually drawing the layers (into their associated paint buffer). If the paint buffers don't need changing/reallocating, this method basically leaves them alone and thus finishes very fast.

- -
-
- -

§ createPaintBuffer()

- -
-
- - - - - -
- - - - - - - -
QCPAbstractPaintBuffer * QCustomPlot::createPaintBuffer ()
-
-protected
-
-

This method is used by setupPaintBuffers when it needs to create new paint buffers.

-

Depending on the current setting of setOpenGl, and the current Qt version, different backends (subclasses of QCPAbstractPaintBuffer) are created, initialized with the proper size and device pixel ratio, and returned.

- -
-
- -

§ hasInvalidatedPaintBuffers()

- -
-
- - - - - -
- - - - - - - -
bool QCustomPlot::hasInvalidatedPaintBuffers ()
-
-protected
-
-

This method returns whether any of the paint buffers held by this QCustomPlot instance are invalidated.

-

If any buffer is invalidated, a partial replot (QCPLayer::replot) is not allowed and always causes a full replot (QCustomPlot::replot) of all layers. This is the case when for example the layer order has changed, new layers were added or removed, layer modes were changed (QCPLayer::setMode), or layerables were added or removed.

-
See also
QCPAbstractPaintBuffer::setInvalidated
- -
-
- -

§ setupOpenGl()

- -
-
- - - - - -
- - - - - - - -
bool QCustomPlot::setupOpenGl ()
-
-protected
-
-

When setOpenGl is set to true, this method is used to initialize OpenGL (create a context, surface, paint device).

-

Returns true on success.

-

If this method is successful, all paint buffers should be deleted and then reallocated by calling setupPaintBuffers, so the OpenGL-based paint buffer subclasses (QCPPaintBufferGlPbuffer, QCPPaintBufferGlFbo) are used for subsequent replots.

-
See also
freeOpenGl
- -
-
- -

§ freeOpenGl()

- -
-
- - - - - -
- - - - - - - -
void QCustomPlot::freeOpenGl ()
-
-protected
-
-

When setOpenGl is set to false, this method is used to deinitialize OpenGL (releases the context and frees resources).

-

After OpenGL is disabled, all paint buffers should be deleted and then reallocated by calling setupPaintBuffers, so the standard software rendering paint buffer subclass (QCPPaintBufferPixmap) is used for subsequent replots.

-
See also
setupOpenGl
- -
-
-

Field Documentation

- -

§ xAxis

- -
-
- - - - -
QCPAxis * QCustomPlot::xAxis
-
-

A pointer to the primary x Axis (bottom) of the main axis rect of the plot.

-

QCustomPlot offers convenient pointers to the axes (xAxis, yAxis, xAxis2, yAxis2) and the legend. They make it very easy working with plots that only have a single axis rect and at most one axis at each axis rect side. If you use the layout system to add multiple axis rects or multiple axes to one side, use the QCPAxisRect::axis interface to access the new axes. If one of the four default axes or the default legend is removed due to manipulation of the layout system (e.g. by removing the main axis rect), the corresponding pointers become nullptr.

-

If an axis convenience pointer is currently nullptr and a new axis rect or a corresponding axis is added in the place of the main axis rect, QCustomPlot resets the convenience pointers to the according new axes. Similarly the legend convenience pointer will be reset if a legend is added after the main legend was removed before.

- -
-
- -

§ yAxis

- -
-
- - - - -
QCPAxis * QCustomPlot::yAxis
-
-

A pointer to the primary y Axis (left) of the main axis rect of the plot.

-

QCustomPlot offers convenient pointers to the axes (xAxis, yAxis, xAxis2, yAxis2) and the legend. They make it very easy working with plots that only have a single axis rect and at most one axis at each axis rect side. If you use the layout system to add multiple axis rects or multiple axes to one side, use the QCPAxisRect::axis interface to access the new axes. If one of the four default axes or the default legend is removed due to manipulation of the layout system (e.g. by removing the main axis rect), the corresponding pointers become nullptr.

-

If an axis convenience pointer is currently nullptr and a new axis rect or a corresponding axis is added in the place of the main axis rect, QCustomPlot resets the convenience pointers to the according new axes. Similarly the legend convenience pointer will be reset if a legend is added after the main legend was removed before.

- -
-
- -

§ xAxis2

- -
-
- - - - -
QCPAxis * QCustomPlot::xAxis2
-
-

A pointer to the secondary x Axis (top) of the main axis rect of the plot. Secondary axes are invisible by default. Use QCPAxis::setVisible to change this (or use QCPAxisRect::setupFullAxesBox).

-

QCustomPlot offers convenient pointers to the axes (xAxis, yAxis, xAxis2, yAxis2) and the legend. They make it very easy working with plots that only have a single axis rect and at most one axis at each axis rect side. If you use the layout system to add multiple axis rects or multiple axes to one side, use the QCPAxisRect::axis interface to access the new axes. If one of the four default axes or the default legend is removed due to manipulation of the layout system (e.g. by removing the main axis rect), the corresponding pointers become nullptr.

-

If an axis convenience pointer is currently nullptr and a new axis rect or a corresponding axis is added in the place of the main axis rect, QCustomPlot resets the convenience pointers to the according new axes. Similarly the legend convenience pointer will be reset if a legend is added after the main legend was removed before.

- -
-
- -

§ yAxis2

- -
-
- - - - -
QCPAxis * QCustomPlot::yAxis2
-
-

A pointer to the secondary y Axis (right) of the main axis rect of the plot. Secondary axes are invisible by default. Use QCPAxis::setVisible to change this (or use QCPAxisRect::setupFullAxesBox).

-

QCustomPlot offers convenient pointers to the axes (xAxis, yAxis, xAxis2, yAxis2) and the legend. They make it very easy working with plots that only have a single axis rect and at most one axis at each axis rect side. If you use the layout system to add multiple axis rects or multiple axes to one side, use the QCPAxisRect::axis interface to access the new axes. If one of the four default axes or the default legend is removed due to manipulation of the layout system (e.g. by removing the main axis rect), the corresponding pointers become nullptr.

-

If an axis convenience pointer is currently nullptr and a new axis rect or a corresponding axis is added in the place of the main axis rect, QCustomPlot resets the convenience pointers to the according new axes. Similarly the legend convenience pointer will be reset if a legend is added after the main legend was removed before.

- -
-
- -

§ legend

- -
-
- - - - -
QCPLegend * QCustomPlot::legend
-
-

A pointer to the default legend of the main axis rect. The legend is invisible by default. Use QCPLegend::setVisible to change this.

-

QCustomPlot offers convenient pointers to the axes (xAxis, yAxis, xAxis2, yAxis2) and the legend. They make it very easy working with plots that only have a single axis rect and at most one axis at each axis rect side. If you use the layout system to add multiple legends to the plot, use the layout system interface to access the new legend. For example, legends can be placed inside an axis rect's inset layout, and must then also be accessed via the inset layout. If the default legend is removed due to manipulation of the layout system (e.g. by removing the main axis rect), the corresponding pointer becomes nullptr.

-

If an axis convenience pointer is currently nullptr and a new axis rect or a corresponding axis is added in the place of the main axis rect, QCustomPlot resets the convenience pointers to the according new axes. Similarly the legend convenience pointer will be reset if a legend is added after the main legend was removed before.

- -
-
-
The documentation for this class was generated from the following files: -
- - diff --git a/third_party/qcustomplot/documentation/html/classes.html b/third_party/qcustomplot/documentation/html/classes.html deleted file mode 100644 index 7ec553d7..00000000 --- a/third_party/qcustomplot/documentation/html/classes.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - -Data Structure Index - - - - -
-
-
Data Structure Index
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  q  
-
QCPItemEllipse   
QCPItemLine   
QCPAbstractItem   QCPItemPixmap   
QCPAbstractLegendItem   QCPItemPosition   
QCPAbstractPaintBuffer   QCPItemRect   
QCPAbstractPlottable   QCPItemStraightLine   
QCPAbstractPlottable1D   QCPItemText   
QCPAxis   QCPItemTracer   
QCPAxisRect   QCPLayer   
QCPAxisTicker   QCPLayerable   
QCPAxisTickerDateTime   QCPLayout   
QCPAxisTickerFixed   QCPLayoutElement   
QCPAxisTickerLog   QCPLayoutGrid   
QCPAxisTickerPi   QCPLayoutInset   
QCPAxisTickerText   QCPLegend   
QCPAxisTickerTime   QCPLineEnding   
QCPBars   QCPMarginGroup   
QCPBarsData   QCPPaintBufferGlFbo   
QCPBarsGroup   QCPPaintBufferGlPbuffer   
QCPColorGradient   QCPPaintBufferPixmap   
QCPColorMap   QCPPainter   
QCPColorMapData   QCPPlottableInterface1D   
QCPColorScale   QCPPlottableLegendItem   
QCPCurve   QCPPolarAxisAngular   
QCPCurveData   QCPPolarAxisRadial   
QCPDataContainer   QCPPolarGraph   
QCPDataRange   QCPPolarGrid   
QCPDataSelection   QCPPolarLegendItem   
QCPErrorBars   QCPRange   
QCPErrorBarsData   QCPScatterStyle   
QCPFinancial   QCPSelectionDecorator   
QCPFinancialData   QCPSelectionDecoratorBracket   
QCPGraph   QCPSelectionRect   
QCPGraphData   QCPStatisticalBox   
QCPGrid   QCPStatisticalBoxData   
QCPItemAnchor   QCPTextElement   
QCPItemBracket   QCPVector2D   
QCPItemCurve   QCustomPlot   
- -
- - diff --git a/third_party/qcustomplot/documentation/html/classoverview.html b/third_party/qcustomplot/documentation/html/classoverview.html deleted file mode 100644 index fbbdd813..00000000 --- a/third_party/qcustomplot/documentation/html/classoverview.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - -Class Overview - - - - -
-
-
Class Overview
-
-
-

The following diagrams may help to gain a deeper understanding of the relationships between classes that make up the QCustomPlot library. The diagrams are not exhaustive, so only the classes deemed most relevant are shown.

-

-Class Relationship Diagram

-
-RelationOverview.png -
-Overview of most important classes and their relations
-

-Class Inheritance Tree

-
-InheritanceOverview.png -
-Inheritance tree of most important classes
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
- - diff --git a/third_party/qcustomplot/documentation/html/closed.png b/third_party/qcustomplot/documentation/html/closed.png deleted file mode 100644 index 49860843..00000000 Binary files a/third_party/qcustomplot/documentation/html/closed.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/core_8cpp.html b/third_party/qcustomplot/documentation/html/core_8cpp.html deleted file mode 100644 index b11702c3..00000000 --- a/third_party/qcustomplot/documentation/html/core_8cpp.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - -src/core.cpp File Reference - - - - -
-
-
core.cpp File Reference
-
-
-
- - diff --git a/third_party/qcustomplot/documentation/html/datacontainer_8h.html b/third_party/qcustomplot/documentation/html/datacontainer_8h.html deleted file mode 100644 index 5d1826a8..00000000 --- a/third_party/qcustomplot/documentation/html/datacontainer_8h.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - -src/datacontainer.h File Reference - - - - -
- -
-
datacontainer.h File Reference
-
-
- - - - - -

-Data Structures

class  QCPDataContainer< DataType >
 The generic data container for one-dimensional plottables. More...
 
-
- - diff --git a/third_party/qcustomplot/documentation/html/dataselection.html b/third_party/qcustomplot/documentation/html/dataselection.html deleted file mode 100644 index 04e85ed6..00000000 --- a/third_party/qcustomplot/documentation/html/dataselection.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - -Data Selection Mechanism - - - - -
-
-
Data Selection Mechanism
-
-
-

In QCustomPlot, each plottable can be selected by the user, or programmatically. If the user shall be able to select data in any way, the interaction flag QCP::iSelectPlottables must be set in QCustomPlot::setInteractions.

-

-Data selection granularity

-

The selection granularity can be controlled via QCPAbstractPlottable::setSelectable, by specifying an according QCP::SelectionType. For example, when using QCP::stMultipleDataRanges, the user will have full freedom over which data points he selects and which not. On the other hand if we use QCP::stDataRange, the selection mechanism will enforce that the selected data is always one contiguous range. So if the user selects two distant data points (while holding the multi-select modifier, usually Ctrl), all data points in between those two points will also become selected.

-

These images show the effect of the different selection types, when the indicated selection rect was dragged:

-
- - -
-selectiontype-none.png -
-stNone
-
-selectiontype-whole.png -
-stWhole
-
-selectiontype-singledata.png -
-stSingleData
-
-selectiontype-datarange.png -
-stDataRange
-
-selectiontype-multipledataranges.png -
-stMultipleDataRanges
-
-

-Selection by click and selection rect

-

The user can select data points in two ways:

-

The first method is to click on the data points with the mouse cursor. In this case, if the user wants to select multiple data points one after the other, he has to press and hold the multi-select modifier (QCustomPlot::setMultiSelectModifier), and QCP::iMultiSelect must be set in QCustomPlot::setInteractions.

-

The other method is by dragging a selection rect over the data points that shall be selected. This is possible if QCustomPlot::setSelectionRectMode is set to QCP::srmSelect. Note that while the selection rect mode is set (is not QCP::srmNone), mouse dragging will not be forwarded to underlying layout elements. This also means that axis ranges can't be dragged with the mouse anymore. If you wish to provide your user both with axis range dragging and data selection/range zooming, use QCustomPlot::setSelectionRectMode to switch between the modes just before the interaction is processed, e.g. in reaction to the QCustomPlot::mousePress or QCustomPlot::mouseMove signals. For example you could check whether the user is holding a certain keyboard modifier, and then decide which mode shall be set.

-

-Retrieving the selected data

-

Once the selection state of a plottable changes either by user interaction or programmatically, the affected plottable emits the signal QCPAbstractPlottable::selectionChanged, carrying the currently selected data points in the form of a QCPDataSelection. An overload of this signal is available, which just indicates in a bool whether the plottable has any selected data points.

-

By calling QCustomPlot::selectedPlottables you can retrieve a list of plottables which currently have selected data points. The current selection of a plottable can be retrieved via QCPAbstractPlottable::selection. There is also a method dedicated to QCPGraph plottables specifically, called QCustomPlot::selectedGraphs.

-

-Accessing a data selection

-

A QCPDataSelection is a list of QCPDataRange instances, which themselves hold the begin and end index of the respective data range. In the case of a one-dimensional plottable (deriving from QCPAbstractPlottable1D, e.g. QCPGraph, QCPCurve, QCPBars, etc.) you can access the data points by index, using the data container's at(int index) method. Alternatively you can simply add the integer index to the data container's begin() iterator.

-

As an example, the following code snippet calculates the average value of a graph's data selection:

QCPDataSelection selection = graph->selection();
double sum = 0;
foreach (QCPDataRange dataRange, selection.dataRanges())
{
QCPGraphDataContainer::const_iterator begin = graph->data()->at(dataRange.begin()); // get range begin iterator from index
QCPGraphDataContainer::const_iterator end = graph->data()->at(dataRange.end()); // get range end iterator from index
for (QCPGraphDataContainer::const_iterator it=begin; it!=end; ++it)
{
// iterator "it" will go through all selected data points, as an example, we calculate the value average
sum += it->value;
}
}
double average = sum/selection.dataPointCount();

Since QCPDataSelection instances are not tightly bound to a specific plottable, it is possible that the indices they contain exceed the valid data range of a plottable. The valid data range can be retrieved by accessing the plottable's data container and calling QCPDataContainer::dataRange. With this, you can check whether a given QCPDataSelection is contained in the valid range, and trim it if necessary, by using QCPDataSelection::contains, and QCPDataSelection::intersection, respectively.

-

Of course, the data selections returned by QCPAbstractPlottable::selection are always within the plottable's data bounds, as long as they aren't changed after retrieving the selection.

-

-Retrieving the data point at a given pixel position

-

If you only want to find out which data point of a plottable is at or close to a given pixel position (without the need for a click or actual selection event), you can use QCPAbstractPlottable::selectTest. For example, the following code retrieves an iterator to the data point closest to a given QPoint in pixel coordinates:

-
QCPGraphDataContainer::const_iterator it = graph->data()->constEnd();
QVariant details;
if (graph->selectTest(QPoint(123, 456), false, &details)) // QPoint could be e.g. event->pos() of a mouse event
{
QCPDataSelection dataPoints = details.value<QCPDataSelection>();
if (dataPoints.dataPointCount() > 0)
it = graph->data()->at(dataPoints.dataRange().begin());
}
// iterator "it" now carries the data point at pixel coordinates (123, 456), or constEnd if no data point was hit.


-
-
-
-
-
-

-
- - diff --git a/third_party/qcustomplot/documentation/html/dir_17cee08e17148530a7aedf85f92ee362.html b/third_party/qcustomplot/documentation/html/dir_17cee08e17148530a7aedf85f92ee362.html deleted file mode 100644 index 3ff6064c..00000000 --- a/third_party/qcustomplot/documentation/html/dir_17cee08e17148530a7aedf85f92ee362.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - -src/items Directory Reference - - - - -
-
-
items Directory Reference
-
-
-
- - diff --git a/third_party/qcustomplot/documentation/html/dir_4749ca9c363ee6e69b445a1c06361cef.html b/third_party/qcustomplot/documentation/html/dir_4749ca9c363ee6e69b445a1c06361cef.html deleted file mode 100644 index 7717dfa0..00000000 --- a/third_party/qcustomplot/documentation/html/dir_4749ca9c363ee6e69b445a1c06361cef.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - -src/axis Directory Reference - - - - -
-
-
axis Directory Reference
-
-
-
- - diff --git a/third_party/qcustomplot/documentation/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/third_party/qcustomplot/documentation/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html deleted file mode 100644 index 893c6b0a..00000000 --- a/third_party/qcustomplot/documentation/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - -src Directory Reference - - - - -
-
-
src Directory Reference
-
-
- - -

-Directories

- - - - - - - -

-Files

file  core.cpp
 
file  datacontainer.h
 
file  global.h
 
-
- - diff --git a/third_party/qcustomplot/documentation/html/dir_78a97038723513eb3e3a9e944a7f482f.html b/third_party/qcustomplot/documentation/html/dir_78a97038723513eb3e3a9e944a7f482f.html deleted file mode 100644 index d88a2943..00000000 --- a/third_party/qcustomplot/documentation/html/dir_78a97038723513eb3e3a9e944a7f482f.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - -src/layoutelements Directory Reference - - - - -
-
-
layoutelements Directory Reference
-
-
-
- - diff --git a/third_party/qcustomplot/documentation/html/dir_7ecf847125af2ab645f5f2d2c82f57e2.html b/third_party/qcustomplot/documentation/html/dir_7ecf847125af2ab645f5f2d2c82f57e2.html deleted file mode 100644 index 4acc938f..00000000 --- a/third_party/qcustomplot/documentation/html/dir_7ecf847125af2ab645f5f2d2c82f57e2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - -src/polar Directory Reference - - - - -
-
-
polar Directory Reference
-
-
-
- - diff --git a/third_party/qcustomplot/documentation/html/dir_d1ab82e73f77cddd99808c625b504457.html b/third_party/qcustomplot/documentation/html/dir_d1ab82e73f77cddd99808c625b504457.html deleted file mode 100644 index cee6ee2d..00000000 --- a/third_party/qcustomplot/documentation/html/dir_d1ab82e73f77cddd99808c625b504457.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - -src/plottables Directory Reference - - - - -
-
-
plottables Directory Reference
-
-
- - - - - - - - - - - - - - -

-Files

file  plottable-bars.h
 
file  plottable-curve.h
 
file  plottable-errorbar.h
 
file  plottable-financial.h
 
file  plottable-graph.h
 
file  plottable-statisticalbox.h
 
-
- - diff --git a/third_party/qcustomplot/documentation/html/doc.png b/third_party/qcustomplot/documentation/html/doc.png deleted file mode 100644 index 37033cc3..00000000 Binary files a/third_party/qcustomplot/documentation/html/doc.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/doxygen.png b/third_party/qcustomplot/documentation/html/doxygen.png deleted file mode 100644 index 3c730737..00000000 Binary files a/third_party/qcustomplot/documentation/html/doxygen.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/dynsections.js b/third_party/qcustomplot/documentation/html/dynsections.js deleted file mode 100644 index 85e18369..00000000 --- a/third_party/qcustomplot/documentation/html/dynsections.js +++ /dev/null @@ -1,97 +0,0 @@ -function toggleVisibility(linkObj) -{ - var base = $(linkObj).attr('id'); - var summary = $('#'+base+'-summary'); - var content = $('#'+base+'-content'); - var trigger = $('#'+base+'-trigger'); - var src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; -} - -function updateStripes() -{ - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); -} - -function toggleLevel(level) -{ - $('table.directory tr').each(function() { - var l = this.id.split('_').length-1; - var i = $('#img'+this.id.substring(3)); - var a = $('#arr'+this.id.substring(3)); - if (l - - - - - -File List - - - - -
-
-
File List
-
-
-
Here is a list of all documented files with brief descriptions:
-
- - diff --git a/third_party/qcustomplot/documentation/html/folderclosed.png b/third_party/qcustomplot/documentation/html/folderclosed.png deleted file mode 100644 index f3dce03b..00000000 Binary files a/third_party/qcustomplot/documentation/html/folderclosed.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/folderopen.png b/third_party/qcustomplot/documentation/html/folderopen.png deleted file mode 100644 index 1d55785f..00000000 Binary files a/third_party/qcustomplot/documentation/html/folderopen.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/functions.html b/third_party/qcustomplot/documentation/html/functions.html deleted file mode 100644 index d2020d8f..00000000 --- a/third_party/qcustomplot/documentation/html/functions.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- a -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_b.html b/third_party/qcustomplot/documentation/html/functions_b.html deleted file mode 100644 index 8cbe2c9d..00000000 --- a/third_party/qcustomplot/documentation/html/functions_b.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- b -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_c.html b/third_party/qcustomplot/documentation/html/functions_c.html deleted file mode 100644 index 01920f85..00000000 --- a/third_party/qcustomplot/documentation/html/functions_c.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- c -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_d.html b/third_party/qcustomplot/documentation/html/functions_d.html deleted file mode 100644 index dc0ce703..00000000 --- a/third_party/qcustomplot/documentation/html/functions_d.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- d -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_e.html b/third_party/qcustomplot/documentation/html/functions_e.html deleted file mode 100644 index 72ab7c08..00000000 --- a/third_party/qcustomplot/documentation/html/functions_e.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- e -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_enum.html b/third_party/qcustomplot/documentation/html/functions_enum.html deleted file mode 100644 index 42b39fd9..00000000 --- a/third_party/qcustomplot/documentation/html/functions_enum.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - -Data Fields - Enumerations - - - - -
-  - -

- a -

- - -

- b -

- - -

- c -

- - -

- e -

- - -

- f -

- - -

- g -

- - -

- i -

- - -

- l -

- - -

- n -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- u -

- - -

- w -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_eval.html b/third_party/qcustomplot/documentation/html/functions_eval.html deleted file mode 100644 index 915eeefa..00000000 --- a/third_party/qcustomplot/documentation/html/functions_eval.html +++ /dev/null @@ -1,507 +0,0 @@ - - - - - - -Data Fields - Enumerator - - - - -
-  - -

- a -

- - -

- b -

- - -

- c -

- - -

- e -

- - -

- f -

- - -

- g -

- - -

- i -

- - -

- l -

- - -

- n -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- u -

- - -

- w -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_f.html b/third_party/qcustomplot/documentation/html/functions_f.html deleted file mode 100644 index d9a88f63..00000000 --- a/third_party/qcustomplot/documentation/html/functions_f.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- f -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func.html b/third_party/qcustomplot/documentation/html/functions_func.html deleted file mode 100644 index ba092872..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- a -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_b.html b/third_party/qcustomplot/documentation/html/functions_func_b.html deleted file mode 100644 index 88bf8987..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_b.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- b -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_c.html b/third_party/qcustomplot/documentation/html/functions_func_c.html deleted file mode 100644 index 7a9bce88..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_c.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- c -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_d.html b/third_party/qcustomplot/documentation/html/functions_func_d.html deleted file mode 100644 index 7245ae55..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_d.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- d -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_e.html b/third_party/qcustomplot/documentation/html/functions_func_e.html deleted file mode 100644 index 559569e0..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_e.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- e -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_f.html b/third_party/qcustomplot/documentation/html/functions_func_f.html deleted file mode 100644 index a11ad88b..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_f.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- f -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_g.html b/third_party/qcustomplot/documentation/html/functions_func_g.html deleted file mode 100644 index b4940090..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_g.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- g -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_h.html b/third_party/qcustomplot/documentation/html/functions_func_h.html deleted file mode 100644 index 6cf5d7cf..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_h.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- h -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_i.html b/third_party/qcustomplot/documentation/html/functions_func_i.html deleted file mode 100644 index 74de0d24..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_i.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- i -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_k.html b/third_party/qcustomplot/documentation/html/functions_func_k.html deleted file mode 100644 index 540c545e..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_k.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- k -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_l.html b/third_party/qcustomplot/documentation/html/functions_func_l.html deleted file mode 100644 index ba8d3193..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_l.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- l -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_m.html b/third_party/qcustomplot/documentation/html/functions_func_m.html deleted file mode 100644 index 1cedadc3..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_m.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- m -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_n.html b/third_party/qcustomplot/documentation/html/functions_func_n.html deleted file mode 100644 index c582fe74..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_n.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- n -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_o.html b/third_party/qcustomplot/documentation/html/functions_func_o.html deleted file mode 100644 index b8918451..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_o.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- o -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_p.html b/third_party/qcustomplot/documentation/html/functions_func_p.html deleted file mode 100644 index d584fb99..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_p.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- p -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_q.html b/third_party/qcustomplot/documentation/html/functions_func_q.html deleted file mode 100644 index 5765fc40..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_q.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- q -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_r.html b/third_party/qcustomplot/documentation/html/functions_func_r.html deleted file mode 100644 index f7284c18..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_r.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- r -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_s.html b/third_party/qcustomplot/documentation/html/functions_func_s.html deleted file mode 100644 index 7aa16531..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_s.html +++ /dev/null @@ -1,1147 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- s -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_t.html b/third_party/qcustomplot/documentation/html/functions_func_t.html deleted file mode 100644 index cb353e2c..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_t.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- t -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_u.html b/third_party/qcustomplot/documentation/html/functions_func_u.html deleted file mode 100644 index 876809e8..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_u.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- u -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_v.html b/third_party/qcustomplot/documentation/html/functions_func_v.html deleted file mode 100644 index 8bbb7645..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_v.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- v -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_func_w.html b/third_party/qcustomplot/documentation/html/functions_func_w.html deleted file mode 100644 index e4684c18..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_w.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - -Data Fields - Functions - - - - - - - diff --git a/third_party/qcustomplot/documentation/html/functions_func_z.html b/third_party/qcustomplot/documentation/html/functions_func_z.html deleted file mode 100644 index ea8f401e..00000000 --- a/third_party/qcustomplot/documentation/html/functions_func_z.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - -Data Fields - Functions - - - - -
-  - -

- z -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_g.html b/third_party/qcustomplot/documentation/html/functions_g.html deleted file mode 100644 index 624ac639..00000000 --- a/third_party/qcustomplot/documentation/html/functions_g.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- g -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_h.html b/third_party/qcustomplot/documentation/html/functions_h.html deleted file mode 100644 index 497c43d5..00000000 --- a/third_party/qcustomplot/documentation/html/functions_h.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- h -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_i.html b/third_party/qcustomplot/documentation/html/functions_i.html deleted file mode 100644 index 87548fdf..00000000 --- a/third_party/qcustomplot/documentation/html/functions_i.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- i -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_k.html b/third_party/qcustomplot/documentation/html/functions_k.html deleted file mode 100644 index ce9b2e0b..00000000 --- a/third_party/qcustomplot/documentation/html/functions_k.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- k -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_l.html b/third_party/qcustomplot/documentation/html/functions_l.html deleted file mode 100644 index b1051c18..00000000 --- a/third_party/qcustomplot/documentation/html/functions_l.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- l -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_m.html b/third_party/qcustomplot/documentation/html/functions_m.html deleted file mode 100644 index eadd255e..00000000 --- a/third_party/qcustomplot/documentation/html/functions_m.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- m -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_n.html b/third_party/qcustomplot/documentation/html/functions_n.html deleted file mode 100644 index 5e11a9a7..00000000 --- a/third_party/qcustomplot/documentation/html/functions_n.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- n -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_o.html b/third_party/qcustomplot/documentation/html/functions_o.html deleted file mode 100644 index 9fc12d25..00000000 --- a/third_party/qcustomplot/documentation/html/functions_o.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- o -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_p.html b/third_party/qcustomplot/documentation/html/functions_p.html deleted file mode 100644 index ec0ed105..00000000 --- a/third_party/qcustomplot/documentation/html/functions_p.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- p -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_q.html b/third_party/qcustomplot/documentation/html/functions_q.html deleted file mode 100644 index 1d5f5488..00000000 --- a/third_party/qcustomplot/documentation/html/functions_q.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- q -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_r.html b/third_party/qcustomplot/documentation/html/functions_r.html deleted file mode 100644 index 5fbbdc59..00000000 --- a/third_party/qcustomplot/documentation/html/functions_r.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- r -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_rela.html b/third_party/qcustomplot/documentation/html/functions_rela.html deleted file mode 100644 index 478cf917..00000000 --- a/third_party/qcustomplot/documentation/html/functions_rela.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - -Data Fields - Related Functions - - - - -
-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_s.html b/third_party/qcustomplot/documentation/html/functions_s.html deleted file mode 100644 index 8df71c4c..00000000 --- a/third_party/qcustomplot/documentation/html/functions_s.html +++ /dev/null @@ -1,1299 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- s -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_t.html b/third_party/qcustomplot/documentation/html/functions_t.html deleted file mode 100644 index 292fc6ea..00000000 --- a/third_party/qcustomplot/documentation/html/functions_t.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- t -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_u.html b/third_party/qcustomplot/documentation/html/functions_u.html deleted file mode 100644 index ff6ce6de..00000000 --- a/third_party/qcustomplot/documentation/html/functions_u.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- u -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_v.html b/third_party/qcustomplot/documentation/html/functions_v.html deleted file mode 100644 index 1c0000b0..00000000 --- a/third_party/qcustomplot/documentation/html/functions_v.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- v -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_vars.html b/third_party/qcustomplot/documentation/html/functions_vars.html deleted file mode 100644 index c6d7f224..00000000 --- a/third_party/qcustomplot/documentation/html/functions_vars.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - -Data Fields - Variables - - - - -
-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_w.html b/third_party/qcustomplot/documentation/html/functions_w.html deleted file mode 100644 index abc528a7..00000000 --- a/third_party/qcustomplot/documentation/html/functions_w.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- w -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_x.html b/third_party/qcustomplot/documentation/html/functions_x.html deleted file mode 100644 index edddd56d..00000000 --- a/third_party/qcustomplot/documentation/html/functions_x.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- x -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_y.html b/third_party/qcustomplot/documentation/html/functions_y.html deleted file mode 100644 index 4d614e8f..00000000 --- a/third_party/qcustomplot/documentation/html/functions_y.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- y -

-
- - diff --git a/third_party/qcustomplot/documentation/html/functions_z.html b/third_party/qcustomplot/documentation/html/functions_z.html deleted file mode 100644 index ad131be0..00000000 --- a/third_party/qcustomplot/documentation/html/functions_z.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - -Data Fields - - - - -
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- z -

-
- - diff --git a/third_party/qcustomplot/documentation/html/global_8h.html b/third_party/qcustomplot/documentation/html/global_8h.html deleted file mode 100644 index 0c4bca29..00000000 --- a/third_party/qcustomplot/documentation/html/global_8h.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - -src/global.h File Reference - - - - -
- -
-
global.h File Reference
-
-
- - - - -

-Namespaces

 QCP
 
- - - - - - - - - - - -

-Macros

-#define QCP_DEVICEPIXELRATIO_SUPPORTED
 
-#define QCP_DEVICEPIXELRATIO_FLOAT
 
-#define QCUSTOMPLOT_VERSION_STR   "2.1.1"
 
-#define QCUSTOMPLOT_VERSION   0x020101
 
-#define QCP_LIB_DECL
 
- - - - - - - - - - - - - - - - - - - -

-Enumerations

enum  QCP::ResolutionUnit
 
enum  QCP::ExportPen
 
enum  QCP::SignDomain
 
enum  QCP::MarginSide
 
enum  QCP::AntialiasedElement
 
enum  QCP::PlottingHint
 
enum  QCP::Interaction
 
enum  QCP::SelectionRectMode
 
enum  QCP::SelectionType
 
- - - - - - - - - -

-Functions

bool QCP::isInvalidData (double value)
 
bool QCP::isInvalidData (double value1, double value2)
 
void QCP::setMarginValue (QMargins &margins, QCP::MarginSide side, int value)
 
int QCP::getMarginValue (const QMargins &margins, QCP::MarginSide side)
 
- - - -

-Variables

-const QMetaObject QCP::staticMetaObject
 
-
- - diff --git a/third_party/qcustomplot/documentation/html/globals.html b/third_party/qcustomplot/documentation/html/globals.html deleted file mode 100644 index 4aafa1f3..00000000 --- a/third_party/qcustomplot/documentation/html/globals.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - -Globals - - - - -
-
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
-
- - diff --git a/third_party/qcustomplot/documentation/html/globals_type.html b/third_party/qcustomplot/documentation/html/globals_type.html deleted file mode 100644 index 0a912948..00000000 --- a/third_party/qcustomplot/documentation/html/globals_type.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - -Globals - - - - -
-
- - diff --git a/third_party/qcustomplot/documentation/html/hierarchy.html b/third_party/qcustomplot/documentation/html/hierarchy.html deleted file mode 100644 index 9604a4b1..00000000 --- a/third_party/qcustomplot/documentation/html/hierarchy.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - -Class Hierarchy - - - - -
-
-
Class Hierarchy
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 CQCPAbstractPaintBufferThe abstract base class for paint buffers, which define the rendering backend
 CQCPPaintBufferGlFboA paint buffer based on OpenGL frame buffers objects, using hardware accelerated rendering
 CQCPPaintBufferGlPbufferA paint buffer based on OpenGL pixel buffers, using hardware accelerated rendering
 CQCPPaintBufferPixmapA paint buffer based on QPixmap, using software raster rendering
 CQCPAxisTickerThe base class tick generator used by QCPAxis to create tick positions and tick labels
 CQCPAxisTickerDateTimeSpecialized axis ticker for calendar dates and times as axis ticks
 CQCPAxisTickerFixedSpecialized axis ticker with a fixed tick step
 CQCPAxisTickerLogSpecialized axis ticker suited for logarithmic axes
 CQCPAxisTickerPiSpecialized axis ticker to display ticks in units of an arbitrary constant, for example pi
 CQCPAxisTickerTextSpecialized axis ticker which allows arbitrary labels at specified coordinates
 CQCPAxisTickerTimeSpecialized axis ticker for time spans in units of milliseconds to days
 CQCPBarsDataHolds the data of one single data point (one bar) for QCPBars
 CQCPBarsGroupGroups multiple QCPBars together so they appear side by side
 CQCPColorGradientDefines a color gradient for use with e.g. QCPColorMap
 CQCPColorMapDataHolds the two-dimensional data of a QCPColorMap plottable
 CQCPCurveDataHolds the data of one single data point for QCPCurve
 CQCPDataContainer< DataType >The generic data container for one-dimensional plottables
 CQCPDataRangeDescribes a data range given by begin and end index
 CQCPDataSelectionDescribes a data set by holding multiple QCPDataRange instances
 CQCPErrorBarsDataHolds the data of one single error bar for QCPErrorBars
 CQCPFinancialDataHolds the data of one single data point for QCPFinancial
 CQCPGraphDataHolds the data of one single data point for QCPGraph
 CQCPItemAnchorAn anchor of an item to which positions can be attached to
 CQCPItemPositionManages the position of an item
 CQCPLayerA layer that may contain objects, to control the rendering order
 CQCPLayerableBase class for all drawable objects
 CQCPAbstractItemThe abstract base class for all items in a plot
 CQCPItemBracketA bracket for referencing/highlighting certain parts in the plot
 CQCPItemCurveA curved line from one point to another
 CQCPItemEllipseAn ellipse
 CQCPItemLineA line from one point to another
 CQCPItemPixmapAn arbitrary pixmap
 CQCPItemRectA rectangle
 CQCPItemStraightLineA straight line that spans infinitely in both directions
 CQCPItemTextA text label
 CQCPItemTracerItem that sticks to QCPGraph data points
 CQCPAbstractPlottableThe abstract base class for all data representing objects in a plot
 CQCPAbstractPlottable1D< DataType >A template base class for plottables with one-dimensional data
 CQCPAbstractPlottable1D< QCPBarsData >
 CQCPBarsA plottable representing a bar chart in a plot
 CQCPAbstractPlottable1D< QCPCurveData >
 CQCPCurveA plottable representing a parametric curve in a plot
 CQCPAbstractPlottable1D< QCPFinancialData >
 CQCPFinancialA plottable representing a financial stock chart
 CQCPAbstractPlottable1D< QCPGraphData >
 CQCPGraphA plottable representing a graph in a plot
 CQCPAbstractPlottable1D< QCPStatisticalBoxData >
 CQCPStatisticalBoxA plottable representing a single statistical box in a plot
 CQCPColorMapA plottable representing a two-dimensional color map in a plot
 CQCPErrorBarsA plottable that adds a set of error bars to other plottables
 CQCPAxisManages a single axis inside a QCustomPlot
 CQCPGridResponsible for drawing the grid of a QCPAxis
 CQCPLayoutElementThe abstract base class for all objects that form the layout system
 CQCPAbstractLegendItemThe abstract base class for all entries in a QCPLegend
 CQCPPlottableLegendItemA legend item representing a plottable with an icon and the plottable name
 CQCPPolarLegendItemA legend item for polar plots
 CQCPAxisRectHolds multiple axes and arranges them in a rectangular shape
 CQCPColorScaleA color scale for use with color coding data such as QCPColorMap
 CQCPLayoutThe abstract base class for layouts
 CQCPLayoutGridA layout that arranges child elements in a grid
 CQCPLegendManages a legend inside a QCustomPlot
 CQCPLayoutInsetA layout that places child elements aligned to the border or arbitrarily positioned
 CQCPPolarAxisAngularThe main container for polar plots, representing the angular axis as a circle
 CQCPTextElementA layout element displaying a text
 CQCPPolarAxisRadialThe radial axis inside a radial plot
 CQCPPolarGraphA radial graph used to display data in polar plots
 CQCPPolarGridThe grid in both angular and radial dimensions for polar plots
 CQCPSelectionRectProvides rect/rubber-band data selection and range zoom interaction
 CQCPLineEndingHandles the different ending decorations for line-like items
 CQCPMarginGroupA margin group allows synchronization of margin sides if working with multiple layout elements
 CQCPPainterQPainter subclass used internally
 CQCPPlottableInterface1DDefines an abstract interface for one-dimensional plottables
 CQCPAbstractPlottable1D< DataType >A template base class for plottables with one-dimensional data
 CQCPAbstractPlottable1D< QCPBarsData >
 CQCPAbstractPlottable1D< QCPCurveData >
 CQCPAbstractPlottable1D< QCPFinancialData >
 CQCPAbstractPlottable1D< QCPGraphData >
 CQCPAbstractPlottable1D< QCPStatisticalBoxData >
 CQCPErrorBarsA plottable that adds a set of error bars to other plottables
 CQCPRangeRepresents the range an axis is encompassing
 CQCPScatterStyleRepresents the visual appearance of scatter points
 CQCPSelectionDecoratorControls how a plottable's data selection is drawn
 CQCPSelectionDecoratorBracketA selection decorator which draws brackets around each selected data segment
 CQCPStatisticalBoxDataHolds the data of one single data point for QCPStatisticalBox
 CQCPVector2DRepresents two doubles as a mathematical 2D vector
 CQCustomPlotThe central class of the library. This is the QWidget which displays the plot and interacts with the user
-
-
- - diff --git a/third_party/qcustomplot/documentation/html/index.html b/third_party/qcustomplot/documentation/html/index.html deleted file mode 100644 index 42fa0280..00000000 --- a/third_party/qcustomplot/documentation/html/index.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - -QCustomPlot 2.1.1 Documentation - - - - -
-
-
QCustomPlot 2.1.1 Documentation
-
-
-
-qcp-doc-logo.png -
-

If you are new to QCustomPlot and just want to start using it, it's recommended to look at the tutorials and examples at

-

https://www.qcustomplot.com/

-

This documentation is especially helpful as a reference, when you're familiar with the basics of data visualization with QCustomPlot and you wish to learn more about specific functionality or more advanced concepts. See the class overview for diagrams explaining the relationships between the most important classes of the QCustomPlot library.

-

-Plottables

-

Plottables are classes that display any kind of data in QCustomPlot. They all derive from QCPAbstractPlottable. For example, QCPGraph is a plottable that displays a graph with different line styles, scatter styles, filling etc.

-

Since plotting graphs is such a dominant use case, QCustomPlot has a special interface for working with QCPGraph plottables, that makes it very easy to handle them:
- A new graph can be created with QCustomPlot::addGraph and accessed with QCustomPlot::graph.

-

For all other plottables, the normal plottable interface is used: First, an instance of the respective plottable is created and added to the QCustomPlot, e.g.

QCPCurve *newCurve = new QCPCurve(customPlot->xAxis, customPlot->yAxis);

The properties of the newly created plottable can then be accessed via the newCurve pointer.

-

Plottables (including graphs) can be retrieved via QCustomPlot::plottable. Since the return type of that function is the abstract base class of all plottables, QCPAbstractPlottable, you will probably want to qobject_cast the returned pointer to the respective plottable subclass. As usual, the cast returns nullptr if the plottable wasn't of that specific subclass.

-

All further interfacing with plottables (e.g how to set data) is specific to the plottable type. See the documentations of the subclasses: QCPGraph, QCPCurve, QCPBars, QCPStatisticalBox, QCPColorMap, QCPFinancial.

-

-Controlling the Axes

-

QCustomPlot has four default axes: xAxis (bottom), yAxis (left), xAxis2 (top), yAxis2 (right).

-

Their range is handled by the simple QCPRange class which basically holds the lower and upper axis coordinate. You can set the range with the QCPAxis::setRange function. To change the axis scale type from a linear scale to a logarithmic scale, set QCPAxis::setScaleType to QCPAxis::stLogarithmic. In that case you will also want logarithmically spaced ticks and tick labels, so set the axis ticker with QCPAxis::setTicker to a QCPAxisTickerLog instance.

-

Each axis can be given an axis label (e.g. "Voltage (mV)") with QCPAxis::setLabel.

-

By default, an axis automatically creates and labels ticks in a sensible manner. See the various methods of the QCPAxis documentation for fine-tuning. Ticks can be disabled for an axis via QCPAxis::setTicks. If you only wish to hide tick labels (the numbers), use QCPAxis::setTickLabels. Note that the default right and top axes start out with hidden tick labels.

-

The distance of an axis backbone to the respective viewport/widget border is called its margin. Normally, the margins are calculated automatically to fit the axis and tick labels. To change this, set QCPAxisRect::setAutoMargins to exclude the respective margin sides, and set the margins manually with QCPAxisRect::setMargins. The main axis rect can be accessed with QCustomPlot::axisRect(). A detailed explanation of the different margins/paddings/offset options is given in the QCPAxisRect and QCPAxis documentation.

-

-Plot Legend

-

Every QCustomPlot has one QCPLegend (as QCustomPlot::legend) by default. A legend is a small layout element inside the plot which lists the plottables with an icon of the plottable line/symbol and a name (QCPAbstractPlottable::setName). Plottables can be added and removed from the legend via QCPAbstractPlottable::addToLegend and QCPAbstractPlottable::removeFromLegend. By default, adding a plottable to QCustomPlot automatically adds it to the legend, too. This behaviour can be changed with the QCustomPlot::setAutoAddPlottableToLegend property.

-

QCPLegend provides an interface to access, add and remove legend items directly, too. See QCPLegend::item, QCPLegend::itemWithPlottable, QCPLegend::addItem, QCPLegend::removeItem for example.

-

Multiple legends are supported via the layout system (since a QCPLegend is a normal layout element).

-

-User Interaction

-

QCustomPlot supports dragging axis ranges with the mouse (QCPAxisRect::setRangeDrag), zooming axis ranges with the mouse wheel (QCPAxisRect::setRangeZoom) and a complete selection mechanism with configurable granularity down to data points and data ranges.

-

The availability of these interactions is controlled with QCustomPlot::setInteractions. For details about the interaction system, see the documentation there. The data selection is discussed in detail on the dedicated Data Selection Mechanism page.

-

Further, QCustomPlot always emits corresponding signals, when objects are clicked or doubleClicked. See QCustomPlot::plottableClick, QCustomPlot::plottableDoubleClick and QCustomPlot::axisClick for example.

-

Finally on the lowest level you can work with the QCPLayerable mouse event virtual methods in own subclasses, that the QCustomPlot instance calls on the affected layerable.

-

-Decorations and Auxiliary Items

-

Apart from plottables there is another category of plot objects that are important: Items. The base class of all items is QCPAbstractItem. An item sets itself apart from plottables in that it's not necessarily bound to any axes. This means it may also be positioned in absolute pixel coordinates or placed at a relative position on an axis rect. Further, it usually doesn't represent data directly, but acts as decoration, emphasis, description etc.

-

Multiple items can be arranged in a parent-child-hierarchy allowing for dynamical behaviour. For example, you could place the head of an arrow at a fixed plot coordinate, so it always points to some important area in the plot. The tail of the arrow can be anchored to a text item which always resides in the top center of the axis rect, independent of where the user drags the axis ranges. This way the arrow stretches and turns so it always points from the label to the specified plot coordinate, without any further code necessary.

-

For a more detailed introduction, see the QCPAbstractItem documentation, and from there the documentations of the individual standard items, to find out how to use them.

-

-Layout Elements and Layouts

-

QCustomPlot uses an internal layout system to provide dynamic sizing and positioning of objects like the axis rect(s), legends, color scales, and other layout elements. They are all based on QCPLayoutElement and are arranged by placing them inside a QCPLayout subclass, like QCPLayoutGrid.

-

See the page about the layout system for details.

-

-OpenGL Accelerated Plotting and Performance Improvement

-

QCustomPlot has multiple OpenGL backends to provide OpenGL hardware accelerated plotting across all supported Qt versions. If the computer supports OpenGL, you can enable it by compiling with QCUSTOMPLOT_USE_OPENGL and simply calling setOpenGl(true) on the respective QCustomPlot instance. More details are given in the documentation of that method.

-

Information on maximizing plot performance for demanding visualization tasks can be found on the dedicated page about Plot Performance Improvement.

-

-Preprocessor Define Flags

-

QCustomPlot understands some preprocessor defines that are useful for debugging and compilation. The flags must be defined before including the QCustomPlot header. Usually it's best to add them to your qmake project file, using e.g. DEFINES += QCUSTOMPLOT_USE_OPENGL

-
-
QCUSTOMPLOT_USE_OPENGL
-
If this flag is defined, QCustomPlot can use OpenGL to improve plot performance for graphically demanding plots, see QCustomPlot::setOpenGl.
-
QCUSTOMPLOT_COMPILE_LIBRARY
-
Define this flag when compiling QCustomPlot as a shared library (.so/.dll)
-
QCUSTOMPLOT_USE_LIBRARY
-
Define this flag before including the header, when using QCustomPlot as a shared library
-
QCUSTOMPLOT_CHECK_DATA
-
If this flag is defined, the QCustomPlot plottables will perform data validity checks on every redraw. They will give qDebug output when encountering inf or nan values (also if silent NaNs are used intentionally to create gaps in graphs).
-
-

-Using QCustomPlot with special Qt flags

-

See the page Special Qt Flags if your project uses QT_NO_CAST_FROM_ASCII, QT_NO_CAST_TO_ASCII or QT_NO_KEYWORDS.

-


-
-
-
-
-
-

-
- - diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_0.png b/third_party/qcustomplot/documentation/html/inherit_graph_0.png deleted file mode 100644 index af22b81b..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_0.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_1.png b/third_party/qcustomplot/documentation/html/inherit_graph_1.png deleted file mode 100644 index b9528c59..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_1.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_10.png b/third_party/qcustomplot/documentation/html/inherit_graph_10.png deleted file mode 100644 index db386187..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_10.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_11.png b/third_party/qcustomplot/documentation/html/inherit_graph_11.png deleted file mode 100644 index 11a048bc..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_11.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_12.png b/third_party/qcustomplot/documentation/html/inherit_graph_12.png deleted file mode 100644 index 9ccebae4..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_12.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_13.png b/third_party/qcustomplot/documentation/html/inherit_graph_13.png deleted file mode 100644 index f7217b5b..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_13.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_14.png b/third_party/qcustomplot/documentation/html/inherit_graph_14.png deleted file mode 100644 index 95583909..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_14.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_15.png b/third_party/qcustomplot/documentation/html/inherit_graph_15.png deleted file mode 100644 index 8b2def6a..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_15.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_16.png b/third_party/qcustomplot/documentation/html/inherit_graph_16.png deleted file mode 100644 index 10e12fbd..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_16.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_17.png b/third_party/qcustomplot/documentation/html/inherit_graph_17.png deleted file mode 100644 index 2445275e..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_17.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_18.png b/third_party/qcustomplot/documentation/html/inherit_graph_18.png deleted file mode 100644 index 199743b0..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_18.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_19.png b/third_party/qcustomplot/documentation/html/inherit_graph_19.png deleted file mode 100644 index ec6e4524..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_19.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_2.png b/third_party/qcustomplot/documentation/html/inherit_graph_2.png deleted file mode 100644 index 3babe91e..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_2.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_20.png b/third_party/qcustomplot/documentation/html/inherit_graph_20.png deleted file mode 100644 index 5f8b4bb2..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_20.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_21.png b/third_party/qcustomplot/documentation/html/inherit_graph_21.png deleted file mode 100644 index 2071d512..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_21.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_22.png b/third_party/qcustomplot/documentation/html/inherit_graph_22.png deleted file mode 100644 index c8e1833d..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_22.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_23.png b/third_party/qcustomplot/documentation/html/inherit_graph_23.png deleted file mode 100644 index 8b3d5dfb..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_23.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_24.png b/third_party/qcustomplot/documentation/html/inherit_graph_24.png deleted file mode 100644 index ea1625ae..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_24.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_3.png b/third_party/qcustomplot/documentation/html/inherit_graph_3.png deleted file mode 100644 index c899cace..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_3.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_4.png b/third_party/qcustomplot/documentation/html/inherit_graph_4.png deleted file mode 100644 index 03e53c40..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_4.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_5.png b/third_party/qcustomplot/documentation/html/inherit_graph_5.png deleted file mode 100644 index e59e3e29..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_5.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_6.png b/third_party/qcustomplot/documentation/html/inherit_graph_6.png deleted file mode 100644 index 63c4e4e1..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_6.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_7.png b/third_party/qcustomplot/documentation/html/inherit_graph_7.png deleted file mode 100644 index 6e437f60..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_7.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_8.png b/third_party/qcustomplot/documentation/html/inherit_graph_8.png deleted file mode 100644 index c16e1cec..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_8.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherit_graph_9.png b/third_party/qcustomplot/documentation/html/inherit_graph_9.png deleted file mode 100644 index 11219955..00000000 Binary files a/third_party/qcustomplot/documentation/html/inherit_graph_9.png and /dev/null differ diff --git a/third_party/qcustomplot/documentation/html/inherits.html b/third_party/qcustomplot/documentation/html/inherits.html deleted file mode 100644 index fa4f1b91..00000000 --- a/third_party/qcustomplot/documentation/html/inherits.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - -Class Hierarchy - - - - -
-
-
Class Hierarchy
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- - - - - - - - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - - -
- - - -
- - - -
- - - -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- - - -
- - - - -
- - - -
- - - -
- - - -
-
- - diff --git a/third_party/qcustomplot/documentation/html/jquery.js b/third_party/qcustomplot/documentation/html/jquery.js deleted file mode 100644 index f5343eda..00000000 --- a/third_party/qcustomplot/documentation/html/jquery.js +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * jQuery JavaScript Library v1.7.1 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Nov 21 21:11:03 2011 -0500 - */ -(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*! - * jQuery UI 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! - * jQuery UI Widget 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Widget - */ -(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! - * jQuery UI Mouse 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Mouse - * - * Depends: - * jquery.ui.widget.js - */ -(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! - * jQuery hashchange event - v1.3 - 7/21/2010 - * http://benalman.com/projects/jquery-hashchange-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('