252 |
} |
} |
253 |
|
|
254 |
|
|
255 |
|
// Window drag-n-drop event handlers. |
256 |
void qsamplerMainForm::dragEnterEvent ( QDragEnterEvent* pDragEnterEvent ) |
void qsamplerMainForm::dragEnterEvent ( QDragEnterEvent* pDragEnterEvent ) |
257 |
{ |
{ |
258 |
bool bAccept = false; |
bool bAccept = false; |
277 |
} |
} |
278 |
|
|
279 |
|
|
280 |
|
// Context menu event handler. |
281 |
|
void qsamplerMainForm::contextMenuEvent( QContextMenuEvent *pEvent ) |
282 |
|
{ |
283 |
|
stabilizeForm(); |
284 |
|
|
285 |
|
editMenu->exec(pEvent->globalPos()); |
286 |
|
} |
287 |
|
|
288 |
|
|
289 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
290 |
// qsamplerMainForm -- Brainless public property accessors. |
// qsamplerMainForm -- Brainless public property accessors. |
291 |
|
|
1472 |
// And try to stop server. |
// And try to stop server. |
1473 |
if (m_pServer) { |
if (m_pServer) { |
1474 |
appendMessages(tr("Server is stopping...")); |
appendMessages(tr("Server is stopping...")); |
1475 |
if (m_pServer->isRunning()) { |
if (m_pServer->isRunning()) |
1476 |
m_pServer->tryTerminate(); |
m_pServer->tryTerminate(); |
|
return; |
|
|
} |
|
1477 |
} |
} |
1478 |
|
|
1479 |
|
// Give it some time to terminate gracefully and stabilize... |
1480 |
|
QTime t; |
1481 |
|
t.start(); |
1482 |
|
while (t.elapsed() < QSAMPLER_TIMER_MSECS) |
1483 |
|
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
1484 |
|
|
1485 |
// Do final processing anyway. |
// Do final processing anyway. |
1486 |
processServerExit(); |
processServerExit(); |
1487 |
} |
} |