summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/playlistselection.cpp
Unidiff
Diffstat (limited to 'core/apps/embeddedkonsole/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/playlistselection.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/apps/embeddedkonsole/playlistselection.cpp b/core/apps/embeddedkonsole/playlistselection.cpp
index fc5330f..096d36a 100644
--- a/core/apps/embeddedkonsole/playlistselection.cpp
+++ b/core/apps/embeddedkonsole/playlistselection.cpp
@@ -8,32 +8,35 @@
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include <qheader.h>
21 20
22#include "playlistselection.h" 21#include "playlistselection.h"
23 22
24#include <stdlib.h> 23/* OPIE */
25 24#include <opie2/odebug.h>
26 25
26/* Qt */
27#include <qheader.h>
27 28
29/* STD */
30#include <stdlib.h>
28 31
29 32
30PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) 33PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
31 : QListView( parent, name ) 34 : QListView( parent, name )
32{ 35{
33 setAllColumnsShowFocus( TRUE ); 36 setAllColumnsShowFocus( TRUE );
34 addColumn( tr( "Command Selection" ) ); 37 addColumn( tr( "Command Selection" ) );
35 header()->hide(); 38 header()->hide();
36 setSorting( -1, FALSE ); 39 setSorting( -1, FALSE );
37} 40}
38 41
39 42
@@ -72,25 +75,25 @@ PlayListSelectionItem *item = new PlayListSelectionItem( this, new QString( lnk-
72} 75}
73 76
74void PlayListSelection::addStringToSelection (const QString & lnk) { 77void PlayListSelection::addStringToSelection (const QString & lnk) {
75 PlayListSelectionItem *item = new PlayListSelectionItem( this, new QString( lnk ) ); 78 PlayListSelectionItem *item = new PlayListSelectionItem( this, new QString( lnk ) );
76 QListViewItem *current = selectedItem(); 79 QListViewItem *current = selectedItem();
77 if ( current ) 80 if ( current )
78 item->moveItem( current ); 81 item->moveItem( current );
79 setSelected( item, TRUE ); 82 setSelected( item, TRUE );
80 ensureItemVisible( selectedItem() ); 83 ensureItemVisible( selectedItem() );
81 84
82} 85}
83void PlayListSelection::removeSelected() { 86void PlayListSelection::removeSelected() {
84 qDebug("removeSelected()"); 87 odebug << "removeSelected()" << oendl;
85 QListViewItem *item = selectedItem(); 88 QListViewItem *item = selectedItem();
86 if ( item ) 89 if ( item )
87 delete item; 90 delete item;
88 setSelected( currentItem(), TRUE ); 91 setSelected( currentItem(), TRUE );
89 ensureItemVisible( selectedItem() ); 92 ensureItemVisible( selectedItem() );
90} 93}
91 94
92 95
93void PlayListSelection::moveSelectedUp() { 96void PlayListSelection::moveSelectedUp() {
94 QListViewItem *item = selectedItem(); 97 QListViewItem *item = selectedItem();
95 if ( item && item->itemAbove() ) 98 if ( item && item->itemAbove() )
96 item->itemAbove()->moveItem( item ); 99 item->itemAbove()->moveItem( item );