rem: connect( mainWidget, SIGNAL(modifiedToolBarConfig()), this, SLOT(slotToolbarChanged()) );
context:   mParentWidget( parentWidget ){  kdDebug(5006) << "KMailPart()" << endl;  kdDebug(5006) << "  InstanceName: " << kapp->instanceName() << endl;  setInstance(KMailFactory::instance());  kdDebug(5006) << "KMailPart()..." << endl;  kdDebug(5006) << "  InstanceName: " << kapp->instanceName() << endl;  // import i18n data and icons from libraries:  KMail::insertLibraryCataloguesAndIcons();  // Make sure that the KNotify Daemon is running (this is necessary for people  // using KMail without KDE)  KNotifyClient::startDaemon();  KMail::lockOrDie();  kapp->dcopClient()->suspend(); // Don't handle DCOP requests yet  //local, do the init  KMKernel *kmailKernel = new KMKernel();  kmailKernel->init();  kmailKernel->setXmlGuiInstance( KMailFactory::instance() );  // and session management  kmailKernel->doSessionManagement();  // any dead letters?  kmailKernel->recoverDeadLetters();  kmsetSignalHandler(kmsignalHandler);  kapp->dcopClient()->resume(); // Ok. We are ready for DCOP requests.  // create a canvas to insert our widget  QWidget *canvas = new QWidget(parentWidget, widgetName);  canvas->setFocusPolicy(QWidget::ClickFocus);  setWidget(canvas);  KGlobal::iconLoader()->addAppDir("kmail");#if 0  //It's also possible to make a part out of a readerWin  KMReaderWin *mReaderWin = new KMReaderWin( canvas, canvas, actionCollection() );  connect(mReaderWin, SIGNAL(urlClicked(const KURL&,int)),	  mReaderWin, SLOT(slotUrlClicked()));  QVBoxLayout *topLayout = new QVBoxLayout(canvas);  topLayout->addWidget(mReaderWin);  mReaderWin->setAutoDelete( true );  kmkernel->inboxFolder()->open();  KMMessage *msg = kmkernel->inboxFolder()->getMsg(0);  mReaderWin->setMsg( msg, true );  mReaderWin->setFocusPolicy(QWidget::ClickFocus);  m_extension = new KMailBrowserExtension(this);  mStatusBar  = new KMailStatusBarExtension(this);  //new KParts::SideBarExtension( kmkernel->mainWin()-mainKMWidget()->leftFrame(), this );  KGlobal::iconLoader()->addAppDir("kmail");  setXMLFile( "kmmainwin.rc" );  kmkernel->inboxFolder()->close();#else  mainWidget = new KMMainWidget( canvas, "mainWidget", this, actionCollection(),                                 kapp->config());  QVBoxLayout *topLayout = new QVBoxLayout(canvas);  topLayout->addWidget(mainWidget);  mainWidget->setFocusPolicy(QWidget::ClickFocus);  m_extension = new KMailBrowserExtension(this);  mStatusBar  = new KMailStatusBarExtension(this);  new KParts::SideBarExtension( mainWidget->folderTree(),                                this,                                "KMailSidebar" );  // Get to know when the user clicked on a folder in the KMail part and update the headerWidget of Kontact  KParts::InfoExtension *ie = new KParts::InfoExtension( this, "KMailInfo" );  connect( mainWidget->folderTree(), SIGNAL(folderSelected(KMFolder*)), this, SLOT(exportFolder(KMFolder*)) );  connect( mainWidget->folderTree(), SIGNAL(iconChanged(KMFolderTreeItem*)),           this, SLOT(slotIconChanged(KMFolderTreeItem*)) );  connect( mainWidget->folderTree(), SIGNAL(nameChanged(KMFolderTreeItem*)),           this, SLOT(slotNameChanged(KMFolderTreeItem*)) );  connect( mainWidget, SIGNAL(modifiedToolBarConfig()),           this, SLOT(slotToolbarChanged()) );  connect( this, SIGNAL(textChanged(const QString&)), ie, SIGNAL(textChanged(const QString&)) );  connect( this, SIGNAL(iconChanged(const QPixmap&)), ie, SIGNAL(iconChanged(const QPixmap&)) );  KGlobal::iconLoader()->addAppDir( "kmail" );  setXMLFile( "kmmainwin.rc" );#endif}