/[svn]/qsampler/trunk/src/qsamplerChannelForm.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerChannelForm.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2107 by capela, Sat Jul 10 09:47:33 2010 UTC revision 2387 by capela, Sat Dec 29 00:21:11 2012 UTC
# Line 1  Line 1 
1  // qsamplerChannelForm.cpp  // qsamplerChannelForm.cpp
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2010, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2012, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, 2008 Christian Schoenebeck     Copyright (C) 2007, 2008 Christian Schoenebeck
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
# Line 64  ChannelForm::ChannelForm ( QWidget* pPar Line 64  ChannelForm::ChannelForm ( QWidget* pPar
64    
65          m_ui.AudioRoutingTable->setModel(&m_routingModel);          m_ui.AudioRoutingTable->setModel(&m_routingModel);
66          m_ui.AudioRoutingTable->setItemDelegate(&m_routingDelegate);          m_ui.AudioRoutingTable->setItemDelegate(&m_routingDelegate);
67    #if QT_VERSION < 0x050000
68          m_ui.AudioRoutingTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);          m_ui.AudioRoutingTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
69    #endif
70  //      m_ui.AudioRoutingTable->verticalHeader()->hide();  //      m_ui.AudioRoutingTable->verticalHeader()->hide();
71    
72          // This goes initially hidden, and will be shown          // This goes initially hidden, and will be shown
# Line 473  void ChannelForm::openInstrumentFile (vo Line 475  void ChannelForm::openInstrumentFile (vo
475    
476          // FIXME: the instrument file filters should be restricted,          // FIXME: the instrument file filters should be restricted,
477          // depending on the current engine.          // depending on the current engine.
478            QStringList filters;
479            const QString& sEngineName = m_ui.EngineNameComboBox->currentText().toUpper();
480            if (sEngineName.contains("GIG"))
481                    filters << tr("GIG Instrument files") + " (*.gig *.dls)";
482            if (sEngineName.contains("SFZ"))
483                    filters << tr("SFZ Instrument files") + " (*.sfz)";
484            if (sEngineName.contains("SF2"))
485                    filters << tr("SF2 Instrument files") + " (*.sf2)";
486            filters << tr("All files") + " (*.*)";
487            const QString& filter = filters.join(";;");
488    
489          QString sInstrumentFile = QFileDialog::getOpenFileName(this,          QString sInstrumentFile = QFileDialog::getOpenFileName(this,
490                  QSAMPLER_TITLE ": " + tr("Instrument files"), // Caption.                  QSAMPLER_TITLE ": " + tr("Instrument files"), // Caption.
491                  pOptions->sInstrumentDir,                 // Start here.                  pOptions->sInstrumentDir, // Start here.
492                  tr("Instrument files") + " (*.gig *.dls)" // Filter (GIG and DLS files)                  filter                    // File filter.
493          );          );
494    
495          if (sInstrumentFile.isEmpty())          if (sInstrumentFile.isEmpty())

Legend:
Removed from v.2107  
changed lines
  Added in v.2387

  ViewVC Help
Powered by ViewVC