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 |
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); |
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. |
3006 |
} |
} |
3007 |
|
|
3008 |
|
|
3009 |
|
// Channel toolbar orientation change. |
3010 |
|
void MainForm::channelsToolbarOrientation ( Qt::Orientation orientation ) |
3011 |
|
{ |
3012 |
|
#ifdef CONFIG_VOLUME |
3013 |
|
m_pVolumeSlider->setOrientation(orientation); |
3014 |
|
if (orientation == Qt::Horizontal) { |
3015 |
|
m_pVolumeSlider->setMinimumHeight(24); |
3016 |
|
m_pVolumeSlider->setMaximumHeight(32); |
3017 |
|
m_pVolumeSlider->setMinimumWidth(120); |
3018 |
|
m_pVolumeSlider->setMaximumWidth(640); |
3019 |
|
m_pVolumeSpinBox->setMaximumWidth(64); |
3020 |
|
m_pVolumeSpinBox->setButtonSymbols(QSpinBox::UpDownArrows); |
3021 |
|
} else { |
3022 |
|
m_pVolumeSlider->setMinimumHeight(120); |
3023 |
|
m_pVolumeSlider->setMaximumHeight(480); |
3024 |
|
m_pVolumeSlider->setMinimumWidth(24); |
3025 |
|
m_pVolumeSlider->setMaximumWidth(32); |
3026 |
|
m_pVolumeSpinBox->setMaximumWidth(32); |
3027 |
|
m_pVolumeSpinBox->setButtonSymbols(QSpinBox::NoButtons); |
3028 |
|
} |
3029 |
|
#endif |
3030 |
|
} |
3031 |
|
|
3032 |
|
|
3033 |
} // namespace QSampler |
} // namespace QSampler |
3034 |
|
|
3035 |
|
|