KNGroupSelectDialog::KNGroupSelectDialog(QWidget *parent, KNNntpAccount *a, const QString &act) : KNGroupBrowser(parent, i18n("Select Destinations"), a) { selView=new QListView(page); selView->addColumn(QString::null); selView->header()->hide(); listL->addWidget(selView, 1,2); rightLabel->setText(i18n("Groups for this article:")); subCB->setChecked(true); KNGroupInfo info; QStringList actGroups = QStringList::split(',',act); for ( QStringList::Iterator it = actGroups.begin(); it != actGroups.end(); ++it ) { info.name = *it; new GroupItem(selView, info); } connect(selView, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotItemSelected(QListViewItem*))); connect(groupView, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotItemSelected(QListViewItem*))); connect(groupView, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); connect(arrowBtn1, SIGNAL(clicked()), this, SLOT(slotArrowBtn1())); connect(arrowBtn2, SIGNAL(clicked()), this, SLOT(slotArrowBtn2())); KNHelper::restoreWindowSize("groupSelDlg", this, QSize(659,364)); // optimized for 800x600 }
KNGroupDialog::KNGroupDialog( QWidget *parent, KNNntpAccount::Ptr a ) : KNGroupBrowser(parent, i18n("Subscribe to Newsgroups"),a, User1 | User2, true, i18n("New &List"), i18n("New &Groups...") ) { rightLabel->setText(i18n("Current changes:")); subView=new Q3ListView(page); subView->addColumn(i18n("Subscribe To")); unsubView=new Q3ListView(page); unsubView->addColumn(i18n("Unsubscribe From")); QVBoxLayout *protL=new QVBoxLayout(); protL->setSpacing(3); listL->addLayout(protL, 1,2); protL->addWidget(subView); protL->addWidget(unsubView); dir1=right; dir2=left; connect(groupView, SIGNAL(selectionChanged(Q3ListViewItem*)), this, SLOT(slotItemSelected(Q3ListViewItem*))); connect(groupView, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); connect(subView, SIGNAL(selectionChanged(Q3ListViewItem*)), this, SLOT(slotItemSelected(Q3ListViewItem*))); connect(unsubView, SIGNAL(selectionChanged(Q3ListViewItem*)), this, SLOT(slotItemSelected(Q3ListViewItem*))); connect(arrowBtn1, SIGNAL(clicked()), this, SLOT(slotArrowBtn1())); connect(arrowBtn2, SIGNAL(clicked()), this, SLOT(slotArrowBtn2())); connect( this, SIGNAL(user1Clicked()), SLOT(slotUser1()) ); connect( this, SIGNAL(user2Clicked()), SLOT(slotUser2()) ); KNHelper::restoreWindowSize("groupDlg", this, QSize(662,393)); // optimized for 800x600 setHelp("anc-fetch-group-list"); }