author | llornkcor <llornkcor> | 2002-02-24 21:51:51 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-02-24 21:51:51 (UTC) |
commit | 36b768c465c6ecddceb57ff1d7a5087e9848c897 (patch) (unidiff) | |
tree | 4ddde589e2393ca136e24cda4fc456612149ae72 /core/multimedia/opieplayer/playlistselection.cpp | |
parent | ade25ac278169f0e0c9ee0771e754adb46cf7ce2 (diff) | |
download | opie-36b768c465c6ecddceb57ff1d7a5087e9848c897.zip opie-36b768c465c6ecddceb57ff1d7a5087e9848c897.tar.gz opie-36b768c465c6ecddceb57ff1d7a5087e9848c897.tar.bz2 |
changed mediaplayerplugininterface.h location
Diffstat (limited to 'core/multimedia/opieplayer/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index fbfb946..f17ab6f 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp | |||
@@ -35,6 +35,6 @@ class PlayListSelectionItem : public QListViewItem { | |||
35 | public: | 35 | public: |
36 | PlayListSelectionItem( QListView *parent, const DocLnk *f ) : QListViewItem( parent ), fl( f ) { | 36 | PlayListSelectionItem( QListView *parent, const DocLnk *f ) : QListViewItem( parent ), fl( f ) { |
37 | setText( 0, f->name() ); | 37 | setText( 0, f->name() ); |
38 | setPixmap( 0, f->pixmap() ); | 38 | setPixmap( 0, f->pixmap() ); |
39 | } | 39 | } |
40 | 40 | ||
@@ -72,5 +72,5 @@ void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { | |||
72 | QImage logo = Resource::loadImage( "mpegplayer/background" ); | 72 | QImage logo = Resource::loadImage( "mpegplayer/background" ); |
73 | if ( !logo.isNull() ) | 73 | if ( !logo.isNull() ) |
74 | p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); | 74 | p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); |
75 | } | 75 | } |
76 | #endif | 76 | #endif |
@@ -79,10 +79,10 @@ void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { | |||
79 | void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { | 79 | void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { |
80 | if ( event->state() == QMouseEvent::LeftButton ) { | 80 | if ( event->state() == QMouseEvent::LeftButton ) { |
81 | QListViewItem *currentItem = selectedItem(); | 81 | QListViewItem *currentItem = selectedItem(); |
82 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); | 82 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); |
83 | if ( currentItem && currentItem->itemAbove() == itemUnder ) | 83 | if ( currentItem && currentItem->itemAbove() == itemUnder ) |
84 | moveSelectedUp(); | 84 | moveSelectedUp(); |
85 | else if ( currentItem && currentItem->itemBelow() == itemUnder ) | 85 | else if ( currentItem && currentItem->itemBelow() == itemUnder ) |
86 | moveSelectedDown(); | 86 | moveSelectedDown(); |
87 | } | 87 | } |
88 | } | 88 | } |
@@ -92,5 +92,5 @@ const DocLnk *PlayListSelection::current() { | |||
92 | PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem(); | 92 | PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem(); |
93 | if ( item ) | 93 | if ( item ) |
94 | return item->file(); | 94 | return item->file(); |
95 | return NULL; | 95 | return NULL; |
96 | } | 96 | } |
@@ -98,5 +98,5 @@ const DocLnk *PlayListSelection::current() { | |||
98 | 98 | ||
99 | void PlayListSelection::addToSelection( const DocLnk &lnk ) { | 99 | void PlayListSelection::addToSelection( const DocLnk &lnk ) { |
100 | PlayListSelectionItem *item = new PlayListSelectionItem( this, new DocLnk( lnk ) ); | 100 | PlayListSelectionItem *item = new PlayListSelectionItem( this, new DocLnk( lnk ) ); |
101 | QListViewItem *current = selectedItem(); | 101 | QListViewItem *current = selectedItem(); |
102 | if ( current ) | 102 | if ( current ) |
@@ -110,5 +110,5 @@ void PlayListSelection::removeSelected() { | |||
110 | QListViewItem *item = selectedItem(); | 110 | QListViewItem *item = selectedItem(); |
111 | if ( item ) | 111 | if ( item ) |
112 | delete item; | 112 | delete item; |
113 | setSelected( currentItem(), TRUE ); | 113 | setSelected( currentItem(), TRUE ); |
114 | ensureItemVisible( selectedItem() ); | 114 | ensureItemVisible( selectedItem() ); |
@@ -119,5 +119,5 @@ void PlayListSelection::moveSelectedUp() { | |||
119 | QListViewItem *item = selectedItem(); | 119 | QListViewItem *item = selectedItem(); |
120 | if ( item && item->itemAbove() ) | 120 | if ( item && item->itemAbove() ) |
121 | item->itemAbove()->moveItem( item ); | 121 | item->itemAbove()->moveItem( item ); |
122 | ensureItemVisible( selectedItem() ); | 122 | ensureItemVisible( selectedItem() ); |
123 | } | 123 | } |
@@ -137,5 +137,5 @@ bool PlayListSelection::prev() { | |||
137 | setSelected( item->itemAbove(), TRUE ); | 137 | setSelected( item->itemAbove(), TRUE ); |
138 | else | 138 | else |
139 | return FALSE; | 139 | return FALSE; |
140 | ensureItemVisible( selectedItem() ); | 140 | ensureItemVisible( selectedItem() ); |
141 | return TRUE; | 141 | return TRUE; |
@@ -148,5 +148,5 @@ bool PlayListSelection::next() { | |||
148 | setSelected( item->itemBelow(), TRUE ); | 148 | setSelected( item->itemBelow(), TRUE ); |
149 | else | 149 | else |
150 | return FALSE; | 150 | return FALSE; |
151 | ensureItemVisible( selectedItem() ); | 151 | ensureItemVisible( selectedItem() ); |
152 | return TRUE; | 152 | return TRUE; |
@@ -159,5 +159,5 @@ bool PlayListSelection::first() { | |||
159 | setSelected( item, TRUE ); | 159 | setSelected( item, TRUE ); |
160 | else | 160 | else |
161 | return FALSE; | 161 | return FALSE; |
162 | ensureItemVisible( selectedItem() ); | 162 | ensureItemVisible( selectedItem() ); |
163 | return TRUE; | 163 | return TRUE; |
@@ -169,9 +169,9 @@ bool PlayListSelection::last() { | |||
169 | QListViewItem *item = firstChild(); | 169 | QListViewItem *item = firstChild(); |
170 | while ( ( item = item->nextSibling() ) ) | 170 | while ( ( item = item->nextSibling() ) ) |
171 | prevItem = item; | 171 | prevItem = item; |
172 | if ( prevItem ) | 172 | if ( prevItem ) |
173 | setSelected( prevItem, TRUE ); | 173 | setSelected( prevItem, TRUE ); |
174 | else | 174 | else |
175 | return FALSE; | 175 | return FALSE; |
176 | ensureItemVisible( selectedItem() ); | 176 | ensureItemVisible( selectedItem() ); |
177 | return TRUE; | 177 | return TRUE; |