author | ar <ar> | 2004-05-02 16:22:24 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-02 16:22:24 (UTC) |
commit | 34f1234b010fa80f9ca06e65f46130713f7362d9 (patch) (unidiff) | |
tree | 6ded6dcd83ed00b436f312f2403f7afc9f399435 /core/apps/embeddedkonsole/playlistselection.cpp | |
parent | 4e7ab937501b6495ce5635a7515e66a75e04d37e (diff) | |
download | opie-34f1234b010fa80f9ca06e65f46130713f7362d9.zip opie-34f1234b010fa80f9ca06e65f46130713f7362d9.tar.gz opie-34f1234b010fa80f9ca06e65f46130713f7362d9.tar.bz2 |
- convert qDebug to odebug
Diffstat (limited to 'core/apps/embeddedkonsole/playlistselection.cpp') (more/less context) (show 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 | |||
@@ -1,51 +1,54 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
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 | ||
44 | 47 | ||
45 | void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { | 48 | void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { |
46 | if ( event->state() == QMouseEvent::LeftButton ) { | 49 | if ( event->state() == QMouseEvent::LeftButton ) { |
47 | QListViewItem *currentItem = selectedItem(); | 50 | QListViewItem *currentItem = selectedItem(); |
48 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); | 51 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); |
49 | if ( currentItem && currentItem->itemAbove() == itemUnder ) | 52 | if ( currentItem && currentItem->itemAbove() == itemUnder ) |
50 | moveSelectedUp(); | 53 | moveSelectedUp(); |
51 | else if ( currentItem && currentItem->itemBelow() == itemUnder ) | 54 | else if ( currentItem && currentItem->itemBelow() == itemUnder ) |
@@ -60,49 +63,49 @@ const QString *PlayListSelection::current() { | |||
60 | return item->file(); | 63 | return item->file(); |
61 | return NULL; | 64 | return NULL; |
62 | } | 65 | } |
63 | 66 | ||
64 | 67 | ||
65 | void PlayListSelection::addToSelection( QListViewItem *lnk ) { | 68 | void PlayListSelection::addToSelection( QListViewItem *lnk ) { |
66 | PlayListSelectionItem *item = new PlayListSelectionItem( this, new QString( lnk->text(0) ) ); | 69 | PlayListSelectionItem *item = new PlayListSelectionItem( this, new QString( lnk->text(0) ) ); |
67 | QListViewItem *current = selectedItem(); | 70 | QListViewItem *current = selectedItem(); |
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 | ||
101 | void PlayListSelection::moveSelectedDown() { | 104 | void PlayListSelection::moveSelectedDown() { |
102 | QListViewItem *item = selectedItem(); | 105 | QListViewItem *item = selectedItem(); |
103 | if ( item && item->itemBelow() ) | 106 | if ( item && item->itemBelow() ) |
104 | item->moveItem( item->itemBelow() ); | 107 | item->moveItem( item->itemBelow() ); |
105 | ensureItemVisible( selectedItem() ); | 108 | ensureItemVisible( selectedItem() ); |
106 | } | 109 | } |
107 | 110 | ||
108 | 111 | ||