Diffstat (limited to 'noncore/net/opieirc/ircchannellist.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircchannellist.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/opieirc/ircchannellist.cpp b/noncore/net/opieirc/ircchannellist.cpp index 8cf144e..3982f30 100644 --- a/noncore/net/opieirc/ircchannellist.cpp +++ b/noncore/net/opieirc/ircchannellist.cpp | |||
@@ -1,61 +1,61 @@ | |||
1 | #include <qpe/resource.h> | 1 | #include <opie2/oresource.h> |
2 | 2 | ||
3 | #include "ircchannellist.h" | 3 | #include "ircchannellist.h" |
4 | #include "ircchannelperson.h" | 4 | #include "ircchannelperson.h" |
5 | 5 | ||
6 | IRCChannelList::IRCChannelList(IRCChannel *channel, QWidget *parent, const char *name, WFlags f) : QListBox(parent, name, f) { | 6 | IRCChannelList::IRCChannelList(IRCChannel *channel, QWidget *parent, const char *name, WFlags f) : QListBox(parent, name, f) { |
7 | m_channel = channel; | 7 | m_channel = channel; |
8 | } | 8 | } |
9 | 9 | ||
10 | void IRCChannelList::update() { | 10 | void IRCChannelList::update() { |
11 | QPixmap op = Resource::loadPixmap("opieirc/op"); | 11 | QPixmap op = Opie::Core::OResource::loadPixmap( "opieirc/op" ); |
12 | QPixmap hop = Resource::loadPixmap("opieirc/hop"); | 12 | QPixmap hop = Opie::Core::OResource::loadPixmap( "opieirc/hop" ); |
13 | QPixmap voice = Resource::loadPixmap("opieirc/voice"); | 13 | QPixmap voice = Opie::Core::OResource::loadPixmap( "opieirc/voice" ); |
14 | QListIterator<IRCChannelPerson> it = m_channel->people(); | 14 | QListIterator<IRCChannelPerson> it = m_channel->people(); |
15 | clear(); | 15 | clear(); |
16 | for (; it.current(); ++it) { | 16 | for (; it.current(); ++it) { |
17 | IRCChannelPerson *person = it.current(); | 17 | IRCChannelPerson *person = it.current(); |
18 | if (person->flags() & IRCChannelPerson::PERSON_FLAG_OP) { | 18 | if (person->flags() & IRCChannelPerson::PERSON_FLAG_OP) { |
19 | insertItem(op, "1" + person->nick()); | 19 | insertItem(op, "1" + person->nick()); |
20 | } else if (person->flags() & IRCChannelPerson::PERSON_FLAG_HALFOP) { | 20 | } else if (person->flags() & IRCChannelPerson::PERSON_FLAG_HALFOP) { |
21 | insertItem(op, "2" + person->nick()); | 21 | insertItem(op, "2" + person->nick()); |
22 | } else if (person->flags() & IRCChannelPerson::PERSON_FLAG_VOICE) { | 22 | } else if (person->flags() & IRCChannelPerson::PERSON_FLAG_VOICE) { |
23 | insertItem(voice, "3" + person->nick()); | 23 | insertItem(voice, "3" + person->nick()); |
24 | } else { | 24 | } else { |
25 | insertItem("4" + person->nick()); | 25 | insertItem("4" + person->nick()); |
26 | } | 26 | } |
27 | } | 27 | } |
28 | sort(); | 28 | sort(); |
29 | adjustNicks(); | 29 | adjustNicks(); |
30 | } | 30 | } |
31 | 31 | ||
32 | 32 | ||
33 | bool IRCChannelList::hasPerson(QString nick) { | 33 | bool IRCChannelList::hasPerson(QString nick) { |
34 | for (unsigned int i=0; i<count(); i++) { | 34 | for (unsigned int i=0; i<count(); i++) { |
35 | if (text(i) == nick) | 35 | if (text(i) == nick) |
36 | return TRUE; | 36 | return TRUE; |
37 | } | 37 | } |
38 | return FALSE; | 38 | return FALSE; |
39 | } | 39 | } |
40 | 40 | ||
41 | bool IRCChannelList::removePerson(QString nick) { | 41 | bool IRCChannelList::removePerson(QString nick) { |
42 | for (unsigned int i=0; i<count(); i++) { | 42 | for (unsigned int i=0; i<count(); i++) { |
43 | if (text(i) == nick){ | 43 | if (text(i) == nick){ |
44 | removeItem(i); | 44 | removeItem(i); |
45 | return TRUE; | 45 | return TRUE; |
46 | } | 46 | } |
47 | } | 47 | } |
48 | return FALSE; | 48 | return FALSE; |
49 | } | 49 | } |
50 | 50 | ||
51 | void IRCChannelList::adjustNicks() { | 51 | void IRCChannelList::adjustNicks() { |
52 | QString txt; | 52 | QString txt; |
53 | QPixmap pm; | 53 | QPixmap pm; |
54 | 54 | ||
55 | for(unsigned int i=0; i<count(); i++) { | 55 | for(unsigned int i=0; i<count(); i++) { |
56 | txt = text(i).remove(0,1); | 56 | txt = text(i).remove(0,1); |
57 | if(pixmap(i)) { | 57 | if(pixmap(i)) { |
58 | pm = *pixmap(i); | 58 | pm = *pixmap(i); |
59 | removeItem(i); | 59 | removeItem(i); |
60 | insertItem(pm, txt, i); | 60 | insertItem(pm, txt, i); |
61 | } | 61 | } |