This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge pull request #434 from kuzmas/sysstat

SysStat library and plugin
  • Loading branch information...
kuzmas committed Oct 27, 2012
2 parents 4664c24 + 74884b8 commit 6002ff0f4ac42fa9f53a777de71289af73e9a599
Showing with 5,045 additions and 6 deletions.
  1. +4 −0 CMakeLists.txt
  2. +2 −1 libraries/CMakeLists.txt
  3. +92 −0 libraries/sysstat/CMakeLists.txt
  4. +510 −0 libraries/sysstat/LGPLv2.1
  5. +165 −0 libraries/sysstat/LGPLv3
  6. +197 −0 libraries/sysstat/basestat.cpp
  7. +82 −0 libraries/sysstat/basestat.hpp
  8. +86 −0 libraries/sysstat/basestat_p.hpp
  9. +159 −0 libraries/sysstat/cpufreqstat.cpp
  10. +64 −0 libraries/sysstat/cpufreqstat.hpp
  11. +69 −0 libraries/sysstat/cpufreqstat_p.hpp
  12. +301 −0 libraries/sysstat/cpustat.cpp
  13. +85 −0 libraries/sysstat/cpustat.hpp
  14. +101 −0 libraries/sysstat/cpustat_p.hpp
  15. +125 −0 libraries/sysstat/memstat.cpp
  16. +65 −0 libraries/sysstat/memstat.hpp
  17. +68 −0 libraries/sysstat/memstat_p.hpp
  18. +135 −0 libraries/sysstat/netstat.cpp
  19. +64 −0 libraries/sysstat/netstat.hpp
  20. +78 −0 libraries/sysstat/netstat_p.hpp
  21. +79 −0 libraries/sysstat/sysstat.pro
  22. +45 −0 libraries/sysstat/sysstat_global.hpp
  23. +64 −0 libraries/sysstat/version.cpp
  24. +48 −0 libraries/sysstat/version.hpp
  25. +45 −0 libraries/sysstat/version_p.hpp
  26. +5 −5 razorqt-panel/CMakeLists.txt
  27. +38 −0 razorqt-panel/plugin-sysstat/CMakeLists.txt
  28. +414 −0 razorqt-panel/plugin-sysstat/razorsysstat.cpp
  29. +131 −0 razorqt-panel/plugin-sysstat/razorsysstat.h
  30. +287 −0 razorqt-panel/plugin-sysstat/razorsysstatconfiguration.cpp
  31. +99 −0 razorqt-panel/plugin-sysstat/razorsysstatconfiguration.h
  32. +1,270 −0 razorqt-panel/plugin-sysstat/razorsysstatconfiguration.ui
  33. +47 −0 razorqt-panel/plugin-sysstat/razorsysstatutils.cpp
  34. +14 −0 razorqt-panel/plugin-sysstat/razorsysstatutils.h
  35. +7 −0 razorqt-panel/plugin-sysstat/resources/panelsysstat.desktop.in
View
@@ -87,6 +87,10 @@ build_module(MODULE_LIBRAZORMOUNT
"Razor mount library"
libraries/razormount On)
+build_module(MODULE_LIBSYSSTAT
+ "System statistics library"
+ libraries/sysstat On)
+
build_module(MODULE_RESOURCES
"Razor resources"
razorqt-resources On)
View
@@ -2,6 +2,7 @@ add_subdirectory(razormount)
add_subdirectory(razorqt)
add_subdirectory(razorqxt)
add_subdirectory(qtxdg)
+add_subdirectory(sysstat)
-add_dependencies(razorqt qtxdg razorqxt razormount)
+add_dependencies(razorqt qtxdg razorqxt razormount sysstat)
@@ -0,0 +1,92 @@
+project(libsysstat)
+
+# additional cmake files
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+
+set (MAJOR_VERSION 0)
+set (MINOR_VERSION 1)
+set (PATCH_VERSION 0)
+add_definitions(-DMAJOR_VERSION=${MAJOR_VERSION})
+add_definitions(-DMINOR_VERSION=${MINOR_VERSION})
+add_definitions(-DPATCH_VERSION=${PATCH_VERSION})
+add_definitions(-DSYSSTAT_LIBRARY)
+
+add_definitions(-Wall)
+find_package(Qt4 REQUIRED)
+
+
+set(SYSSTAT_PUBLIC_HDRS
+ version.hpp
+ sysstat_global.hpp
+ basestat.hpp
+ cpustat.hpp
+ memstat.hpp
+ netstat.hpp
+)
+
+set(SYSSTAT_PRIVATE_HDRS
+ version_p.hpp
+ basestat_p.hpp
+ cpustat_p.hpp
+ memstat_p.hpp
+ netstat_p.hpp
+)
+
+set(SYSSTAT_SRCS
+ version.cpp
+ basestat.cpp
+ cpustat.cpp
+ memstat.cpp
+ netstat.cpp
+)
+
+set(SYSSTAT_MOCS
+ basestat.hpp
+ cpustat.hpp
+ memstat.hpp
+ netstat.hpp
+ basestat_p.hpp
+ cpustat_p.hpp
+ memstat_p.hpp
+ netstat_p.hpp
+)
+
+
+# Translations **********************************
+file(GLOB SYSSTAT_TS_FILES
+ translations/*.ts
+)
+#************************************************
+
+
+#**********************************************************
+cmake_minimum_required( VERSION 2.6 )
+
+include(RazorLibSuffix)
+include(${QT_USE_FILE})
+
+QT4_WRAP_CPP(SYSSTAT_CXX ${SYSSTAT_MOCS})
+qt4_add_translation(SYSSTAT_QM_FILES ${SYSSTAT_TS_FILES})
+
+if (NOT CMAKE_BUILD_TYPE)
+ set ( CMAKE_BUILD_TYPE Release )
+endif (NOT CMAKE_BUILD_TYPE)
+
+
+set(APP_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/sysstat)
+add_definitions(-DTRANSLATIONS_DIR=\"${APP_SHARE_DIR}\")
+
+add_library(sysstat SHARED ${SYSSTAT_PUBLIC_HDRS} ${SYSSTAT_PRIVATE_HDRS} ${SYSSTAT_SRCS} ${SYSSTAT_CXX} ${SYSSTAT_QM_FILES})
+target_link_libraries(sysstat ${QT_LIBRARIES})
+
+set_target_properties(sysstat PROPERTIES
+ VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}
+ SOVERSION ${MAJOR_VERSION}
+)
+
+install(TARGETS sysstat DESTINATION lib${LIB_SUFFIX})
+install(FILES ${SYSSTAT_PUBLIC_HDRS} DESTINATION include/sysstat)
+install(FILES ${SYSSTAT_QM_FILES} DESTINATION ${APP_SHARE_DIR})
+
+include(create_pkgconfig_file)
+create_pkgconfig_file(sysstat "SysStat, a Qt-based interface to system statistics")
Oops, something went wrong.

0 comments on commit 6002ff0

Please sign in to comment.