#include <MUtils/OSSupport.h>
#include <MUtils/GUI.h>
#include <MUtils/Exception.h>
+#include <MUtils/Sound.h>
#include <MUtils/Version.h>
//Qt includes
{ \
if(BANNER_VISIBLE || m_delayedFileTimer->isActive() || (QApplication::activeModalWidget() != NULL)) \
{ \
- lamexp_beep(lamexp_beep_warning); \
+ MUtils::Sound::beep(MUtils::Sound::BEEP_WRN); \
return; \
} \
} \
#define PLAY_SOUND_OPTIONAL(NAME, ASYNC) do \
{ \
- if(m_settings->soundsEnabled()) lamexp_play_sound((NAME), (ASYNC)); \
+ if(m_settings->soundsEnabled()) MUtils::Sound::play_sound((NAME), (ASYNC)); \
} \
while(0)
{
if(lamexp_check_escape_state())
{
- lamexp_beep(lamexp_beep_error);
+ MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
qWarning("Operation cancelled by user!");
fileList.clear();
break;
{
if(BANNER_VISIBLE || m_delayedFileTimer->isActive())
{
- lamexp_beep(lamexp_beep_warning);
+ MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
event->ignore();
}
if(e->modifiers().testFlag(Qt::ControlModifier) && (e->key() == Qt::Key_F5))
{
initializeTranslation();
- lamexp_beep(lamexp_beep_info);
+ MUtils::Sound::beep(MUtils::Sound::BEEP_NFO);
return;
}
m_settings->licenseAccepted(++iAccepted);
m_settings->syncNow();
QApplication::processEvents();
- lamexp_play_sound("whammy", false);
+ MUtils::Sound::play_sound("whammy", false);
QMessageBox::critical(this, tr("License Declined"), tr("You have declined the license. Consequently the application will exit now!"), tr("Goodbye!"));
QFileInfo uninstallerInfo = QFileInfo(QString("%1/Uninstall.exe").arg(QApplication::applicationDirPath()));
if(uninstallerInfo.exists())
return;
}
- lamexp_play_sound("woohoo", false);
+ MUtils::Sound::play_sound("woohoo", false);
m_settings->licenseAccepted(1);
m_settings->syncNow();
if(lamexp_version_demo()) showAnnounceBox();
if(MUtils::OS::current_date() >= lamexp_version_expires())
{
qWarning("Binary has expired !!!");
- lamexp_play_sound("whammy", false);
+ MUtils::Sound::play_sound("whammy", false);
if(QMessageBox::warning(this, tr("LameXP - Expired"), QString("%1<br>%2").arg(NOBR(tr("This demo (pre-release) version of LameXP has expired at %1.").arg(lamexp_version_expires().toString(Qt::ISODate))), NOBR(tr("LameXP is free software and release versions won't expire."))), tr("Check for Updates"), tr("Exit Program")) == 0)
{
checkForUpdates();
return;
default:
QEventLoop loop; QTimer::singleShot(7000, &loop, SLOT(quit()));
- lamexp_play_sound("waiting", true);
+ MUtils::Sound::play_sound("waiting", true);
SHOW_BANNER_ARG(tr("Skipping update check this time, please be patient..."), &loop);
break;
}
}
else
{
- lamexp_beep(lamexp_beep_error);
+ MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
m_outputFolderFavoritesMenu->removeAction(item);
item->deleteLater();
}
}
}
- suggestedName = lamexp_clean_filename(suggestedName);
+ suggestedName = MUtils::clean_file_name(suggestedName);
while(true)
{
if(bApplied)
{
- folderName = lamexp_clean_filepath(folderName.simplified());
+ folderName = MUtils::clean_file_path(folderName.simplified());
if(folderName.isEmpty())
{
- lamexp_beep(lamexp_beep_error);
+ MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
continue;
}
}
else
{
- lamexp_beep(lamexp_beep_warning);
+ MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
}
CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
}
}
else
{
- lamexp_beep(lamexp_beep_warning);
+ MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
}
m_settings->favoriteOutputFolders(favorites.join("|"));
ui->outputFolderLabel->setVisible(true);
ui->outputFolderView->setEnabled(true);
- if(!ok) lamexp_beep(lamexp_beep_error);
+ if(!ok) MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
}
pattern.replace("<Year>", "2001", Qt::CaseInsensitive);
pattern.replace("<Comment>", "Encoded by LameXP", Qt::CaseInsensitive);
- const QString patternClean = lamexp_clean_filename(pattern);
+ const QString patternClean = MUtils::clean_file_name(pattern);
if(pattern.compare(patternClean))
{
if(ui->lineEditRenamePattern->palette().color(QPalette::Text) != Qt::red)
{
- if(!silent) lamexp_beep(lamexp_beep_error);
+ if(!silent) MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
SET_TEXT_COLOR(ui->lineEditRenamePattern, Qt::red);
}
}
{
if(ui->lineEditRenamePattern->palette() != QPalette())
{
- if(!silent) lamexp_beep(lamexp_beep_info);
+ if(!silent) MUtils::Sound::beep(MUtils::Sound::BEEP_NFO);
ui->lineEditRenamePattern->setPalette(QPalette());
}
}
case SettingsModel::AAC_ENCODER_QAAC: showCustomParamsHelpScreen("qaac.exe", "--help"); break;
case SettingsModel::AAC_ENCODER_FHG : showCustomParamsHelpScreen("fhgaacenc.exe", ""); break;
case SettingsModel::AAC_ENCODER_NERO: showCustomParamsHelpScreen("neroAacEnc.exe", "-help"); break;
- default: lamexp_beep(lamexp_beep_error); break;
+ default: MUtils::Sound::beep(MUtils::Sound::BEEP_ERR); break;
}
}
else if(obj == ui->helpCustomParamFLAC) showCustomParamsHelpScreen("flac.exe", "--help");
else if(obj == ui->helpCustomParamAften) showCustomParamsHelpScreen("aften.exe", "-h");
else if(obj == ui->helpCustomParamOpus) showCustomParamsHelpScreen("opusenc.exe", "--help");
- else lamexp_beep(lamexp_beep_error);
+ else MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
}
/*
const QString binary = lamexp_lookup_tool(toolName);
if(binary.isEmpty())
{
- lamexp_beep(lamexp_beep_error);
+ MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
qWarning("customParamsHelpRequested: Binary could not be found!");
return;
}
if(output.count() < 1)
{
qWarning("Empty output, cannot show help screen!");
- lamexp_beep(lamexp_beep_error);
+ MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
}
LogViewDialog *dialog = new LogViewDialog(this);