71 |
// Create a new one... |
// Create a new one... |
72 |
m_pChannel = new qsamplerChannel(pMainForm); |
m_pChannel = new qsamplerChannel(pMainForm); |
73 |
// And set appropriate settings. |
// And set appropriate settings. |
74 |
if (m_pChannel) { |
if (m_pChannel && iChannelID >= 0) { |
75 |
m_pChannel->setChannelID(iChannelID); |
m_pChannel->setChannelID(iChannelID); |
76 |
m_iDirtyChange = 0; |
m_iDirtyChange = 0; |
77 |
} |
} |
132 |
|
|
133 |
|
|
134 |
// Channel setup dialog slot. |
// Channel setup dialog slot. |
135 |
void qsamplerChannelStrip::channelSetup (void) |
bool qsamplerChannelStrip::channelSetup (void) |
136 |
{ |
{ |
137 |
showChannelSetup(false); |
bool bResult = false; |
|
} |
|
|
|
|
138 |
|
|
|
// Channel setup dialog. |
|
|
void qsamplerChannelStrip::showChannelSetup ( bool bNew ) |
|
|
{ |
|
139 |
qsamplerChannelForm *pChannelForm = new qsamplerChannelForm(this); |
qsamplerChannelForm *pChannelForm = new qsamplerChannelForm(this); |
140 |
if (pChannelForm) { |
if (pChannelForm) { |
141 |
pChannelForm->setup(m_pChannel, bNew); |
pChannelForm->setup(m_pChannel); |
142 |
if (pChannelForm->exec()) { |
bResult = pChannelForm->exec(); |
|
updateChannelInfo(); |
|
|
emit channelChanged(this); |
|
|
} |
|
143 |
delete pChannelForm; |
delete pChannelForm; |
144 |
} |
} |
145 |
|
|
146 |
|
if (bResult) { |
147 |
|
updateChannelInfo(); |
148 |
|
emit channelChanged(this); |
149 |
|
} |
150 |
|
|
151 |
|
return bResult; |
152 |
} |
} |
153 |
|
|
154 |
|
|
159 |
return; |
return; |
160 |
|
|
161 |
// Update strip caption. |
// Update strip caption. |
162 |
QString sText = tr("Channel %1").arg(m_pChannel->channelID()); |
QString sText = m_pChannel->channelName(); |
163 |
setCaption(sText); |
setCaption(sText); |
164 |
ChannelSetupPushButton->setText(sText); |
ChannelSetupPushButton->setText(sText); |
165 |
|
|