Code Search for Developers
 
 
  

mainwindow.cpp.texinfo from marsyas at Krugle


Show mainwindow.cpp.texinfo syntax highlighted

@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite
@example
@i{/*}
@i{** Copyright (C) 2007 Graham Percival }@t{<gperciva@@uvic.ca>}
@i{**       }
@i{** This program is free software; you can redistribute it and/or modify}
@i{** it under the terms of the GNU General Public License as published by}
@i{** the Free Software Foundation; either version 2 of the License, or}
@i{** (at your option) any later version.}
@i{** }
@i{** This program is distributed in the hope that it will be useful,}
@i{** but WITHOUT ANY WARRANTY; without even the implied warranty of}
@i{** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}
@i{** GNU General Public License for more details.}
@i{** }
@i{** You should have received a copy of the GNU General Public License}
@i{** along with this program; if not, write to the Free Software }
@i{** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.}
@i{*/}

@b{#include} @t{"mainwindow.h"}

MarQTwindow::@b{MarQTwindow}(string fileName)
@{
@i{// typical Qt front-end}
       QPushButton *quit = @b{new} @b{QPushButton}(@b{tr}(@t{"Quit"}));
       @b{connect}(quit, @b{SIGNAL}(@b{clicked}()), qApp, @b{SLOT}(@b{quit}()));

       QPushButton *updatePos = @b{new} @b{QPushButton}(@b{tr}(@t{"Update position"}));

       QSlider *volume = @b{new} @b{QSlider }(Qt::Horizontal);
       volume->@b{setRange}(0,100);
       volume->@b{setValue}(50);

       lcd_ = @b{new} @b{QLCDNumber}();
       lcd_->@b{setNumDigits}(10);

       QVBoxLayout *layout = @b{new} QVBoxLayout;
       layout->@b{addWidget}(volume);
       layout->@b{addWidget}(updatePos);
       layout->@b{addWidget}(lcd_);
       layout->@b{addWidget}(quit);
       @b{setLayout}(layout);

@i{// make the Marsyas backend}
       marBackend_ = @b{new} @b{MarBackend}();
       marBackend_->@b{openBackendSoundfile}(fileName);

@i{// make connections between the Qt front-end and the Marsyas backend:}

@i{//              Qt -> Marsyas}
       @b{connect}(volume, @b{SIGNAL}(@b{valueChanged}(int)),
               marBackend_, @b{SLOT}(@b{setBackendVolume}(int)));

@i{//              Marsyas -> Qt}
       @b{connect}(marBackend_, @b{SIGNAL}(@b{changedBackendPosition}(int)),
               @b{this}, @b{SLOT}(@b{setMainPosition}(int)));

@i{//              Qt -> Marsyas (getBackendPosition) -> Qt (changedBackendPosition)}
       @b{connect}(updatePos, @b{SIGNAL}(@b{clicked}()),
               marBackend_, @b{SLOT}(@b{getBackendPosition}()));
@}

MarQTwindow::~@b{MarQTwindow}()
@{
       @b{delete} marBackend_;
@}

void MarQTwindow::@b{setMainPosition}(int newPos)
@{
       lcd_->@b{display}(newPos);
@}


@end example



See more files for this project here

marsyas

Marsyas (Music Analysis, Retrieval and Synthesis for Audio Signals) is a framework for developing systems for audio processing. It provides an general architecture for connecting audio, soundfiles, signal processing blocks and machine learning.

Project homepage: http://sourceforge.net/projects/marsyas
Programming language(s): C++
License: other

  backend.cpp.html
  backend.cpp.texinfo
  backend.h.html
  backend.h.texinfo
  commandOptions.cpp.html
  commandOptions.cpp.texinfo
  controls.cpp.html
  controls.cpp.texinfo
  dataflow-split.cpp.html
  dataflow-split.cpp.texinfo
  gettingdata.cpp.html
  gettingdata.cpp.texinfo
  helloworld.cpp.html
  helloworld.cpp.texinfo
  main.cpp.html
  main.cpp.texinfo
  mainwindow.cpp.html
  mainwindow.cpp.texinfo
  mainwindow.h.html
  mainwindow.h.texinfo
  tutorial.pro.html
  tutorial.pro.texinfo
  writefile.cpp.html
  writefile.cpp.texinfo