[Kst] branches/work/kst/kst1kde4/kst/src/plugins

Andrew Walker arwalker at sumusltd.com
Thu Feb 25 03:02:55 CET 2010


SVN commit 1095796 by arwalker:

first pass of plugins for kstkde4

 M  +1 -1      crosscorrelation_bruteforce/CMakeLists.txt  
 M  +7 -0      crosscorrelation_bruteforce/crosscorrelate.cpp  
 M  +1 -0      crosscorrelation_bruteforce/crosscorrelate.h  
 M  +3 -5      planckUtils/latestDate/CMakeLists.txt  
 M  +7 -2      planckUtils/latestDate/planckLatestDate.cpp  
 M  +1 -0      planckUtils/latestDate/planckLatestDate.h  
 A             spectral_normalization (directory)  
 A             spectral_normalization/CMakeLists.txt  
 A             spectral_normalization/kstobject_spectral_normalization.desktop  
 A             spectral_normalization/spectral_normalization.cpp   [License: GPL (v2+)]
 A             spectral_normalization/spectral_normalization.h   [License: GPL (v2+)]


--- branches/work/kst/kst1kde4/kst/src/plugins/crosscorrelation_bruteforce/CMakeLists.txt #1095795:1095796
@@ -1,4 +1,4 @@
-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/libkst ${CMAKE_SOURCE_DIR}/src/libkstmath ${KDE4_INCLUDE_DIR} ${QT_INCLUDE_DIR})
+include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/libkst ${CMAKE_SOURCE_DIR}/src/libkstmath ${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDE_DIR})
 
 ########### next target ###############
 
--- branches/work/kst/kst1kde4/kst/src/plugins/crosscorrelation_bruteforce/crosscorrelate.cpp #1095795:1095796
@@ -38,6 +38,13 @@
 }
 
 
+CrossCorrelate::CrossCorrelate( QObject */*parent*/, const QStringList &/*args*/ )
+    : KstBasicPlugin() {
+  _inputScalarDefaults.insert(STEP_SIZE, 10.0);
+  _inputScalarDefaults.insert(SKIP_SIZE, 10.0);
+}
+
+
 CrossCorrelate::~CrossCorrelate() {
 }
 
--- branches/work/kst/kst1kde4/kst/src/plugins/crosscorrelation_bruteforce/crosscorrelate.h #1095795:1095796
@@ -23,6 +23,7 @@
   Q_OBJECT
   public:
     CrossCorrelate(QObject *parent, const char *name, const QStringList &args);
+    CrossCorrelate(QObject *parent, const QStringList &args);
     virtual ~CrossCorrelate();
 
     virtual bool algorithm();
--- branches/work/kst/kst1kde4/kst/src/plugins/planckUtils/latestDate/CMakeLists.txt #1095795:1095796
@@ -1,15 +1,13 @@
-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/libkst ${CMAKE_SOURCE_DIR}/src/libkstmath ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR})
+include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/libkst ${CMAKE_SOURCE_DIR}/src/libkstmath ${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES})
 
 ########### next target ###############
 
 set(kstobject_planckLatestDate_PART_SRCS planckLatestDate.cpp)
 
-KDE3_AUTOMOC(${kstobject_planckLatestDate_PART_SRCS})
+kde4_add_plugin(kstobject_planckLatestDate ${kstobject_planckLatestDate_PART_SRCS})
 
-KDE3_ADD_KPART(kstobject_planckLatestDate ${kstobject_planckLatestDate_PART_SRCS})
+target_link_libraries(kstobject_planckLatestDate kstbase kstmath ${KDE4_KPARTS_LIBS})
 
-target_link_libraries(kstobject_planckLatestDate)
-
 install(TARGETS kstobject_planckLatestDate 
 	LIBRARY DESTINATION lib/kde3
  	${INSTALL_TARGETS_DEFAULT_ARGS})
--- branches/work/kst/kst1kde4/kst/src/plugins/planckUtils/latestDate/planckLatestDate.cpp #1095795:1095796
@@ -36,6 +36,11 @@
 }
 
 
+PlanckLatestDate::PlanckLatestDate( QObject */*parent*/, const QStringList &/*args*/ )
+    : KstBasicPlugin() {
+}
+
+
 PlanckLatestDate::~PlanckLatestDate() {
 }
 
@@ -52,7 +57,7 @@
 
   kstrName->setValue(QString());
 
-  iIndex = strTemplate.findRev( QDir::separator() );
+  iIndex = strTemplate.lastIndexOf( QDir::separator() );
   if (iIndex >= 0) {
     strDir = strTemplate.left( iIndex + 1 );
     if (strTemplate.length() > 0) {
@@ -68,7 +73,7 @@
     files = dir.entryList( );
 
     if (!files.empty()) {
-      kstrName->setValue( dir.absFilePath( files.back() ) );
+      kstrName->setValue( dir.absoluteFilePath( files.back() ) );
     }
 
     iRetVal = true;
--- branches/work/kst/kst1kde4/kst/src/plugins/planckUtils/latestDate/planckLatestDate.h #1095795:1095796
@@ -24,6 +24,7 @@
   Q_OBJECT
   public:
     PlanckLatestDate(QObject *parent, const char *name, const QStringList &args);
+    PlanckLatestDate(QObject *parent, const QStringList &args);
     virtual ~PlanckLatestDate();
 
     virtual bool algorithm();


More information about the Kst mailing list