DlgAutoDJ::DlgAutoDJ(QWidget* parent, ConfigObject<ConfigValue>* pConfig, Library* pLibrary, AutoDJProcessor* pProcessor, TrackCollection* pTrackCollection, MixxxKeyboard* pKeyboard) : QWidget(parent), Ui::DlgAutoDJ(), m_pAutoDJProcessor(pProcessor), // no sorting m_pTrackTableView(new WTrackTableView(this, pConfig, pTrackCollection, false)), m_pAutoDJTableModel(NULL) { setupUi(this); m_pTrackTableView->installEventFilter(pKeyboard); connect(m_pTrackTableView, SIGNAL(loadTrack(TrackPointer)), this, SIGNAL(loadTrack(TrackPointer))); connect(m_pTrackTableView, SIGNAL(loadTrackToPlayer(TrackPointer, QString, bool)), this, SIGNAL(loadTrackToPlayer(TrackPointer, QString, bool))); connect(m_pTrackTableView, SIGNAL(trackSelected(TrackPointer)), this, SIGNAL(trackSelected(TrackPointer))); connect(pLibrary, SIGNAL(setTrackTableFont(QFont)), m_pTrackTableView, SLOT(setTrackTableFont(QFont))); connect(pLibrary, SIGNAL(setTrackTableRowHeight(int)), m_pTrackTableView, SLOT(setTrackTableRowHeight(int))); connect(m_pTrackTableView, SIGNAL(trackSelected(TrackPointer)), this, SLOT(updateSelectionInfo())); QBoxLayout* box = dynamic_cast<QBoxLayout*>(layout()); DEBUG_ASSERT_AND_HANDLE(box) { //Assumes the form layout is a QVBox/QHBoxLayout! } else {
DlgRecording::DlgRecording(QWidget* parent, UserSettingsPointer pConfig, Library* pLibrary, TrackCollection* pTrackCollection, RecordingManager* pRecordingManager, KeyboardEventFilter* pKeyboard) : QWidget(parent), m_pConfig(pConfig), m_pTrackCollection(pTrackCollection), m_browseModel(this, m_pTrackCollection, pRecordingManager), m_proxyModel(&m_browseModel), m_bytesRecordedStr("--"), m_durationRecordedStr("--:--"), m_pRecordingManager(pRecordingManager) { setupUi(this); m_pTrackTableView = new WTrackTableView(this, pConfig, m_pTrackCollection, true); m_pTrackTableView->installEventFilter(pKeyboard); connect(m_pTrackTableView, SIGNAL(loadTrack(TrackPointer)), this, SIGNAL(loadTrack(TrackPointer))); connect(m_pTrackTableView, SIGNAL(loadTrackToPlayer(TrackPointer, QString, bool)), this, SIGNAL(loadTrackToPlayer(TrackPointer, QString, bool))); connect(pLibrary, SIGNAL(setTrackTableFont(QFont)), m_pTrackTableView, SLOT(setTrackTableFont(QFont))); connect(pLibrary, SIGNAL(setTrackTableRowHeight(int)), m_pTrackTableView, SLOT(setTrackTableRowHeight(int))); connect(m_pRecordingManager, SIGNAL(isRecording(bool)), this, SLOT(slotRecordingEnabled(bool))); connect(m_pRecordingManager, SIGNAL(bytesRecorded(int)), this, SLOT(slotBytesRecorded(int))); connect(m_pRecordingManager, SIGNAL(durationRecorded(QString)), this, SLOT(slotDurationRecorded(QString))); QBoxLayout* box = dynamic_cast<QBoxLayout*>(layout()); VERIFY_OR_DEBUG_ASSERT(box) { //Assumes the form layout is a QVBox/QHBoxLayout! } else {
DlgPrefLibrary::DlgPrefLibrary(QWidget * parent, UserSettingsPointer config, Library *pLibrary) : DlgPreferencePage(parent), m_dirListModel(), m_pconfig(config), m_pLibrary(pLibrary), m_baddedDirectory(false), m_iOriginalTrackTableRowHeight(Library::kDefaultRowHeightPx) { setupUi(this); slotUpdate(); checkbox_ID3_sync->setVisible(false); connect(this, SIGNAL(requestAddDir(QString)), m_pLibrary, SLOT(slotRequestAddDir(QString))); connect(this, SIGNAL(requestRemoveDir(QString, Library::RemovalType)), m_pLibrary, SLOT(slotRequestRemoveDir(QString, Library::RemovalType))); connect(this, SIGNAL(requestRelocateDir(QString,QString)), m_pLibrary, SLOT(slotRequestRelocateDir(QString,QString))); connect(PushButtonAddDir, SIGNAL(clicked()), this, SLOT(slotAddDir())); connect(PushButtonRemoveDir, SIGNAL(clicked()), this, SLOT(slotRemoveDir())); connect(PushButtonRelocateDir, SIGNAL(clicked()), this, SLOT(slotRelocateDir())); //connect(pushButtonM4A, SIGNAL(clicked()), this, SLOT(slotM4ACheck())); connect(pushButtonExtraPlugins, SIGNAL(clicked()), this, SLOT(slotExtraPlugins())); // plugins are loaded in src/main.cpp way early in boot so this is safe // here, doesn't need done at every slotUpdate QStringList plugins(SoundSourceProxy::getSupportedFileExtensionsByPlugins()); if (plugins.length() > 0) { pluginsLabel->setText(plugins.join(", ")); } // Set default direction as stored in config file int rowHeight = m_pLibrary->getTrackTableRowHeight(); spinBoxRowHeight->setValue(rowHeight); connect(spinBoxRowHeight, SIGNAL(valueChanged(int)), this, SLOT(slotRowHeightValueChanged(int))); connect(libraryFontButton, SIGNAL(clicked()), this, SLOT(slotSelectFont())); connect(this, SIGNAL(setTrackTableFont(QFont)), m_pLibrary, SLOT(slotSetTrackTableFont(QFont))); connect(this, SIGNAL(setTrackTableRowHeight(int)), m_pLibrary, SLOT(slotSetTrackTableRowHeight(int))); // TODO(XXX) this string should be extracted from the soundsources QString builtInFormatsStr = "Ogg Vorbis, FLAC, WAVe, AIFF"; #if defined(__MAD__) || defined(__APPLE__) builtInFormatsStr += ", MP3"; #endif #ifdef __OPUS__ builtInFormatsStr += ", Opus"; #endif #ifdef _MODPLUG_ builtInFormatsStr += ", ModPlug"; #endif builtInFormats->setText(builtInFormatsStr); }