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

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

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

revision 2441 by capela, Wed Apr 10 09:11:37 2013 UTC revision 2717 by schoenebeck, Wed Jan 21 13:19:51 2015 UTC
# Line 1  Line 1 
1  // qsamplerMainForm.cpp  // qsamplerMainForm.cpp
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2013, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2014, 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 65  Line 65 
65  #if QT_VERSION < 0x040500  #if QT_VERSION < 0x040500
66  namespace Qt {  namespace Qt {
67  const WindowFlags WindowCloseButtonHint = WindowFlags(0x08000000);  const WindowFlags WindowCloseButtonHint = WindowFlags(0x08000000);
 #if QT_VERSION < 0x040200  
 const WindowFlags CustomizeWindowHint   = WindowFlags(0x02000000);  
 #endif  
68  }  }
69  #endif  #endif
70    
# Line 257  MainForm::MainForm ( QWidget *pParent ) Line 254  MainForm::MainForm ( QWidget *pParent )
254          QObject::connect(m_pVolumeSlider,          QObject::connect(m_pVolumeSlider,
255                  SIGNAL(valueChanged(int)),                  SIGNAL(valueChanged(int)),
256                  SLOT(volumeChanged(int)));                  SLOT(volumeChanged(int)));
         //m_ui.channelsToolbar->setHorizontallyStretchable(true);  
         //m_ui.channelsToolbar->setStretchableWidget(m_pVolumeSlider);  
257          m_ui.channelsToolbar->addWidget(m_pVolumeSlider);          m_ui.channelsToolbar->addWidget(m_pVolumeSlider);
258          // Volume spin-box          // Volume spin-box
259          m_ui.channelsToolbar->addSeparator();          m_ui.channelsToolbar->addSeparator();
260          m_pVolumeSpinBox = new QSpinBox(m_ui.channelsToolbar);          m_pVolumeSpinBox = new QSpinBox(m_ui.channelsToolbar);
         m_pVolumeSpinBox->setMaximumHeight(24);  
261          m_pVolumeSpinBox->setSuffix(" %");          m_pVolumeSpinBox->setSuffix(" %");
262          m_pVolumeSpinBox->setMinimum(0);          m_pVolumeSpinBox->setMinimum(0);
263          m_pVolumeSpinBox->setMaximum(100);          m_pVolumeSpinBox->setMaximum(100);
# Line 398  MainForm::MainForm ( QWidget *pParent ) Line 392  MainForm::MainForm ( QWidget *pParent )
392          QObject::connect(m_ui.channelsMenu,          QObject::connect(m_ui.channelsMenu,
393                  SIGNAL(aboutToShow()),                  SIGNAL(aboutToShow()),
394                  SLOT(channelsMenuAboutToShow()));                  SLOT(channelsMenuAboutToShow()));
395    #ifdef CONFIG_VOLUME
396            QObject::connect(m_ui.channelsToolbar,
397                    SIGNAL(orientationChanged(Qt::Orientation)),
398                    SLOT(channelsToolbarOrientation(Qt::Orientation)));
399    #endif
400  }  }
401    
402  // Destructor.  // Destructor.
# Line 2695  void MainForm::startServer (void) Line 2694  void MainForm::startServer (void)
2694    
2695          // Setup stdout/stderr capture...          // Setup stdout/stderr capture...
2696  //      if (m_pOptions->bStdoutCapture) {  //      if (m_pOptions->bStdoutCapture) {
         #if QT_VERSION >= 0x040200  
2697                  m_pServer->setProcessChannelMode(QProcess::ForwardedChannels);                  m_pServer->setProcessChannelMode(QProcess::ForwardedChannels);
         #endif  
2698                  QObject::connect(m_pServer,                  QObject::connect(m_pServer,
2699                          SIGNAL(readyReadStandardOutput()),                          SIGNAL(readyReadStandardOutput()),
2700                          SLOT(readServerStdout()));                          SLOT(readServerStdout()));
# Line 2752  void MainForm::stopServer (bool bInterac Line 2749  void MainForm::stopServer (bool bInterac
2749                          "according to your current sampler session and you could alter the\n"                          "according to your current sampler session and you could alter the\n"
2750                          "sampler session at any time by relaunching QSampler.\n\n"                          "sampler session at any time by relaunching QSampler.\n\n"
2751                          "Do you want LinuxSampler to stop?"),                          "Do you want LinuxSampler to stop?"),
2752                          QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)                          QMessageBox::Yes | QMessageBox::No,
2753                            QMessageBox::Yes) == QMessageBox::No)
2754                  {                  {
2755                          bForceServerStop = false;                          bForceServerStop = false;
2756                  }                  }
# Line 3009  void MainForm::activateStrip ( QMdiSubWi Line 3007  void MainForm::activateStrip ( QMdiSubWi
3007  }  }
3008    
3009    
3010    // Channel toolbar orientation change.
3011    void MainForm::channelsToolbarOrientation ( Qt::Orientation orientation )
3012    {
3013    #ifdef CONFIG_VOLUME
3014            m_pVolumeSlider->setOrientation(orientation);
3015            if (orientation == Qt::Horizontal) {
3016                    m_pVolumeSlider->setMinimumHeight(24);
3017                    m_pVolumeSlider->setMaximumHeight(32);
3018                    m_pVolumeSlider->setMinimumWidth(120);
3019                    m_pVolumeSlider->setMaximumWidth(640);
3020                    m_pVolumeSpinBox->setMaximumWidth(64);
3021                    m_pVolumeSpinBox->setButtonSymbols(QSpinBox::UpDownArrows);
3022            } else {
3023                    m_pVolumeSlider->setMinimumHeight(120);
3024                    m_pVolumeSlider->setMaximumHeight(480);
3025                    m_pVolumeSlider->setMinimumWidth(24);
3026                    m_pVolumeSlider->setMaximumWidth(32);
3027                    m_pVolumeSpinBox->setMaximumWidth(32);
3028                    m_pVolumeSpinBox->setButtonSymbols(QSpinBox::NoButtons);
3029            }
3030    #endif
3031    }
3032    
3033    
3034  } // namespace QSampler  } // namespace QSampler
3035    
3036    

Legend:
Removed from v.2441  
changed lines
  Added in v.2717

  ViewVC Help
Powered by ViewVC