File indexing completed on 2025-01-05 04:25:45
0001 /**************************************************************************************** 0002 * Copyright (c) 2010 Rick W. Chen <stuffcorpse@archlinux.us> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify it under * 0005 * the terms of the GNU General Public License as published by the Free Software * 0006 * Foundation; either version 2 of the License, or (at your option) any later * 0007 * version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0011 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0012 * * 0013 * You should have received a copy of the GNU General Public License along with * 0014 * this program. If not, see <http://www.gnu.org/licenses/>. * 0015 ****************************************************************************************/ 0016 0017 #ifndef AMAROK_UPCOMINGEVENTSCALENDARWIDGET_H 0018 #define AMAROK_UPCOMINGEVENTSCALENDARWIDGET_H 0019 0020 #include "LastFmEvent.h" 0021 0022 #include <QGraphicsProxyWidget> 0023 0024 class UpcomingEventsCalendarWidgetPrivate; 0025 0026 class UpcomingEventsCalendarWidget : public QGraphicsProxyWidget 0027 { 0028 Q_OBJECT 0029 Q_PROPERTY( LastFmEvent::List events READ events ) 0030 Q_PROPERTY( QAction* todayAction READ todayAction ) 0031 0032 public: 0033 explicit UpcomingEventsCalendarWidget( QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = 0 ); 0034 ~UpcomingEventsCalendarWidget(); 0035 0036 void clear(); 0037 LastFmEvent::List events() const; 0038 QAction *todayAction(); 0039 0040 public Q_SLOTS: 0041 void addEvent( const LastFmEventPtr &event ); 0042 void addEvents( const LastFmEvent::List &events ); 0043 0044 private: 0045 UpcomingEventsCalendarWidgetPrivate *const d_ptr; 0046 Q_DECLARE_PRIVATE( UpcomingEventsCalendarWidget ) 0047 Q_DISABLE_COPY( UpcomingEventsCalendarWidget ) 0048 0049 Q_PRIVATE_SLOT( d_ptr, void _paletteChanged(QPalette) ) 0050 Q_PRIVATE_SLOT( d_ptr, void _jumpToToday() ) 0051 Q_PRIVATE_SLOT( d_ptr, void _updateToday() ) 0052 }; 0053 0054 #endif /* AMAROK_UPCOMINGEVENTSCALENDARWIDGET_H */