void TDMAppearanceWidget::load() { config->setGroup("X-*-Greeter"); // Read the greeting string greetstr_lined->setText(config->readEntry("GreetString", i18n("Welcome to %n"))); // Regular logo or clock TQString logoArea = config->readEntry("LogoArea", "Logo" ); if (logoArea == "Clock") { clockRadio->setChecked(true); slotAreaRadioClicked(KdmClock); } else if (logoArea == "Logo") { logoRadio->setChecked(true); slotAreaRadioClicked(KdmLogo); } else { noneRadio->setChecked(true); slotAreaRadioClicked(KdmNone); } // See if we use alternate logo setLogo(config->readEntry("LogoPixmap")); // Check the current compositor type compositorcombo->setCurrentId(config->readEntry("Compositor")); // Check the GUI type guicombo->setCurrentId(config->readEntry("GUIStyle")); // Check the Color Scheme colcombo->setCurrentId(config->readEntry("ColorScheme")); // Check the echo mode echocombo->setCurrentId(config->readEntry("EchoMode", "OneStar")); TQStringList sl = config->readListEntry( "GreeterPos" ); if (sl.count() != 2) { xLineEdit->setText( "50" ); yLineEdit->setText( "50" ); } else { xLineEdit->setText( sl.first() ); yLineEdit->setText( sl.last() ); } // get the language langcombo->setCurrentItem(config->readEntry("Language", "C")); // See if the SAK is enabled if (!sakwarning) { if (config->hasGroup("X-:*-Greeter")) { config->setGroup("X-:*-Greeter"); } else { config->setGroup("X-*-Greeter"); } sakbox->setChecked(config->readBoolEntry("UseSAK", false)); } else { sakbox->setChecked(false); } }
void KJanusWidget::addPageWidget( TQFrame *page, const TQStringList &items, const TQString &header,const TQPixmap &pixmap ) { connect(page, TQT_SIGNAL(destroyed(TQObject*)), TQT_SLOT(pageGone(TQObject*))); if( mFace == Tabbed ) { mTabControl->addTab (page, items.last()); d->mIntToPage[d->mNextPageIndex] = static_cast<TQWidget*>(page); d->mPageToInt[static_cast<TQWidget*>(page)] = d->mNextPageIndex; d->mNextPageIndex++; } else if( mFace == TreeList || mFace == IconList ) { d->mIntToPage[d->mNextPageIndex] = static_cast<TQWidget*>(page); d->mPageToInt[static_cast<TQWidget*>(page)] = d->mNextPageIndex; mPageStack->addWidget( page, 0 ); if (items.isEmpty()) { kdDebug() << "Invalid TQStringList, with zero items" << endl; return; } if( mFace == TreeList ) { InsertTreeListItem(items, pixmap, page); } else // mFace == IconList { TQString itemName = items.last(); IconListItem *item = new IconListItem( mIconList, pixmap, itemName ); mIconListToPageStack.insert(item, page); mIconList->invalidateHeight(); mIconList->invalidateWidth(); if (mIconList->isVisible()) mIconList->updateWidth(); } // // Make sure the title label is sufficiently wide // TQString lastName = items.last(); const TQString &title = (!header.isNull() ? header : lastName); TQRect r = mTitleLabel->fontMetrics().boundingRect( title ); if( mTitleLabel->minimumWidth() < r.width() ) { mTitleLabel->setMinimumWidth( r.width() ); } d->mIntToTitle[d->mNextPageIndex] = title; if( d->mIntToTitle.count() == 1 ) { showPage(0); } d->mNextPageIndex++; } else { kdDebug() << "KJanusWidget::addPageWidget: can only add a page in Tabbed, TreeList or IconList modes" << endl; } }