297 changes: 145 additions & 152 deletions pyKst/pykst.py

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions src/libkstapp/scriptserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,14 @@ ScriptServer::ScriptServer(ObjectStore *obj) : _server(new QLocalServer(this)),
}
connect(_server,SIGNAL(newConnection()),this,SLOT(procConnection()));

_fnMap.insert("getVectorList()",&ScriptServer::getVectorList);
_fnMap.insert("newDataVector()",&ScriptServer::newDataVector);
_fnMap.insert("newGeneratedVector()",&ScriptServer::newGeneratedVector);
_fnMap.insert("newEditableVector()",&ScriptServer::newEditableVector);

_fnMap.insert("getVectorList()",&ScriptServer::getVectorList);
_fnMap.insert("getDataVectorList()",&ScriptServer::getDataVectorList);
_fnMap.insert("getGeneratedVectorList()",&ScriptServer::getGeneratedVectorList);
_fnMap.insert("getEditableVectorList()",&ScriptServer::getEditableVectorList);
_fnMap.insert("newEditableVector()",&ScriptServer::newEditableVector);

_fnMap.insert("getMatrixList()",&ScriptServer::getMatrixList);
_fnMap.insert("newDataMatrix()",&ScriptServer::newDataMatrix);
Expand Down Expand Up @@ -379,16 +381,15 @@ QByteArray ScriptServer::getVectorList(QByteArray&, QLocalSocket* s,ObjectStore*
return outputObjectList<Vector>(s,_store);
}

/*
QByteArray ScriptServer::newVector(QByteArray&, QLocalSocket* s,ObjectStore*,const int&ifMode,
QByteArray ScriptServer::getDataVectorList(QByteArray&, QLocalSocket* s,ObjectStore*_store) {

if(_interface) { return handleResponse("To access this function, first call endEdit()",s); }
else {
QByteArray vn; _interface = DialogLauncherSI::self->showVectorDialog(vn);
return handleResponse("Ok",s);
}
return outputObjectList<DataVector>(s,_store);
}

QByteArray ScriptServer::getGeneratedVectorList(QByteArray&, QLocalSocket* s,ObjectStore*_store) {

return outputObjectList<GeneratedVector>(s,_store);
}
*/


QByteArray ScriptServer::getEditableVectorList(QByteArray&, QLocalSocket* s,ObjectStore*_store) {
Expand Down
6 changes: 4 additions & 2 deletions src/libkstapp/scriptserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ public slots:
QByteArray noSuchFn(QByteArray& , QLocalSocket*,ObjectStore*) {return ""; }

// ObjectStore
QByteArray getVectorList(QByteArray& command, QLocalSocket* s,ObjectStore*_store);
QByteArray newDataVector(QByteArray& command, QLocalSocket* s,ObjectStore*_store);
QByteArray newGeneratedVector(QByteArray& command, QLocalSocket* s,ObjectStore*_store);

QByteArray getEditableVectorList(QByteArray& command, QLocalSocket* s,ObjectStore*_store);

QByteArray getVectorList(QByteArray& command, QLocalSocket* s,ObjectStore*_store);
QByteArray getDataVectorList(QByteArray& command, QLocalSocket* s,ObjectStore*_store);
QByteArray getGeneratedVectorList(QByteArray& command, QLocalSocket* s,ObjectStore*_store);
QByteArray newEditableVector(QByteArray& command, QLocalSocket* s,ObjectStore*_store);

QByteArray getMatrixList(QByteArray& command, QLocalSocket* s,ObjectStore*_store);
Expand Down