[Kst] branches/work/kst/portto4/kst/src
George Staikos
staikos at kde.org
Thu Feb 22 20:03:20 CET 2007
SVN commit 636295 by staikos:
More porting work
M +1 -14 CMakeLists.txt
D Makefile.am
M +0 -33 datasources/CMakeLists.txt
D datasources/Makefile.am
M +0 -2 datasources/ascii/ascii.cpp
M +1 -7 libkst/CMakeLists.txt
D libkst/Makefile.am
M +2 -3 libkst/kstdatacollection.h
M +1 -1 libkst/kstdatasource.cpp
M +1 -1 libkst/kstdatasource.h
M +2 -2 libkst/kstdebug.cpp
M +4 -4 libkst/kstobject.h
M +4 -4 libkst/kstvector.h
D libkst/kstwaitcondition.h
D libkst/kstwaitcondition_unix.cpp
M +2 -3 libkst/rwlock.h
D libkstmath/Makefile.am
M +2 -2 libkstmath/dialoglauncher.h
M +2 -2 libkstmath/enodes.cpp
M +2 -2 libkstmath/enodes.h
M +4 -4 libkstmath/kstcplugin.cpp
M +2 -2 libkstmath/kstcplugin.h
M +1 -1 libkstmath/kstimage.cpp
M +1 -1 libkstmath/kstsettings.cpp
M +1 -1 libkstmath/plugin.cpp
M +1 -1 libkstmath/plugin.h
M +4 -4 libkstmath/pluginxmlparser.cpp
--- branches/work/kst/portto4/kst/src/CMakeLists.txt #636294:636295
@@ -2,7 +2,7 @@
#add_subdirectory( extdate )
add_subdirectory( libkst )
add_subdirectory( libkstmath )
-#add_subdirectory( datasources )
+add_subdirectory( datasources )
#add_subdirectory( widgets )
#add_subdirectory( libkstapp )
#add_subdirectory( kst )
@@ -14,16 +14,3 @@
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(KMDI_SUBDIR)")
include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
-
-########### install files ###############
-
-
-
-
-#original Makefile.am contents follow:
-
-#if include_libkstkmdi
-#KMDI_SUBDIR=libkstkmdi
-#endif
-#SUBDIRS = extdate $(KMDI_SUBDIR) libkst libkstmath datasources widgets libkstapp kst d2asc d2d plugins extensions
-#
--- branches/work/kst/portto4/kst/src/datasources/CMakeLists.txt #636294:636295
@@ -17,36 +17,3 @@
include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
-########### install files ###############
-
-
-
-
-#original Makefile.am contents follow:
-
-#if include_piolib
-#PIOLIB_SUBDIR=planck
-#endif
-#
-#if include_fitsio_datasource
-#LIBFITSTOOLS_SUBDIR=libfitstools
-#LFIIO_SUBDIR=lfiio
-#WMAP_SUBDIR=wmap
-#FITSIMAGE_SUBDIR=fitsimage
-#HEALPIX_SUBDIR=healpix
-#endif
-#
-#if include_cdf
-#CDF_SUBDIR=cdf
-#endif
-#
-#if include_netcdf
-#NETCDF_SUBDIR=netcdf
-#endif
-#
-#if include_nad
-#NAD_SUBDIR=nad
-#endif
-#
-#SUBDIRS=ascii qimagesource dirfile frame indirect scuba2 $(PIOLIB_SUBDIR) $(CDF_SUBDIR) $(NETCDF_SUBDIR) $(LFIIO_SUBDIR) $(WMAP_SUBDIR) $(FITSIMAGE_SUBDIR) $(HEALPIX_SUBDIR) $(NAD_SUBDIR)
-#
--- branches/work/kst/portto4/kst/src/datasources/ascii/ascii.cpp #636294:636295
@@ -29,10 +29,8 @@
#include <qradiobutton.h>
#include <qregexp.h>
#include <qspinbox.h>
-#include <qstylesheet.h>
#include <kcombobox.h>
-#include <ksdebug.h>
#include <kstmath.h>
#include "ascii.h"
--- branches/work/kst/portto4/kst/src/libkst/CMakeLists.txt #636294:636295
@@ -1,8 +1,3 @@
-find_package(Subversion)
-if(Subversion_FOUND)
- Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} libkst)
-endif(Subversion_FOUND)
-
#FIXME need to run this whenever .svn/entries changes...
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kstrevision.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kstrevision.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ksttimers.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/ksttimers.h)
@@ -37,8 +32,7 @@
kstvectordefaults.cpp
kstmatrixdefaults.cpp
kstprimitive.cpp
- defaultprimitivenames.cpp
- kstwaitcondition_unix.cpp)
+ defaultprimitivenames.cpp)
kde4_automoc(${kst_LIB_SRCS})
--- branches/work/kst/portto4/kst/src/libkst/kstdatacollection.h #636294:636295
@@ -29,7 +29,7 @@
class QFile;
class KstBaseCurve;
-KST_EXPORT class KstData {
+class KstData {
friend class KStaticDeleter<KstData>;
protected:
static KstData *_self;
@@ -69,9 +69,8 @@
virtual QStringList windowList();
/** Returns the name of the current window. */
virtual QString currentWindow();
-};
+} KST_EXPORT;
-
namespace KST {
/** The list of data sources (files) */
KST_EXPORT extern KstDataSourceList dataSourceList;
--- branches/work/kst/portto4/kst/src/libkst/kstdatasource.cpp #636294:636295
@@ -653,7 +653,7 @@
}
-const QString& KstDataSource::metaData(const QString& key) const {
+QString KstDataSource::metaData(const QString& key) const {
if (_metaData[key]) {
return _metaData[key]->value();
} else {
--- branches/work/kst/portto4/kst/src/libkst/kstdatasource.h #636294:636295
@@ -192,7 +192,7 @@
virtual const Q3Dict<KstString>& metaData() const;
- virtual const QString& metaData(const QString& key) const;
+ virtual QString metaData(const QString& key) const;
virtual bool hasMetaData() const;
--- branches/work/kst/portto4/kst/src/libkst/kstdebug.cpp #636294:636295
@@ -137,7 +137,7 @@
QMutexLocker ml(&_lock);
QString body = i18n("Kst version %1\n\n\nKst log:\n").arg(KSTVERSION);
- for (unsigned i = 0; i < _messages.count(); i++ ) {
+ for (int i = 0; i < _messages.count(); i++ ) {
body += i18nc("date leveltext: message", "%1 %2: %3\n").arg(KGlobal::locale()->formatDateTime(_messages[i].date)).arg(label(_messages[i].level)).arg(_messages[i].msg);
}
@@ -172,7 +172,7 @@
KstDebug::LogMessage KstDebug::message(unsigned n) const {
QMutexLocker ml(&_lock);
- if (_messages.size() > n) {
+ if (_messages.size() > int(n)) {
return _messages[n];
}
return KstDebug::LogMessage();
--- branches/work/kst/portto4/kst/src/libkst/kstobject.h #636294:636295
@@ -137,7 +137,7 @@
QStringList displayFullTag() const {
QStringList out_tag = _context + QStringList(_tag);
- unsigned int componentsToDisplay = qMin(qMax(_uniqueDisplayComponents, _minDisplayComponents), components());
+ int componentsToDisplay = qMin(qMax(_uniqueDisplayComponents, _minDisplayComponents), components());
while (out_tag.count() > componentsToDisplay) {
out_tag.pop_front();
}
@@ -184,10 +184,10 @@
QStringList _context;
unsigned int _minDisplayComponents; // minimum number of components to use in display tag
unsigned int _uniqueDisplayComponents; // number of components necessary for unique display tag
-};
+} KST_EXPORT;
-class KST_EXPORT KstObject : public KstShared, public QObject, public KstRWLock {
+class KstObject : public KstShared, public QObject, public KstRWLock {
public:
KstObject();
@@ -232,7 +232,7 @@
KstObjectTag _tag;
bool _dirty;
KstObject::UpdateType _lastUpdate;
-};
+} KST_EXPORT;
typedef KstSharedPtr<KstObject> KstObjectPtr;
--- branches/work/kst/portto4/kst/src/libkst/kstvector.h #636294:636295
@@ -43,13 +43,13 @@
class KstVector;
typedef KstSharedPtr<KstVector> KstVectorPtr;
// KST::interpolate is still too polluting
-extern double kstInterpolate(double *v, int _size, int in_i, int ns_i);
-extern double kstInterpolateNoHoles(double *v, int _size, int in_i, int ns_i);
+extern double kstInterpolate(double *v, int _size, int in_i, int ns_i) KST_EXPORT;
+extern double kstInterpolateNoHoles(double *v, int _size, int in_i, int ns_i) KST_EXPORT;
/**A class for handling data vectors for kst.
*@author cbn
*/
-class KST_EXPORT KstVector : public KstPrimitive {
+class KstVector : public KstPrimitive {
Q_OBJECT
public:
/**
@@ -202,7 +202,7 @@
friend class KstDataObject;
virtual double* realloced(double *memptr, int newSize);
KstObject::UpdateType internalUpdate(KstObject::UpdateType providerRC);
-};
+} KST_EXPORT;
typedef KstObjectList<KstVectorPtr> KstVectorList;
typedef KstObjectMap<KstVectorPtr> KstVectorMap;
--- branches/work/kst/portto4/kst/src/libkst/rwlock.h #636294:636295
@@ -21,9 +21,8 @@
#include <qmutex.h>
#include <qmap.h>
#include <qthread.h>
+#include <qwaitcondition.h>
-#include "kstwaitcondition.h"
-
#include <config.h>
#include "kst_export.h"
@@ -54,7 +53,7 @@
mutable
#endif
QMutex _mutex;
- mutable KstWaitCondition _readerWait, _writerWait;
+ mutable QWaitCondition _readerWait, _writerWait;
mutable int _readCount, _writeCount;
mutable int _waitingReaders, _waitingWriters;
--- branches/work/kst/portto4/kst/src/libkstmath/dialoglauncher.h #636294:636295
@@ -23,7 +23,7 @@
class QWidget;
-KST_EXPORT class KstDialogs {
+class KstDialogs {
friend class KStaticDeleter<KstDialogs>;
protected:
static KstDialogs *_self;
@@ -55,7 +55,7 @@
virtual void newVectorDialog(QWidget *parent, const char *createdSlot = 0L, const char *selectedSlot = 0L, const char *updateSlot = 0L);
virtual void showVectorDialog(const QString& name = QString::null, bool edit = false);
-};
+} KST_EXPORT;
#endif
--- branches/work/kst/portto4/kst/src/libkstmath/enodes.cpp #636294:636295
@@ -424,7 +424,7 @@
const Q3ValueList<Plugin::Data::IOValue>& itable = _plugin->data()._inputs;
const Q3ValueList<Plugin::Data::IOValue>& otable = _plugin->data()._outputs;
Plugin::countScalarsVectorsAndStrings(itable, _inputScalarCnt, _inputVectorCnt, _inputStringCnt, _inPid);
- unsigned ignore;
+ int ignore;
Plugin::countScalarsVectorsAndStrings(otable, _outputScalarCnt, _outputVectorCnt, _outputStringCnt, ignore);
assert(_inputStringCnt == 0 && _outputStringCnt == 0); // FIXME: implement support for strings
_inScalars = new double[_inputScalarCnt];
@@ -468,7 +468,7 @@
delete[] _inScalars;
delete[] _inVectors;
delete[] _outScalars;
- for (uint i = 0; i < _outputVectorCnt; ++i) {
+ for (int i = 0; i < _outputVectorCnt; ++i) {
free(_outVectors[i]);
}
delete[] _outVectors;
--- branches/work/kst/portto4/kst/src/libkstmath/enodes.h #636294:636295
@@ -139,8 +139,8 @@
private:
double evaluatePlugin(Context *ctx);
- unsigned _inputScalarCnt, _inputVectorCnt, _inputStringCnt;
- unsigned _inPid, _outputScalarCnt, _outputVectorCnt, _outputStringCnt;
+ int _inputScalarCnt, _inputVectorCnt, _inputStringCnt;
+ int _inPid, _outputScalarCnt, _outputVectorCnt, _outputStringCnt;
int *_inArrayLens, *_outArrayLens;
double *_inScalars, *_outScalars;
double **_inVectors, **_outVectors;
--- branches/work/kst/portto4/kst/src/libkstmath/kstcplugin.cpp #636294:636295
@@ -229,7 +229,7 @@
delete[] _inScalars;
_inScalars = 0L;
if (_outStrings) {
- for (unsigned i = 0; i < _outStringCnt; ++i) {
+ for (int i = 0; i < _outStringCnt; ++i) {
if (_outStrings[i]) {
free(_outStrings[i]);
_outStrings[i] = 0L;
@@ -239,7 +239,7 @@
delete[] _outStrings;
_outStrings = 0L;
if (_inStrings) {
- for (unsigned i = 0; i < _inStringCnt; ++i) {
+ for (int i = 0; i < _inStringCnt; ++i) {
if (_inStrings[i]) {
free(_inStrings[i]);
_inStrings[i] = 0L;
@@ -266,13 +266,13 @@
}
#define CLEANUP() do {\
- for (unsigned i = 0; i < _outStringCnt; ++i) { \
+ for (int i = 0; i < _outStringCnt; ++i) { \
if (_outStrings[i]) { \
free(_outStrings[i]); \
_outStrings[i] = 0L; \
} \
} \
- for (unsigned i = 0; i < _inStringCnt; ++i) { \
+ for (int i = 0; i < _inStringCnt; ++i) { \
if (_inStrings[i]) { \
free(_inStrings[i]); \
_inStrings[i] = 0L; \
--- branches/work/kst/portto4/kst/src/libkstmath/kstcplugin.h #636294:636295
@@ -65,8 +65,8 @@
virtual void showNewDialog();
virtual void showEditDialog();
KstSharedPtr<Plugin> _plugin;
- unsigned _inScalarCnt, _inArrayCnt, _inStringCnt, _outScalarCnt;
- unsigned _inPid, _outArrayCnt, _outStringCnt;
+ int _inScalarCnt, _inArrayCnt, _inStringCnt, _outScalarCnt;
+ int _inPid, _outArrayCnt, _outStringCnt;
void *_localData;
QString _lastError;
--- branches/work/kst/portto4/kst/src/libkstmath/kstimage.cpp #636294:636295
@@ -677,7 +677,7 @@
QPoint lastPoint; // used to remember the previous point
bool hasPrevBottom = false;
KstMatrixPtr mp = _inputMatrices[THEMATRIX];
- for (uint k = 0; k < lines.count(); ++k) {
+ for (int k = 0; k < lines.count(); ++k) {
double lineK = lines[k];
if (variableWeight) {
// + 1 because 0 and 1 are the same width
--- branches/work/kst/portto4/kst/src/libkstmath/kstsettings.cpp #636294:636295
@@ -156,7 +156,7 @@
void KstSettings::save() {
- KConfig cfg("kstrc", false, false);
+ KConfig cfg(QString("kstrc"));
cfg.setGroup("Kst");
cfg.writeEntry("Plot Update Timer", qlonglong(plotUpdateTimer));
--- branches/work/kst/portto4/kst/src/libkstmath/plugin.cpp #636294:636295
@@ -138,7 +138,7 @@
}
-void Plugin::countScalarsVectorsAndStrings(const Q3ValueList<Plugin::Data::IOValue>& table, unsigned& scalars, unsigned& vectors, unsigned& strings, unsigned& numberOfPids) {
+void Plugin::countScalarsVectorsAndStrings(const Q3ValueList<Plugin::Data::IOValue>& table, int& scalars, int& vectors, int& strings, int& numberOfPids) {
scalars = 0;
vectors = 0;
strings = 0;
--- branches/work/kst/portto4/kst/src/libkstmath/plugin.h #636294:636295
@@ -138,7 +138,7 @@
};
- static void countScalarsVectorsAndStrings(const Q3ValueList<Plugin::Data::IOValue>& table, unsigned& scalars, unsigned& vectors, unsigned& strings, unsigned& numberOfPids);
+ static void countScalarsVectorsAndStrings(const Q3ValueList<Plugin::Data::IOValue>& table, int& scalars, int& vectors, int& strings, int& numberOfPids);
protected:
Plugin();
--- branches/work/kst/portto4/kst/src/libkstmath/pluginxmlparser.cpp #636294:636295
@@ -142,7 +142,7 @@
int num = 0;
int inputIndex = 0;
- for (uint i = 0; i < _pluginData._inputs.size(); i++) {
+ for (int i = 0; i < _pluginData._inputs.size(); i++) {
if (_pluginData._inputs[i]._type == Plugin::Data::IOValue::TableType) {
num++;
inputIndex = i;
@@ -158,7 +158,7 @@
int num = 0;
int inputIndex = 0;
- for (uint i = 0; i < _pluginData._outputs.size(); i++) {
+ for (int i = 0; i < _pluginData._outputs.size(); i++) {
if (_pluginData._outputs[i]._type == Plugin::Data::IOValue::TableType) {
num++;
inputIndex = i;
@@ -170,10 +170,10 @@
}
// check that we have valid vector names for the input and output.
- for (uint i = 0; i < _pluginData._inputs.size(); i++) {
+ for (int i = 0; i < _pluginData._inputs.size(); i++) {
if (_pluginData._inputs[i]._type == Plugin::Data::IOValue::TableType &&
_pluginData._inputs[i]._name == _pluginData._filterInputVector) {
- for (uint j = 0; j < _pluginData._outputs.size(); j++) {
+ for (int j = 0; j < _pluginData._outputs.size(); j++) {
if (_pluginData._outputs[j]._type == Plugin::Data::IOValue::TableType &&
_pluginData._outputs[j]._name == _pluginData._filterOutputVector) {
_pluginData._isFilter = true;
More information about the Kst
mailing list