Qmmp
|
00001 /*************************************************************************** 00002 * Copyright (C) 2007-2016 by Ilya Kotov * 00003 * forkotov02@hotmail.ru * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 00019 ***************************************************************************/ 00020 00021 #ifndef JUMPTOTRACKDIALOG_P_H 00022 #define JUMPTOTRACKDIALOG_P_H 00023 00024 #include <QDialog> 00025 #include <QList> 00026 #include "metadataformatter.h" 00027 #include "ui_jumptotrackdialog.h" 00028 00029 class QStringListModel; 00030 class QSortFilterProxyModel; 00031 class QEvent; 00032 class PlayListManager; 00033 class PlayListModel; 00034 00039 class JumpToTrackDialog : public QDialog, private Ui::JumpToTrackDialog 00040 { 00041 Q_OBJECT 00042 00043 public: 00044 JumpToTrackDialog(PlayListModel *model, QWidget* parent = 0); 00045 ~JumpToTrackDialog(); 00046 void refresh(); 00047 00048 private slots: 00049 void on_refreshPushButton_clicked(); 00050 void on_queuePushButton_clicked(); 00051 void on_jumpToPushButton_clicked(); 00052 void jumpTo(const QModelIndex&); 00053 void queueUnqueue(const QModelIndex&,const QModelIndex&); 00054 00055 private: 00056 bool eventFilter(QObject *o, QEvent *e); 00057 QStringListModel* m_listModel; 00058 QSortFilterProxyModel* m_proxyModel; 00059 PlayListManager *m_pl_manager; 00060 PlayListModel *m_model; 00061 QList<int> m_indexes; 00062 MetaDataFormatter m_titleFormatter; 00063 }; 00064 00065 #endif //JUMPTOTRACKDIALOG_P_H