diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.cc | 75 | ||||
-rw-r--r-- | src/mainwindow.h | 10 |
2 files changed, 1 insertions, 84 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 4b49325..d58ae2b 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -53,8 +53,6 @@ #include "settings.h" #define MAXVAL 10000000L -//#define SINGLESTEP MAXVAL/100000 -//#define PAGESTEP MAXVAL/10000 static void addTool(QToolBar* toolbar, Canvas* canvas, CanvasTool* tool) { @@ -82,14 +80,13 @@ MainWindow::MainWindow(Settings& settings) setCentralWidget(central); extractor = new AudioExtractor(selections, this); - //canvas = new Canvas(this); canvaswidget = new CanvasWidget(this); QToolBar* toolbar = addToolBar(tr("Tools")); listen = new CanvasToolListen(canvaswidget->canvas, player); addTool(toolbar, canvaswidget->canvas, listen); threshold = new CanvasToolThreshold(canvaswidget->canvas); - canvaswidget->canvas->tools.push_back(threshold);//addTool(toolbar, canvaswidget->canvas, threshold); + canvaswidget->canvas->tools.push_back(threshold); tool_selections = new CanvasToolSelections(canvaswidget->canvas, selections, selections_preview); connect(threshold, SIGNAL(thresholdChanged(double)), @@ -107,30 +104,6 @@ MainWindow::MainWindow(Settings& settings) fileMenu->addAction(act_quit); connect(act_quit, SIGNAL(triggered()), this, SLOT(close())); - // QWidget* dock = new QWidget(); - - //yoffset = new QScrollBar(Qt::Vertical); - //yoffset->setRange(0, MAXVAL); - //yoffset->setPageStep(PAGESTEP); - //yoffset->setSingleStep(SINGLESTEP); - //connect(yoffset, SIGNAL(valueChanged(int)), this, SLOT(setYOffset(int))); - // - //yscale = new ZoomSlider(Qt::Vertical); - //yscale->setRange(0.9, 30); - //yscale->setTickWidth(0.1); - //connect(yscale, SIGNAL(valueChanged(float)), this, SLOT(setYScale(float))); - // - //xscale = new ZoomSlider(Qt::Horizontal); - //xscale->setRange(1, 0.0001); - //xscale->setTickWidth(0.0001); - //connect(xscale, SIGNAL(valueChanged(float)), this, SLOT(setXScale(float))); - // - //xoffset = new QScrollBar(Qt::Horizontal); - //xoffset->setRange(0, MAXVAL); - //xoffset->setPageStep(PAGESTEP); - //xoffset->setSingleStep(SINGLESTEP); - //connect(xoffset, SIGNAL(valueChanged(int)), this, SLOT(setXOffset(int))); - sorter = new SampleSorter(selections, selections_preview); connect(&selections, SIGNAL(added(sel_id_t)), sorter, SLOT(addSelection(sel_id_t))); @@ -153,11 +126,7 @@ MainWindow::MainWindow(Settings& settings) lh->addWidget(canvaswidget); - //lh->addWidget(yscale); - //lh->addWidget(yoffset); lv->addLayout(lh, 100); - //lv->addWidget(xscale, 100); - //lv->addWidget(xoffset, 100); lv->addWidget(sorter, 15); lv->addWidget(btn_playsamples); lv->addWidget(sb_playsamples); @@ -169,12 +138,6 @@ MainWindow::MainWindow(Settings& settings) dockWidget->setWidget(new QWidget()); dockWidget->widget()->setLayout(new QVBoxLayout()); - //dockWidget->widget()->layout()->addWidget(new QLabel("Presets:")); - //presets = new QComboBox(); - //connect(presets, SIGNAL(currentIndexChanged(int)), - // this, SLOT(setPreset(int))); - //dockWidget->widget()->layout()->addWidget(presets); - tabs = new QTabWidget(this); tabs->addTab(createFilesTab(), tr("Files")); generateTabId = tabs->addTab(createGenerateTab(), tr("Generate")); @@ -190,8 +153,6 @@ MainWindow::MainWindow(Settings& settings) &player, SLOT(setGainDB(double))); connect(&player, SIGNAL(peakUpdate(double)), vol, SLOT(updatePeakPower(double))); - //connect(&player, SIGNAL(peakUpdateDB(double)), - // vol, SLOT(updatePeakDb(double))); vol->setVolumeDb(0); dockWidget->widget()->layout()->addWidget(vol); @@ -480,30 +441,6 @@ void MainWindow::saveSettings() settings.saveExportPath(lineed_exportp->text()); } -//void MainWindow::setXScale(float val) -//{ -// canvaswidget->canvas->setXScale(val); -//} -// -//void MainWindow::setYScale(float val) -//{ -// canvaswidget->canvas->setYScale(val); -//} -// -//void MainWindow::setXOffset(int of) -//{ -// // range 0.0 - 1.0 -// float val = (float)of/(float)MAXVAL; -// canvaswidget->canvas->setXOffset(val); -//} -// -//void MainWindow::setYOffset(int of) -//{ -// // range 0.0 - 1.0 -// float val = (float)(of * -1 + MAXVAL)/(float)MAXVAL; -// canvaswidget->canvas->setYOffset(val); -//} - void MainWindow::doExport() { extractor->exportSelections(); @@ -527,16 +464,6 @@ void MainWindow::loadFile(QString filename) setCursor(Qt::ArrowCursor); } -void MainWindow::setPreset(int index) -{ - //QVariant v = presets->itemData(index); - //Preset p = v.value<Preset>(); - //slider_attacklength->setValue(p.attacklength); - //slider_falloff->setValue(p.falloff); - //slider_fadelength->setValue(p.fadelength); - //prefix->setText(p.prefix); -} - void MainWindow::browse() { QString path = diff --git a/src/mainwindow.h b/src/mainwindow.h index d1794b6..b580101 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -67,14 +67,9 @@ public: ~MainWindow(); public slots: - //void setXScale(float); - //void setYScale(float); - //void setXOffset(int); - //void setYOffset(int); void doExport(); void loadFile(QString filename); void playSamples(); - void setPreset(int); void browse(); void tabChanged(int tabid); @@ -99,11 +94,6 @@ private: AudioExtractor* extractor; FileList* filelist; - //Canvas* canvas; - //QScrollBar* yoffset; - //ZoomSlider* yscale; - //ZoomSlider* xscale; - //QScrollBar* xoffset; CanvasWidget* canvaswidget; QScrollBar* sb_playsamples; |