/[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 3784 by capela, Fri Jun 5 09:29:25 2020 UTC revision 3788 by capela, Thu Jun 11 16:59:09 2020 UTC
# Line 752  void MainForm::customEvent ( QEvent* pEv Line 752  void MainForm::customEvent ( QEvent* pEv
752                          default:                          default:
753                                  appendMessagesColor(tr("LSCP Event: %1 data: %2")                                  appendMessagesColor(tr("LSCP Event: %1 data: %2")
754                                          .arg(::lscp_event_to_text(pLscpEvent->event()))                                          .arg(::lscp_event_to_text(pLscpEvent->event()))
755                                          .arg(pLscpEvent->data()), "#996699");                                          .arg(pLscpEvent->data()), Qt::darkMagenta);
756                  }                  }
757          }          }
758  }  }
# Line 1032  bool MainForm::loadSessionFile ( const Q Line 1032  bool MainForm::loadSessionFile ( const Q
1032                                  != LSCP_OK) {                                  != LSCP_OK) {
1033                                  appendMessagesColor(QString("%1(%2): %3")                                  appendMessagesColor(QString("%1(%2): %3")
1034                                          .arg(QFileInfo(sFilename).fileName()).arg(iLine)                                          .arg(QFileInfo(sFilename).fileName()).arg(iLine)
1035                                          .arg(sCommand.simplified()), "#996633");                                          .arg(sCommand.simplified()), Qt::darkYellow);
1036                                  appendMessagesClient("lscp_client_query");                                  appendMessagesClient("lscp_client_query");
1037                                  iErrors++;                                  iErrors++;
1038                          }                          }
# Line 2494  void MainForm::updateMaxVolume (void) Line 2494  void MainForm::updateMaxVolume (void)
2494  // QSampler::MainForm -- Messages window form handlers.  // QSampler::MainForm -- Messages window form handlers.
2495    
2496  // Messages output methods.  // Messages output methods.
2497  void MainForm::appendMessages( const QString& s )  void MainForm::appendMessages ( const QString& s )
2498  {  {
2499          if (m_pMessages)          if (m_pMessages)
2500                  m_pMessages->appendMessages(s);                  m_pMessages->appendMessages(s);
# Line 2502  void MainForm::appendMessages( const QSt Line 2502  void MainForm::appendMessages( const QSt
2502          statusBar()->showMessage(s, 3000);          statusBar()->showMessage(s, 3000);
2503  }  }
2504    
2505  void MainForm::appendMessagesColor( const QString& s, const QString& c )  void MainForm::appendMessagesColor ( const QString& s, const QColor& rgb )
2506  {  {
2507          if (m_pMessages)          if (m_pMessages)
2508                  m_pMessages->appendMessagesColor(s, c);                  m_pMessages->appendMessagesColor(s, rgb);
2509    
2510          statusBar()->showMessage(s, 3000);          statusBar()->showMessage(s, 3000);
2511  }  }
2512    
2513  void MainForm::appendMessagesText( const QString& s )  void MainForm::appendMessagesText ( const QString& s )
2514  {  {
2515          if (m_pMessages)          if (m_pMessages)
2516                  m_pMessages->appendMessagesText(s);                  m_pMessages->appendMessagesText(s);
2517  }  }
2518    
2519  void MainForm::appendMessagesError( const QString& sText )  void MainForm::appendMessagesError ( const QString& s )
2520  {  {
2521          if (m_pMessages)          if (m_pMessages)
2522                  m_pMessages->show();                  m_pMessages->show();
2523    
2524          appendMessagesColor(sText.simplified(), "#ff0000");          appendMessagesColor(s.simplified(), Qt::red);
2525    
2526          // Make it look responsive...:)          // Make it look responsive...:)
2527          QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);          QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
# Line 2534  void MainForm::appendMessagesError( cons Line 2534  void MainForm::appendMessagesError( cons
2534                  QMessageBox mbox(this);                  QMessageBox mbox(this);
2535                  mbox.setIcon(QMessageBox::Critical);                  mbox.setIcon(QMessageBox::Critical);
2536                  mbox.setWindowTitle(sTitle);                  mbox.setWindowTitle(sTitle);
2537                  mbox.setText(sText);                  mbox.setText(s);
2538                  mbox.setStandardButtons(QMessageBox::Cancel);                  mbox.setStandardButtons(QMessageBox::Cancel);
2539                  QCheckBox cbox(tr("Don't show this again"));                  QCheckBox cbox(tr("Don't show this again"));
2540                  cbox.setChecked(false);                  cbox.setChecked(false);
# Line 2555  void MainForm::appendMessagesClient( con Line 2555  void MainForm::appendMessagesClient( con
2555    
2556          appendMessagesColor(s + QString(": %1 (errno=%2)")          appendMessagesColor(s + QString(": %1 (errno=%2)")
2557                  .arg(::lscp_client_get_result(m_pClient))                  .arg(::lscp_client_get_result(m_pClient))
2558                  .arg(::lscp_client_get_errno(m_pClient)), "#996666");                  .arg(::lscp_client_get_errno(m_pClient)), Qt::darkRed);
2559    
2560          // Make it look responsive...:)          // Make it look responsive...:)
2561          QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);          QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
# Line 2907  void MainForm::startServer (void) Line 2907  void MainForm::startServer (void)
2907          args.removeAt(0);          args.removeAt(0);
2908    
2909          appendMessages(tr("Server is starting..."));          appendMessages(tr("Server is starting..."));
2910          appendMessagesColor(m_pOptions->sServerCmdLine, "#990099");          appendMessagesColor(m_pOptions->sServerCmdLine, Qt::darkMagenta);
2911    
2912          // Go linuxsampler, go...          // Go linuxsampler, go...
2913          m_pServer->start(sCommand, args);          m_pServer->start(sCommand, args);

Legend:
Removed from v.3784  
changed lines
  Added in v.3788

  ViewVC Help
Powered by ViewVC