parent
d58173e773
commit
55ebab38f1
@ -0,0 +1,80 @@
|
||||
############################################
|
||||
# #
|
||||
# Improvements and feedbacks are welcome #
|
||||
# #
|
||||
# This file is released under GPL >= 3 #
|
||||
# #
|
||||
############################################
|
||||
|
||||
|
||||
cmake_minimum_required( VERSION 2.8 )
|
||||
|
||||
|
||||
#### general package setup
|
||||
|
||||
project( kima )
|
||||
set( VERSION R14.1.0 )
|
||||
|
||||
|
||||
#### include essential cmake modules
|
||||
|
||||
include( FindPkgConfig )
|
||||
include( CheckFunctionExists )
|
||||
include( CheckSymbolExists )
|
||||
include( CheckIncludeFile )
|
||||
include( CheckLibraryExists )
|
||||
include( CheckCSourceCompiles )
|
||||
include( CheckCXXSourceCompiles )
|
||||
|
||||
|
||||
#### include our cmake modules
|
||||
|
||||
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
|
||||
include( TDEMacros )
|
||||
|
||||
|
||||
##### setup install paths
|
||||
|
||||
include( TDESetupPaths )
|
||||
tde_setup_paths( )
|
||||
|
||||
|
||||
##### optional stuff
|
||||
|
||||
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
|
||||
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
|
||||
option( WITH_NVCONTROL "Build with NVidia control support" ${WITH_ALL_OPTIONS} )
|
||||
|
||||
|
||||
##### user requested modules
|
||||
|
||||
option( BUILD_ALL "Build all" ON )
|
||||
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
|
||||
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
|
||||
|
||||
|
||||
##### configure checks
|
||||
|
||||
include( ConfigureChecks.cmake )
|
||||
|
||||
|
||||
###### global compiler settings
|
||||
|
||||
add_definitions( -DHAVE_CONFIG_H )
|
||||
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
|
||||
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||
|
||||
|
||||
##### directories
|
||||
|
||||
add_subdirectory( src )
|
||||
tde_conditional_add_subdirectory( BUILD_DOC doc )
|
||||
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
|
||||
|
||||
|
||||
|
||||
##### write configure files
|
||||
|
||||
configure_file( config.h.cmake config.h @ONLY )
|
@ -0,0 +1,45 @@
|
||||
###########################################
|
||||
# #
|
||||
# Improvements and feedback are welcome #
|
||||
# #
|
||||
# This file is released under GPL >= 3 #
|
||||
# #
|
||||
###########################################
|
||||
|
||||
# required stuff
|
||||
find_package( TQt )
|
||||
find_package( TDE )
|
||||
|
||||
tde_setup_architecture_flags( )
|
||||
|
||||
include(TestBigEndian)
|
||||
test_big_endian(WORDS_BIGENDIAN)
|
||||
|
||||
tde_setup_largefiles( )
|
||||
|
||||
|
||||
##### check for gcc visibility support
|
||||
|
||||
if( WITH_GCC_VISIBILITY )
|
||||
tde_setup_gcc_visibility( )
|
||||
endif( WITH_GCC_VISIBILITY )
|
||||
|
||||
|
||||
##### check for NVidia support
|
||||
|
||||
if( WITH_NVCONTROL )
|
||||
set( NVCONTROL_FOUND false)
|
||||
|
||||
find_path( NVCONTROL_INCLUDE_DIR NAMES "NVCtrlLib.h" PATH_SUFFIXES "NVCtrl" )
|
||||
find_library( NVCONTROL_LIBRARIES NAMES XNVCtrl )
|
||||
|
||||
if( NVCONTROL_LIBRARIES AND NVCONTROL_INCLUDE_DIR )
|
||||
set( NVCONTROL_FOUND true)
|
||||
endif( NVCONTROL_LIBRARIES AND NVCONTROL_INCLUDE_DIR )
|
||||
|
||||
if( NVCONTROL_FOUND )
|
||||
set( HAVE_NVCONTROL 1 )
|
||||
else()
|
||||
tde_message_fatal( "NVidia support has been requested but <NVCtrlLib.h> or libXNVCtrl were not found on your system" )
|
||||
endif( NVCONTROL_FOUND )
|
||||
endif( WITH_NVCONTROL )
|
@ -0,0 +1,11 @@
|
||||
#define VERSION "@VERSION@"
|
||||
|
||||
// Defined if you have fvisibility and fvisibility-inlines-hidden support.
|
||||
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
|
||||
|
||||
/* Defined if you have <NVCtrlLib.h> header */
|
||||
#cmakedefine HAVE_NVCONTROL @HAVE_NVCONTROL@
|
@ -0,0 +1 @@
|
||||
tde_auto_add_subdirectories( )
|
@ -0,0 +1,2 @@
|
||||
tde_create_handbook( DESTINATION ${PROJECT_NAME} )
|
||||
|
@ -0,0 +1,5 @@
|
||||
file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
|
||||
|
||||
if( _srcs )
|
||||
tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} )
|
||||
endif( )
|
@ -0,0 +1,42 @@
|
||||
add_subdirectory( cpufreqd )
|
||||
add_subdirectory( sources )
|
||||
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${TDE_INCLUDE_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
${CMAKE_BINARY_DIR}/src/sources
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TQT_LIBRARY_DIRS}
|
||||
${TDE_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### libkima (kpart)
|
||||
|
||||
tde_add_kpart( libkima AUTOMOC
|
||||
|
||||
SOURCES
|
||||
prefs.ui
|
||||
kima.cpp
|
||||
flowlayout.cpp
|
||||
sourcelistitem.cpp
|
||||
LINK
|
||||
cpufreqd-static
|
||||
sources-static
|
||||
tdeui-shared
|
||||
|
||||
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### other data
|
||||
|
||||
install(
|
||||
FILES ${PROJECT_NAME}.desktop
|
||||
DESTINATION ${DATA_INSTALL_DIR}/kicker/applets
|
||||
)
|
@ -0,0 +1,23 @@
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${TDE_INCLUDE_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TQT_LIBRARY_DIRS}
|
||||
${TDE_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### cpufreqd (static)
|
||||
|
||||
tde_add_library( cpufreqd STATIC_PIC AUTOMOC
|
||||
|
||||
SOURCES
|
||||
cpufreqd.cpp
|
||||
cpufreqdconnection.cpp
|
||||
cpufreqdprofile.cpp
|
||||
)
|
@ -1,71 +0,0 @@
|
||||
#include <kdialog.h>
|
||||
#include <tdelocale.h>
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file './prefs.ui'
|
||||
**
|
||||
** Created: Thu Jun 21 19:16:50 2007
|
||||
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.7 edited Aug 31 2005 $)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
|
||||
#include "prefs.h"
|
||||
|
||||
#include <tqvariant.h>
|
||||
#include <tqsplitter.h>
|
||||
#include <tqheader.h>
|
||||
#include <tdelistview.h>
|
||||
#include <tqwidgetstack.h>
|
||||
#include <tqlayout.h>
|
||||
#include <tqtooltip.h>
|
||||
#include <tqwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a Prefs as a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
Prefs::Prefs( TQWidget* parent, const char* name, WFlags fl )
|
||||
: TQWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "Prefs" );
|
||||
PrefsLayout = new TQVBoxLayout( this, 0, 6, "PrefsLayout");
|
||||
|
||||
splitter3 = new TQSplitter( this, "splitter3" );
|
||||
splitter3->setOrientation( TQSplitter::Horizontal );
|
||||
|
||||
sourceListView = new TDEListView( splitter3, "sourceListView" );
|
||||
sourceListView->addColumn( tr2i18n( "Source" ) );
|
||||
sourceListView->header()->setClickEnabled( FALSE, sourceListView->header()->count() - 1 );
|
||||
sourceListView->header()->setResizeEnabled( FALSE, sourceListView->header()->count() - 1 );
|
||||
sourceListView->setResizeMode( TDEListView::AllColumns );
|
||||
|
||||
widgetStack = new TQWidgetStack( splitter3, "widgetStack" );
|
||||
|
||||
WStackPage = new TQWidget( widgetStack, "WStackPage" );
|
||||
widgetStack->addWidget( WStackPage, 0 );
|
||||
PrefsLayout->addWidget( splitter3 );
|
||||
languageChange();
|
||||
resize( TQSize(340, 73).expandedTo(minimumSizeHint()) );
|
||||
clearWState( WState_Polished );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
Prefs::~Prefs()
|
||||
{
|
||||
// no need to delete child widgets, TQt does it all for us
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the strings of the subwidgets using the current
|
||||
* language.
|
||||
*/
|
||||
void Prefs::languageChange()
|
||||
{
|
||||
setCaption( tr2i18n( "Preferences" ) );
|
||||
sourceListView->header()->setLabel( 0, tr2i18n( "Source" ) );
|
||||
}
|
||||
|
||||
#include "prefs.moc"
|
@ -0,0 +1,46 @@
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${TDE_INCLUDE_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
${NVCONTROL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TQT_LIBRARY_DIRS}
|
||||
${TDE_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### sources (static)
|
||||
|
||||
tde_add_library( sources STATIC_PIC AUTOMOC
|
||||
|
||||
SOURCES
|
||||
labelsourcePrefs.ui
|
||||
sourceprefs.ui
|
||||
acpithermalsrc.cpp
|
||||
batterysrc.cpp
|
||||
cpuinfofreqsrc.cpp
|
||||
hddtempsrc.cpp
|
||||
hwmonfansrc.cpp
|
||||
hwmonthermalsrc.cpp
|
||||
i8ksrc.cpp
|
||||
ibmacpifansrc.cpp
|
||||
ibmacpithermalsrc.cpp
|
||||
ibmhdaps.cpp
|
||||
ibookg4thermalsrc.cpp
|
||||
labelsource.cpp
|
||||
nvidiathermalsrc.cpp
|
||||
omnibookthermalsrc.cpp
|
||||
source.cpp
|
||||
sysfreqsrc.cpp
|
||||
threadedtrigger.cpp
|
||||
triggeredsource.cpp
|
||||
updateevent.cpp
|
||||
uptimesrc.cpp
|
||||
LINK
|
||||
tdecore-shared
|
||||
${NVCONTROL_LIBRARIES}
|
||||
)
|
@ -1,110 +0,0 @@
|
||||
#include <kdialog.h>
|
||||
#include <tdelocale.h>
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file './labelsourcePrefs.ui'
|
||||
**
|
||||
** Created: Thu Jun 21 19:16:51 2007
|
||||
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.7 edited Aug 31 2005 $)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
|
||||
#include "labelsourcePrefs.h"
|
||||
|
||||
#include <tqvariant.h>
|
||||
#include <tqpushbutton.h>
|
||||
#include <tqframe.h>
|
||||
#include <tqlabel.h>
|
||||
#include <kcolorbutton.h>
|
||||
#include <tdefontrequester.h>
|
||||
#include <tqcombobox.h>
|
||||
#include <tqlayout.h>
|
||||
#include <tqtooltip.h>
|
||||
#include <tqwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a LabelSourcePrefs as a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
LabelSourcePrefs::LabelSourcePrefs( TQWidget* parent, const char* name, WFlags fl )
|
||||
: TQWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "LabelSourcePrefs" );
|
||||
LabelSourcePrefsLayout = new TQVBoxLayout( this, 0, 6, "LabelSourcePrefsLayout");
|
||||
|
||||
defaultSourcePrefsFrame = new TQFrame( this, "defaultSourcePrefsFrame" );
|
||||
defaultSourcePrefsFrame->setFrameShape( TQFrame::NoFrame );
|
||||
defaultSourcePrefsFrame->setFrameShadow( TQFrame::Plain );
|
||||
defaultSourcePrefsFrameLayout = new TQVBoxLayout( defaultSourcePrefsFrame, 0, 6, "defaultSourcePrefsFrameLayout");
|
||||
|
||||
taskbartitleLabel = new TQLabel( defaultSourcePrefsFrame, "taskbartitleLabel" );
|
||||
TQFont taskbartitleLabel_font( taskbartitleLabel->font() );
|
||||
taskbartitleLabel_font.setBold( TRUE );
|
||||
taskbartitleLabel->setFont( taskbartitleLabel_font );
|
||||
defaultSourcePrefsFrameLayout->addWidget( taskbartitleLabel );
|
||||
|
||||
layout13 = new TQHBoxLayout( 0, 0, 6, "layout13");
|
||||
|
||||
colorLabel = new TQLabel( defaultSourcePrefsFrame, "colorLabel" );
|
||||
layout13->addWidget( colorLabel );
|
||||
|
||||
colorButton = new KColorButton( defaultSourcePrefsFrame, "colorButton" );
|
||||
layout13->addWidget( colorButton );
|
||||
spacer1 = new TQSpacerItem( 350, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
|
||||
layout13->addItem( spacer1 );
|
||||
defaultSourcePrefsFrameLayout->addLayout( layout13 );
|
||||
|
||||
layout17 = new TQHBoxLayout( 0, 0, 6, "layout17");
|
||||
|
||||
fontLabel = new TQLabel( defaultSourcePrefsFrame, "fontLabel" );
|
||||
layout17->addWidget( fontLabel );
|
||||
|
||||
fontRequester = new TDEFontRequester( defaultSourcePrefsFrame, "fontRequester" );
|
||||
layout17->addWidget( fontRequester );
|
||||
defaultSourcePrefsFrameLayout->addLayout( layout17 );
|
||||
|
||||
layout18 = new TQHBoxLayout( 0, 0, 6, "layout18");
|
||||
|
||||
alignmentLabel = new TQLabel( defaultSourcePrefsFrame, "alignmentLabel" );
|
||||
layout18->addWidget( alignmentLabel );
|
||||
|
||||
alignmentComboBox = new TQComboBox( FALSE, defaultSourcePrefsFrame, "alignmentComboBox" );
|
||||
layout18->addWidget( alignmentComboBox );
|
||||
spacer2 = new TQSpacerItem( 350, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
|
||||
layout18->addItem( spacer2 );
|
||||
defaultSourcePrefsFrameLayout->addLayout( layout18 );
|
||||
LabelSourcePrefsLayout->addWidget( defaultSourcePrefsFrame );
|
||||
languageChange();
|
||||
resize( TQSize(299, 135).expandedTo(minimumSizeHint()) );
|
||||
clearWState( WState_Polished );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
LabelSourcePrefs::~LabelSourcePrefs()
|
||||
{
|
||||
// no need to delete child widgets, TQt does it all for us
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the strings of the subwidgets using the current
|
||||
* language.
|
||||
*/
|
||||
void LabelSourcePrefs::languageChange()
|
||||
{
|
||||
setCaption( tr2i18n( "LabelSourcePrefs" ) );
|
||||
taskbartitleLabel->setText( tr2i18n( "<br>\n"
|
||||
"Taskbar visual settings" ) );
|
||||
colorLabel->setText( tr2i18n( "Foreground color:" ) );
|
||||
colorButton->setText( TQString() );
|
||||
fontLabel->setText( tr2i18n( "Font:" ) );
|
||||
alignmentLabel->setText( tr2i18n( "Alignment:" ) );
|
||||
alignmentComboBox->clear();
|
||||
alignmentComboBox->insertItem( tr2i18n( "Left" ) );
|
||||
alignmentComboBox->insertItem( tr2i18n( "Center" ) );
|
||||
alignmentComboBox->insertItem( tr2i18n( "Right" ) );
|
||||
}
|
||||
|
||||
#include "labelsourcePrefs.moc"
|
@ -1,88 +0,0 @@
|
||||
#include <kdialog.h>
|
||||
#include <tdelocale.h>
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file './sourceprefs.ui'
|
||||
**
|
||||
** Created: Thu Jun 21 19:16:51 2007
|
||||
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.7 edited Aug 31 2005 $)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
|
||||
#include "sourceprefs.h"
|
||||
|
||||
#include <tqvariant.h>
|
||||
#include <tqpushbutton.h>
|
||||
#include <tqlabel.h>
|
||||
#include <tqlineedit.h>
|
||||
#include <tqcheckbox.h>
|
||||
#include <tqlayout.h>
|
||||
#include <tqtooltip.h>
|
||||
#include <tqwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a SourcePrefs as a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
SourcePrefs::SourcePrefs( TQWidget* parent, const char* name, WFlags fl )
|
||||
: TQWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "SourcePrefs" );
|
||||
SourcePrefsLayout = new TQVBoxLayout( this, 0, 6, "SourcePrefsLayout");
|
||||
|
||||
descriptionLabel = new TQLabel( this, "descriptionLabel" );
|
||||
SourcePrefsLayout->addWidget( descriptionLabel );
|
||||
|
||||
hBoxLayout = new TQHBoxLayout( 0, 0, 6, "hBoxLayout");
|
||||
|
||||
nameLabel = new TQLabel( this, "nameLabel" );
|
||||
hBoxLayout->addWidget( nameLabel );
|
||||
|
||||
nameLineEdit = new TQLineEdit( this, "nameLineEdit" );
|
||||
hBoxLayout->addWidget( nameLineEdit );
|
||||
spacer8 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
|
||||
hBoxLayout->addItem( spacer8 );
|
||||
SourcePrefsLayout->addLayout( hBoxLayout );
|
||||
|
||||
taskbarCheckBox = new TQCheckBox( this, "taskbarCheckBox" );
|
||||
SourcePrefsLayout->addWidget( taskbarCheckBox );
|
||||
|
||||
hBoxLayout2 = new TQHBoxLayout( 0, 0, 6, "hBoxLayout2");
|
||||
spacer8_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
|
||||
hBoxLayout2->addItem( spacer8_2 );
|
||||
|
||||
nameCheckBox = new TQCheckBox( this, "nameCheckBox" );
|
||||
hBoxLayout2->addWidget( nameCheckBox );
|
||||
SourcePrefsLayout->addLayout( hBoxLayout2 );
|
||||
|
||||
tooltipCheckBox = new TQCheckBox( this, "tooltipCheckBox" );
|
||||
SourcePrefsLayout->addWidget( tooltipCheckBox );
|
||||
languageChange();
|
||||
resize( TQSize(203, 127).expandedTo(minimumSizeHint()) );
|
||||
clearWState( WState_Polished );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
SourcePrefs::~SourcePrefs()
|
||||
{
|
||||
// no need to delete child widgets, TQt does it all for us
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the strings of the subwidgets using the current
|
||||
* language.
|
||||
*/
|
||||
void SourcePrefs::languageChange()
|
||||
{
|
||||
setCaption( tr2i18n( "SourcePrefs" ) );
|
||||
descriptionLabel->setText( tr2i18n( "description" ) );
|
||||
nameLabel->setText( tr2i18n( "Name:" ) );
|
||||
taskbarCheckBox->setText( tr2i18n( "Show this source in Taskbar" ) );
|
||||
nameCheckBox->setText( tr2i18n( "Show name in Taskbar" ) );
|
||||
tooltipCheckBox->setText( tr2i18n( "Show this source in ToolTip" ) );
|
||||
}
|
||||
|
||||
#include "sourceprefs.moc"
|
Loading…
Reference in new issue