diff --git a/koviz/main.cpp b/koviz/main.cpp index b7e43d9..24262dc 100644 --- a/koviz/main.cpp +++ b/koviz/main.cpp @@ -613,6 +613,12 @@ int main(int argc, char *argv[]) if ( fileInfo.fileName().startsWith("MONTE_") ) { isMonte = true; } + } else if ( runPaths.size() == 0 && + opts.trickport > 0 ) { + // Add var server "run path" + QString tvpath = QString("trick://%1:%2"). + arg(opts.trickhost).arg(opts.trickport); + runPaths.append(tvpath); } bool isShowProgress = true; diff --git a/libkoviz/libkoviz.pro b/libkoviz/libkoviz.pro index b642fae..0173c9e 100644 --- a/libkoviz/libkoviz.pro +++ b/libkoviz/libkoviz.pro @@ -52,6 +52,7 @@ SOURCES += bookmodel.cpp \ rundir.cpp \ runfile.cpp \ runswidget.cpp \ + runtv.cpp \ sie_listmodel.cpp \ trickvarsortfilterproxymodel.cpp \ varswidget.cpp \ @@ -137,6 +138,7 @@ HEADERS += bookmodel.h \ rundir.h \ runfile.h \ runswidget.h \ + runtv.h \ sie_listmodel.h \ trickvarsortfilterproxymodel.h \ varswidget.h \ diff --git a/libkoviz/runs.cpp b/libkoviz/runs.cpp index 21c3e27..143062d 100644 --- a/libkoviz/runs.cpp +++ b/libkoviz/runs.cpp @@ -180,6 +180,12 @@ void Runs::_init() _filterPattern,_excludePattern); } else if ( fi.isFile() ) { run = new RunFile(runPath,_timeNames,_varMap); + } else if ( runPath.startsWith("trick://") ) { + run = new RunTV(runPath); + } else { + fprintf(stderr, "koviz [error]: Runs::_init() Bad run path=%s\n", + runPath.toLatin1().constData()); + exit(-1); } _runs.append(run); if ( progress ) { diff --git a/libkoviz/runs.h b/libkoviz/runs.h index 7f9e5f7..e60839a 100644 --- a/libkoviz/runs.h +++ b/libkoviz/runs.h @@ -22,6 +22,7 @@ #include "mapvalue.h" #include "rundir.h" #include "runfile.h" +#include "runtv.h" class Runs : public QObject { diff --git a/libkoviz/runtv.cpp b/libkoviz/runtv.cpp new file mode 100644 index 0000000..e64dcc6 --- /dev/null +++ b/libkoviz/runtv.cpp @@ -0,0 +1,17 @@ +#include "runtv.h" + +RunTV::RunTV(const QString &host_port_path) : + _host_port_path(host_port_path) +{ +} + +QStringList RunTV::params() +{ + return _params; +} + +DataModel *RunTV::dataModel(const QString ¶m) +{ + DataModel* model = 0; + return model; +} diff --git a/libkoviz/runtv.h b/libkoviz/runtv.h new file mode 100644 index 0000000..9d39d80 --- /dev/null +++ b/libkoviz/runtv.h @@ -0,0 +1,22 @@ +#ifndef RUNTV_H +#define RUNTV_H + +#include +#include +#include "run.h" + +// For now, this class is a placeholder that returns empty + +class RunTV : public Run +{ +public: + RunTV(const QString& host_port_path); // e.g. trick://127.0.0.1:4545 + virtual QStringList params(); + virtual DataModel *dataModel(const QString& param); +private: + QString _host_port_path; + DataModel* _model; + QStringList _params; +}; + +#endif // RUNTV_H