File indexing completed on 2025-01-19 04:23:51

0001 /****************************************************************************************
0002  * Copyright (c) 2009 Simon Esneault <simon.esneault@gmail.com>                         *
0003  * Copyright (c) 2010 Emmanuel Wagner <manu.wagner@sfr.fr>                              *
0004  * Copyright (c) 2010 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 #ifndef COVERBLING_APPLET_H
0019 #define COVERBLING_APPLET_H
0020 
0021 #include "context/Applet.h"
0022 #include "context/DataEngine.h"
0023 #include "PhotoBrowser.h"
0024 #include "ui_coverblingSettings.h"
0025 
0026 class TextScrollingWidget;
0027 class KConfigDialog;
0028 class PhotosScrollWidget;
0029 class QGraphicsSimpleTextItem;
0030 class QGraphicsProxyWidget;
0031 class RatingWidget;
0032 class QGraphicsPixmapItem;
0033 class SearchBarTextItem;
0034 
0035 namespace Plasma
0036 {
0037     class IconWidget;
0038 }
0039 
0040 class CoverBlingApplet : public Context::Applet
0041 {
0042     Q_OBJECT
0043 
0044     public:
0045         CoverBlingApplet( QObject* parent, const QVariantList& args );
0046         ~CoverBlingApplet();
0047 
0048         void init();
0049 
0050     public Q_SLOTS:
0051         void slotAlbumQueryResult( Meta::AlbumList albums);
0052         void slideChanged( int islideindex );
0053         void slotDoubleClicked( int islideindex );
0054         void toggleFullscreen();
0055         void jumpToPlaying();
0056         void saveSettings();
0057         void skipToFirst();
0058         void skipToLast();
0059         void albumSearch(QString ialbum);
0060         void switchSearchIcon();
0061         void displaySearchName();
0062     protected :
0063         virtual void constraintsEvent( Plasma::Constraints constraints = Plasma::AllConstraints );
0064         void createConfigurationInterface(KConfigDialog *parent);
0065 
0066     private:
0067         PhotoBrowser * m_pictureflow;
0068         QGraphicsProxyWidget * m_layout;
0069         RatingWidget* m_ratingWidget;
0070         QGraphicsSimpleTextItem* m_label;
0071 
0072         Plasma::IconWidget* m_blingtofirst;
0073         Plasma::IconWidget* m_blingtolast;
0074         Plasma::IconWidget* m_blingfastback;
0075         Plasma::IconWidget* m_blingfastforward;
0076         Plasma::IconWidget* m_fullscreen;
0077         Plasma::IconWidget* m_jumptoplaying;
0078         Plasma::IconWidget* m_albumsearch;
0079         SearchBarTextItem* m_editsearch;
0080         
0081         bool m_fullsize;
0082         bool m_autojump;
0083         bool m_animatejump;
0084         Ui::coverblingSettings   ui_Settings;
0085         int m_coversize;
0086         PictureFlow::ReflectionEffect m_reflectionEffect;
0087         bool m_openGL;
0088         bool m_album_or_artist;
0089         bool m_initrandompos;
0090 };
0091 
0092 AMAROK_EXPORT_APPLET( coverbling, CoverBlingApplet )
0093 
0094 #endif /* COVERBLING_APPLET_H */