1
/***************************************************************************
2
* Copyright (C) 2018 by santiago González *
3
* santigoro@gmail.com *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 3 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
18
***************************************************************************/
21
#include "connector.h"
23
#include "itemlibrary.h"
24
#include "oscopechannel.h"
27
static const char* Oscope_properties[] = {
28
QT_TRANSLATE_NOOP("App::Property","Filter")
31
Component* Oscope::construct( QObject* parent, QString type, QString id )
33
return new Oscope( parent, type, id );
36
LibraryItem* Oscope::libraryItem()
38
return new LibraryItem(
46
Oscope::Oscope( QObject* parent, QString type, QString id )
47
: PlotBase( parent, type, id )
49
Q_UNUSED( Oscope_properties );
53
setLabelPos(-80,-80, 0);
61
m_bufferSize = 600000;
63
for(int i=0; i<2; i++ )
65
m_channel[i] = new OscopeChannel( (id+"Chan"+QString::number(i)));
66
m_channel[i]->m_channel = i;
67
m_channel[i]->m_ePin[0] = m_pin[i];
68
m_channel[i]->m_ePin[1] = m_pin[2]; // Ref Pin
71
setAdvanc( false ); // Create Widgets
76
void Oscope::setFilter( double filter )
80
for(int i=0; i<2; i++ ) m_channel[i]->setFilter( filter );
83
#include "moc_oscope.cpp"