diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/mixer/basetrackplayer.cpp | 2 | ||||
-rw-r--r-- | src/preferences/dialog/dlgpreferences.cpp | 48 | ||||
-rw-r--r-- | src/preferences/dialog/dlgpreferences.h | 27 | ||||
-rw-r--r-- | src/preferences/dialog/dlgprefnovinyl.cpp | 28 | ||||
-rw-r--r-- | src/preferences/dialog/dlgprefnovinyl.h | 16 | ||||
-rw-r--r-- | src/preferences/dialog/dlgprefnovinyldlg.ui | 35 | ||||
-rw-r--r-- | src/widget/wmainmenubar.cpp | 2 | ||||
-rw-r--r-- | src/widget/wspinny.cpp | 8 |
9 files changed, 47 insertions, 121 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3db19a46fd..365d4687fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -694,8 +694,6 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL src/preferences/dialog/dlgpreflibrary.cpp src/preferences/dialog/dlgpreflibrarydlg.ui src/preferences/dialog/dlgpreflv2dlg.ui - src/preferences/dialog/dlgprefnovinyl.cpp - src/preferences/dialog/dlgprefnovinyldlg.ui src/preferences/dialog/dlgprefrecord.cpp src/preferences/dialog/dlgprefrecorddlg.ui src/preferences/dialog/dlgprefreplaygain.cpp diff --git a/src/mixer/basetrackplayer.cpp b/src/mixer/basetrackplayer.cpp index 8675331957..c0503d8b4c 100644 --- a/src/mixer/basetrackplayer.cpp +++ b/src/mixer/basetrackplayer.cpp @@ -649,6 +649,8 @@ void BaseTrackPlayerImpl::slotVinylControlEnabled(double v) { m_pVinylControlStatus->set(VINYL_STATUS_DISABLED); emit noVinylControlInputConfigured(); } +#else + Q_UNUSED(v); #endif } diff --git a/src/preferences/dialog/dlgpreferences.cpp b/src/preferences/dialog/dlgpreferences.cpp index a8598aec63..5001fdb124 100644 --- a/src/preferences/dialog/dlgpreferences.cpp +++ b/src/preferences/dialog/dlgpreferences.cpp @@ -16,9 +16,7 @@ #ifdef __VINYLCONTROL__ #include "preferences/dialog/dlgprefvinyl.h" -#else /* __VINYLCONTROL__ */ -#include "preferences/dialog/dlgprefnovinyl.h" -#endif +#endif // __VINYLCONTROL__ #include "preferences/dialog/dlgprefcolors.h" #include "preferences/dialog/dlgprefcrossfader.h" @@ -28,13 +26,13 @@ #include "preferences/dialog/dlgprefwaveform.h" #ifdef __LILV__ #include "preferences/dialog/dlgpreflv2.h" -#endif /* __LILV__ */ +#endif // __LILV__ #include "preferences/dialog/dlgprefeffects.h" #include "preferences/dialog/dlgprefautodj.h" #ifdef __BROADCAST__ #include "preferences/dialog/dlgprefbroadcast.h" -#endif /* __BROADCAST__ */ +#endif // __BROADCAST__ #include "preferences/dialog/dlgprefrecord.h" #include "preferences/dialog/dlgprefbeats.h" @@ -43,7 +41,7 @@ #ifdef __MODPLUG__ #include "preferences/dialog/dlgprefmodplug.h" -#endif /* __MODPLUG__ */ +#endif // __MODPLUG__ #include "controllers/controllermanager.h" #include "library/library.h" @@ -65,9 +63,12 @@ DlgPreferences::DlgPreferences( SettingsManager* pSettingsManager, Library* pLibrary) : m_pConfig(pSettingsManager->settings()), m_pageSizeHint(QSize(0, 0)) { +#ifndef __VINYLCONTROL__ + Q_UNUSED(pVCManager); +#endif // __VINYLCONTROL__ #ifndef __LILV__ Q_UNUSED(pLV2Backend); -#endif /* __LILV__ */ +#endif // __LILV__ Q_UNUSED(pPlayerManager); setupUi(this); contentsTreeWidget->setHeaderHidden(true); @@ -126,15 +127,7 @@ DlgPreferences::DlgPreferences( m_pVinylControlButton, tr("Vinyl Control"), "ic_preferences_vinyl.svg"); -#else /* __VINYLCONTROL__ */ - - m_pVinylControlButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_noVinylControlPage = new DlgPrefNoVinyl(this, pSoundManager, m_pConfig); - addPageWidget(m_noVinylControlPage, - m_pVinylControlButton, - tr("Vinyl Control"), - "ic_preferences_vinyl.svg"); -#endif +#endif // __VINYLCONTROL__ m_pInterfaceButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_interfacePage = new DlgPrefInterface(this, pMixxx, pSkinLoader, m_pConfig); @@ -192,7 +185,7 @@ DlgPreferences::DlgPreferences( m_pLV2Button, tr("LV2 Plugins"), "ic_preferences_lv2.svg"); -#endif /* __LILV__ */ +#endif // __LILV__ m_pAutoDJButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_autoDjPage = new DlgPrefAutoDJ(this, m_pConfig); @@ -208,7 +201,7 @@ DlgPreferences::DlgPreferences( m_pBroadcastButton, tr("Live Broadcasting"), "ic_preferences_broadcast.svg"); -#endif /* __BROADCAST__ */ +#endif // __BROADCAST__ m_pRecordingButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_recordingPage = new DlgPrefRecord(this, m_pConfig); @@ -245,7 +238,7 @@ DlgPreferences::DlgPreferences( m_pModplugButton, tr("Modplug Decoder"), "ic_preferences_modplug.svg"); -#endif /* __MODPLUG__ */ +#endif // __MODPLUG__ connect(contentsTreeWidget, &QTreeWidget::currentItemChanged, @@ -288,10 +281,7 @@ void DlgPreferences::changePage(QTreeWidgetItem* pCurrent, QTreeWidgetItem* pPre #ifdef __VINYLCONTROL__ } else if (pCurrent == m_pVinylControlButton) { switchToPage(m_vinylControlPage); -#else /* __VINYLCONTROL__ */ - } else if (pCurrent == m_pVinylControlButton) { - switchToPage(m_noVinylControlPage); -#endif +#endif // __VINYLCONTROL__ } else if (pCurrent == m_pInterfaceButton) { switchToPage(m_interfacePage); } else if (pCurrent == m_pWaveformButton) { @@ -309,13 +299,13 @@ void DlgPreferences::changePage(QTreeWidgetItem* pCurrent, QTreeWidgetItem* pPre #ifdef __LILV__ } else if (pCurrent == m_pLV2Button) { switchToPage(m_lv2Page); -#endif /* __LILV__ */ +#endif // __LILV__ } else if (pCurrent == m_pAutoDJButton) { switchToPage(m_autoDjPage); #ifdef __BROADCAST__ } else if (pCurrent == m_pBroadcastButton) { switchToPage(m_broadcastingPage); -#endif /* __BROADCAST__ */ +#endif // __BROADCAST__ } else if (pCurrent == m_pRecordingButton) { switchToPage(m_recordingPage); } else if (pCurrent == m_pBeatDetectionButton) { @@ -327,7 +317,7 @@ void DlgPreferences::changePage(QTreeWidgetItem* pCurrent, QTreeWidgetItem* pPre #ifdef __MODPLUG__ } else if (pCurrent == m_pModplugButton) { switchToPage(m_modplugPage); -#endif /* __MODPLUG__ */ +#endif // __MODPLUG__ } } @@ -391,7 +381,7 @@ void DlgPreferences::onShow() { // Update geometry with last values #ifdef __WINDOWS__ resize(m_geometry[2].toInt(), m_geometry[3].toInt()); -#else /* __WINDOWS__ */ +#else // __WINDOWS__ // On linux, when the window is opened for the first time by the window manager, // QT does not have information about the frame size so the offset is zero. // As such, the first time it opens the window does not include the offset, @@ -405,7 +395,7 @@ void DlgPreferences::onShow() { newY, // y position m_geometry[2].toInt(), // width m_geometry[3].toInt()); // height -#endif +#endif // __LINUX__ / __MACOS__ // Move is also needed on linux. move(newX, newY); @@ -524,7 +514,7 @@ void DlgPreferences::moveEvent(QMoveEvent* e) { Q_UNUSED(e); m_geometry[0] = QString::number(frameGeometry().left()); m_geometry[1] = QString::number(frameGeometry().top()); -#else /* __WINDOWS__ */ +#else // Warning! geometry does NOT include the frame/title. int offsetX = geometry().left() - frameGeometry().left(); int offsetY = geometry().top() - frameGeometry().top(); diff --git a/src/preferences/dialog/dlgpreferences.h b/src/preferences/dialog/dlgpreferences.h index b57d3db257..595fd10cf6 100644 --- a/src/preferences/dialog/dlgpreferences.h +++ b/src/preferences/dialog/dlgpreferences.h @@ -18,8 +18,9 @@ class DlgPrefSound; class DlgPrefLibrary; class DlgPrefController; class DlgPrefControllers; +#ifdef __VINYLCONTROL__ class DlgPrefVinyl; -class DlgPrefNoVinyl; +#endif // __VINYLCONTROL__ class DlgPrefInterface; class DlgPrefWaveform; class DlgPrefDeck; @@ -28,14 +29,16 @@ class DlgPrefEQ; class DlgPrefEffects; class DlgPrefCrossfader; class DlgPrefAutoDJ; +#ifdef __BROADCAST__ class DlgPrefBroadcast; +#endif // __BROADCAST__ class DlgPrefRecord; class DlgPrefBeats; class DlgPrefKey; class DlgPrefReplayGain; #ifdef __LILV__ class DlgPrefLV2; -#endif /* __LILV__ */ +#endif // __LILV__ class LV2Backend; class ControllerManager; class EffectsManager; @@ -45,7 +48,7 @@ class Library; class VinylControlManager; #ifdef __MODPLUG__ class DlgPrefModplug; -#endif +#endif // __MODPLUG__ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg { Q_OBJECT @@ -103,9 +106,7 @@ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg { DlgPrefControllers *m_controllersPage; #ifdef __VINYLCONTROL__ DlgPrefVinyl* m_vinylControlPage; -#else /* __VINYLCONTROL__ */ - DlgPrefNoVinyl* m_noVinylControlPage; -#endif +#endif // __VINYLCONTROL__ DlgPrefInterface* m_interfacePage; DlgPrefWaveform* m_waveformPage; DlgPrefDeck* m_deckPage; @@ -114,22 +115,26 @@ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg { DlgPrefCrossfader* m_crossfaderPage; DlgPrefEffects* m_effectsPage; DlgPrefAutoDJ* m_autoDjPage; +#ifdef __BROADCAST__ DlgPrefBroadcast* m_broadcastingPage; +#endif // __BROADCAST__ DlgPrefRecord* m_recordingPage; DlgPrefBeats* m_beatgridPage; DlgPrefKey* m_musicalKeyPage; DlgPrefReplayGain* m_replayGainPage; #ifdef __LILV__ DlgPrefLV2* m_lv2Page; -#endif /* __LILV__ */ +#endif // __LILV__ #ifdef __MODPLUG__ DlgPrefModplug* m_modplugPage; -#endif /* __MODPLUG__ */ +#endif // __MODPLUG__ QTreeWidgetItem* m_pSoundButton; QTreeWidgetItem* m_pLibraryButton; QTreeWidgetItem* m_pControllersRootButton; +#ifdef __VINYLCONTROL__ QTreeWidgetItem* m_pVinylControlButton; +#endif // __VINYLCONTROL__ QTreeWidgetItem* m_pInterfaceButton; QTreeWidgetItem* m_pWaveformButton; QTreeWidgetItem* m_pDecksButton; @@ -137,18 +142,20 @@ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg { QTreeWidgetItem* m_pEqButton; #ifdef __LILV__ QTreeWidgetItem* m_pLV2Button; -#endif /* __LILV__ */ +#endif // __LILV__ QTreeWidgetItem* m_pEffectsButton; QTreeWidgetItem* m_pCrossfaderButton; QTreeWidgetItem* m_pAutoDJButton; +#ifdef __BROADCAST__ QTreeWidgetItem* m_pBroadcastButton; +#endif // __BROADCAST__ QTreeWidgetItem* m_pRecordingButton; QTreeWidgetItem* m_pBeatDetectionButton; QTreeWidgetItem* m_pKeyDetectionButton; QTreeWidgetItem* m_pReplayGainButton; #ifdef __MODPLUG__ QTreeWidgetItem* m_pModplugButton; -#endif /* __MODPLUG__ */ +#endif // __MODPLUG__ QSize m_pageSizeHint; diff --git a/src/preferences/dialog/dlgprefnovinyl.cpp b/src/preferences/dialog/dlgprefnovinyl.cpp deleted file mode 100644 index e6497bfa3a..0000000000 --- a/src/preferences/dialog/dlgprefnovinyl.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "preferences/dialog/dlgprefnovinyl.h" - -#include <QtDebug> - -#include "defs_urls.h" -#include "moc_dlgprefnovinyl.cpp" - -DlgPrefNoVinyl::DlgPrefNoVinyl(QWidget * parent, SoundManager * soundman, - UserSettingsPointer _config) - : DlgPreferencePage(parent) { - Q_UNUSED(soundman); - Q_UNUSED(_config); - setupUi(this); - // Create text color for the cue mode link "?" to the manual - createLinkColor(); - noVinylControlHint->setText( - // TODO That link is kinda pointless as it does not clarify - // why VC is not available - tr("This version of Mixxx does not support vinyl control.\n" - "Please visit %1 for more information.") - .arg(coloredLinkString( - m_pLinkColor, - MIXXX_WEBSITE_SHORT_URL, - MIXXX_WEBSITE_URL))); -} - -DlgPrefNoVinyl::~DlgPrefNoVinyl() { -} diff --git a/src/preferences/dialog/dlgprefnovinyl.h b/src/preferences/dialog/dlgprefnovinyl.h deleted file mode 100644 index e6987fa972..0000000000 --- a/src/preferences/dialog/dlgprefnovinyl.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include <QWidget> - -#include "preferences/dialog/dlgpreferencepage.h" -#include "preferences/dialog/ui_dlgprefnovinyldlg.h" -#include "preferences/usersettings.h" - -class SoundManager; - -class DlgPrefNoVinyl : public DlgPreferencePage, Ui::DlgPrefNoVinylDlg { - Q_OBJECT - public: - DlgPrefNoVinyl(QWidget *parent, SoundManager* soundman, UserSettingsPointer _config); - virtual ~DlgPrefNoVinyl(); -}; diff --git a/src/preferences/dialog/dlgprefnovinyldlg.ui b/src/preferences/dialog/dlgprefnovinyldlg.ui deleted file mode 100644 index 4f681708a1..0000000000 --- a/src/preferences/dialog/dlgprefnovinyldlg.ui +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>DlgPrefNoVinylDlg</class> - <widget class="QWidget" name="DlgPrefNoVinylDlg"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>548</width> - <height>263</height> - </rect> - </property> - <property name="windowTitle"> - <string extracomment="Using a version with the Vinyl Control feature disabled, an alternative preferences window is displayed.">Vinyl Control (Disabled) Preferences</string> - </property> - <layout class="QGridLayout" name="gridLayout_3"> - <item row="0" column="0" colspan="2"> - <widget class="QLabel" name="noVinylControlHint"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> - </widget> - <layoutdefault spacing="6" margin="11"/> - <resources/> - <connections/> -</ui> diff --git a/src/widget/wmainmenubar.cpp b/src/widget/wmainmenubar.cpp index 62907573dc..4a21f520c6 100644 --- a/src/widget/wmainmenubar.cpp +++ b/src/widget/wmainmenubar.cpp @@ -20,6 +20,7 @@ QString buildWhatsThis(const QString& title, const QString& text) { return QString("%1\n\n%2").arg(preparedTitle.remove("&"), text); } +#ifdef __VINYLCONTROL__ QString vinylControlDefaultKeyBinding(int deck) { // More bindings need to be defined if you increment // kMaximumVinylControlInputs. @@ -32,6 +33,7 @@ QString vinylControlDefaultKeyBinding(int deck) { default: return QString(); } } +#endif // __VINYLCONTROL__ QString loadToDeckDefaultKeyBinding(int deck) { switch (deck) { diff --git a/src/widget/wspinny.cpp b/src/widget/wspinny.cpp index 8c4149f619..b9eadc0c2c 100644 --- a/src/widget/wspinny.cpp +++ b/src/widget/wspinny.cpp @@ -68,7 +68,9 @@ WSpinny::WSpinny( m_pCoverMenu(new WCoverArtMenu(this)) { #ifdef __VINYLCONTROL__ m_pVCManager = pVCMan; -#endif +#else + Q_UNUSED(pVCMan); +#endif // __VINYLCONTROL__ //Drag and drop setAcceptDrops(true); qDebug() << "WSpinny(): Created QGLWidget, Context" @@ -140,6 +142,8 @@ void WSpinny::onVinylSignalQualityUpdate(const VinylSignalQualityReport& report) line++; } } +#else + Q_UNUSED(report); #endif } @@ -540,6 +544,8 @@ void WSpinny::updateVinylControlSignalEnabled(double enabled) { // fill with transparent black m_qImage.fill(qRgba(0,0,0,0)); } +#else + Q_UNUSED(enabled); #endif } |