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 {
DlgAnalysis::DlgAnalysis(QWidget* parent, ConfigObject<ConfigValue>* pConfig, TrackCollection* pTrackCollection) : QWidget(parent), m_pConfig(pConfig), m_pTrackCollection(pTrackCollection), m_bAnalysisActive(false), m_tracksInQueue(0), m_currentTrack(0) { setupUi(this); m_songsButtonGroup.addButton(radioButtonRecentlyAdded); m_songsButtonGroup.addButton(radioButtonAllSongs); m_pAnalysisLibraryTableView = new WAnalysisLibraryTableView(this, pConfig, pTrackCollection); connect(m_pAnalysisLibraryTableView, SIGNAL(loadTrack(TrackPointer)), this, SIGNAL(loadTrack(TrackPointer))); connect(m_pAnalysisLibraryTableView, SIGNAL(loadTrackToPlayer(TrackPointer, QString)), this, SIGNAL(loadTrackToPlayer(TrackPointer, QString))); connect(m_pAnalysisLibraryTableView, SIGNAL(trackSelected(TrackPointer)), this, SIGNAL(trackSelected(TrackPointer))); QBoxLayout* box = dynamic_cast<QBoxLayout*>(layout()); DEBUG_ASSERT_AND_HANDLE(box) { // Assumes the form layout is a QVBox/QHBoxLayout! } else {
void AnalysisFeature::bindWidget(WLibrary* libraryWidget, MixxxKeyboard* keyboard) { m_pAnalysisView = new DlgAnalysis(libraryWidget, m_pConfig, m_pTrackCollection); connect(m_pAnalysisView, SIGNAL(loadTrack(TrackPointer)), this, SIGNAL(loadTrack(TrackPointer))); connect(m_pAnalysisView, SIGNAL(loadTrackToPlayer(TrackPointer, QString)), this, SIGNAL(loadTrackToPlayer(TrackPointer, QString))); connect(m_pAnalysisView, SIGNAL(analyzeTracks(QList<int>)), this, SLOT(analyzeTracks(QList<int>))); connect(m_pAnalysisView, SIGNAL(stopAnalysis()), this, SLOT(stopAnalysis())); connect(m_pAnalysisView, SIGNAL(trackSelected(TrackPointer)), this, SIGNAL(trackSelected(TrackPointer))); connect(this, SIGNAL(analysisActive(bool)), m_pAnalysisView, SLOT(analysisActive(bool))); connect(this, SIGNAL(trackAnalysisStarted(int)), m_pAnalysisView, SLOT(trackAnalysisStarted(int))); m_pAnalysisView->installEventFilter(keyboard); // Let the DlgAnalysis know whether or not analysis is active. bool bAnalysisActive = m_pAnalyserQueue != NULL; emit(analysisActive(bAnalysisActive)); libraryWidget->registerView(m_sAnalysisViewName, m_pAnalysisView); }
DlgMissing::DlgMissing(QWidget* parent, ConfigObject<ConfigValue>* pConfig, TrackCollection* pTrackCollection, MixxxKeyboard* pKeyboard) : QWidget(parent), Ui::DlgMissing(), m_pTrackTableView( new WTrackTableView(this,pConfig,pTrackCollection, false)) { setupUi(this); m_pTrackTableView->installEventFilter(pKeyboard); // Install our own trackTable QBoxLayout* box = dynamic_cast<QBoxLayout*>(layout()); Q_ASSERT(box); //Assumes the form layout is a QVBox/QHBoxLayout! box->removeWidget(m_pTrackTablePlaceholder); m_pTrackTablePlaceholder->hide(); box->insertWidget(1, m_pTrackTableView); m_pMissingTableModel = new MissingTableModel(this, pTrackCollection); m_pTrackTableView->loadTrackModel(m_pMissingTableModel); connect(btnPurge, SIGNAL(clicked()), m_pTrackTableView, SLOT(slotPurge())); connect(btnPurge, SIGNAL(clicked()), this, SLOT(clicked())); connect(btnSelect, SIGNAL(clicked()), this, SLOT(selectAll())); connect(m_pTrackTableView->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), this, SLOT(selectionChanged(const QItemSelection&, const QItemSelection&))); connect(m_pTrackTableView, SIGNAL(trackSelected(TrackPointer)), this, SIGNAL(trackSelected(TrackPointer))); }
void MixxxLibraryFeature::bindWidget(WLibrary* pLibraryWidget, KeyboardEventFilter* pKeyboard) { m_pHiddenView = new DlgHidden(pLibraryWidget, m_pConfig, m_pLibrary, m_pTrackCollection, pKeyboard); pLibraryWidget->registerView(kHiddenTitle, m_pHiddenView); connect(m_pHiddenView, SIGNAL(trackSelected(TrackPointer)), this, SIGNAL(trackSelected(TrackPointer))); m_pMissingView = new DlgMissing(pLibraryWidget, m_pConfig, m_pLibrary, m_pTrackCollection, pKeyboard); pLibraryWidget->registerView(kMissingTitle, m_pMissingView); connect(m_pMissingView, SIGNAL(trackSelected(TrackPointer)), this, SIGNAL(trackSelected(TrackPointer))); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),ui(new Ui::MainWindow),options(new channelOptions(this)),modOptions(new moduleDialog(this)),serialPortOpt(new serialPortOptions(this)),thePlaylist(new playlist(this))//thePlayer(new QMediaPlayer), { thePlayer = NULL; ui->setupUi(this); playbackRate=1; serialPortName="COM3"; //serialPortName="/dev/ttyUSB0"; //thePort.setPortName("/dev/ttyACM0"); thePort.setPortName(serialPortName); thePort.setBaudRate(QSerialPort::Baud9600); serialOutputOn=0; connect(ui->label_2,SIGNAL(playScroll(int)),ui->horizontalScrollBar,SLOT(setValue(int))); connect(ui->label_2,SIGNAL(trackSelected(uint,QColor)),this,SLOT(channelSelected(uint,QColor))); connect(ui->label_2,SIGNAL(updatePicture(binaryTrack)),ui->label,SLOT(whatToLightUp(binaryTrack))); connect(ui->label_2,SIGNAL(updatePicture(binaryTrack)),this,SLOT(writeToSerialPort(binaryTrack))); connect(ui->actionExit,SIGNAL(triggered()),this,SLOT(close())); connect(options,SIGNAL(removeChannel(int)),this,SLOT(removeChannel(int))); connect(options,SIGNAL(theColorChanged(uint,QColor)),this,SLOT(channelColorHasChanged(uint,QColor))); connect(options,SIGNAL(changeEditMode(bool)),ui->label,SLOT(changeEditMode(bool))); connect(options,SIGNAL(channelEnableButtonPushed(int,bool)),this,SLOT(channelEnabledButtonPushed(int,bool))); connect(serialPortOpt,SIGNAL(setNewSerialPort(QString)),this,SLOT(serialPortNameChanged(QString))); connect(thePlaylist,SIGNAL(changeSong(QString)),this,SLOT(playlistChangeSong(QString))); tempTrackCount=0; }
void TrackList::selectNewTrack(Q3ListViewItem *item) { if (!item) return; int num = item->text(0).toInt() - 1; emit trackSelected(song->t.at(num)); }
void TimelineDock::selectTrackHead(int trackIndex) { if (trackIndex >= 0) { int i = m_model.trackList().at(trackIndex).mlt_index; Mlt::Producer* producer = m_model.tractor()->track(i); if (producer && producer->is_valid()) emit trackSelected(producer); delete producer; } }
/** * \brief Slot called when a track is selected * * This slot retrieves the complete tracking history (it used a summary * only to fill the selection list) and emits the trackSelected signal * with the complete track history as the argument. */ void trackselectiondialog::trackAccepted() { int selected = ui->tracklistWidget->currentRow(); if ((selected < 0) || (selected >= _tracks.size())) { return; } int trackid = _tracks[selected].trackid; debug(LOG_DEBUG, DEBUG_LOG, 0, "selected track id: %d", trackid); snowstar::TrackingHistory track = _guiderfactory->getTrackingHistory(trackid); debug(LOG_DEBUG, DEBUG_LOG, 0, "track %d selected, id %d, %d points", selected, _tracks[selected].trackid, track.points.size()); emit trackSelected(track); }
void AutoDJFeature::bindWidget(WLibrary* libraryWidget, KeyboardEventFilter* keyboard) { m_pAutoDJView = new DlgAutoDJ(libraryWidget, m_pConfig, m_pLibrary, m_pAutoDJProcessor, m_pTrackCollection, keyboard); libraryWidget->registerView(m_sAutoDJViewName, m_pAutoDJView); connect(m_pAutoDJView, SIGNAL(loadTrack(TrackPointer)), this, SIGNAL(loadTrack(TrackPointer))); connect(m_pAutoDJView, SIGNAL(loadTrackToPlayer(TrackPointer, QString, bool)), this, SIGNAL(loadTrackToPlayer(TrackPointer, QString, bool))); connect(m_pAutoDJView, SIGNAL(trackSelected(TrackPointer)), this, SIGNAL(trackSelected(TrackPointer))); // Be informed when the user wants to add another random track. connect(m_pAutoDJProcessor,SIGNAL(randomTrackRequested(int)), this,SLOT(slotRandomQueue(int))); connect(m_pAutoDJView, SIGNAL(addRandomButton(bool)), this, SLOT(slotAddRandomTrack(bool))); }
DlgAutoDJ::DlgAutoDJ(QWidget* parent, ConfigObject<ConfigValue>* pConfig, 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))); QBoxLayout* box = dynamic_cast<QBoxLayout*>(layout()); Q_ASSERT(box); //Assumes the form layout is a QVBox/QHBoxLayout! box->removeWidget(m_pTrackTablePlaceholder); m_pTrackTablePlaceholder->hide(); box->insertWidget(1, m_pTrackTableView); // We do _NOT_ take ownership of this from AutoDJProcessor. m_pAutoDJTableModel = m_pAutoDJProcessor->getTableModel(); m_pTrackTableView->loadTrackModel(m_pAutoDJTableModel); // Override some playlist-view properties: // Do not set this because it disables auto-scrolling //m_pTrackTableView->setDragDropMode(QAbstractItemView::InternalMove); connect(pushButtonShuffle, SIGNAL(clicked(bool)), this, SLOT(shufflePlaylistButton(bool))); connect(pushButtonSkipNext, SIGNAL(clicked(bool)), this, SLOT(skipNextButton(bool))); #ifdef __AUTODJCRATES__ connect(pushButtonAddRandom, SIGNAL(clicked(bool)), this, SIGNAL(addRandomButton(bool))); #else // __AUTODJCRATES__ pushButtonAddRandom->setVisible(false); horizontalLayout->removeWidget(pushButtonAddRandom); #endif // __AUTODJCRATES__ connect(pushButtonFadeNow, SIGNAL(clicked(bool)), this, SLOT(fadeNowButton(bool))); connect(spinBoxTransition, SIGNAL(valueChanged(int)), this, SLOT(transitionSliderChanged(int))); connect(pushButtonAutoDJ, SIGNAL(toggled(bool)), this, SLOT(toggleAutoDJButton(bool))); // Setup DlgAutoDJ UI based on the current AutoDJProcessor state. Keep in // mind that AutoDJ may already be active when DlgAutoDJ is created (due to // skin changes, etc.). spinBoxTransition->setValue(m_pAutoDJProcessor->getTransitionTime()); connect(m_pAutoDJProcessor, SIGNAL(transitionTimeChanged(int)), this, SLOT(transitionTimeChanged(int))); connect(m_pAutoDJProcessor, SIGNAL(autoDJStateChanged(AutoDJProcessor::AutoDJState)), this, SLOT(autoDJStateChanged(AutoDJProcessor::AutoDJState))); autoDJStateChanged(m_pAutoDJProcessor->getState()); }
CrateFeature::CrateFeature(Library* pLibrary, TrackCollection* pTrackCollection, UserSettingsPointer pConfig) : LibraryFeature(pConfig), m_pTrackCollection(pTrackCollection), m_crateDao(pTrackCollection->getCrateDAO()), m_crateTableModel(this, pTrackCollection) { m_pCreateCrateAction = new QAction(tr("Create New Crate"),this); connect(m_pCreateCrateAction, SIGNAL(triggered()), this, SLOT(slotCreateCrate())); m_pDeleteCrateAction = new QAction(tr("Remove"),this); connect(m_pDeleteCrateAction, SIGNAL(triggered()), this, SLOT(slotDeleteCrate())); m_pRenameCrateAction = new QAction(tr("Rename"),this); connect(m_pRenameCrateAction, SIGNAL(triggered()), this, SLOT(slotRenameCrate())); m_pLockCrateAction = new QAction(tr("Lock"),this); connect(m_pLockCrateAction, SIGNAL(triggered()), this, SLOT(slotToggleCrateLock())); m_pImportPlaylistAction = new QAction(tr("Import Crate"),this); connect(m_pImportPlaylistAction, SIGNAL(triggered()), this, SLOT(slotImportPlaylist())); m_pCreateImportPlaylistAction = new QAction(tr("Import Crate"), this); connect(m_pCreateImportPlaylistAction, SIGNAL(triggered()), this, SLOT(slotCreateImportCrate())); m_pExportPlaylistAction = new QAction(tr("Export Crate"), this); connect(m_pExportPlaylistAction, SIGNAL(triggered()), this, SLOT(slotExportPlaylist())); m_pExportTrackFilesAction = new QAction(tr("Export Track Files"), this); connect(m_pExportTrackFilesAction, SIGNAL(triggered()), this, SLOT(slotExportTrackFiles())); m_pDuplicateCrateAction = new QAction(tr("Duplicate"),this); connect(m_pDuplicateCrateAction, SIGNAL(triggered()), this, SLOT(slotDuplicateCrate())); m_pAnalyzeCrateAction = new QAction(tr("Analyze entire Crate"),this); connect(m_pAnalyzeCrateAction, SIGNAL(triggered()), this, SLOT(slotAnalyzeCrate())); m_pAutoDjTrackSource = new QAction(tr("Auto DJ Track Source"),this); m_pAutoDjTrackSource->setCheckable(true); connect(m_pAutoDjTrackSource, SIGNAL(changed()), this, SLOT(slotAutoDjTrackSourceChanged())); connect(&m_crateDao, SIGNAL(added(int)), this, SLOT(slotCrateTableChanged(int))); connect(&m_crateDao, SIGNAL(deleted(int)), this, SLOT(slotCrateTableChanged(int))); connect(&m_crateDao, SIGNAL(changed(int)), this, SLOT(slotCrateContentChanged(int))); connect(&m_crateDao, SIGNAL(renamed(int,QString)), this, SLOT(slotCrateTableRenamed(int,QString))); connect(&m_crateDao, SIGNAL(lockChanged(int)), this, SLOT(slotCrateTableChanged(int))); // construct child model TreeItem *rootItem = new TreeItem(); m_childModel.setRootItem(rootItem); constructChildModel(-1); connect(pLibrary, SIGNAL(trackSelected(TrackPointer)), this, SLOT(slotTrackSelected(TrackPointer))); connect(pLibrary, SIGNAL(switchToView(const QString&)), this, SLOT(slotResetSelectedTrack())); }