Diffstat (limited to 'core/apps/embeddedkonsole/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/playlistselection.cpp | 11 |
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 | |||
@@ -4,40 +4,43 @@ | |||
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
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 | ||
30 | PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) | 33 | PlayListSelection::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 | ||
40 | PlayListSelection::~PlayListSelection() { | 43 | PlayListSelection::~PlayListSelection() { |
41 | } | 44 | } |
42 | 45 | ||
43 | 46 | ||
@@ -68,33 +71,33 @@ PlayListSelectionItem *item = new PlayListSelectionItem( this, new QString( lnk- | |||
68 | if ( current ) | 71 | if ( current ) |
69 | item->moveItem( current ); | 72 | item->moveItem( current ); |
70 | setSelected( item, TRUE ); | 73 | setSelected( item, TRUE ); |
71 | ensureItemVisible( selectedItem() ); | 74 | ensureItemVisible( selectedItem() ); |
72 | } | 75 | } |
73 | 76 | ||
74 | void PlayListSelection::addStringToSelection (const QString & lnk) { | 77 | void 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 | } |
83 | void PlayListSelection::removeSelected() { | 86 | void 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 | ||
93 | void PlayListSelection::moveSelectedUp() { | 96 | void 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 ); |
97 | ensureItemVisible( selectedItem() ); | 100 | ensureItemVisible( selectedItem() ); |
98 | } | 101 | } |
99 | 102 | ||
100 | 103 | ||