channel.h

来自「This a framework to test new ideas in tr」· C头文件 代码 · 共 88 行

H
88
字号
/***************************************************************************                     channel.h  -  Shows one channel                            -------------------    begin                :  2003    authors              :  Linus Gasser    emails               :  linus.gasser@epfl.ch ***************************************************************************//***************************************************************************                                 Changes                                 ------- date - name - description 03/01/20 - ineiti - begin **************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/#ifndef CHANNEL_H__#define CHANNEL_H__#include <stdlib.h>#include <qwidget.h>#include <qlayout.h>#include <qptrlist.h>#include <qspinbox.h>#include <qwt_plot.h>#include "serverplug.h"class TapSpinBox : public QSpinBox{  Q_OBJECTpublic:  TapSpinBox ( QWidget * parent = 0, const char * name = 0 ):     QSpinBox( parent, name ){}  TapSpinBox ( int minValue, int maxValue, int step = 1, 	     QWidget * parent = 0, const char * name = 0 ):    QSpinBox( minValue, maxValue, step, parent, name ){}  ~TapSpinBox (){};    QString mapValueToText( int value ){    return QString( "%1%2.%3" ) // -1.0 to 1.0      .arg( value > 0 ? " " : "-" ).arg( abs( value ) / 10 ).      arg( abs( value ) % 10 );  }    int mapTextToValue( bool *ok ){    *ok = true;    return (int) ( 10 * text().toFloat() ); // -1.0 to 1.0  }};class Channel : public QWidget {  Q_OBJECT        public:  Channel( QWidget *baseW, ServerPlug *s, int c );  ~Channel();    public slots:    void valueChange( int i ); signals:  void somethingChanged( int channel, QValueList<double> *values ); protected:  ServerPlug *server;  int channel;  QPtrList<TapSpinBox> taps;  QwtPlot *plot;  long channel_sig;  int filterLen;};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?