~ubuntu-branches/debian/experimental/smplayer/experimental

« back to all changes in this revision

Viewing changes to src/playlistdock.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-01-03 17:08:06 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090103170806-eodntb2slv6g2pb6
Tags: 0.6.6-0ubuntu1
* The "just before FF" release.
* New upstream release.
* debian/control: Bumped Standards-Version to 3.8.0.
* debian/copyright: Changed (C) to © to fix Lintian warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
*/
18
18
 
19
19
#include "playlistdock.h"
 
20
#include <QCloseEvent>
20
21
 
21
22
PlaylistDock::PlaylistDock(QWidget * parent, Qt::WindowFlags flags)
22
23
        : QDockWidget(parent, flags)
23
24
{
24
25
        //setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Expanding );
 
26
        setAcceptDrops(true); // Fix for Qt 4.4, otherwise the playlist doesn't accept drops...
25
27
}
26
28
 
27
29
PlaylistDock::~PlaylistDock() {
28
30
}
29
31
 
30
 
void PlaylistDock::closeEvent( QCloseEvent * /*event*/ ) {
 
32
void PlaylistDock::closeEvent( QCloseEvent * e ) {
31
33
        qDebug("PlaylistDock::closeEvent");
32
34
        emit closed();
 
35
        e->accept();
33
36
}
34
37
 
 
38
#if QT_VERSION < 0x040300
35
39
void PlaylistDock::showEvent( QShowEvent * /* event */ ) {
36
 
        qDebug("PlaylistDock::showEvent: isFloating: %d", isFloating() );
37
 
 
38
 
        if (!isFloating()) {
39
 
                qDebug(" docked");
40
 
                emit docked();
41
 
        }
 
40
        qDebug("PlaylistDock::showEvent");
 
41
        emit visibilityChanged(true);
42
42
}
43
43
 
44
44
void PlaylistDock::hideEvent( QHideEvent * /* event */ ) {
45
 
        qDebug("PlaylistDock::hideEvent: isFloating: %d", isFloating() );
46
 
 
47
 
        if (!isFloating()) {
48
 
                qDebug(" undocked");
49
 
                emit undocked();
50
 
        }
 
45
        qDebug("PlaylistDock::hideEvent");
 
46
        emit visibilityChanged(false);
51
47
}
 
48
#endif
52
49
 
53
50
 
54
51
#include "moc_playlistdock.cpp"