~siretart/vlc/ubuntu

« back to all changes in this revision

Viewing changes to modules/gui/qt4/components/interface_widgets.hpp

  • Committer: Reinhard Tartler
  • Date: 2008-09-26 06:45:40 UTC
  • mto: (21.2.1 vlc-0.9.3)
  • mto: This revision was merged to the branch mainline in revision 23.
  • Revision ID: siretart@tauware.de-20080926064540-0sd8zwmig33ksmy4
Tags: upstream-ubuntu-0.9.3
Import upstream version 0.9.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * interface_widgets.hpp : Custom widgets for the main interface
3
3
 ****************************************************************************
4
4
 * Copyright (C) 2006 the VideoLAN team
5
 
 * $Id: 535ca32d020635cdeba89947d78a6bb32558a5ca $
 
5
 * $Id: 5bfcd1fdd6ba6ab4891b62c572ec85875045361f $
6
6
 *
7
7
 * Authors: Clément Stenac <zorglub@videolan.org>
8
8
 *          Jean-Baptiste Kempf <jb@videolan.org>
252
252
    void attachVout( vout_thread_t *p_vout );
253
253
    void detachVout();
254
254
    void fullscreenChanged( vout_thread_t *, bool b_fs, int i_timeout );
 
255
    vout_thread_t *p_vout;
 
256
 
 
257
    int i_mouse_last_move_x;
 
258
    int i_mouse_last_move_y;
255
259
 
256
260
protected:
257
261
    friend class MainInterface;
291
295
 
292
296
    virtual void customEvent( QEvent *event );
293
297
 
294
 
    vout_thread_t *p_vout;
295
298
 
296
299
    /* Shared variable between FSC and VLC (protected by a lock) */
297
300
    vlc_mutex_t lock;
329
332
class TimeLabel : public QLabel
330
333
{
331
334
    Q_OBJECT
332
 
    void mousePressEvent( QMouseEvent *event )
 
335
public:
 
336
    TimeLabel( intf_thread_t *_p_intf );
 
337
protected:
 
338
    virtual void mousePressEvent( QMouseEvent *event )
333
339
    {
334
 
        emit timeLabelClicked();
 
340
        toggleTimeDisplay();
335
341
    }
336
 
    void mouseDoubleClickEvent( QMouseEvent *event )
 
342
    virtual void mouseDoubleClickEvent( QMouseEvent *event )
337
343
    {
 
344
        toggleTimeDisplay();
338
345
        emit timeLabelDoubleClicked();
339
346
    }
 
347
private slots:
 
348
    void setDisplayPosition( float pos, int time, int length );
 
349
private:
 
350
    intf_thread_t *p_intf;
 
351
    bool b_remainingTime;
 
352
    void toggleTimeDisplay();
340
353
signals:
341
 
    void timeLabelClicked();
342
354
    void timeLabelDoubleClicked();
343
355
};
344
356