#include "qt4.hpp"
#include "util/singleton.hpp"
-#include "util/uniqueevent.hpp"
#include "variables.hpp"
#include <QObject>
REPEAT_ALL,/* loop: 1, repeat: 0 */
};
-class IMEvent : public UniqueEvent
+class IMEvent : public QEvent
{
public:
enum event_types {
FullscreenControlHide,
FullscreenControlPlanHide,
};
+
IMEvent( event_types type, input_item_t *p_input = NULL )
- : UniqueEvent( (QEvent::Type)(type) )
+ : QEvent( (QEvent::Type)(type) )
{
if( (p_item = p_input) != NULL )
vlc_gc_incref( p_item );
}
+
virtual ~IMEvent()
{
if( p_item )
vlc_gc_decref( p_item );
}
+
input_item_t *item() const { return p_item; };
- virtual bool equals(UniqueEvent *e) const
- {
- IMEvent *ev = static_cast<IMEvent *>(e);
- return ( ev->item() == p_item && ev->type() == type() );
- }
+
private:
input_item_t *p_item;
};
LeafToParent,
PLEmpty
};
+
PLEvent( PLEventTypes t, int i, int p = 0 )
: QEvent( (QEvent::Type)(t) ), i_item(i), i_parent(p) {}
int getItemId() const { return i_item; };
int getParentId() const { return i_parent; };
+
private:
/* Needed for "playlist-item*" and "leaf-to-parent" callbacks
* !! Can be a input_item_t->i_id or a playlist_item_t->i_id */
{
return p_input /* We have an input */
&& !p_input->b_dead /* not dead yet, */
- && !p_input->b_eof /* not EOF either, */
- && vlc_object_alive (p_input); /* and the VLC object is alive */
+ && !p_input->b_eof /* not EOF either */;
}
int playingStatus();
bool hasVideo() { return hasInput() && b_video; }
bool hasVisualisation();
void requestArtUpdate( input_item_t *p_item );
+ void setArt( input_item_t *p_item, QString fileUrl );
QString getName() { return oldName; }
static const QString decodeArtURL( input_item_t *p_item );
- void postUniqueEvent( QObject *, UniqueEvent * );
private:
intf_thread_t *p_intf;
mtime_t timeA, timeB;
void customEvent( QEvent * );
- RateLimitedEventPoster *rateLimitedEventPoster;
void addCallbacks();
void delCallbacks();
{
Q_OBJECT
friend class Singleton<MainInputManager>;
+
public:
input_thread_t *getInput() { return p_input; }
InputManager *getIM() { return im; }
bool hasEmptyPlaylist();
void requestVoutUpdate() { return im->UpdateVout(); }
+
private:
MainInputManager( intf_thread_t * );
virtual ~MainInputManager();
void activatePlayQuit( bool );
void loopRepeatLoopStatus();
+
private slots:
void notifyRandom( bool );
void notifyRepeatLoop( bool );
void notifyVolume( float );
void notifyMute( bool );
+
signals:
void inputChanged( input_thread_t * );
void volumeChanged( float );