Commit 6848736b authored by jcaceres's avatar jcaceres
Browse files

qwt dependency removed and working

parent af42cac0
......@@ -12,17 +12,15 @@
#include "ThreadCommEvent.h"
#include <qlabel.h>
#include <qlayout.h>
//#include <qwt_slider.h> //Removed for compatibility with qwt-5 (we are not really using it right now)
//#include <qwt_slider.h>
MainDialog::MainDialog (QWidget * parent, const char *name):
MainWindow (parent, name) // generated by designer
{
// plot = new StripChart (plotFrame);
// plot = new StripChart (plotFrame);
// plot->setAxisScale(0,0.0,0.1);
// plot->setAxisScale(1,0.0,0.1);
// plot->resize (300, 300);
//plot->resize (300, 300);
connect ((QObject *) goButton, SIGNAL (toggled (bool)),
SLOT (goThreads (bool)));
......@@ -30,10 +28,9 @@ connect ((QObject *) goButton, SIGNAL (toggled (bool)),
}
void
MainDialog::init(StreamBD *s){
MainDialog::init(StreamBD *s)
{
QString tmp;
QTextOStream (&tmp) << "sampleRate " << s->args->sampleRate;
sampleRateTextLabel->setText (tmp); tmp = "";
......@@ -128,8 +125,8 @@ MainDialog::customEvent (QCustomEvent * e)
if (e->type () == QEvent::User + 117)
{
ThreadCommEvent *ce = (ThreadCommEvent *) e;
// if (ce->val0 () > 0.0) plot->setV1 (ce->val0 ());
// if (ce->val0 () > 0.0) plot->dpy();
// if (ce->val1 () > 0.0) plot->setV2 (ce->val1 ());
//if (ce->val0 () > 0.0) plot->setV1 (ce->val0 ());
//if (ce->val0 () > 0.0) plot->dpy();
//if (ce->val1 () > 0.0) plot->setV2 (ce->val1 ());
}
}
......@@ -6,21 +6,21 @@
#ifndef _MAINDIALOG_H_
#define _MAINDIALOG_H_
//#include "../src/ui/MainWindow.h" //Removed for compatibility with qwt-5 (we are not really using it right now)
#include "../src/ui/MainWindow.h"
#include "qptrlist.h"
#include "qthread.h"
#include "qstring.h"
#include "qtimer.h"
#include "StreamBD.h"
//#include "StripChart.h" //Removed for compatibility with qwt-5 (we are not really using it right now)
//#include "StripChart.h"
class MainDialog//:public MainWindow //Removed for compatibility with qwt-5 (we are not really using it right now)
class MainDialog:public MainWindow
{
Q_OBJECT public:
MainDialog (QWidget * parent = 0, const char *name = 0);
virtual ~ MainDialog ();
void init(StreamBD *s);
//StripChart *plot; //Removed for compatibility with qwt-5 (we are not really using it right now)
//StripChart *plot;
virtual void closeEvent (QCloseEvent * e);
void customEvent (QCustomEvent * e);
void addThread (QObject * t);
......
//#include "MainDialog.h"
#include "MainDialog.h"
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "qstring.h"
#include "StreamBD.h"
// dotted integer from hostname
QString *
......@@ -45,18 +44,18 @@ int
main (int argc, char **argv)
{
//create application object
//QApplication a (argc, argv);
//StreamBD s;
QApplication a (argc, argv);
StreamBD s;
// Parse the command line. If the arguments are invalid,
// usage instructions will be printed. Streambd will exit.
//if (s.ParseCommandLine (argc, argv) == 0)
if (s.ParseCommandLine (argc, argv) == 0)
return 0;
//MainDialog m;
//a.setMainWidget (&m);
//if (s.args->gui) m.show ();
//m.init (&s);
//a.processEvents ();
//return a.exec ();
MainDialog m;
a.setMainWidget (&m);
if (s.args->gui) m.show ();
m.init (&s);
a.processEvents ();
return a.exec ();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment