diff options
author | gregory guy <g-gregory@gmx.fr> | 2019-04-19 16:41:06 +0200 |
---|---|---|
committer | gregory guy <g-gregory@gmx.fr> | 2019-04-21 20:19:23 +0200 |
commit | 55ebab38f1bc2c061eb3673029fee13615635221 (patch) | |
tree | b390ff21b5340f9634a4baee2c7ba2383ee84298 | |
parent | d58173e77380a3b1ea7b036af4bb6ea8135e514d (diff) | |
download | kima-55ebab38f1bc2c061eb3673029fee13615635221.tar.gz kima-55ebab38f1bc2c061eb3673029fee13615635221.zip |
conversion to the cmake building system
Signed-off-by: gregory guy <g-gregory@gmx.fr>
35 files changed, 279 insertions, 280 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..2d81e36 --- /dev/null +++ b/CMakeLists.txt @@ -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 ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..f327430 --- /dev/null +++ b/ConfigureChecks.cmake @@ -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 ) diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..52071eb --- /dev/null +++ b/config.h.cmake @@ -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@ diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..6d0aa9f --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1 @@ +tde_auto_add_subdirectories( ) diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt new file mode 100644 index 0000000..c96df24 --- /dev/null +++ b/doc/en/CMakeLists.txt @@ -0,0 +1,2 @@ +tde_create_handbook( DESTINATION ${PROJECT_NAME} ) + diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100644 index 0000000..597c341 --- /dev/null +++ b/po/CMakeLists.txt @@ -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( ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..fbecc95 --- /dev/null +++ b/src/CMakeLists.txt @@ -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 +) diff --git a/src/cpufreqd/CMakeLists.txt b/src/cpufreqd/CMakeLists.txt new file mode 100644 index 0000000..e14b38d --- /dev/null +++ b/src/cpufreqd/CMakeLists.txt @@ -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 +) diff --git a/src/cpufreqd/cpufreqd.cpp b/src/cpufreqd/cpufreqd.cpp index c510d90..374a7cb 100644 --- a/src/cpufreqd/cpufreqd.cpp +++ b/src/cpufreqd/cpufreqd.cpp @@ -154,3 +154,4 @@ void CPUFreqd::setMode(uint32_t mode) { m_conn.write(CMD_SET_MODE, mode); m_conn.close(); } +#include "cpufreqd.moc" diff --git a/src/flowlayout.cpp b/src/flowlayout.cpp index 2826a3e..24663f9 100644 --- a/src/flowlayout.cpp +++ b/src/flowlayout.cpp @@ -345,3 +345,4 @@ TQLayoutItem* FlowLayout::takeAt(int index) { return item; } #endif // USE_QT4 +#include "flowlayout.moc" diff --git a/src/kima.cpp b/src/kima.cpp index 1bc1169..1cc8343 100644 --- a/src/kima.cpp +++ b/src/kima.cpp @@ -73,7 +73,7 @@ //#include "kdebug.h" extern "C" { - KPanelApplet* init( TQWidget* inParent, const TQString& inConfigFile) { +KDE_EXPORT KPanelApplet* init( TQWidget* inParent, const TQString& inConfigFile) { TDEGlobal::locale()->insertCatalogue("kima"); return new Kima(inConfigFile, KPanelApplet::Normal, //KPanelApplet::About | KPanelApplet::Help | KPanelApplet::Preferences, @@ -430,3 +430,4 @@ void Kima::maybeTip(const TQPoint& inPos){ text.append("</table>"); tip(rect(), text); } +#include "kima.moc" diff --git a/src/prefs.cpp b/src/prefs.cpp deleted file mode 100644 index 4d9f6b1..0000000 --- a/src/prefs.cpp +++ /dev/null @@ -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" diff --git a/src/sourcelistitem.cpp b/src/sourcelistitem.cpp index 5b217b1..68a68d7 100644 --- a/src/sourcelistitem.cpp +++ b/src/sourcelistitem.cpp @@ -95,3 +95,4 @@ void SourceListItem::stateChange(bool inOn){ TQCheckListItem::stateChange(inOn); setEnabled(inOn); } +#include "sourcelistitem.moc" diff --git a/src/sources/CMakeLists.txt b/src/sources/CMakeLists.txt new file mode 100644 index 0000000..3b407bd --- /dev/null +++ b/src/sources/CMakeLists.txt @@ -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} +) diff --git a/src/sources/acpithermalsrc.cpp b/src/sources/acpithermalsrc.cpp index a2340a0..53f7674 100644 --- a/src/sources/acpithermalsrc.cpp +++ b/src/sources/acpithermalsrc.cpp @@ -62,4 +62,4 @@ TQString ACPIThermalSrc::fetchValue() { } return s; } - +#include "acpithermalsrc.moc" diff --git a/src/sources/batterysrc.cpp b/src/sources/batterysrc.cpp index f4d4bd5..7b9c763 100644 --- a/src/sources/batterysrc.cpp +++ b/src/sources/batterysrc.cpp @@ -70,3 +70,4 @@ TQString BatterySrc::fetchValue() { } return s; } +#include "batterysrc.moc" diff --git a/src/sources/cpuinfofreqsrc.cpp b/src/sources/cpuinfofreqsrc.cpp index d10f360..a437c44 100644 --- a/src/sources/cpuinfofreqsrc.cpp +++ b/src/sources/cpuinfofreqsrc.cpp @@ -55,3 +55,4 @@ TQString CpuinfoFreqSrc::fetchValue(){ } return s; } +#include "cpuinfofreqsrc.moc" diff --git a/src/sources/hddtempsrc.cpp b/src/sources/hddtempsrc.cpp index 31fee40..65a5898 100644 --- a/src/sources/hddtempsrc.cpp +++ b/src/sources/hddtempsrc.cpp @@ -97,4 +97,4 @@ TQString HDDTempSrc::fetchValue(){ } return s; } - +#include "hddtempsrc.moc" diff --git a/src/sources/hwmonfansrc.cpp b/src/sources/hwmonfansrc.cpp index cc05f93..647dc2d 100644 --- a/src/sources/hwmonfansrc.cpp +++ b/src/sources/hwmonfansrc.cpp @@ -88,4 +88,4 @@ TQString HwMonFanSrc::fetchValue(){ } return s; } - +#include "hwmonfansrc.moc" diff --git a/src/sources/hwmonthermalsrc.cpp b/src/sources/hwmonthermalsrc.cpp index c9b56e4..8e73610 100644 --- a/src/sources/hwmonthermalsrc.cpp +++ b/src/sources/hwmonthermalsrc.cpp @@ -91,4 +91,4 @@ TQString HwMonThermalSrc::fetchValue(){ } return s; } - +#include "hwmonthermalsrc.moc" diff --git a/src/sources/i8ksrc.cpp b/src/sources/i8ksrc.cpp index d2dfc10..bdabc39 100644 --- a/src/sources/i8ksrc.cpp +++ b/src/sources/i8ksrc.cpp @@ -108,4 +108,4 @@ TQString I8kSrc::index2Name(unsigned int inIndex){ return "unknown" + TQString().setNum(inIndex); } } - +#include "i8ksrc.moc" diff --git a/src/sources/ibmacpifansrc.cpp b/src/sources/ibmacpifansrc.cpp index 2fcfb1d..a14e197 100644 --- a/src/sources/ibmacpifansrc.cpp +++ b/src/sources/ibmacpifansrc.cpp @@ -54,4 +54,4 @@ TQString IBMACPIFanSrc::fetchValue(){ } return s; } - +#include "ibmacpifansrc.moc" diff --git a/src/sources/ibmacpithermalsrc.cpp b/src/sources/ibmacpithermalsrc.cpp index 8ff2c1b..db56fa0 100644 --- a/src/sources/ibmacpithermalsrc.cpp +++ b/src/sources/ibmacpithermalsrc.cpp @@ -84,3 +84,4 @@ TQString IBMACPIThermalSrc::index2Name(unsigned int inIndex){ return "ibmacpi" + TQString().setNum(inIndex); } } +#include "ibmacpithermalsrc.moc" diff --git a/src/sources/ibmhdaps.cpp b/src/sources/ibmhdaps.cpp index 23f758f..ede4a2f 100644 --- a/src/sources/ibmhdaps.cpp +++ b/src/sources/ibmhdaps.cpp @@ -61,3 +61,4 @@ TQString IBMHDAPSSrc::fetchValue(){ } return s; } +#include "ibmhdaps.moc" diff --git a/src/sources/ibookg4thermalsrc.cpp b/src/sources/ibookg4thermalsrc.cpp index 4d137ae..8f1f696 100644 --- a/src/sources/ibookg4thermalsrc.cpp +++ b/src/sources/ibookg4thermalsrc.cpp @@ -60,4 +60,4 @@ TQString IbookG4ThermalSrc::fetchValue(){ } return s; } - +#include "ibookg4thermalsrc.moc" diff --git a/src/sources/labelsource.cpp b/src/sources/labelsource.cpp index ba4f8fc..6c6892d 100644 --- a/src/sources/labelsource.cpp +++ b/src/sources/labelsource.cpp @@ -131,3 +131,4 @@ void LabelSource::realizeWidget(){ mLabel->setTextFormat(TQt::PlainText); connect(this, TQT_SIGNAL(valueUpdated(const TQString&)), this, TQT_SLOT(updateLabel(const TQString&))); } +#include "labelsource.moc" diff --git a/src/sources/labelsourcePrefs.cpp b/src/sources/labelsourcePrefs.cpp deleted file mode 100644 index 8104c87..0000000 --- a/src/sources/labelsourcePrefs.cpp +++ /dev/null @@ -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" diff --git a/src/sources/nvidiathermalsrc.cpp b/src/sources/nvidiathermalsrc.cpp index 7fff602..ce97a61 100644 --- a/src/sources/nvidiathermalsrc.cpp +++ b/src/sources/nvidiathermalsrc.cpp @@ -172,4 +172,4 @@ TQString NVidiaThermalSrc::fetchValue(){ return mValue; #endif } - +#include "nvidiathermalsrc.moc" diff --git a/src/sources/omnibookthermalsrc.cpp b/src/sources/omnibookthermalsrc.cpp index 2a347b2..2fde287 100644 --- a/src/sources/omnibookthermalsrc.cpp +++ b/src/sources/omnibookthermalsrc.cpp @@ -55,4 +55,4 @@ TQString OmnibookThermalSrc::fetchValue(){ } return s; } - +#include "omnibookthermalsrc.moc" diff --git a/src/sources/source.cpp b/src/sources/source.cpp index 6ebe6b4..5c4e52a 100644 --- a/src/sources/source.cpp +++ b/src/sources/source.cpp @@ -220,3 +220,4 @@ int Source::celsiusToFahrenheit(int inCelsius) const{ void Source::realizeWidget(){ mIsMetric = TDEGlobal::locale()->measureSystem() == TDELocale::Metric; } +#include "source.moc" diff --git a/src/sources/sourceprefs.cpp b/src/sources/sourceprefs.cpp deleted file mode 100644 index 4db4da0..0000000 --- a/src/sources/sourceprefs.cpp +++ /dev/null @@ -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" diff --git a/src/sources/sysfreqsrc.cpp b/src/sources/sysfreqsrc.cpp index 22242f8..c2e982c 100644 --- a/src/sources/sysfreqsrc.cpp +++ b/src/sources/sysfreqsrc.cpp @@ -63,4 +63,4 @@ TQString SysFreqSrc::fetchValue(){ } return s; } - +#include "sysfreqsrc.moc" diff --git a/src/sources/threadedtrigger.cpp b/src/sources/threadedtrigger.cpp index 5ea2998..8c667e0 100644 --- a/src/sources/threadedtrigger.cpp +++ b/src/sources/threadedtrigger.cpp @@ -65,3 +65,4 @@ void ThreadedTrigger::run(){ // 2. mWaitMutex is locked when we enter the loop mWaitMutex.unlock(); // unlock it again } +#include "threadedtrigger.moc" diff --git a/src/sources/triggeredsource.cpp b/src/sources/triggeredsource.cpp index c83b417..5f79714 100644 --- a/src/sources/triggeredsource.cpp +++ b/src/sources/triggeredsource.cpp @@ -46,3 +46,4 @@ void TriggeredSource::customEvent(TQCustomEvent* event){ TQString TriggeredSource::getValue() const{ return mValue; } +#include "triggeredsource.moc" diff --git a/src/sources/uptimesrc.cpp b/src/sources/uptimesrc.cpp index 8ec0db5..c55f21e 100644 --- a/src/sources/uptimesrc.cpp +++ b/src/sources/uptimesrc.cpp @@ -68,3 +68,4 @@ void UptimeSrc::realizeWidget() { mTimeFormatLong = i18n("%1d %2:%3"); mTimeFormatShort = i18n("%1:%2"); } +#include "uptimesrc.moc" |