Browse Source

added cmake support and updated some hardcoded strings

master
mutantturkey 10 years ago
parent
commit
5b1fef5431
  1. 2
      AUTHORS
  2. 66
      CMakeLists.txt
  3. 5
      README
  4. 4
      TODO
  5. 4
      src/khdapsmonitorsystray.cpp
  6. 8
      src/khdapsmonitorwidget.h
  7. 7
      src/main.cpp

2
AUTHORS

@ -0,0 +1,2 @@
Roy Marples <roy@marples.name>
Calvin Morrison <mutantturkey@gmail.com>

66
CMakeLists.txt

@ -0,0 +1,66 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
#################################################
cmake_minimum_required( VERSION 2.8 )
##### general package setup #####################
project( khdapsmonitor )
set( PACKAGE kdebase )
set( VERSION "3.5.13" )
##### include essential cmake modules ###########
include( FindPkgConfig )
include( CheckIncludeFile )
include( CheckCSourceRuns )
include( CheckCXXSourceCompiles )
include( CheckLibraryExists )
include( CheckFunctionExists )
include( CheckStructHasMember )
##### include our cmake modules #################
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
##### setup install paths #######################
include( TDESetupPaths )
tde_setup_paths( )
find_package( TQt )
find_package( TDE )
##### set PKG_CONFIG_PATH #######################
set( ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}:$ENV{PKG_CONFIG_PATH}:${LIB_INSTALL_DIR}/pkgconfig" )
##### configure checks ##########################
###### global compiler settings #################
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
##### kdebase directories #######################
add_subdirectory( src )
##### write configure files #####################
configure_file( config.h.cmake config.h @ONLY )

5
README

@ -0,0 +1,5 @@
KHDAPSMonitor is a TDE based monitor for laptops that support the IBM
Hard Drive Active Protection System (http://hdaps.sf.net)
You'll need to be running the hdapsd daemon to get monitoring support.

4
TODO

@ -0,0 +1,4 @@
Documentation - lol
Better Polling
Configurable interval
Configurable readings (keyboard, mouse etc)

4
src/khdapsmonitorsystray.cpp

@ -58,11 +58,11 @@ void KHDAPSMonitorSysTray::update()
if (! sysFS.hasHDAPS())
{
newToolTip = I18N_NOOP("ERROR: Kernel does not support HDAPS");
newToolTip = I18N_NOOP("error: Kernel does not support HDAPS or ");
}
else if (dList.count() == 0)
{
newToolTip = I18N_NOOP("ERROR: No devices found that use HDAPS");
newToolTip = I18N_NOOP("error: No devices found that use HDAPS");
}
else

8
src/khdapsmonitorwidget.h

@ -38,14 +38,6 @@ public:
public slots:
void update();
/*$PUBLIC_SLOTS$*/
protected:
/*$PROTECTED_FUNCTIONS$*/
protected slots:
/*$PROTECTED_SLOTS$*/
private:
SysFS sysFS;
};

7
src/main.cpp

@ -25,9 +25,9 @@
#include <klocale.h>
static const char description[] =
I18N_NOOP("HDAPS Monitor for KDE");
I18N_NOOP("HDAPS Monitor for TDE");
static const char version[] = "0.1";
static const char version[] = "0.1.1";
static KCmdLineOptions options[] =
{
@ -38,9 +38,10 @@ static KCmdLineOptions options[] =
int main(int argc, char **argv)
{
KAboutData about("khdapsmonitor", I18N_NOOP("KHDAPSMonitor"), version, description,
KAboutData::License_GPL, "(C) 2006 Roy Marples", 0, "http://roy.marples.name",
KAboutData::License_GPL, "(C) 2006 Roy Marples (C) 2012 Calvin Morrison", 0, "http://roy.marples.name http://trinitydesktop.org",
"bugs@marples.name");
about.addAuthor( "Roy Marples", 0, "roy@marples.name" );
about.addAuthor( "Calvin Morrison", 0, "mutantturkey@gmail.com");
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options );

Loading…
Cancel
Save