summaryrefslogtreecommitdiffabout
path: root/kmicromail/nntpgroups.cpp
Unidiff
Diffstat (limited to 'kmicromail/nntpgroups.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/nntpgroups.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/kmicromail/nntpgroups.cpp b/kmicromail/nntpgroups.cpp
index c729f79..d2213d4 100644
--- a/kmicromail/nntpgroups.cpp
+++ b/kmicromail/nntpgroups.cpp
@@ -1,62 +1,62 @@
1#include "nntpgroups.h" 1#include "nntpgroups.h"
2 2
3#include <libmailwrapper/settings.h> 3#include <libmailwrapper/settings.h>
4#include <qlistview.h> 4#include <q3listview.h>
5#include <qlineedit.h> 5#include <qlineedit.h>
6 6
7using namespace Opie::Core; 7using namespace Opie::Core;
8 8
9NNTPGroups::NNTPGroups(NNTPaccount *account, QWidget* parent, const char* name, WFlags fl) 9NNTPGroups::NNTPGroups(NNTPaccount *account, QWidget* parent, const char* name, Qt::WFlags fl)
10 : NNTPGroupsUI(parent,name,fl),subscribedGroups() 10 : NNTPGroupsUI(parent,name,fl),subscribedGroups()
11{ 11{
12 m_Account = account; 12 m_Account = account;
13 fillGroups(); 13 fillGroups();
14} 14}
15 15
16NNTPGroups::~NNTPGroups() 16NNTPGroups::~NNTPGroups()
17{ 17{
18 18
19} 19}
20 20
21void NNTPGroups::slotGetNG() 21void NNTPGroups::slotGetNG()
22{ 22{
23 if (!m_Account) return; 23 if (!m_Account) return;
24 GroupListView->clear(); 24 GroupListView->clear();
25 NNTPwrapper tmp( m_Account ); 25 NNTPwrapper tmp( m_Account );
26 QString filter = Groupfilteredit->text(); 26 QString filter = Groupfilteredit->text();
27 QStringList list = tmp.listAllNewsgroups(filter); 27 QStringList list = tmp.listAllNewsgroups(filter);
28 subscribedGroupsNotListed = subscribedGroups; 28 subscribedGroupsNotListed = subscribedGroups;
29 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { 29 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
30 QCheckListItem *item; 30 Q3CheckListItem *item;
31 item = new QCheckListItem( GroupListView, (*it), QCheckListItem::CheckBox ); 31 item = new Q3CheckListItem( GroupListView, (*it), Q3CheckListItem::CheckBox );
32 if ( subscribedGroups.contains( (*it) ) >= 1 ) { 32 if ( subscribedGroups.contains( (*it) ) >= 1 ) {
33 item->setOn( true ); 33 item->setOn( true );
34 subscribedGroupsNotListed.remove((*it)); 34 subscribedGroupsNotListed.remove((*it));
35 } 35 }
36 } 36 }
37} 37}
38 38
39void NNTPGroups::fillGroups() 39void NNTPGroups::fillGroups()
40{ 40{
41 if (!m_Account) return; 41 if (!m_Account) return;
42 subscribedGroups = m_Account->getGroups(); 42 subscribedGroups = m_Account->getGroups();
43 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { 43 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) {
44 QCheckListItem *item; 44 Q3CheckListItem *item;
45 item = new QCheckListItem( GroupListView, (*it), QCheckListItem::CheckBox ); 45 item = new Q3CheckListItem( GroupListView, (*it), Q3CheckListItem::CheckBox );
46 item->setOn( true ); 46 item->setOn( true );
47 } 47 }
48} 48}
49 49
50void NNTPGroups::storeValues() 50void NNTPGroups::storeValues()
51{ 51{
52 if (!m_Account) return; 52 if (!m_Account) return;
53 QListViewItemIterator list_it( GroupListView ); 53 Q3ListViewItemIterator list_it( GroupListView );
54 subscribedGroups.clear(); 54 subscribedGroups.clear();
55 for ( ; list_it.current(); ++list_it ) { 55 for ( ; list_it.current(); ++list_it ) {
56 if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { 56 if ( ( (Q3CheckListItem*)list_it.current() )->isOn() ) {
57 subscribedGroups.append( list_it.current()->text(0) ); 57 subscribedGroups.append( list_it.current()->text(0) );
58 } 58 }
59 } 59 }
60 subscribedGroups+=subscribedGroupsNotListed; 60 subscribedGroups+=subscribedGroupsNotListed;
61 m_Account->setGroups( subscribedGroups ); 61 m_Account->setGroups( subscribedGroups );
62} 62}