diff -Nru kcollectd-0.10.2/ChangeLog kcollectd-0.11.0/ChangeLog --- kcollectd-0.10.2/ChangeLog 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/ChangeLog 2020-02-23 19:32:25.000000000 +0000 @@ -1,87 +1,92 @@ -2019-08-22: - Version 0.10 - Port to Qt5 - Package taken over - -2010-01-31: - Version 0.9 - session-management - -2009-11-30: - Version 0.8.2 - make it compile with binutils-gold (see debian Bug#554939) - -2009-10-11: - Version 0.8.1 - added a manual to make the help-menu-entry work. - -2009-06-06: - Version 0.8 - added drag-n-drop Pixmap - make datasource-tree hideable - multiline legends - -2009-06-01: - read argument from commandline to load file - load/save config in xml-file - -2009-05-31: - added Menus - main window now is a KMainWindow - -2009-05-26: - Version 0.7 - context-menu - changed functionality of gui. - now datasources has to be dragged to graph-widget - -2009-05-10: - widgets allows multigraphs - -2009-05-03: - Version: 0.6 - added auto-update-and-follow-mode to manpage - changed from reading command-output of “rrdtool info” - to using the (new) function in rrd API - -2009-04-19: - Ported to KDE4 - single leave-entries are no longer shown in tree - -2009-03-31: - fixed overlapping of labels on flat graphs - improved horzontal-lines (there can now be 10, 5 or 2 in a region) - -2009-01-08: - Version 0.3 - fixed bug reported by Daniel Clark (this was a security problem) - -2008-08-01: - removed dependency on kglobalsettings.h from graph-widget - most of minmax → misc.cc - code-cleanup - removed y_range and base vom Graph-widget-class - -2008-07-31: - Version 0.2 - multi-select. The user now can select multible datasources. - There might be problems if rrd-layout differs between datasources - some cleanup - -2008-07-23 - some cleanup, time-axes - -2008-07-14 - removed the label displaying the datasource - added last-{hour,day,week,month}-buttons - added some sensiblity-checks to zooming - fixed Qt-problem with strftimes localized output - some more comments - color_-variables - KDE-defaultcolor for text - translation de fixed - name as a graph-label (but inactive) - -2008-07-10 - translation +### 2020-02-23: + - Version 0.11 + - Code and documentation cleanup (thank you Pino Toscano!) + - Split paths on - character: + - Should make the df plugin more convenient + +### 2019-08-22: + - Version 0.10 + - Port to Qt5 + - Package taken over + +### 2010-01-31: + - Version 0.9 + - session-management + +### 2009-11-30: + - Version 0.8.2 + - make it compile with binutils-gold (see debian Bug###554939) + +### 2009-10-11: + - Version 0.8.1 + - added a manual to make the help-menu-entry work. + +### 2009-06-06: + - Version 0.8 + - added drag-n-drop Pixmap + - make datasource-tree hideable + - multiline legends + +### 2009-06-01: + - read argument from commandline to load file + - load/save config in xml-file + +### 2009-05-31: + - added Menus + - main window now is a KMainWindow + +### 2009-05-26: + - Version 0.7 + - context-menu + - changed functionality of gui. + - now datasources has to be dragged to graph-widget + +### 2009-05-10: + - widgets allows multigraphs + +### 2009-05-03: + - Version: 0.6 + - added auto-update-and-follow-mode to manpage + - changed from reading command-output of “rrdtool info” + - - to using the (new) function in rrd API + +### 2009-04-19: + - Ported to KDE4 + - single leave-entries are no longer shown in tree + +### 2009-03-31: + - fixed overlapping of labels on flat graphs + - improved horzontal-lines (there can now be 10, 5 or 2 in a region) + +### 2009-01-08: + - Version 0.3 + - fixed bug reported by Daniel Clark (this was a security problem) + +### 2008-08-01: + - removed dependency on kglobalsettings.h from graph-widget + - most of minmax → misc.cc + - code-cleanup + - removed y_range and base vom Graph-widget-class + +### 2008-07-31: + - Version 0.2 + - multi-select. The user now can select multible datasources. + - There might be problems if rrd-layout differs between datasources + - some cleanup + +### 2008-07-23 + - some cleanup, time-axes + +### 2008-07-14 + - removed the label displaying the datasource + - added last-{hour,day,week,month}-buttons + - added some sensiblity-checks to zooming + - fixed Qt-problem with strftimes localized output + - some more comments + - color_-variables + - KDE-defaultcolor for text + - translation de fixed + - name as a graph-label (but inactive) +### 2008-07-10 + - translation diff -Nru kcollectd-0.10.2/CMakeLists.txt kcollectd-0.11.0/CMakeLists.txt --- kcollectd-0.10.2/CMakeLists.txt 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/CMakeLists.txt 2020-02-23 19:32:25.000000000 +0000 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.0) cmake_policy(SET CMP0063 NEW) -project(kcollectd VERSION 0.10.2) +project(kcollectd VERSION 0.11.0) find_package(ECM REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) diff -Nru kcollectd-0.10.2/debian/changelog kcollectd-0.11.0/debian/changelog --- kcollectd-0.10.2/debian/changelog 2020-02-23 17:19:52.000000000 +0000 +++ kcollectd-0.11.0/debian/changelog 2020-02-23 18:55:48.000000000 +0000 @@ -1,3 +1,16 @@ +kcollectd (0.11.0-1) unstable; urgency=medium + + * New upstream release 0.11.0. + - Includes better handling of long paths. + * Remove upstreamed patches. + * Upstream changes to manual pages. + * Add Rules-Requires-Root: no. + * Update upstream website. + * Refresh upstream signing key. + * Update debian/watch. + + -- Antonio Russo Sun, 23 Feb 2020 11:55:48 -0700 + kcollectd (0.10.2-3) unstable; urgency=medium * Team upload. diff -Nru kcollectd-0.10.2/debian/control kcollectd-0.11.0/debian/control --- kcollectd-0.10.2/debian/control 2020-02-23 16:45:13.000000000 +0000 +++ kcollectd-0.11.0/debian/control 2020-02-23 18:55:48.000000000 +0000 @@ -24,7 +24,8 @@ qtbase5-dev, shared-mime-info Standards-Version: 4.5.0 -Homepage: https://gitlab.com/aerusso/kcollectd +Rules-Requires-Root: no +Homepage: https://www.antonioerusso.com/projects/kcollectd Vcs-Git: https://salsa.debian.org/qt-kde-team/extras/kcollectd.git Vcs-Browser: https://salsa.debian.org/qt-kde-team/extras/kcollectd diff -Nru kcollectd-0.10.2/debian/kcollectd.manpages kcollectd-0.11.0/debian/kcollectd.manpages --- kcollectd-0.10.2/debian/kcollectd.manpages 2020-01-31 07:52:30.000000000 +0000 +++ kcollectd-0.11.0/debian/kcollectd.manpages 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -doc/kcollectd.1 diff -Nru kcollectd-0.10.2/debian/patches/series kcollectd-0.11.0/debian/patches/series --- kcollectd-0.10.2/debian/patches/series 2020-02-23 16:40:19.000000000 +0000 +++ kcollectd-0.11.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -upstream_build-properly-enable-the-C-exceptions.patch -upstream_build-do-not-override-CXXFLAGS.patch diff -Nru kcollectd-0.10.2/debian/patches/upstream_build-do-not-override-CXXFLAGS.patch kcollectd-0.11.0/debian/patches/upstream_build-do-not-override-CXXFLAGS.patch --- kcollectd-0.10.2/debian/patches/upstream_build-do-not-override-CXXFLAGS.patch 2020-02-23 16:38:29.000000000 +0000 +++ kcollectd-0.11.0/debian/patches/upstream_build-do-not-override-CXXFLAGS.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -From 6410ffb8eca0f8f0cf0dcd49cdb8b25ef8688114 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Fri, 31 Jan 2020 16:19:27 +0100 -Subject: [PATCH] build: do not override CXXFLAGS - -No additional flags are set, so do not override CXXFLAGS by effectively -removing all the existing ones (both from ECM, and from environment). ---- - kcollectd/CMakeLists.txt | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/kcollectd/CMakeLists.txt b/kcollectd/CMakeLists.txt -index 7841516..fcda44a 100644 ---- a/kcollectd/CMakeLists.txt -+++ b/kcollectd/CMakeLists.txt -@@ -14,8 +14,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/icons/sc-apps-kcollectd.svgz - ) - - --set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAG}") -- - add_executable(kcollectd - graph.cc - gui.cc --- -2.25.0 - diff -Nru kcollectd-0.10.2/debian/patches/upstream_build-properly-enable-the-C-exceptions.patch kcollectd-0.11.0/debian/patches/upstream_build-properly-enable-the-C-exceptions.patch --- kcollectd-0.10.2/debian/patches/upstream_build-properly-enable-the-C-exceptions.patch 2020-02-23 16:38:29.000000000 +0000 +++ kcollectd-0.11.0/debian/patches/upstream_build-properly-enable-the-C-exceptions.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -From 83e217496b0f0ab05d168485062312830c8fb651 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Fri, 31 Jan 2020 16:18:32 +0100 -Subject: [PATCH] build: properly enable the C++ exceptions - -boost::filesystem uses C++ exceptions, so use the per-target ECM macro -to enable them when building the kcollectd target. - -This is needed as ECM disables them by default. ---- - kcollectd/CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/kcollectd/CMakeLists.txt b/kcollectd/CMakeLists.txt -index 5e26c9a..7841516 100644 ---- a/kcollectd/CMakeLists.txt -+++ b/kcollectd/CMakeLists.txt -@@ -25,6 +25,8 @@ add_executable(kcollectd - timeaxis.cc) - set(rrd_LIBRARIES rrd) - -+kde_target_enable_exceptions(kcollectd PRIVATE) -+ - target_link_libraries(kcollectd - PUBLIC - KF5::XmlGui --- -2.25.0 - diff -Nru kcollectd-0.10.2/debian/upstream/signing-key.asc kcollectd-0.11.0/debian/upstream/signing-key.asc --- kcollectd-0.10.2/debian/upstream/signing-key.asc 2020-01-31 07:52:30.000000000 +0000 +++ kcollectd-0.11.0/debian/upstream/signing-key.asc 2020-02-23 18:55:48.000000000 +0000 @@ -23,88 +23,159 @@ WFJXvk/RvX8yUt5GaXafMrr0zd6cT9tbnPX+Q5rFdAhBTnyUUvOaPzzZBPn9w56l gOzv79lpYc3dUHQSNGKeGxup83o456bXaYPgX0YkdQkJyfc/BgKu8ha0P3b+Ll4Z eKi53N1F8Z3MtMNGNBueZ3HF36rJZlrxrKFMhCHEWLB3Gk+W9b5Oz9cS4Cu1GtBA -BX5ck3qtttj3aXF8XHe29zlqqezJlQbBmtK27FyMLhjICDaQmrdVIWug3cst7Ta0 -JkFudG9uaW8gUnVzc28gPGFlcnVzc29AYWx1bW5pLmNtdS5lZHU+iQI3BBMBCgAh -BQJW+hk9AhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJELAcU9Xe1KTu/sYQ -AKF51sVB+SBac2pAkJv7khMHmszLtdcnXbIWWe5pPWGRN8so6Lf74f82yV8snrb6 -RISv20jtAbu51BAblNS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rEI +mmI/E812tmjdnBl+Utq+Cfg= +=PZa2 -----END PGP PUBLIC KEY BLOCK----- diff -Nru kcollectd-0.10.2/debian/watch kcollectd-0.11.0/debian/watch --- kcollectd-0.10.2/debian/watch 2020-01-31 07:52:30.000000000 +0000 +++ kcollectd-0.11.0/debian/watch 2020-02-23 18:55:48.000000000 +0000 @@ -1,3 +1,3 @@ version=4 opts="mode=git,pgpmode=gittag" https://gitlab.com/aerusso/kcollectd.git \ - refs/tags/v([\d\.]+) + refs/tags/v([\d\.]+) debian uupdate diff -Nru kcollectd-0.10.2/doc/CMakeLists.txt kcollectd-0.11.0/doc/CMakeLists.txt --- kcollectd-0.10.2/doc/CMakeLists.txt 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/doc/CMakeLists.txt 2020-02-23 19:32:25.000000000 +0000 @@ -1,2 +1,3 @@ subdirs(en) +kdoctools_create_manpage(man-kcollectd.1.docbook 1 INSTALL_DESTINATION ${KDE_INSTALL_MANDIR}) diff -Nru kcollectd-0.10.2/doc/en/index.docbook kcollectd-0.11.0/doc/en/index.docbook --- kcollectd-0.10.2/doc/en/index.docbook 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/doc/en/index.docbook 2020-02-23 19:32:25.000000000 +0000 @@ -1,5 +1,5 @@ -kcollectd 0.10.2"> diff -Nru kcollectd-0.10.2/doc/kcollectd.1 kcollectd-0.11.0/doc/kcollectd.1 --- kcollectd-0.10.2/doc/kcollectd.1 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/doc/kcollectd.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH KCOLLECTD 1 "31 August 2019" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -kcollectd \- displays system time-series monitoring information in collectd -rrd datacollections -.SH SYNOPSIS -.B kcollectd -.\"RI [ options ] " files" ... -.SH DESCRIPTION -.B kcollectd -is a simple application that presents -\fBcollectd\fR(1) -time-series data in a natural way. The mousewheel up and down action -lets you zoom in and out, respectively, and click and dragging lets you -move around (in the recorded history). There is an automatic -update-and-follow mode, which presents new data in real time, allowing -kcollectd to be used as a status monitor. -.PP -At the left side of the window there is a tree that lists all identified -\fBcollectd\fR(1) data sources. -You can display any such data by dragging it onto the desired graph in the -right hand panel. -.PP -At the right, various data sources are shown in graphs. You can move -the graph to the left or right with the mouse and zoom in or out with -the mousewheel or the zoombuttons. Plots can be created and destroyed from -the right-click context menu. The context menu also allows for the deletion -of unwanted data sources from a given graph. -.PP -At the lower left the auto-update-button switches kcollectd into the -update-and-follow-mode. In this mode the right side of the graph is pinned to -the current time, and new data is presented in real time. The plot can still -be zoomed with the mouse wheel. -.SH AUTHOR -kcollectd was written by M G Berberich. -.PP -This manual page was written by M G Berberich -and Antonio Russo . -.SH "SEE ALSO" -.BR collectd(1) -.BR rrdtool(1) diff -Nru kcollectd-0.10.2/doc/man-kcollectd.1.docbook kcollectd-0.11.0/doc/man-kcollectd.1.docbook --- kcollectd-0.10.2/doc/man-kcollectd.1.docbook 1970-01-01 00:00:00.000000000 +0000 +++ kcollectd-0.11.0/doc/man-kcollectd.1.docbook 2020-02-23 19:32:25.000000000 +0000 @@ -0,0 +1,90 @@ + + +kcollectd"> +collectd"> +]> + + + +KCollectd User's Manual +M GBerberich +KCollectd, this man page. +berberic@fmi.uni-passau.de +AntonioRusso +KCollectd man page. +antonio.e.russo@gmail.com +2019-08-31 +KCollectd 0.10.2 + + + +&kcollectd; +1 + + + +kcollectd +displays system time-series monitoring information in collectd rrd datacollections + + + + +kcollectd +KCollectd options +file + + + +Description +&kcollectd; is a simple application that presents &collectd; +time-series data in a natural way. The mousewheel up and down action +lets you zoom in and out, respectively, and click and dragging lets you +move around (in the recorded history). There is an automatic +update-and-follow mode, which presents new data in real time, allowing +&kcollectd; to be used as a status monitor. + +At the left side of the window there is a tree that lists all identified +&collectd; data sources. +You can display any such data by dragging it onto the desired graph in the +right hand panel. + +At the right, various data sources are shown in graphs. You can move +the graph to the left or right with the mouse and zoom in or out with +the mousewheel or the zoom buttons. Plots can be created and destroyed from +the right-click context menu. The context menu also allows for the deletion +of unwanted data sources from a given graph. + +At the lower left the auto-update-button switches &kcollectd; into the +update-and-follow-mode. In this mode the right side of the graph is pinned to +the current time, and new data is presented in real time. The plot can still +be zoomed with the mouse wheel. + + +Arguments + + + + +A collectd file to open. + + + + + + +See Also + +More detailed user documentation is available from help:/kcollectd +(either enter this URL into &konqueror;, or run +khelpcenter +help:/kcollectd). +kf5options(7) +qt5options(7) +collectd(1) +rrdtool(1) + + + + diff -Nru kcollectd-0.10.2/kcollectd/CMakeLists.txt kcollectd-0.11.0/kcollectd/CMakeLists.txt --- kcollectd-0.10.2/kcollectd/CMakeLists.txt 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/CMakeLists.txt 2020-02-23 19:32:25.000000000 +0000 @@ -13,8 +13,22 @@ ${CMAKE_CURRENT_SOURCE_DIR}/icons/sc-apps-kcollectd.svgz ) +set(KCOLLECTD_MIME_ICONS_PNG + ${CMAKE_CURRENT_SOURCE_DIR}/icons/16-mimetypes-application-x-kcollectd.png + ${CMAKE_CURRENT_SOURCE_DIR}/icons/22-mimetypes-application-x-kcollectd.png + ${CMAKE_CURRENT_SOURCE_DIR}/icons/32-mimetypes-application-x-kcollectd.png + ${CMAKE_CURRENT_SOURCE_DIR}/icons/48-mimetypes-application-x-kcollectd.png + ${CMAKE_CURRENT_SOURCE_DIR}/icons/64-mimetypes-application-x-kcollectd.png + ${CMAKE_CURRENT_SOURCE_DIR}/icons/128-mimetypes-application-x-kcollectd.png +) + +set(KCOLLECTD_MIME_ICONS_SVG + ${CMAKE_CURRENT_SOURCE_DIR}/icons/sc-mimetypes-application-x-kcollectd.svgz +) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAG}") +ecm_install_icons( + ICONS ${KCOLLECTD_ICONS_PNG} ${KCOLLECTD_ICONS_SVG} ${KCOLLECTD_MIME_ICONS_PNG} ${KCOLLECTD_MIME_ICONS_SVG} + DESTINATION ${ICON_INSTALL_DIR}) add_executable(kcollectd graph.cc @@ -25,6 +39,8 @@ timeaxis.cc) set(rrd_LIBRARIES rrd) +kde_target_enable_exceptions(kcollectd PRIVATE) + target_link_libraries(kcollectd PUBLIC KF5::XmlGui diff -Nru kcollectd-0.10.2/kcollectd/graph.cc kcollectd-0.11.0/kcollectd/graph.cc --- kcollectd-0.10.2/kcollectd/graph.cc 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/graph.cc 2020-02-23 19:32:25.000000000 +0000 @@ -1,8 +1,8 @@ -/* - Constructs a font object that uses the application's default font. +/* + Constructs a font object that uses the application's default font. * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd - * + * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or @@ -21,56 +21,48 @@ #include -#include #include +#include -#include -#include -#include -#include #include +#include #include #include +#include +#include +#include #include -#include "rrd_interface.h" +#include "graph.h" #include "misc.h" +#include "rrd_interface.h" #include "timeaxis.h" -#include "graph.h" -#define I18N_NOOP(text) text +#define I18N_NOOP(text) text // some magic numbers // colors static const double colortable[][3] = { - { 0, 255, 0}, - { 255, 0, 255 }, - { 0, 128, 255 }, - { 255, 128, 0 }, - { 0, 255, 191}, - { 64, 0, 255 }, - { 255, 0, 64 }, - { 191,255,0 } }; + {0, 255, 0}, {255, 0, 255}, {0, 128, 255}, {255, 128, 0}, + {0, 255, 191}, {64, 0, 255}, {255, 0, 64}, {191, 255, 0}}; // magnification for the header-font static const double header_font_mag = 1.2; // distance between elements -const int marg = 2; +const int marg = 2; -inline double norm(const QPointF &a) -{ - return sqrt(a.x()*a.x() + a.y()*a.y()); +inline double norm(const QPointF &a) { + return sqrt(a.x() * a.x() + a.y() * a.y()); } /** * draw an arrow * origin: IRC:peppe */ -void drawArrow(QPainter &p, const QPoint &first, const QPoint &second) -{ +void drawArrow(QPainter &p, const QPoint &first, const QPoint &second) { p.save(); QPen pen = p.pen(); @@ -79,51 +71,48 @@ p.translate(second); QPointF difference = second - first; double angle = atan2(difference.y(), difference.x()); - angle *= 180.0/M_PI; // to degrees + angle *= 180.0 / M_PI; // to degrees p.rotate(angle); - + static const QPointF arrow[] = { - QPoint(0.0, 0.0), - QPoint(-5.0*width, -2.0*width), - QPoint(-4.0*width, 0.0), - QPoint(-5.0*width, 2.0*width) - }; - + QPoint(0.0, 0.0), QPoint(-5.0 * width, -2.0 * width), + QPoint(-4.0 * width, 0.0), QPoint(-5.0 * width, 2.0 * width)}; + p.setBrush(QBrush(pen.color(), Qt::SolidPattern)); - p.drawLine(-4.0*width, 0.0, -norm(difference), 0.0); + p.drawLine(-4.0 * width, 0.0, -norm(difference), 0.0); pen.setWidth(0); p.setPen(pen); p.drawPolygon(arrow, 4); - + p.restore(); } - + /** * */ -Graph::Graph(QWidget *parent) : - QFrame(parent), data_is_valid(false), - start(time(0)-3600*24), span(3600*24), step(1), dragging(false), - font(QFontDatabase::systemFont(QFontDatabase::GeneralFont)), - small_font(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont)), - color_major(140, 115, 60), color_minor(80, 65, 34), - color_graph_bg(0, 0, 0), - //color_major(255, 180, 180), color_minor(220, 220, 220), - //color_graph_bg(255, 255, 255), - //color_minmax(180, 255, 180, 200), color_line(0, 170, 0), - autoUpdateTimer(-1) -{ - setFrameStyle(QFrame::StyledPanel|QFrame::Plain); +Graph::Graph(QWidget *parent) + : QFrame(parent), data_is_valid(false), start(time(0) - 3600 * 24), + span(3600 * 24), step(1), dragging(false), + font(QFontDatabase::systemFont(QFontDatabase::GeneralFont)), + small_font( + QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont)), + color_major(140, 115, 60), color_minor(80, 65, 34), + color_graph_bg(0, 0, 0), + // color_major(255, 180, 180), color_minor(220, 220, 220), + // color_graph_bg(255, 255, 255), + // color_minmax(180, 255, 180, 200), color_line(0, 170, 0), + autoUpdateTimer(-1) { + setFrameStyle(QFrame::StyledPanel | QFrame::Plain); setMinimumWidth(300); setMinimumHeight(150); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setAcceptDrops(true); - + // setup color-tables - for (int i=0; i<8; ++i) { + for (int i = 0; i < 8; ++i) { color_line[i].setRgb(colortable[i][0], colortable[i][1], colortable[i][2]); - color_minmax[i].setRgb(0.5*colortable[i][0], 0.5*colortable[i][1], - 0.5*colortable[i][2], 160); + color_minmax[i].setRgb(0.5 * colortable[i][0], 0.5 * colortable[i][1], + 0.5 * colortable[i][2], 160); } // idiotic case-differentiation on point or pixelsize necessary :( @@ -132,50 +121,49 @@ } else { header_font.setPixelSize(header_font_mag * header_font.pixelSize()); } - + struct timezone tz; struct timeval tv; gettimeofday(&tv, &tz); tz_off = tz.tz_minuteswest * 60; } -/** +/** * get average, min and max data * * set start end to the values get_rrd_data returns * don't change span, because it can shrink */ -bool Graph::fetchAllData () -{ +bool Graph::fetchAllData() { if (data_is_valid) return (true); - + if (empty()) return (false); - for(graph_list::iterator i = begin(); i != end(); ++i) { - for(GraphInfo::iterator j = i->begin(); j != i->end(); ++j) { + for (graph_list::iterator i = begin(); i != end(); ++i) { + for (GraphInfo::iterator j = i->begin(); j != i->end(); ++j) { const std::string file(j->rrd.toUtf8().data()); - const std::string ds(j->ds.toUtf8().data()); - + const std::string ds(j->ds.toUtf8().data()); + data_start = start; data_end = start + span; step = 1; - get_rrd_data (file, ds, &data_start, &data_end, &step, - "MIN", &j->min_data); - + get_rrd_data(file, ds, &data_start, &data_end, &step, "MIN", + &j->min_data); + data_start = start; data_end = start + span; step = 1; - get_rrd_data (file, ds, &data_start, &data_end, &step, - "MAX", &j->max_data); - + get_rrd_data(file, ds, &data_start, &data_end, &step, "MAX", + &j->max_data); + data_start = start; data_end = start + span; step = 1; - get_rrd_data (file, ds, &data_start, &data_end, &step, - "AVERAGE", &j->avg_data); - } + get_rrd_data(file, ds, &data_start, &data_end, &step, "AVERAGE", + &j->avg_data); + } } data_is_valid = true; @@ -183,22 +171,20 @@ } /** - * + * */ -void Graph::clear() -{ +void Graph::clear() { glist.clear(); data_is_valid = false; layout(); update(); } -int Graph::calcLegendHeights(int box_size, int width) -{ +int Graph::calcLegendHeights(int box_size, int width) { const QFontMetrics &fontmetric = fontMetrics(); int total_legend_height = 0; - for(graph_list::iterator i = begin(); i != end(); ++i) { + for (graph_list::iterator i = begin(); i != end(); ++i) { if (i->empty()) { i->legend_lines(0); @@ -206,25 +192,25 @@ } std::vector label_width; - for(GraphInfo::const_iterator gi = i->begin(); gi != i->end(); ++gi) + for (GraphInfo::const_iterator gi = i->begin(); gi != i->end(); ++gi) label_width.push_back(fontmetric.width(gi->label) + box_size + marg); - + const int n = label_width.size(); int r; - for(r = 1; r < n; ++r) { - const int col = (n+r-1)/r; - int total_width = 0, i=0; - for (int j=0; jlegend_lines(r); total_legend_height += r * fontmetric.lineSpacing(); @@ -232,36 +218,34 @@ return total_legend_height; } -void Graph::drawLegend(QPainter &paint, int left, int y, - int box_size, const GraphInfo &ginfo) -{ +void Graph::drawLegend(QPainter &paint, int left, int y, int box_size, + const GraphInfo &ginfo) { const QFontMetrics &fontmetric = fontMetrics(); int n = 0, cy = y, cx = left, max_width = 0; int lines = ginfo.legend_lines(); if (lines) { - for(GraphInfo::const_iterator i = ginfo.begin(); i != ginfo.end(); ++i) { - paint.drawRect(cx, cy-box_size, box_size-1, box_size-1); - paint.fillRect(cx+1, cy-box_size+1, box_size-2, box_size-2, - color_line[n % 8]); + for (GraphInfo::const_iterator i = ginfo.begin(); i != ginfo.end(); ++i) { + paint.drawRect(cx, cy - box_size, box_size - 1, box_size - 1); + paint.fillRect(cx + 1, cy - box_size + 1, box_size - 2, box_size - 2, + color_line[n % 8]); paint.drawText(cx + box_size + marg, cy, i->label); - + int w = box_size + marg + fontmetric.width(i->label); - if (w>max_width) - max_width = w; + if (w > max_width) + max_width = w; cy += fontmetric.lineSpacing(); ++n; if (n % lines == 0) { - cx += max_width + 4*marg; - max_width = 0; - cy = y; + cx += max_width + 4 * marg; + max_width = 0; + cy = y; } } } } -void Graph::drawHeader(QPainter &paint) -{ +void Graph::drawHeader(QPainter &paint) { paint.save(); paint.setFont(header_font); @@ -269,29 +253,27 @@ QString format; time_t time_span = data_end - data_start; - if (time_span > 3600*24*356) + if (time_span > 3600 * 24 * 356) format = i18n("%Y-%m"); - else if (time_span > 3600*24*31) + else if (time_span > 3600 * 24 * 31) format = i18n("%A %Y-%m-%d"); - else if (time_span > 3600*24) + else if (time_span > 3600 * 24) format = i18n("%A %Y-%m-%d %H:%M"); else format = i18n("%A %Y-%m-%d %H:%M:%S"); QString buffer_from = Qstrftime(format.toLatin1(), localtime(&data_start)); QString buffer_to = Qstrftime(format.toLatin1(), localtime(&data_end)); - QString label = i18n("from %1 to %2", - buffer_from, buffer_to); - int x = (contentsRect().left()+contentsRect().right())/2 - - fontmetric.width(label)/2; + QString label = i18n("from %1 to %2", buffer_from, buffer_to); + int x = (contentsRect().left() + contentsRect().right()) / 2 - + fontmetric.width(label) / 2; int y = fontmetric.ascent() + marg; paint.drawText(x, y, label); paint.restore(); } -void Graph::drawFooter(QPainter &paint, int left, int right) -{ +void Graph::drawFooter(QPainter &paint, int left, int right) { paint.save(); paint.setFont(header_font); @@ -299,11 +281,11 @@ QString format; time_t time_span = data_end - data_start; - if (time_span > 3600*24*356) + if (time_span > 3600 * 24 * 356) format = i18n("%Y-%m"); - else if (time_span > 3600*24*31) + else if (time_span > 3600 * 24 * 31) format = i18n("%A %Y-%m-%d"); - else if (time_span > 3600*24) + else if (time_span > 3600 * 24) format = i18n("%A %Y-%m-%d %H:%M"); else format = i18n("%A %Y-%m-%d %H:%M:%S"); @@ -311,40 +293,40 @@ QString buffer_from = Qstrftime(format.toLatin1(), localtime(&data_start)); QString buffer_to = Qstrftime(format.toLatin1(), localtime(&data_end)); QString label = i18n("from %1 to %2", buffer_from, buffer_to); - + fontmetric.width(label); - paint.drawText((left+right)/2-fontmetric.width(label)/2, - label_y2, label); + paint.drawText((left + right) / 2 - fontmetric.width(label) / 2, label_y2, + label); paint.restore(); } -void Graph::drawXLines(QPainter &paint, const QRect &rect, - time_iterator i, QColor color) -{ - if (!i.valid()) return; - +void Graph::drawXLines(QPainter &paint, const QRect &rect, time_iterator i, + QColor color) { + if (!i.valid()) + return; + // setting up linear mappings const linMap xmap(data_start, rect.left(), data_end, rect.right()); - + // if lines are to close draw nothing - if (i.interval() * xmap.m() < 3) + if (i.interval() * xmap.m() < 3) return; // draw lines paint.save(); paint.setPen(color); - for(; *i <= data_end; ++i) { + for (; *i <= data_end; ++i) { int x = xmap(*i); paint.drawLine(x, rect.top(), x, rect.bottom()); } paint.restore(); } -void Graph::drawXLabel(QPainter &paint, int y, int left, int right, - time_iterator i, QString format, bool center) -{ - if (!i.valid()) return; +void Graph::drawXLabel(QPainter &paint, int y, int left, int right, + time_iterator i, QString format, bool center) { + if (!i.valid()) + return; paint.save(); paint.setFont(small_font); @@ -352,36 +334,36 @@ const linMap xmap(data_start, left, data_end, right); // draw labels - if (center) --i; - for(; *i <= data_end; ++i) { + if (center) + --i; + for (; *i <= data_end; ++i) { // special handling for localtime/mktime on DST time_t t = center ? *i + i.interval() / 2 : *i; tm tm; localtime_r(&t, &tm); QString label = Qstrftime(i18n(format.toLatin1()).toLatin1(), &tm); - if(! label.isNull()) { + if (!label.isNull()) { const int width = paint.fontMetrics().width(label); - int x = center - ? xmap(*i + i.interval() / 2) - width / 2 - : xmap(*i) - width / 2; - + int x = center ? xmap(*i + i.interval() / 2) - width / 2 + : xmap(*i) - width / 2; + if (x > left && x + width < right) - paint.drawText(x, y, label); + paint.drawText(x, y, label); } } paint.restore(); } void Graph::findXGrid(int width, QString &format, bool ¢er, - time_iterator &minor_x, time_iterator &major_x, time_iterator &label_x) -{ + time_iterator &minor_x, time_iterator &major_x, + time_iterator &label_x) { const time_t min = 60; const time_t hour = 3600; - const time_t day = 24*hour; - const time_t week = 7*day; - const time_t month = 31*day; - const time_t year = 365*day; - + const time_t day = 24 * hour; + const time_t week = 7 * day; + const time_t month = 31 * day; + const time_t year = 365 * day; + enum bla { align_tzalign, align_week, align_month }; struct { time_t maxspan; @@ -391,71 +373,71 @@ bool center; bla align; } axis_params[] = { - { day, 1*min, 10, "%H:%M", false, align_tzalign }, - { day, 2*min, 30, "%H:%M", false, align_tzalign }, - { day, 5*min, min, "%H:%M", false, align_tzalign }, - { day, 10*min, min, "%H:%M", false, align_tzalign }, - { day, 30*min, 10*min, "%H:%M", false, align_tzalign }, - { day, hour, 10*min, "%H:%M", false, align_tzalign }, - { day, 2*hour, 30*min, "%H:%M", false, align_tzalign }, - { day, 3*hour, hour, "%H:%M", false, align_tzalign }, - { day, 6*hour, hour, "%H:%M", false, align_tzalign }, - { day, 12*hour, 3*hour, "%H:%M", false, align_tzalign }, - { week, 12*hour, 3*hour, "%a %H:%M", false, align_tzalign }, - { week, day, 3*hour, "%a", true, align_tzalign }, - { week, 2*day, 6*hour, "%a", true, align_tzalign }, - { month, day, 6*hour, "%a %d", true, align_tzalign }, - { month, day, 6*hour, "%d", true, align_tzalign }, - { year, week, day, I18N_NOOP("week %V"), true, align_week }, - { year, month, day, "%b", true, align_month }, - { 0, 0, 0, 0, true, align_tzalign }, + {day, 1 * min, 10, "%H:%M", false, align_tzalign}, + {day, 2 * min, 30, "%H:%M", false, align_tzalign}, + {day, 5 * min, min, "%H:%M", false, align_tzalign}, + {day, 10 * min, min, "%H:%M", false, align_tzalign}, + {day, 30 * min, 10 * min, "%H:%M", false, align_tzalign}, + {day, hour, 10 * min, "%H:%M", false, align_tzalign}, + {day, 2 * hour, 30 * min, "%H:%M", false, align_tzalign}, + {day, 3 * hour, hour, "%H:%M", false, align_tzalign}, + {day, 6 * hour, hour, "%H:%M", false, align_tzalign}, + {day, 12 * hour, 3 * hour, "%H:%M", false, align_tzalign}, + {week, 12 * hour, 3 * hour, "%a %H:%M", false, align_tzalign}, + {week, day, 3 * hour, "%a", true, align_tzalign}, + {week, 2 * day, 6 * hour, "%a", true, align_tzalign}, + {month, day, 6 * hour, "%a %d", true, align_tzalign}, + {month, day, 6 * hour, "%d", true, align_tzalign}, + {year, week, day, I18N_NOOP("week %V"), true, align_week}, + {year, month, day, "%b", true, align_month}, + {0, 0, 0, 0, true, align_tzalign}, }; const QFontMetrics fontmetric(font); const time_t time_span = data_end - data_start; const time_t now = time(0); - for(int i=0; axis_params[i].maxspan; ++i) { + for (int i = 0; axis_params[i].maxspan; ++i) { if (time_span < axis_params[i].maxspan) { QString label = Qstrftime(axis_params[i].format, localtime(&now)); - if(!label.isNull()) { - const int textwidth = fontmetric.width(label) - * time_span / axis_params[i].major * 3 / 2; - if (textwidth < width) { - switch(axis_params[i].align) { - case align_tzalign: - minor_x.set(data_start, axis_params[i].minor); - major_x.set(data_start, axis_params[i].major); - label_x.set(data_start, axis_params[i].major); - format = axis_params[i].format; - center = axis_params[i].center; - break; - case align_week: - minor_x.set(data_start, day); - major_x.set(data_start, 1, time_iterator::weeks); - label_x.set(data_start, 1, time_iterator::weeks); - format = axis_params[i].format; - center = axis_params[i].center; - break; - case align_month: - minor_x.set(data_start, axis_params[i].minor); - major_x.set(data_start, 1, time_iterator::month); - label_x.set(data_start, 1, time_iterator::month); - format = axis_params[i].format; - center = axis_params[i].center; - break; - } - return; - } + if (!label.isNull()) { + const int textwidth = + fontmetric.width(label) * time_span / axis_params[i].major * 3 / 2; + if (textwidth < width) { + switch (axis_params[i].align) { + case align_tzalign: + minor_x.set(data_start, axis_params[i].minor); + major_x.set(data_start, axis_params[i].major); + label_x.set(data_start, axis_params[i].major); + format = axis_params[i].format; + center = axis_params[i].center; + break; + case align_week: + minor_x.set(data_start, day); + major_x.set(data_start, 1, time_iterator::weeks); + label_x.set(data_start, 1, time_iterator::weeks); + format = axis_params[i].format; + center = axis_params[i].center; + break; + case align_month: + minor_x.set(data_start, axis_params[i].minor); + major_x.set(data_start, 1, time_iterator::month); + label_x.set(data_start, 1, time_iterator::month); + format = axis_params[i].format; + center = axis_params[i].center; + break; + } + return; + } } } } QString label = Qstrftime("%Y", localtime(&now)); - if(!label.isNull()) { + if (!label.isNull()) { const int textwidth = fontmetric.width(label) * 3 / 2; // fixed-point calculation with 16 bit fraction. - int num = (time_span * textwidth * 16) / ( year * width); - if (num < 16 ) { + int num = (time_span * textwidth * 16) / (year * width); + if (num < 16) { minor_x.set(data_start, 1, time_iterator::month); major_x.set(data_start, 1, time_iterator::years); label_x.set(data_start, 1, time_iterator::years); @@ -463,17 +445,16 @@ center = true; } else { minor_x.set(data_start, 1, time_iterator::years); - major_x.set(data_start, (num+15)/16, time_iterator::years); - label_x.set(data_start, (num+15)/16, time_iterator::years); + major_x.set(data_start, (num + 15) / 16, time_iterator::years); + label_x.set(data_start, (num + 15) / 16, time_iterator::years); format = "%Y"; center = false; } } } -void Graph::drawYLabel(QPainter &paint, const QRect &rect, - const Range &y_range, double base) -{ +void Graph::drawYLabel(QPainter &paint, const QRect &rect, const Range &y_range, + double base) { // setting up linear mappings const linMap ymap(y_range.min(), rect.bottom(), y_range.max(), rect.top()); @@ -491,27 +472,27 @@ if (rect.height() < fontheight) return; - while(rect.height() < fontheight * (y_range.max()-y_range.min())/base) - if (rect.height() > fontheight * (y_range.max()-y_range.min())/base/2) + while (rect.height() < fontheight * (y_range.max() - y_range.min()) / base) + if (rect.height() > fontheight * (y_range.max() - y_range.min()) / base / 2) base *= 2; - else if (rect.height() > fontheight * (y_range.max()-y_range.min())/base/5) + else if (rect.height() > + fontheight * (y_range.max() - y_range.min()) / base / 5) base *= 5; else base *= 10; // draw labels - double min = ceil(y_range.min()/base)*base; - double max = floor(y_range.max()/base)*base; - for(double i = min; i <= max; i += base) { + double min = ceil(y_range.min() / base) * base; + double max = floor(y_range.max() / base) * base; + for (double i = min; i <= max; i += base) { const std::string label = si_number(i, 6, SI, mag); const int x = rect.left() - fontmetric.width(label.c_str()) - 4; - paint.drawText(x, ymap(i) + fontmetric.ascent()/2, label.c_str()); + paint.drawText(x, ymap(i) + fontmetric.ascent() / 2, label.c_str()); } } -void Graph::drawYLines(QPainter &paint, const QRect &rect, - const Range &y_range, double base, QColor color) -{ +void Graph::drawYLines(QPainter &paint, const QRect &rect, const Range &y_range, + double base, QColor color) { // setting up linear mappings const linMap ymap(y_range.min(), rect.bottom(), y_range.max(), rect.top()); @@ -519,21 +500,22 @@ // adjust linespacing if (base * -ymap.m() < 5.0) { - if (2.0 * base * -ymap.m() > 5.0) + if (2.0 * base * -ymap.m() > 5.0) base = base * 2.0; - else + else base = base * 5.0; } // and return if unsufficient - if (base * -ymap.m() < 5) return; + if (base * -ymap.m() < 5) + return; // draw lines paint.save(); paint.setPen(color); - double min = ceil(y_range.min()/base)*base; + double min = ceil(y_range.min() / base) * base; double max = y_range.max(); - for(double i = min; i < max; i += base) { + for (double i = min; i < max; i += base) { paint.drawLine(rect.left(), ymap(i), rect.right(), ymap(i)); } paint.restore(); @@ -542,19 +524,18 @@ /** * draw the graph itself */ -void Graph::drawGraph(QPainter &paint, const QRect &rect, - const GraphInfo &ginfo, double min, double max) -{ +void Graph::drawGraph(QPainter &paint, const QRect &rect, + const GraphInfo &ginfo, double min, double max) { const linMap ymap(min, rect.bottom(), max, rect.top()); // define once use many QPolygon points; - + paint.save(); - //paint.setRenderHint(QPainter::Antialiasing); + // paint.setRenderHint(QPainter::Antialiasing); // draw all min/max backshadows int color_nr = 0; - for(GraphInfo::const_iterator gi = ginfo.begin(); gi != ginfo.end(); ++gi) { + for (GraphInfo::const_iterator gi = ginfo.begin(); gi != ginfo.end(); ++gi) { const std::vector &min_data = gi->min_data; const std::vector &max_data = gi->max_data; @@ -563,54 +544,59 @@ const int size = gi->min_data.size(); // setting up linear mappings - const linMap xmap(0, rect.left(), size-1, rect.right()); - - if (!min_data.empty() && !max_data.empty()) { + const linMap xmap(0, rect.left(), size - 1, rect.right()); + + if (!min_data.empty() && !max_data.empty()) { paint.setPen(Qt::NoPen); paint.setBrush(QBrush(color_minmax[color_nr++ % 8])); - for(int i=0; i &avg_data = gi->avg_data; - if (avg_data.empty()) continue; + if (avg_data.empty()) + continue; const int size = avg_data.size(); - + // setting up linear mappings - const linMap xmap(0, rect.left(), size-1, rect.right()); - + const linMap xmap(0, rect.left(), size - 1, rect.right()); + // draw ing if (!avg_data.empty()) { paint.setPen(color_line[color_nr++ % 8]); - for(int i=0; itop() - contentsRect().top(); const int bottom = i->bottom() - contentsRect().top(); @@ -657,23 +644,23 @@ double base; Range y_range = i->minmax_adj(&base); if (!y_range.isValid()) - continue; - + continue; + // geometry const int xlabel_base = bottom + marg + smallmetric.ascent(); const int legend_base = top + graph_height + fontmetric.ascent(); - + // panel area - QRect panelrect(graph_rect.left(), top, graph_rect.width(), bottom-top); - + QRect panelrect(graph_rect.left(), top, graph_rect.width(), bottom - top); + // graph-background paint.fillRect(panelrect, color_graph_bg); - + // draw minor, major, graph - drawXLabel(paint, xlabel_base, graph_rect.left(), graph_rect.right(), - label_x, format_x, center_x); + drawXLabel(paint, xlabel_base, graph_rect.left(), graph_rect.right(), + label_x, format_x, center_x); drawXLines(paint, panelrect, minor_x, color_minor); - drawYLines(paint, panelrect, y_range, base/10, color_minor); + drawYLines(paint, panelrect, y_range, base / 10, color_minor); drawXLines(paint, panelrect, major_x, color_major); drawYLines(paint, panelrect, y_range, base, color_major); drawYLabel(paint, panelrect, y_range, base); @@ -688,15 +675,15 @@ paint.eraseRect(contentsRect()); const QString label(i18n("Drop sensors from list here")); const int labelwidth = paint.fontMetrics().width(label); - paint.drawText((width()-labelwidth)/2, height()/2, label); + paint.drawText((width() - labelwidth) / 2, height() / 2, label); paint.end(); } } -void Graph::layout() -{ - const int numgraphs = glist.size(); - if (!numgraphs) return; +void Graph::layout() { + const int numgraphs = glist.size(); + if (!numgraphs) + return; // resize offscreen-map to widget-size offscreen = QPixmap(contentsRect().width(), contentsRect().height()); @@ -711,53 +698,49 @@ const QFontMetrics headermetric = QFontMetrics(header_font); const int labelwidth = fontmetric.boundingRect("888.888 M").width(); - box_size = fontmetric.ascent()-2; + box_size = fontmetric.ascent() - 2; // area for graphs (including legends) - graph_rect.setRect(labelwidth + marg, headermetric.height() + 2*marg, - offscreen.width() - labelwidth - marg, - offscreen.height() - headermetric.height() - 2*marg); - - const int total_legend_height = - calcLegendHeights(box_size, offscreen.width() - 2*marg); - graph_height = (graph_rect.height() - total_legend_height - - marg*(2*numgraphs-1)) / numgraphs; + graph_rect.setRect(labelwidth + marg, headermetric.height() + 2 * marg, + offscreen.width() - labelwidth - marg, + offscreen.height() - headermetric.height() - 2 * marg); + + const int total_legend_height = + calcLegendHeights(box_size, offscreen.width() - 2 * marg); + graph_height = + (graph_rect.height() - total_legend_height - marg * (2 * numgraphs - 1)) / + numgraphs; int top = graph_rect.top(); - for(graph_list::iterator i = begin(); i != end(); ++i) { + for (graph_list::iterator i = begin(); i != end(); ++i) { int bottom = top + graph_height - marg - smallmetric.lineSpacing(); i->top(top + contentsRect().top()); i->bottom(bottom + contentsRect().top()); - top += graph_height + i->legend_lines()*fontmetric.lineSpacing() + 2*marg; + top += + graph_height + i->legend_lines() * fontmetric.lineSpacing() + 2 * marg; } } /** * Qt (re)paint event */ -void Graph::paintEvent(QPaintEvent *e) -{ +void Graph::paintEvent(QPaintEvent *e) { QFrame::paintEvent(e); drawAll(); } -void Graph::resizeEvent(QResizeEvent *e) -{ - layout(); -} +void Graph::resizeEvent(QResizeEvent *e) { layout(); } -Graph::graph_list::iterator Graph::graphAt(const QPoint &pos) -{ - for(graph_list::iterator i = begin(); i != end(); ++i) { +Graph::graph_list::iterator Graph::graphAt(const QPoint &pos) { + for (graph_list::iterator i = begin(); i != end(); ++i) { if (i->top() < pos.y() && i->bottom() > pos.y()) return i; } return end(); } -Graph::graph_list::const_iterator Graph::graphAt(const QPoint &pos) const -{ - for(graph_list::const_iterator i = begin(); i != end(); ++i) { +Graph::graph_list::const_iterator Graph::graphAt(const QPoint &pos) const { + for (graph_list::const_iterator i = begin(); i != end(); ++i) { if (i->top() < pos.y() && i->bottom() > pos.y()) return i; } @@ -766,11 +749,10 @@ /** * switch auto-update on or off - * + * * Auto-update does a update every 10 sec. */ -void Graph::autoUpdate(bool active) -{ +void Graph::autoUpdate(bool active) { if (active == true) { if (autoUpdateTimer == -1) { autoUpdateTimer = startTimer(10000); @@ -790,10 +772,10 @@ /** * */ -void Graph::removeGraph() -{ - const int numgraphs = glist.size(); - if (!numgraphs) return; +void Graph::removeGraph() { + const int numgraphs = glist.size(); + if (!numgraphs) + return; graph_list::iterator target = graphAt(QPoint(0, origin_y)); if (target != end()) { @@ -807,21 +789,18 @@ /** * */ -void Graph::splitGraph() -{ +void Graph::splitGraph() { add(); layout(); update(); } - /** * Qt mouse-press-event */ -void Graph::mousePressEvent(QMouseEvent *e) -{ - origin_x = e->x (); - origin_y = e->y (); +void Graph::mousePressEvent(QMouseEvent *e) { + origin_x = e->x(); + origin_y = e->y(); origin_start = data_start; origin_end = data_end; @@ -830,26 +809,26 @@ if (e->button() == Qt::RightButton) { // map for delete-datasource-options typedef std::map actionmap; - actionmap acts; - + actionmap acts; + // context-menu QMenu menu(this); - + graph_list::iterator s_graph = graphAt(e->pos()); - - menu.addAction(QIcon("list-add"), - i18n("add new subgraph"), this, SLOT(splitGraph())); + + menu.addAction(QIcon("list-add"), i18n("add new subgraph"), this, + SLOT(splitGraph())); if (s_graph != end()) { - menu.addAction(QIcon("edit-delete"), - i18n("delete this subgraph"), this, SLOT(removeGraph())); + menu.addAction(QIcon("edit-delete"), i18n("delete this subgraph"), this, + SLOT(removeGraph())); menu.addSeparator(); - + // generate entries to remove datasources - for(GraphInfo::iterator i = s_graph->begin(); i != s_graph->end(); ++i) { - QAction *T = menu.addAction(QIcon("list-remove"), - i18n("remove ") + i->label); - acts[T] = i; + for (GraphInfo::iterator i = s_graph->begin(); i != s_graph->end(); ++i) { + QAction *T = + menu.addAction(QIcon("list-remove"), i18n("remove ") + i->label); + acts[T] = i; } } @@ -869,34 +848,33 @@ * * handle dragging of mouse in graph */ -void Graph::mouseMoveEvent(QMouseEvent *e) -{ +void Graph::mouseMoveEvent(QMouseEvent *e) { if (e->buttons() == Qt::LeftButton) { - if (autoUpdateTimer != -1) + if (autoUpdateTimer != -1) return; - + int x = e->x(); int y = e->y(); - + if ((x < graph_rect.left()) || (x >= graph_rect.right())) return; if ((y < 0) || (y >= height())) return; - - int offset = (x - origin_x) * (origin_end - origin_start) - / graph_rect.width(); - + + int offset = + (x - origin_x) * (origin_end - origin_start) / graph_rect.width(); + start = origin_start - offset; const time_t now = time(0); - if (start + span > now + span * 2 / 3 ) + if (start + span > now + span * 2 / 3) start = now - span / 3; - - if (autoUpdateTimer != -1) + + if (autoUpdateTimer != -1) timer_diff = time(0) - start; - + data_is_valid = false; update(); - } else if (e->buttons() == Qt::MidButton){ + } else if (e->buttons() == Qt::MidButton) { dragging = true; update(); } else { @@ -907,20 +885,17 @@ /** * */ -void Graph::wheelEvent(QWheelEvent *e) -{ +void Graph::wheelEvent(QWheelEvent *e) { if (e->delta() < 0) zoom(1.259921050); else - zoom(1.0/1.259921050); + zoom(1.0 / 1.259921050); } - /** * */ -void Graph::timerEvent(QTimerEvent *event) -{ +void Graph::timerEvent(QTimerEvent *event) { data_is_valid = false; start = time(0) - timer_diff; update(); @@ -930,10 +905,9 @@ * */ -void Graph::dragEnterEvent(QDragEnterEvent *event) -{ - const GraphMimeData *mimeData = - qobject_cast(event->mimeData()); +void Graph::dragEnterEvent(QDragEnterEvent *event) { + const GraphMimeData *mimeData = + qobject_cast(event->mimeData()); if (mimeData) event->acceptProposedAction(); @@ -944,20 +918,20 @@ /** *hermione•load•load•longterm */ -void Graph::dragMoveEvent(QDragMoveEvent *event) -{ - const GraphMimeData *mimeData = - qobject_cast(event->mimeData()); - if (!mimeData) return; +void Graph::dragMoveEvent(QDragMoveEvent *event) { + const GraphMimeData *mimeData = + qobject_cast(event->mimeData()); + if (!mimeData) + return; - if(glist.size() == 0) { + if (glist.size() == 0) { event->accept(contentsRect()); } else { - graph_list::iterator i = graphAt(event->pos()); - if(i != end()) { + graph_list::iterator i = graphAt(event->pos()); + if (i != end()) { QRect g; - g.setCoords(contentsRect().left(), i->top(), - contentsRect().right(), i->bottom()); + g.setCoords(contentsRect().left(), i->top(), contentsRect().right(), + i->bottom()); event->accept(g); } else { event->ignore(); @@ -968,14 +942,14 @@ /** * */ -void Graph::dropEvent(QDropEvent *event) -{ - const GraphMimeData *mimeData = - qobject_cast(event->mimeData()); - if (!mimeData) return; +void Graph::dropEvent(QDropEvent *event) { + const GraphMimeData *mimeData = + qobject_cast(event->mimeData()); + if (!mimeData) + return; event->acceptProposedAction(); - const int numgraphs = glist.size(); + const int numgraphs = glist.size(); if (numgraphs) { graph_list::iterator target = graphAt(event->pos()); if (target != end()) { @@ -994,10 +968,9 @@ /** * set the graph to display the last new_span seconds */ -void Graph::last(time_t new_span) -{ +void Graph::last(time_t new_span) { span = new_span; - + if (autoUpdateTimer != -1) { timer_diff = 0.99 * span; start = time(0) - timer_diff; @@ -1011,25 +984,26 @@ /** * zoom graph with factor */ -void Graph::zoom(double factor) -{ +void Graph::zoom(double factor) { // don't zoom to wide - if (factor < 1 && span*factor < width()) return; + if (factor < 1 && span * factor < width()) + return; - time_t time_center = data_end - span / 2; - if (time_center < 0) return; + time_t time_center = data_end - span / 2; + if (time_center < 0) + return; span *= factor; start = time_center - (span / 2); const time_t now = time(0); - if (start + span > now + span * 2 / 3 ) + if (start + span > now + span * 2 / 3) start = now - span / 3; if (autoUpdateTimer != -1) { timer_diff = 0.99 * span; start = time(0) - timer_diff; } - + data_is_valid = false; update(); } @@ -1037,16 +1011,15 @@ /** * returns range for y-values */ -Range GraphInfo::minmax() -{ +Range GraphInfo::minmax() { Range r; - for(const_iterator i = begin(); i != end(); ++i) { + for (const_iterator i = begin(); i != end(); ++i) { Range a = ds_minmax(i->avg_data, i->min_data, i->max_data); if (a.isValid()) { if (r.isValid()) - r = range_max(r, a); + r = range_max(r, a); else - r = a; + r = a; } } return r; @@ -1055,8 +1028,7 @@ /** * returns adjusted range for y-values */ -Range GraphInfo::minmax_adj(double *base) -{ +Range GraphInfo::minmax_adj(double *base) { Range y = minmax(); return range_adj(y, base); } diff -Nru kcollectd-0.10.2/kcollectd/graph.h kcollectd-0.11.0/kcollectd/graph.h --- kcollectd-0.10.2/kcollectd/graph.h 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/graph.h 2020-02-23 19:32:25.000000000 +0000 @@ -2,7 +2,7 @@ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd - * + * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or @@ -26,21 +26,19 @@ #include #include -#include -#include +#include #include #include +#include +#include #include -#include #include "misc.h" class time_iterator; -class GraphInfo -{ +class GraphInfo { public: - struct datasource { QString rrd; QString ds; @@ -67,15 +65,14 @@ typedef std::vector::const_iterator const_iterator; iterator begin() { return dslist.begin(); } - iterator end() { return dslist.end(); } - const_iterator begin() const { return dslist.begin(); } - const_iterator end() const { return dslist.end(); } + iterator end() { return dslist.end(); } + const_iterator begin() const { return dslist.begin(); } + const_iterator end() const { return dslist.end(); } void erase(iterator i) { dslist.erase(i); } bool empty() const { return dslist.empty(); } private: - int top_, bottom_, legend_lines_; std::vector dslist; }; @@ -85,12 +82,13 @@ */ class GraphMimeData : public QMimeData { Q_OBJECT - public: +public: void setGraph(const QString &rrd, const QString &ds, const QString &label); const QString &rrd() const { return rrd_; } const QString &ds() const { return ds_; } const QString &label() const { return label_; } - private: + +private: QString rrd_; QString ds_; QString label_; @@ -99,18 +97,17 @@ /** * */ -class Graph : public QFrame -{ +class Graph : public QFrame { Q_OBJECT; - public: +public: typedef std::vector graph_list; typedef graph_list::iterator iterator; typedef graph_list::const_iterator const_iterator; - explicit Graph(QWidget *parent=0); - Graph(QWidget *parent, const std::string &rrd, const std::string &ds, - const char *name=0); + explicit Graph(QWidget *parent = 0); + Graph(QWidget *parent, const std::string &rrd, const std::string &ds, + const char *name = 0); void clear(); GraphInfo &add(const QString &rrd, const QString &ds, const QString &label); @@ -124,8 +121,8 @@ virtual QSize sizeHint() const; virtual void paintEvent(QPaintEvent *ev); - virtual void resizeEvent(QResizeEvent*); - + virtual void resizeEvent(QResizeEvent *); + virtual void last(time_t span); virtual void zoom(double factor); virtual void mousePressEvent(QMouseEvent *e); @@ -136,12 +133,12 @@ virtual void dragEnterEvent(QDragEnterEvent *event); virtual void dragMoveEvent(QDragMoveEvent *event); virtual void dropEvent(QDropEvent *event); - + // Iterators iterator begin() { return glist.begin(); } - iterator end() { return glist.end(); } + iterator end() { return glist.end(); } const_iterator begin() const { return glist.begin(); } - const_iterator end() const { return glist.end(); } + const_iterator end() const { return glist.end(); } bool empty() const { return glist.empty(); } time_t range() { return span; } @@ -150,39 +147,40 @@ virtual void removeGraph(); virtual void splitGraph(); - private: +private: bool fetchAllData(); void drawAll(); int calcLegendHeights(int box_size, int width); - void drawLegend(QPainter &paint, int left, int pos, - int box_size, const GraphInfo &ginfo); + void drawLegend(QPainter &paint, int left, int pos, int box_size, + const GraphInfo &ginfo); void drawFooter(QPainter &paint, int left, int right); void drawHeader(QPainter &paint); - void drawYLines(QPainter &paint, const QRect &rect, - const Range &y_range, double base, QColor color); - void drawYLabel(QPainter &paint, const QRect &rect, - const Range &range, double base); - void drawXLines(QPainter &paint, const QRect &rect, - time_iterator it, QColor color); - void drawXLabel(QPainter &paint, int y, int left, int right, - time_iterator it, QString format, bool center); - void findXGrid(int width, QString &format, bool ¢er, - time_iterator &minor_x, time_iterator &major_x, time_iterator &label_x ); - void drawGraph(QPainter &paint, const QRect &rect, const GraphInfo &gi, - double min, double max); + void drawYLines(QPainter &paint, const QRect &rect, const Range &y_range, + double base, QColor color); + void drawYLabel(QPainter &paint, const QRect &rect, const Range &range, + double base); + void drawXLines(QPainter &paint, const QRect &rect, time_iterator it, + QColor color); + void drawXLabel(QPainter &paint, int y, int left, int right, time_iterator it, + QString format, bool center); + void findXGrid(int width, QString &format, bool ¢er, + time_iterator &minor_x, time_iterator &major_x, + time_iterator &label_x); + void drawGraph(QPainter &paint, const QRect &rect, const GraphInfo &gi, + double min, double max); void layout(); - + graph_list::iterator graphAt(const QPoint &pos); graph_list::const_iterator graphAt(const QPoint &pos) const; // rrd-data graph_list glist; bool data_is_valid; - time_t start; // user set start of graph - time_t span; // user-set span of graph - time_t data_start; // real start of data (from rrd_fetch) - time_t data_end; // real end of data (from rrd_fetch) - time_t tz_off; // offset of the local timezone from GMT + time_t start; // user set start of graph + time_t span; // user-set span of graph + time_t data_start; // real start of data (from rrd_fetch) + time_t data_end; // real end of data (from rrd_fetch) + time_t tz_off; // offset of the local timezone from GMT unsigned long step; // technical helpers @@ -210,9 +208,8 @@ /** * add a datasource to the GraphInfo */ -inline void -GraphInfo::add(const QString &rrd, const QString &ds, const QString &label) -{ +inline void GraphInfo::add(const QString &rrd, const QString &ds, + const QString &label) { datasource new_ds; new_ds.rrd = rrd; new_ds.ds = ds; @@ -223,29 +220,26 @@ /** * set graph-infos. */ -inline void -GraphMimeData::setGraph(const QString &r, const QString &d, const QString &l) -{ +inline void GraphMimeData::setGraph(const QString &r, const QString &d, + const QString &l) { rrd_ = r; ds_ = d; label_ = l; } /** - * + * */ -inline GraphInfo & -Graph::add(const QString &rrd, const QString &ds, const QString &label) -{ +inline GraphInfo &Graph::add(const QString &rrd, const QString &ds, + const QString &label) { GraphInfo &gi = add(); gi.add(rrd, ds, label); data_is_valid = false; return gi; } -inline GraphInfo &Graph::add() -{ - GraphInfo gi; +inline GraphInfo &Graph::add() { + GraphInfo gi; glist.push_back(gi); changed(true); layout(); @@ -253,10 +247,6 @@ return glist.back(); } - -inline QSize Graph::sizeHint() const -{ - return QSize(640, 480); -} +inline QSize Graph::sizeHint() const { return QSize(640, 480); } #endif diff -Nru kcollectd-0.10.2/kcollectd/gui.cc kcollectd-0.11.0/kcollectd/gui.cc --- kcollectd-0.10.2/kcollectd/gui.cc 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/gui.cc 2020-02-23 19:32:25.000000000 +0000 @@ -1,7 +1,7 @@ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd - * + * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or @@ -24,56 +24,56 @@ #include -#include -#include -#include -#include -#include -#include +#include #include -#include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include -#include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include +#include -#include -#include -#include +#include #include +#include #include #include #include -#include +#include +#include -#include "rrd_interface.h" #include "graph.h" #include "gui.h" +#include "rrd_interface.h" #include "drag_pixmap.xpm" #ifndef RRD_BASEDIR -# define RRD_BASEDIR "/var/lib/collectd/rrd" +#define RRD_BASEDIR "/var/lib/collectd/rrd" #endif -#define I18N_NOOP(text) text +#define I18N_NOOP(text) text static struct { KStandardAction::StandardAction actionType; const char *name; const char *slot; } standard_actions[] = { - { KStandardAction::ZoomIn, "zoomIn", SLOT(zoomIn()) }, - { KStandardAction::ZoomOut, "zoomOut", SLOT(zoomOut()) }, - { KStandardAction::Open, "open", SLOT(load()) }, - { KStandardAction::SaveAs, "save", SLOT(save()) }, - { KStandardAction::Quit, "quit", SLOT(close()) }, + {KStandardAction::ZoomIn, "zoomIn", SLOT(zoomIn())}, + {KStandardAction::ZoomOut, "zoomOut", SLOT(zoomOut())}, + {KStandardAction::Open, "open", SLOT(load())}, + {KStandardAction::SaveAs, "save", SLOT(save())}, + {KStandardAction::Quit, "quit", SLOT(close())}, }; static struct { @@ -81,101 +81,190 @@ const char *name; const char *slot; } normal_actions[] = { - { I18N_NOOP("Last Hour"), "lastHour", SLOT(last_hour()) }, - { I18N_NOOP("Last Day"), "lastDay", SLOT(last_day()) }, - { I18N_NOOP("Last Week"), "lastWeek", SLOT(last_week()) }, - { I18N_NOOP("Last Month"), "lastMonth", SLOT(last_month()) }, - { I18N_NOOP("Add New Subgraph"), "splitGraph", SLOT(splitGraph()) }, + {I18N_NOOP("Last Hour"), "lastHour", SLOT(last_hour())}, + {I18N_NOOP("Last Day"), "lastDay", SLOT(last_day())}, + {I18N_NOOP("Last Week"), "lastWeek", SLOT(last_week())}, + {I18N_NOOP("Last Month"), "lastMonth", SLOT(last_month())}, + {I18N_NOOP("Add New Subgraph"), "splitGraph", SLOT(splitGraph())}, }; static const std::string delimiter("•"); static void get_datasources(const std::string &rrdfile, const std::string &info, - QTreeWidgetItem *item) -{ + QTreeWidgetItem *item) { std::set datasources; get_dsinfo(rrdfile, datasources); - + if (datasources.size() == 1) { - item->setFlags(item->flags() | Qt::ItemIsSelectable); + item->setFlags(item->flags() | Qt::ItemIsSelectable); item->setText(1, QString::fromUtf8(info.c_str())); item->setText(2, QString::fromUtf8(rrdfile.c_str())); item->setText(3, QString::fromUtf8((*datasources.begin()).c_str())); - } else { - for(std::set::iterator i=datasources.begin(); - i != datasources.end(); ++i){ + } else { + for (std::set::iterator i = datasources.begin(); + i != datasources.end(); ++i) { QStringList SL(i->c_str()); SL.append(QString::fromUtf8((info + delimiter + *i).c_str())); SL.append(QString::fromUtf8(rrdfile.c_str())); SL.append(QString::fromUtf8(i->c_str())); QTreeWidgetItem *dsitem = new QTreeWidgetItem(item, SL); item->setFlags(dsitem->flags() & ~Qt::ItemIsSelectable); - } + } } } -static QTreeWidgetItem *mkItem(QTreeWidget *listview, std::string s) -{ +static QTreeWidgetItem *mkItem(QTreeWidget *listview, std::string s) { return new QTreeWidgetItem(listview, QStringList(QString(s.c_str()))); } -static QTreeWidgetItem *mkItem(QTreeWidgetItem *item, std::string s) -{ +static QTreeWidgetItem *mkItem(QTreeWidgetItem *item, std::string s) { return new QTreeWidgetItem(item, QStringList(QString(s.c_str()))); } -static void get_rrds(const boost::filesystem::path rrdpath, - QTreeWidget *listview) -{ +static void recurseTree(QTreeWidgetItem *item, + const boost::filesystem::directory_iterator &host) { + const boost::filesystem::directory_iterator end_itr; + const QString separator = QStringLiteral("-"); + + for (int childNumber = 0; childNumber < item->childCount(); ++childNumber) { + QTreeWidgetItem *newroot = item->child(childNumber); + QString rootstr = newroot->text(0); + int lastpos = rootstr.lastIndexOf(separator); + + while (childNumber + 1 < item->childCount()) { + QTreeWidgetItem *newchild = item->child(childNumber + 1); + QString newchildstr = newchild->text(0); + int endsearch = std::min(lastpos + 1, newchildstr.length()); + bool abort = true; + int newlastpos = -1; + + for (int characterIndex = 0; characterIndex < endsearch; + ++characterIndex) { + const QChar character = newchildstr.at(characterIndex); + if (character != rootstr.at(characterIndex)) + break; + + if (character == separator) { + newlastpos = characterIndex; + if (abort) { + if (newroot->childCount() == 0) + new QTreeWidgetItem(newroot, QStringList(rootstr)); + item->removeChild(newchild); + newroot->addChild(newchild); + abort = false; + } + } + } + + if (abort) + break; + + lastpos = newlastpos; + } + + if (newroot->childCount() > 0) { + newroot->setText(0, rootstr.left(lastpos)); + for (int newchildNumber = 0; newchildNumber < newroot->childCount(); + ++newchildNumber) { + QTreeWidgetItem *newchild = newroot->child(newchildNumber); + newchild->setText(0, newchild->text(0).mid(lastpos + 1, -1)); + newchild->setFlags(newchild->flags() & ~Qt::ItemIsSelectable); + } + + // continue building subfolders + recurseTree(newroot, host); + continue; + } + + // this is the terminal node corresponding to + // the full directory + std::stack stack; + std::ostringstream sensorbuilder; + + for (const QTreeWidgetItem *current = newroot; current != NULL; + current = current->parent()) + stack.push(current->text(0).toStdString()); + + // don't use the hostname + stack.pop(); + + // don't start with a separator symbol + sensorbuilder << stack.top(); + stack.pop(); + + for (; stack.size() > 0; stack.pop()) + sensorbuilder << separator.toStdString() << stack.top(); + + std::string sensor = sensorbuilder.str(); + + for (boost::filesystem::directory_iterator rrd(absolute(*host) / sensor); + rrd != end_itr; ++rrd) { + if (!is_regular(*rrd) && extension(*rrd) == ".rrd") + continue; + + QTreeWidgetItem *rrditem = mkItem(newroot, basename(*rrd)); + rrditem->setFlags(rrditem->flags() & ~Qt::ItemIsSelectable); + + std::ostringstream info; + info << sensor << delimiter << basename(*rrd); + + get_datasources(rrd->path().string(), info.str(), rrditem); + } + } +} + +static void get_rrds(const boost::filesystem::path rrdpath, + QTreeWidget *listview) { using namespace boost::filesystem; - + const directory_iterator end_itr; - for (directory_iterator host(rrdpath); host != end_itr; ++host ) { - if (is_directory(*host)) { - QTreeWidgetItem *hostitem = mkItem(listview, host->path().filename().string()); - hostitem->setFlags(hostitem->flags() & ~Qt::ItemIsSelectable); - for (directory_iterator sensor(*host); sensor != end_itr; ++sensor ) { - if (is_directory(*sensor)) { - QTreeWidgetItem *sensoritem = mkItem(hostitem, sensor->path().filename().string()); - sensoritem->setFlags(sensoritem->flags() & ~Qt::ItemIsSelectable); - for (directory_iterator rrd(*sensor); rrd != end_itr; ++rrd ) { - if (is_regular(*rrd) && extension(*rrd) == ".rrd") { - QTreeWidgetItem *rrditem = mkItem(sensoritem, basename(*rrd)); - rrditem->setFlags(rrditem->flags() & ~Qt::ItemIsSelectable); - std::ostringstream info; - info << host->path().filename().string() << delimiter - << sensor->path().filename().string() << delimiter - << basename(*rrd); - get_datasources(rrd->path().string(), info.str(), rrditem); - } - } - } - } + for (directory_iterator host(rrdpath); host != end_itr; ++host) { + if (!is_directory(*host)) + continue; + + QTreeWidgetItem *hostitem = + mkItem(listview, host->path().filename().string()); + hostitem->setFlags(hostitem->flags() & ~Qt::ItemIsSelectable); + + for (directory_iterator sensor(*host); sensor != end_itr; ++sensor) { + if (!is_directory(*sensor)) + continue; + + QTreeWidgetItem *sensoritem = + mkItem(hostitem, sensor->path().filename().string()); + sensoritem->setFlags(sensoritem->flags() & ~Qt::ItemIsSelectable); } + + hostitem->sortChildren(0, Qt::AscendingOrder); + recurseTree(hostitem, host); } + listview->sortItems(0, Qt::AscendingOrder); } -/** +/** * Constructs a KCollectdGui - * + * * @param parent parent-widget see KMainWindow */ KCollectdGui::KCollectdGui(QWidget *parent) - : KMainWindow(parent), action_collection(parent) -{ + : KMainWindow(parent), action_collection(parent) { // standard_actions - for (size_t i=0; i< sizeof(standard_actions)/sizeof(*standard_actions); ++i) - actionCollection()->addAction(standard_actions[i].actionType, - standard_actions[i].name, this, standard_actions[i].slot); + for (size_t i = 0; i < sizeof(standard_actions) / sizeof(*standard_actions); + ++i) + actionCollection()->addAction(standard_actions[i].actionType, + standard_actions[i].name, this, + standard_actions[i].slot); // normal actions - for (size_t i=0; i< sizeof(normal_actions)/sizeof(*normal_actions); ++i) { + for (size_t i = 0; i < sizeof(normal_actions) / sizeof(*normal_actions); + ++i) { QAction *act = new QAction(i18n(normal_actions[i].label), this); connect(act, SIGNAL(triggered()), this, normal_actions[i].slot); actionCollection()->addAction(normal_actions[i].name, act); } // toggle_actions - auto_action = new QAction(QIcon::fromTheme("chronometer"), i18n("Automatic Update"), this); + auto_action = new QAction(QIcon::fromTheme("chronometer"), + i18n("Automatic Update"), this); auto_action->setCheckable(true); auto_action->setShortcut(QKeySequence("f8")); actionCollection()->addAction("autoUpdate", auto_action); @@ -214,25 +303,28 @@ hbox2->addWidget(last_day); QPushButton *last_hour = new QPushButton(i18n("last hour")); hbox2->addWidget(last_hour); - QPushButton *zoom_in = new QPushButton(QIcon::fromTheme("zoom-in"), QString()); + QPushButton *zoom_in = + new QPushButton(QIcon::fromTheme("zoom-in"), QString()); zoom_in->setToolTip(i18n("increases magnification")); zoom_in->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); hbox2->addWidget(zoom_in); - QPushButton *zoom_out = new QPushButton(QIcon::fromTheme("zoom-out"), QString()); + QPushButton *zoom_out = + new QPushButton(QIcon::fromTheme("zoom-out"), QString()); zoom_out->setToolTip(i18n("reduces magnification")); zoom_out->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); hbox2->addWidget(zoom_out); auto_button = new QPushButton(QIcon::fromTheme("chronometer"), QString()); auto_button->setToolTip(i18n("toggle automatic update-and-follow mode.")); #if 1 - QString text = i18n("

This button toggles the " - "automatic update-and-follow mode

" - "

The automatic update-and-follow mode updates the graph " - "every ten seconds. " - "In this mode the graph still can be zoomed, but always displays " - "now near the right edge and " - "can not be scrolled any more.
" - "This makes kcollectd some kind of status monitor.

"); + QString text = + i18n("

This button toggles the " + "automatic update-and-follow mode

" + "

The automatic update-and-follow mode updates the graph " + "every ten seconds. " + "In this mode the graph still can be zoomed, but always displays " + "now near the right edge and " + "can not be scrolled any more.
" + "This makes kcollectd some kind of status monitor.

"); auto_button->setWhatsThis(text); #endif auto_button->setCheckable(true); @@ -240,14 +332,14 @@ hbox2->addWidget(auto_button); // signals - connect(listview_, SIGNAL(itemPressed(QTreeWidgetItem *, int)), - SLOT(startDrag(QTreeWidgetItem *, int))); - connect(last_month, SIGNAL(clicked()), this, SLOT(last_month())); - connect(last_week, SIGNAL(clicked()), this, SLOT(last_week())); - connect(last_day, SIGNAL(clicked()), this, SLOT(last_day())); - connect(last_hour, SIGNAL(clicked()), this, SLOT(last_hour())); - connect(zoom_in, SIGNAL(clicked()), this, SLOT(zoomIn())); - connect(zoom_out, SIGNAL(clicked()), this, SLOT(zoomOut())); + connect(listview_, SIGNAL(itemPressed(QTreeWidgetItem *, int)), + SLOT(startDrag(QTreeWidgetItem *, int))); + connect(last_month, SIGNAL(clicked()), this, SLOT(last_month())); + connect(last_week, SIGNAL(clicked()), this, SLOT(last_week())); + connect(last_day, SIGNAL(clicked()), this, SLOT(last_day())); + connect(last_hour, SIGNAL(clicked()), this, SLOT(last_hour())); + connect(zoom_in, SIGNAL(clicked()), this, SLOT(zoomIn())); + connect(zoom_out, SIGNAL(clicked()), this, SLOT(zoomOut())); connect(auto_button, SIGNAL(toggled(bool)), this, SLOT(autoUpdate(bool))); // Menu @@ -257,7 +349,7 @@ fileMenu->addAction(actionCollection()->action("save")); fileMenu->addSeparator(); fileMenu->addAction(actionCollection()->action("quit")); - + QMenu *editMenu = new QMenu(i18n("&Edit")); menuBar()->addMenu(editMenu); editMenu->addAction(actionCollection()->action("splitGraph")); @@ -282,19 +374,17 @@ get_rrds(RRD_BASEDIR, listview()); } -KCollectdGui::~KCollectdGui() -{ -} +KCollectdGui::~KCollectdGui() {} -void KCollectdGui::startDrag(QTreeWidgetItem *widget, int col) -{ +void KCollectdGui::startDrag(QTreeWidgetItem *widget, int col) { // if (event->button() == Qt::LeftButton // && iconLabel->geometry().contains(event->pos())) { - + QDrag *drag = new QDrag(this); GraphMimeData *mimeData = new GraphMimeData; - if (widget->text(1).isEmpty()) return; + if (widget->text(1).isEmpty()) + return; mimeData->setText(widget->text(1)); mimeData->setGraph(widget->text(2), widget->text(3), widget->text(1)); @@ -304,8 +394,7 @@ drag->exec(); } -void KCollectdGui::set(Graph *new_graph) -{ +void KCollectdGui::set(Graph *new_graph) { if (graph) { vbox->removeWidget(graph); delete graph; @@ -313,38 +402,35 @@ vbox->insertWidget(0, new_graph); } -void KCollectdGui::autoUpdate(bool t) -{ +void KCollectdGui::autoUpdate(bool t) { auto_button->setChecked(t); auto_action->setChecked(t); graph->autoUpdate(t); } -void KCollectdGui::hideTree(bool t) -{ - listview_->setHidden(t); -} +void KCollectdGui::hideTree(bool t) { listview_->setHidden(t); } -void KCollectdGui::load() -{ - QString file = QFileDialog::getOpenFileName(this, "", - QDir::homePath(), "application/x-kcollectd"); - if (file.isEmpty()) return; +void KCollectdGui::load() { + QString file = QFileDialog::getOpenFileName(this, "", QDir::homePath(), + "application/x-kcollectd"); + if (file.isEmpty()) + return; load(file); } -void KCollectdGui::save() -{ - QString file = QFileDialog::getSaveFileName(this, "", - QDir::homePath(), "application/x-kcollectd"); - if (file.isEmpty()) return; +void KCollectdGui::save() { + QString file = QFileDialog::getSaveFileName(this, "", QDir::homePath(), + "application/x-kcollectd"); + if (file.isEmpty()) + return; QFile out(file); if (out.exists()) { - int answer = KMessageBox::questionYesNo(this, - i18n("file ‘%1’ already exists.\n" - "Do you want to overwrite it?", file)); + int answer = + KMessageBox::questionYesNo(this, i18n("file ‘%1’ already exists.\n" + "Do you want to overwrite it?", + file)); if (answer != KMessageBox::Yes) { return; } @@ -353,76 +439,74 @@ save(file); } -void KCollectdGui::load(const QString &file) -{ +void KCollectdGui::load(const QString &file) { QFile in(file); if (in.open(QIODevice::ReadOnly)) { QDomDocument doc; doc.setContent(&in); - + graph->clear(); - + QDomElement t = doc.documentElement().firstChildElement("tab"); - while(!t.isNull()) { + while (!t.isNull()) { QDomElement g = t.firstChildElement("graph"); - while(!g.isNull()) { - GraphInfo &graphinfo = graph->add(); - QDomElement p = g.firstChildElement("plot"); - while(!p.isNull()) { - graphinfo.add(p.attribute("rrd"), p.attribute("ds"), p.attribute("label")); - p = p.nextSiblingElement(); - } - g = g.nextSiblingElement(); + while (!g.isNull()) { + GraphInfo &graphinfo = graph->add(); + QDomElement p = g.firstChildElement("plot"); + while (!p.isNull()) { + graphinfo.add(p.attribute("rrd"), p.attribute("ds"), + p.attribute("label")); + p = p.nextSiblingElement(); + } + g = g.nextSiblingElement(); } t = t.nextSiblingElement(); } filename = file; graph->changed(false); } else { - KMessageBox::detailedSorry(this, - i18n("reading file ‘%1’ failed.", filename), - i18n("System message is: ‘%1’", in.errorString())); + KMessageBox::detailedSorry( + this, i18n("reading file ‘%1’ failed.", filename), + i18n("System message is: ‘%1’", in.errorString())); } } -void KCollectdGui::save(const QString &file) -{ +void KCollectdGui::save(const QString &file) { QFile out(file); if (out.open(QIODevice::WriteOnly)) { QXmlStreamWriter stream(&out); stream.setAutoFormatting(true); stream.writeStartDocument(); stream.writeDTD(""); - + "\"/usr/share/kcollectd/kcollectd.xsd\">"); + stream.writeStartElement("kcollectd"); stream.writeStartElement("tab"); - for(Graph::const_iterator i = graph->begin(); i != graph->end(); ++i) { + for (Graph::const_iterator i = graph->begin(); i != graph->end(); ++i) { stream.writeStartElement("graph"); - for(GraphInfo::const_iterator j = i->begin(); j != i->end(); ++j) { - stream.writeStartElement("plot"); - stream.writeAttribute("rrd", j->rrd); - stream.writeAttribute("ds", j->ds); - stream.writeAttribute("label", j->label); - stream.writeEndElement(); + for (GraphInfo::const_iterator j = i->begin(); j != i->end(); ++j) { + stream.writeStartElement("plot"); + stream.writeAttribute("rrd", j->rrd); + stream.writeAttribute("ds", j->ds); + stream.writeAttribute("label", j->label); + stream.writeEndElement(); } stream.writeEndElement(); } stream.writeEndElement(); stream.writeEndElement(); - + stream.writeEndDocument(); filename = file; graph->changed(false); } else { - KMessageBox::detailedSorry(this, - i18n("opening the file ‘%1’ for writing failed.", filename), - i18n("System message is: ‘%1’", out.errorString())); + KMessageBox::detailedSorry( + this, i18n("opening the file ‘%1’ for writing failed.", filename), + i18n("System message is: ‘%1’", out.errorString())); } } -void KCollectdGui::saveProperties(KConfigGroup &conf) -{ +void KCollectdGui::saveProperties(KConfigGroup &conf) { conf.writeEntry("hide-navigation", listview_->isHidden()); conf.writeEntry("auto-update", graph->autoUpdate()); conf.writeEntry("range", qint64(graph->range())); @@ -433,20 +517,20 @@ char hostname[100]; gethostname(hostname, sizeof(hostname)); QString file = QString("%1/session-%2-%3") - .arg(QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation)) - .arg(hostname) - .arg(getpid()); + .arg(QStandardPaths::writableLocation( + QStandardPaths::RuntimeLocation)) + .arg(hostname) + .arg(getpid()); save(file); conf.writeEntry("filename", file); conf.writeEntry("file-is-session", true); } } -void KCollectdGui::readProperties(const KConfigGroup &conf) -{ +void KCollectdGui::readProperties(const KConfigGroup &conf) { bool nav = conf.readEntry("hide-navigation", false); bool aut = conf.readEntry("auto-update", false); - time_t range = conf.readEntry("range", 24*3600); + time_t range = conf.readEntry("range", 24 * 3600); QString file = conf.readEntry("filename", QString()); bool file_is_session = conf.readEntry("file-is-session", false); if (!file.isEmpty()) { diff -Nru kcollectd-0.10.2/kcollectd/gui.h kcollectd-0.11.0/kcollectd/gui.h --- kcollectd-0.10.2/kcollectd/gui.h 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/gui.h 2020-02-23 19:32:25.000000000 +0000 @@ -2,7 +2,7 @@ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd - * + * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or @@ -22,9 +22,9 @@ #ifndef GUI_H #define GUI_H +#include #include #include -#include #include "graph.h" @@ -39,19 +39,20 @@ class KCollectdGui : public KMainWindow // QWidget { Q_OBJECT; + public: - KCollectdGui(QWidget *parent=0); + KCollectdGui(QWidget *parent = 0); virtual ~KCollectdGui(); QTreeWidget *listview() { return listview_; } - KActionCollection* actionCollection() { return &action_collection; } + KActionCollection *actionCollection() { return &action_collection; } void set(Graph *graph); void load(const QString &filename); void save(const QString &filename); -public slots: - void startDrag(QTreeWidgetItem * widget, int col); +public slots: + void startDrag(QTreeWidgetItem *widget, int col); virtual void last_month(); virtual void last_week(); virtual void last_day(); @@ -71,7 +72,7 @@ private: QTreeWidget *listview_; QVBoxLayout *vbox; - Graph * graph; + Graph *graph; QPushButton *auto_button; QAction *auto_action, *panel_action; QString filename; @@ -79,39 +80,18 @@ KActionCollection action_collection; }; -inline void KCollectdGui::last_month() -{ - graph->last(3600*24*31); -} +inline void KCollectdGui::last_month() { graph->last(3600 * 24 * 31); } -inline void KCollectdGui::last_week() -{ - graph->last(3600*24*7); -} +inline void KCollectdGui::last_week() { graph->last(3600 * 24 * 7); } -inline void KCollectdGui::last_day() -{ - graph->last(3600*24); -} +inline void KCollectdGui::last_day() { graph->last(3600 * 24); } -inline void KCollectdGui::last_hour() -{ - graph->last(3600); -} +inline void KCollectdGui::last_hour() { graph->last(3600); } -inline void KCollectdGui::zoomIn() -{ - graph->zoom(1.0/1.259921050); -} +inline void KCollectdGui::zoomIn() { graph->zoom(1.0 / 1.259921050); } -inline void KCollectdGui::zoomOut() -{ - graph->zoom(1.259921050); -} +inline void KCollectdGui::zoomOut() { graph->zoom(1.259921050); } -inline void KCollectdGui::splitGraph() -{ - graph->splitGraph(); -} +inline void KCollectdGui::splitGraph() { graph->splitGraph(); } #endif Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/128-mimetypes-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/128-mimetypes-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/16-mimetypes-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/16-mimetypes-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/22-mimetypes-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/22-mimetypes-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/32-mimetypes-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/32-mimetypes-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/48-mimetypes-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/48-mimetypes-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/64-mimetypes-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/64-mimetypes-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/ox128-mime-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/ox128-mime-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/ox16-mime-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/ox16-mime-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/ox22-mime-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/ox22-mime-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/ox32-mime-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/ox32-mime-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/ox48-mime-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/ox48-mime-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/ox64-mime-application-x-kcollectd.png and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/ox64-mime-application-x-kcollectd.png differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/oxsc-mime-application-x-kcollectd.svgz and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/oxsc-mime-application-x-kcollectd.svgz differ Binary files /tmp/tmpAjrdR4/uUhkvV1fEj/kcollectd-0.10.2/kcollectd/icons/sc-mimetypes-application-x-kcollectd.svgz and /tmp/tmpAjrdR4/x11UFEcnyZ/kcollectd-0.11.0/kcollectd/icons/sc-mimetypes-application-x-kcollectd.svgz differ diff -Nru kcollectd-0.10.2/kcollectd/kcollectd.cc kcollectd-0.11.0/kcollectd/kcollectd.cc --- kcollectd-0.10.2/kcollectd/kcollectd.cc 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/kcollectd.cc 2020-02-23 19:32:25.000000000 +0000 @@ -1,7 +1,7 @@ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd - * + * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or @@ -18,44 +18,44 @@ * along with this program. If not, see . */ -#include -#include #include +#include +#include #include +#include +#include #include #include -#include -#include -#include #include +#include #include #include "../config.h" #include "gui.h" -int main(int argc, char **argv) -{ +int main(int argc, char **argv) { using namespace boost::filesystem; std::vector rrds; QApplication application(argc, argv); - KAboutData about("kcollectd", - i18n("KCollectd"), VERSION, - i18n("Viewer for Collectd-databases"), - KAboutLicense::GPL, - i18n("© 2008, 2009 M G Berberich"), - i18n("Maintainer and developer"), - "http://www.forwiss.uni-passau.de/~berberic/Linux/kcollectd.html", - "berberic@fmi.uni-passau.de"); + KAboutData about( + "kcollectd", i18n("KCollectd"), VERSION, + i18n("Viewer for Collectd-databases"), KAboutLicense::GPL, + i18n("© 2008, 2009 M G Berberich"), i18n("Maintainer and developer"), + "https://www.antonioerusso.com/projects/kcollectd", + "Antonio E Russo "); about.addAuthor(i18n("M G Berberich"), i18n("Maintainer and developer"), - "M G Berberich ", - "http://www.forwiss.uni-passau.de/~berberic"); + "M G Berberich ", + "http://www.forwiss.uni-passau.de/~berberic"); + about.addAuthor(i18n("A E Russo"), i18n("Maintainer and developer"), + "Antonio E Russo ", + "https://www.antonioerusso.com"); about.setTranslator(i18nc("NAME OF TRANSLATORS", "Your names"), - i18nc("EMAIL OF TRANSLATORS", "Your emails")); + i18nc("EMAIL OF TRANSLATORS", "Your emails")); KAboutData::setApplicationData(about); @@ -70,17 +70,18 @@ try { if (application.isSessionRestored()) { kRestoreMainWindows(); - } else { + } else { KCollectdGui *gui = new KCollectdGui; // handling arguments - if(args.length() == 1) gui->load(args.at(0)); + if (args.length() == 1) + gui->load(args.at(0)); gui->setObjectName("kcollectd#"); gui->show(); } - } - catch(const std::exception &e) { + } catch (const std::exception &e) { KMessageBox::error(0, i18n("Failed to read collectd-structure at \'%1\'\n" - "Terminating.", QString(RRD_BASEDIR))); + "Terminating.", + QString(RRD_BASEDIR))); exit(1); } diff -Nru kcollectd-0.10.2/kcollectd/misc.cc kcollectd-0.11.0/kcollectd/misc.cc --- kcollectd-0.10.2/kcollectd/misc.cc 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/misc.cc 2020-02-23 19:32:25.000000000 +0000 @@ -19,48 +19,34 @@ */ #include -#include -#include #include #include +#include +#include #include #include "misc.h" - /** * determine the apropriate SI-prefix for a number */ -bool si_char(double d, std::string &s, double &m) -{ +bool si_char(double d, std::string &s, double &m) { const struct { double factor; - const char * const si_char; + const char *const si_char; } si_table[] = { - { 1e-24, "y" }, - { 1e-21, "z" }, - { 1e-18, "a" }, - { 1e-15, "f" }, - { 1e-12, "p" }, - { 1e-9, "n" }, - { 1e-6, "µ" }, - { 1e-3, "m" }, - { 1, "" }, - { 1e3, "k" }, - { 1e6, "M" }, - { 1e9, "G" }, - { 1e12, "T" }, - { 1e15, "P" }, - { 1e18, "E" }, - { 1e21, "Z" }, - { 1e24, "Y" }, + {1e-24, "y"}, {1e-21, "z"}, {1e-18, "a"}, {1e-15, "f"}, {1e-12, "p"}, + {1e-9, "n"}, {1e-6, "µ"}, {1e-3, "m"}, {1, ""}, {1e3, "k"}, + {1e6, "M"}, {1e9, "G"}, {1e12, "T"}, {1e15, "P"}, {1e18, "E"}, + {1e21, "Z"}, {1e24, "Y"}, }; - const int tablesize = sizeof(si_table)/sizeof(*si_table); + const int tablesize = sizeof(si_table) / sizeof(*si_table); int i; - for(i=0; i < tablesize; ++i) { - if (d < si_table[i].factor) break; + for (i = 0; i < tablesize; ++i) { + if (d < si_table[i].factor) + break; } if (i == 0 || i == tablesize) { m = 1.0; @@ -77,10 +63,9 @@ /** * formats a number with prefix s and magnitude m, precission p */ -std::string si_number(double d, int p, const std::string &s, double m) -{ +std::string si_number(double d, int p, const std::string &s, double m) { std::ostringstream os; - os << std::setprecision(p) << d/m; + os << std::setprecision(p) << d / m; if (!s.empty()) os << " " << s; return os.str(); @@ -90,10 +75,9 @@ * some kind of strftime that returns a QString and handles locale * !! strftime already is localized */ -QString Qstrftime(const char *format, const tm *t) -{ +QString Qstrftime(const char *format, const tm *t) { char buffer[50]; - if(strftime(buffer, sizeof(buffer), format, t)) + if (strftime(buffer, sizeof(buffer), format, t)) return QString::fromLocal8Bit(buffer); else return QString(); @@ -103,10 +87,9 @@ * determine min and max values for a graph and save it into y_range */ -Range ds_minmax(const std::vector &avg_data, - const std::vector &min_data, - const std::vector &max_data) -{ +Range ds_minmax(const std::vector &avg_data, + const std::vector &min_data, + const std::vector &max_data) { const std::size_t size = avg_data.size(); // all three datasources must be of equal length if (size != min_data.size() || size != max_data.size()) @@ -118,28 +101,37 @@ // process avg_data if (!avg_data.empty()) { - for(std::size_t i=0; i avg_data[i]) min = avg_data[i]; - if (max < avg_data[i]) max = avg_data[i]; + if (min > avg_data[i]) + min = avg_data[i]; + if (max < avg_data[i]) + max = avg_data[i]; } } // process min/max-data - if (!min_data.empty() && !max_data.empty()) { - for(std::size_t i=0; i min_data[i]) min = min_data[i]; - if (max < min_data[i]) max = min_data[i]; - if (min > max_data[i]) min = max_data[i]; - if (max < max_data[i]) max = max_data[i]; + if (min > min_data[i]) + min = min_data[i]; + if (max < min_data[i]) + max = min_data[i]; + if (min > max_data[i]) + min = max_data[i]; + if (max < max_data[i]) + max = max_data[i]; } } - + // no data found at all - if(!valid) return Range(); + if (!valid) + return Range(); return Range(min, max); } @@ -149,11 +141,10 @@ * and do some adjustment */ -Range range_adj(const Range &y_range, double *base) -{ - if(!y_range.isValid()) +Range range_adj(const Range &y_range, double *base) { + if (!y_range.isValid()) return Range(); - + double min(y_range.min()), max(y_range.max()); double tmp_base = 1.0; @@ -162,17 +153,18 @@ min -= 1; } else { // allign to sensible values - tmp_base = pow(10, floor(log(max-min)/log(10))); - min = floor(min/tmp_base)*tmp_base; - max = ceil(max/tmp_base)*tmp_base; - + tmp_base = pow(10, floor(log(max - min) / log(10))); + min = floor(min / tmp_base) * tmp_base; + max = ceil(max / tmp_base) * tmp_base; + // setting some margin at top and bottom - const double margin = 0.05 * (max-min); + const double margin = 0.05 * (max - min); max += margin; min -= margin; } - if (base) *base = tmp_base; + if (base) + *base = tmp_base; return Range(min, max); } @@ -180,8 +172,7 @@ * merges two ranges @a a and @a b into a range, so that the new range * encloses @a a and @a b. */ -Range range_max(const Range &a, const Range &b) -{ +Range range_max(const Range &a, const Range &b) { if (!a.isValid() || !b.isValid()) return Range(); @@ -193,4 +184,3 @@ // definition of NaN in Range const double Range::NaN = std::numeric_limits::quiet_NaN(); - diff -Nru kcollectd-0.10.2/kcollectd/misc.h kcollectd-0.11.0/kcollectd/misc.h --- kcollectd-0.10.2/kcollectd/misc.h 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/misc.h 2020-02-23 19:32:25.000000000 +0000 @@ -31,22 +31,21 @@ QString Qstrftime(const char *format, const tm *t); - /** * linear mapping from range [x1, x2] to range [y1, y2] */ class linMap { double m_, t_; + public: linMap(double x1, double y1, double x2, double y2) { - m_ = (y2-y1)/(x2-x1); - t_ = y1-m_*x1; + m_ = (y2 - y1) / (x2 - x1); + t_ = y1 - m_ * x1; } double operator()(double x) const { return m_ * x + t_; } double m() const { return m_; } }; - /** * small helper holding tow doubles e.g. a point */ @@ -54,20 +53,24 @@ double x_; double y_; static const double NaN; + public: - Range() : x_(NaN), y_(NaN) { } - Range(double x, double y) : x_(x), y_(y) { } + Range() : x_(NaN), y_(NaN) {} + Range(double x, double y) : x_(x), y_(y) {} double min() const { return x_; } double max() const { return y_; } void min(double a) { x_ = a; } void max(double a) { y_ = a; } - void set(double x, double y) { x_ = x; y_ = y; } + void set(double x, double y) { + x_ = x; + y_ = y; + } bool isValid() const { return x_ != NaN; } }; -Range ds_minmax(const std::vector &avg_data, - const std::vector &min_data, - const std::vector &max_data); +Range ds_minmax(const std::vector &avg_data, + const std::vector &min_data, + const std::vector &max_data); Range range_adj(const Range &range, double *base); diff -Nru kcollectd-0.10.2/kcollectd/rrd_interface.cc kcollectd-0.11.0/kcollectd/rrd_interface.cc --- kcollectd-0.10.2/kcollectd/rrd_interface.cc 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/rrd_interface.cc 2020-02-23 19:32:25.000000000 +0000 @@ -23,15 +23,15 @@ * along with this program. If not, see . */ +#include +#include #include +#include #include #include -#include -#include -#include -#include #include +#include #include "rrd_interface.h" @@ -41,13 +41,11 @@ * copying the filename is probably unnecessary, but the signature of * rrd_info does not guarantee leaving it alone. */ -static inline -rrd_info_t *rrd_info(int, const std::string &filename) -{ - char c_file[filename.length()+1]; +static inline rrd_info_t *rrd_info(int, const std::string &filename) { + char c_file[filename.length() + 1]; filename.copy(c_file, std::string::npos); c_file[filename.length()] = 0; - char * arg[] = { 0, c_file, 0 }; + char *arg[] = {0, c_file, 0}; return rrd_info(2, arg); } @@ -56,8 +54,7 @@ * * using rrd_info */ -void get_dsinfo(const std::string &rrdfile, std::set &list) -{ +void get_dsinfo(const std::string &rrdfile, std::set &list) { using namespace std; list.clear(); @@ -66,17 +63,17 @@ rrd_info_t *i = infos; while (i) { string line(i->key); - if (line.substr(0,3) == "ds[") { - size_t e = line.find("].type"); + if (line.substr(0, 3) == "ds[") { + size_t e = line.find("].type"); if (e != string::npos) { - string name = line.substr(3, line.find("].type")-3); - list.insert(name); + string name = line.substr(3, line.find("].type") - 3); + list.insert(name); } } i = i->next; } - if (infos) - rrd_info_free(infos); + if (infos) + rrd_info_free(infos); } /** @@ -85,10 +82,9 @@ * @a start and @a end may get changed from this function and represent * the start and end of the data returned. */ -void get_rrd_data (const std::string &file, const std::string &ds, - time_t *start, time_t *end, unsigned long *step, const char *type, - std::vector *result) -{ +void get_rrd_data(const std::string &file, const std::string &ds, time_t *start, + time_t *end, unsigned long *step, const char *type, + std::vector *result) { unsigned long ds_cnt = 0; char **ds_name; rrd_value_t *data; @@ -96,22 +92,22 @@ result->clear(); - status = rrd_fetch_r(file.c_str(), type, - start, end, step, &ds_cnt, &ds_name, &data); + status = rrd_fetch_r(file.c_str(), type, start, end, step, &ds_cnt, &ds_name, + &data); if (status != 0) { return; } const unsigned long length = (*end - *start) / *step; - for(unsigned int i=0; ipush_back (data[n * ds_cnt + i]); + + for (unsigned int n = 0; n < length; ++n) + result->push_back(data[n * ds_cnt + i]); break; free(ds_name[i]); diff -Nru kcollectd-0.10.2/kcollectd/rrd_interface.h kcollectd-0.11.0/kcollectd/rrd_interface.h --- kcollectd-0.10.2/kcollectd/rrd_interface.h 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/rrd_interface.h 2020-02-23 19:32:25.000000000 +0000 @@ -26,14 +26,14 @@ #ifndef RRD_INTERAFCE_H #define RRD_INTERAFCE_H +#include #include #include -#include void get_dsinfo(const std::string &rrdfile, std::set &list); -void get_rrd_data (const std::string &file, const std::string &ds, - time_t *start, time_t *end, unsigned long *step, const char *type, - std::vector *result); +void get_rrd_data(const std::string &file, const std::string &ds, time_t *start, + time_t *end, unsigned long *step, const char *type, + std::vector *result); #endif diff -Nru kcollectd-0.10.2/kcollectd/timeaxis.cc kcollectd-0.11.0/kcollectd/timeaxis.cc --- kcollectd-0.10.2/kcollectd/timeaxis.cc 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/timeaxis.cc 2020-02-23 19:32:25.000000000 +0000 @@ -1,7 +1,7 @@ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd - * + * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or @@ -20,23 +20,25 @@ #include "timeaxis.h" -void time_iterator::set(time_t start, time_t st, it_type ty) -{ +void time_iterator::set(time_t start, time_t st, it_type ty) { step = st; - if (!step) return; + if (!step) + return; type = ty; - switch(type) { + switch (type) { case seconds: { tzset(); localtime_r(&start, &now_tm); - now_t = ((start + now_tm.tm_gmtoff + step) / step) * step - now_tm.tm_gmtoff; - break; } + now_t = + ((start + now_tm.tm_gmtoff + step) / step) * step - now_tm.tm_gmtoff; + break; + } case weeks: tzset(); localtime_r(&start, &now_tm); - step *= 3600*24*7; + step *= 3600 * 24 * 7; now_tm.tm_sec = now_tm.tm_min = now_tm.tm_hour = 0; now_tm.tm_mday -= now_tm.tm_wday - (now_tm.tm_wday == 0 ? 1 : 8); now_t = mktime(&now_tm); @@ -67,10 +69,8 @@ } } - -time_iterator &time_iterator::operator++() -{ - switch(type) { +time_iterator &time_iterator::operator++() { + switch (type) { case seconds: case weeks: now_t += step; @@ -92,10 +92,8 @@ return *this; } - -time_iterator &time_iterator::operator--() -{ - switch(type) { +time_iterator &time_iterator::operator--() { + switch (type) { case seconds: case weeks: now_t -= step; @@ -117,23 +115,21 @@ return *this; } -time_t time_iterator::interval() -{ - switch(type) { +time_t time_iterator::interval() { + switch (type) { case seconds: case weeks: return step; case month: - return step * 3600*24*30; + return step * 3600 * 24 * 30; case years: - return step * 3600*24*365; + return step * 3600 * 24 * 365; } return 0; } -const struct tm *time_iterator::tm() -{ - switch(type) { +const struct tm *time_iterator::tm() { + switch (type) { case seconds: case weeks: tzset(); @@ -145,4 +141,3 @@ } return &now_tm; } - diff -Nru kcollectd-0.10.2/kcollectd/timeaxis.h kcollectd-0.11.0/kcollectd/timeaxis.h --- kcollectd-0.10.2/kcollectd/timeaxis.h 2019-08-31 13:59:25.000000000 +0000 +++ kcollectd-0.11.0/kcollectd/timeaxis.h 2020-02-23 19:32:25.000000000 +0000 @@ -2,7 +2,7 @@ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd - * + * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or @@ -22,18 +22,18 @@ #ifndef TIMEAXIS_H #define TIMEAXIS_H -#include #include +#include #include class time_iterator { - public: +public: enum it_type { seconds, weeks, month, years }; time_iterator(); - time_iterator(time_t start, time_t step, it_type type = seconds); - void set(time_t start, time_t step, it_type type = seconds); + time_iterator(time_t start, time_t step, it_type type = seconds); + void set(time_t start, time_t step, it_type type = seconds); time_iterator &operator++(); time_iterator &operator--(); @@ -44,36 +44,23 @@ time_t interval(); const struct tm *tm(); - protected: +protected: it_type type; time_t now_t; struct tm now_tm; time_t step; }; -inline time_iterator::time_iterator(time_t start, time_t step, it_type type) -{ +inline time_iterator::time_iterator(time_t start, time_t step, it_type type) { set(start, step, type); -} - -inline time_iterator::time_iterator() -{ - set(0, 0); -} - -inline time_t &time_iterator::operator*() -{ - return now_t; } -inline time_t *time_iterator::operator->() -{ - return &now_t; -} +inline time_iterator::time_iterator() { set(0, 0); } -inline bool time_iterator::valid() -{ - return step != 0; -} +inline time_t &time_iterator::operator*() { return now_t; } + +inline time_t *time_iterator::operator->() { return &now_t; } + +inline bool time_iterator::valid() { return step != 0; } #endif diff -Nru kcollectd-0.10.2/README.md kcollectd-0.11.0/README.md --- kcollectd-0.10.2/README.md 1970-01-01 00:00:00.000000000 +0000 +++ kcollectd-0.11.0/README.md 2020-02-23 19:32:25.000000000 +0000 @@ -0,0 +1,18 @@ +Visit the new and improved [kcollectd home page](https://www.antonioerusso.com/projects/kcollectd/)! + +# Overview + +kcollectd is a graphical front-end to [collectd](https://collectd.org/), +a data collection service that monitors, by polling or pushed updates, +system information, such as temperature or free RAM. + +kcollectd directly displays the data, which is stored in an round-robin +database. + +# History +Many thanks to [M G Berberich](https://www.forwiss.uni-passau.de/~berberic/), +for originally writing kcollectd! See the +[old site](https://www.forwiss.uni-passau.de/~berberic/Linux/kcollectd.html). + +Note that the modern version of kcollectd available here has been ported to +Qt 5 and librrd8.