[Kst] branches/work/kst/portto4/kst/src/datasources/frame

George Staikos staikos at kde.org
Thu Feb 22 23:50:46 CET 2007


SVN commit 636377 by staikos:

Frame is ported


 M  +2 -18     CMakeLists.txt  
 M  +10 -10    frame.cpp  


--- branches/work/kst/portto4/kst/src/datasources/frame/CMakeLists.txt #636376:636377
@@ -1,5 +1,5 @@
 
-include_directories( ${CMAKE_SOURCE_DIR}/kst/src/libkst ${CMAKE_SOURCE_DIR}/kst/src/extdate ${KDE4_INCLUDE_DIR} ${QT_INCLUDES}  )
+include_directories( ${CMAKE_SOURCE_DIR}/src/libkst ${CMAKE_SOURCE_DIR}/src/extdate ${KDE4_INCLUDE_DIR} ${QT_INCLUDES}  )
 
 
 ########### next target ###############
@@ -10,7 +10,7 @@
 
 kde4_add_plugin(kstdata_frame ${kstdata_frame_PART_SRCS})
 
-target_link_libraries(kstdata_frame  ${KDE4_KDECORE_LIBS} )
+target_link_libraries(kstdata_frame  ${KDE4_KDECORE_LIBS} kst)
 
 install(TARGETS kstdata_frame DESTINATION ${PLUGIN_INSTALL_DIR} )
 
@@ -19,19 +19,3 @@
 
 install( FILES  kstdata_frame.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kst )
 
-
-
-#original Makefile.am contents follow:
-
-#INCLUDES=-I$(top_srcdir)/kst/src/libkst -I$(top_srcdir)/kst/src/extdate $(all_includes)
-#
-#kde_module_LTLIBRARIES=kstdata_frame.la
-#
-#kstdata_frame_la_LDFLAGS=$(all_libraries) -module -avoid-version
-#kstdata_frame_la_SOURCES=frame.cpp readdata.c creaddata.c
-#
-#METASOURCES=AUTO
-#
-#services_DATA=kstdata_frame.desktop
-#servicesdir=$(kde_servicesdir)/kst
-#
--- branches/work/kst/portto4/kst/src/datasources/frame/frame.cpp #636376:636377
@@ -51,7 +51,7 @@
   int buf[4], err = 0;
 
   _fieldList.append("INDEX");
-  ReadData(_filename.latin1(), "FFINFO",
+  ReadData(_filename.toLatin1(), "FFINFO",
            0, 0, /* 1st sframe, 1st samp */
            0, 2, /* num sframes, num samps */
            'i', (void*)buf,
@@ -68,8 +68,8 @@
   /* split out file name and extension */
   int len = _filename.length();
   char ext[3];
-  ext[0] = _filename.latin1()[len - 2];
-  ext[1] = _filename.latin1()[len - 1];
+  ext[0] = _filename.toLatin1()[len - 2];
+  ext[1] = _filename.toLatin1()[len - 1];
   ext[2] = '\0';
 
   _rootFileName = _filename;
@@ -98,14 +98,14 @@
   int newN;
 
   if (_maxExt < 0) { // no hex number extension: only this file
-    if (stat(_filename.latin1(), &stat_buf) != 0) { // file is gone
+    if (stat(_filename.toLatin1(), &stat_buf) != 0) { // file is gone
       newN = 0;
     } else {                               // file exists
       newN = stat_buf.st_size/_bytesPerFrame;
     }
   } else {
     do {
-      tmpfilename.sprintf("%s%2.2x", _rootFileName.latin1(), _maxExt);
+      tmpfilename.sprintf("%s%2.2x", _rootFileName.toLatin1(), _maxExt);
       if (stat(QFile::encodeName(tmpfilename).data(), &stat_buf) != 0) {
           if (_maxExt > _rootExt) {  // deleted (?) check the next one down
             _maxExt--;
@@ -141,13 +141,13 @@
   int err = 0;
 
   if (n < 0) {
-    return CReadData(_filename.latin1(), field.left(8).latin1(),
+    return CReadData(_filename.toLatin1(), field.left(8).toLatin1(),
                      s, 0, /* 1st sframe, 1st samp */
                      0, 1, /* num sframes, num samps */
                      'd', (void*)v,
                      &err);
   } else {
-    return CReadData(_filename.latin1(), field.left(8).latin1(),
+    return CReadData(_filename.toLatin1(), field.left(8).toLatin1(),
                      s, 0, /* 1st sframe, 1st samp */
                      n, 0, /* num sframes, num samps */
                      'd', (void*)v,
@@ -159,7 +159,7 @@
 bool FrameSource::isValidField(const QString& field) const {
   int err = 0;
 
-  CReadData(_filename.latin1(), field.left(8).latin1(),
+  CReadData(_filename.toLatin1(), field.left(8).toLatin1(),
             0, 0, /* 1st sframe, 1st samp */
             1, 0, /* num sframes, num samps */
             'n', (void*)0L,
@@ -172,7 +172,7 @@
 int FrameSource::samplesPerFrame(const QString &field) {
   int err = 0;
 
-  return CReadData(_filename.latin1(), field.left(8).latin1(),
+  return CReadData(_filename.toLatin1(), field.left(8).toLatin1(),
                    0, 0, /* 1st sframe, 1st samp */
                    1, 0, /* num sframes, num samps */
                    'n', (void*)0L,
@@ -219,7 +219,7 @@
 
 int understands_frame(KConfig*, const QString& filename) {
   int err = 0;
-  CReadData(filename.latin1(), "INDEX",
+  CReadData(filename.toLatin1(), "INDEX",
             0, 0, /* 1st sframe, 1st samp */
             1, 0, /* num sframes, num samps */
             'n', (void*)0L,


More information about the Kst mailing list