File indexing completed on 2024-05-05 04:48:35
0001 /**************************************************************************************** 0002 * Copyright (c) 2010 Sergey Ivanov <123kash@gmail.com> * 0003 * Copyright (c) 2013 Alberto Villa <avilla@FreeBSD.org> * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify it under * 0006 * the terms of the GNU General Public License as published by the Free Software * 0007 * Foundation; either version 2 of the License, or (at your option) any later * 0008 * version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0011 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0012 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License along with * 0015 * this program. If not, see <http://www.gnu.org/licenses/>. * 0016 ****************************************************************************************/ 0017 0018 #ifndef MUSICBRAINZTAGSVIEW_H 0019 #define MUSICBRAINZTAGSVIEW_H 0020 0021 #include <QIcon> 0022 0023 #include <QTreeView> 0024 0025 class MusicBrainzTagsModel; 0026 0027 class MusicBrainzTagsView : public QTreeView 0028 { 0029 Q_OBJECT 0030 0031 public: 0032 explicit MusicBrainzTagsView( QWidget *parent = nullptr ); 0033 0034 MusicBrainzTagsModel *sourceModel() const; 0035 0036 public Q_SLOTS: 0037 void collapseChosen(); 0038 void expandUnchosen(); 0039 0040 protected: 0041 void contextMenuEvent( QContextMenuEvent *event ) override; 0042 0043 private Q_SLOTS: 0044 void chooseBestMatchesFromRelease() const; 0045 void openArtistPage() const; 0046 void openReleasePage() const; 0047 void openTrackPage() const; 0048 0049 private: 0050 QIcon m_artistIcon; 0051 QIcon m_releaseIcon; 0052 QIcon m_trackIcon; 0053 }; 0054 0055 #endif // MUSICBRAINZTAGSVIEW_H