PublishDialog::PublishDialog( QWidget *parent ) : KDialog( parent ) { setCaption( i18n( "Select Addresses" ) ); setButtons( Ok|Cancel|Help ); setHelp( "group-scheduling", "korganizer" ); QWidget *widget = new QWidget( this ); widget->setObjectName( "PublishFreeBusy" ); mUI.setupUi( widget ); setMainWidget( widget ); mUI.mListWidget->setSelectionMode( QAbstractItemView::SingleSelection ); mUI.mNameLineEdit->setEnabled( false ); mUI.mEmailLineEdit->setEnabled( false ); setButtonToolTip( Ok, i18n( "Send email to these recipients" ) ); setButtonWhatsThis( Ok, i18n( "Clicking the <b>Ok</b> button will cause " "an email to be sent to the recipients you " "have entered." ) ); setButtonToolTip( Cancel, i18n( "Cancel recipient selection and the email" ) ); setButtonWhatsThis( Cancel, i18n( "Clicking the <b>Cancel</b> button will " "cause the email operation to be terminated." ) ); setButtonWhatsThis( Help, i18n( "Click the <b>Help</b> button to read " "more information about Group Scheduling." ) ); mUI.mNew->setIcon( KIcon( "list-add" ) ); mUI.mRemove->setIcon( KIcon( "list-remove" ) ); mUI.mRemove->setEnabled( false ); mUI.mSelectAddressee->setIcon( KIcon( "view-pim-contacts" ) ); connect( mUI.mListWidget, SIGNAL(itemSelectionChanged()), SLOT(updateInput()) ); connect( mUI.mNew, SIGNAL(clicked()), SLOT(addItem()) ); connect( mUI.mRemove, SIGNAL(clicked()), SLOT(removeItem()) ); connect( mUI.mSelectAddressee, SIGNAL(clicked()), SLOT(openAddressbook()) ); connect( mUI.mNameLineEdit, SIGNAL(textChanged(const QString &)), SLOT(updateItem()) ); connect( mUI.mEmailLineEdit, SIGNAL(textChanged(const QString &)), SLOT(updateItem()) ); }
PublishDialog::PublishDialog(QWidget *parent, const char *name, bool modal) : KDialogBase(parent, name, modal, i18n("Select Addresses"), Ok | Cancel | Help, Ok, true) { mWidget = new PublishDialog_base(this, "PublishFreeBusy"); setMainWidget(mWidget); mWidget->mNameLineEdit->setEnabled(false); mWidget->mEmailLineEdit->setEnabled(false); connect(mWidget->mAddressListView, SIGNAL(selectionChanged(QListViewItem *)), SLOT(updateInput())); connect(mWidget->mNew, SIGNAL(clicked()), SLOT(addItem())); connect(mWidget->mRemove, SIGNAL(clicked()), SLOT(removeItem())); connect(mWidget->mSelectAddressee, SIGNAL(clicked()), SLOT(openAddressbook())); connect(mWidget->mNameLineEdit, SIGNAL(textChanged(const QString &)), SLOT(updateItem())); connect(mWidget->mEmailLineEdit, SIGNAL(textChanged(const QString &)), SLOT(updateItem())); }