File indexing completed on 2024-05-19 04:48:39

0001 /****************************************************************************************
0002  * Copyright (c) 2008 Daniel Jones <danielcjones@gmail.com>                             *
0003  * Copyright (c) 2009-2010 Leo Franchi <lfranchi@kde.org>                               *
0004  * Copyright (c) 2009 Mark Kretschmann <kretschmann@kde.org>                            *
0005  *                                                                                      *
0006  * This program is free software; you can redistribute it and/or modify it under        *
0007  * the terms of the GNU General Public License as published by the Free Software        *
0008  * Foundation; either version 2 of the License, or (at your option) any later           *
0009  * version.                                                                             *
0010  *                                                                                      *
0011  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0012  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0013  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0014  *                                                                                      *
0015  * You should have received a copy of the GNU General Public License along with         *
0016  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0017  ****************************************************************************************/
0018 
0019 #ifndef DYNAMICCATEGORY_H
0020 #define DYNAMICCATEGORY_H
0021 
0022 #include "browsers/BrowserCategory.h"
0023 
0024 class QPushButton;
0025 class QToolButton;
0026 class QSpinBox;
0027 
0028 namespace PlaylistBrowserNS {
0029 
0030     class DynamicView;
0031 
0032     /**
0033     */
0034     class DynamicCategory : public BrowserCategory
0035     {
0036         Q_OBJECT
0037         public:
0038             explicit DynamicCategory( QWidget* parent );
0039             ~DynamicCategory() override;
0040 
0041             bool allowDuplicates() const;
0042 
0043         private Q_SLOTS:
0044             void navigatorChanged();
0045             void selectionChanged();
0046             void playlistCleared();
0047             void setUpcomingTracks( int );
0048             void setPreviousTracks( int );
0049 
0050             void setAllowDuplicates( bool value );
0051 
0052         private:
0053             QToolButton *m_onOffButton;
0054             QToolButton *m_duplicateButton;
0055             QToolButton *m_addButton;
0056             QToolButton *m_editButton;
0057             QToolButton *m_deleteButton;
0058             QPushButton *m_repopulateButton;
0059 
0060             DynamicView *m_tree;
0061 
0062             QSpinBox *m_previous, *m_upcoming;
0063     };
0064 
0065 }
0066 
0067 #endif