Logo Search packages:      
Sourcecode: kallery version File versions  Download package

void HtmlOptionsPage::setupPage (  )  [virtual]

Setup this page, because the user will see it just in a moment.

Implements WizardPageBase.

Definition at line 195 of file htmloptionspage.cpp.

References OptionType::galleryTemplate, galleryTemplateList, OptionType::language, loadCountryList(), KalleryGlobals::options, and KalleryGlobals::ref().

{
//FIXME: This should load the list of languages, and not the list of countries!!
  loadCountryList(GalleryLanguageCombo);
  for (int i = 0; i < GalleryLanguageCombo->count(); i++)
  {
    GalleryLanguageCombo->setCurrentItem(i);
    if (GalleryLanguageCombo->currentText() == KalleryGlobals::ref()->options.language)
    {
      break;
    }
  }

  GalleryTemplateCombo->clear();
  for (uint i = 0; i < galleryTemplateList.count(); i++)
  {
    GalleryTemplateCombo->insertItem(galleryTemplateList[i].mid(galleryTemplateList[i].find('|')+1));
  }

  for (int i = GalleryTemplateCombo->count() -1; i >=0; i--)
  {
    GalleryTemplateCombo->setCurrentItem(i);
    if (GalleryTemplateCombo->currentText() == KalleryGlobals::ref()->options.galleryTemplate)
    {
      break;
    }
  }

  QStringList encodings(KGlobal::charsets()->availableEncodingNames());
  int pos = 0;
  for (uint i=0; i < encodings.count(); i++)
  {
    EncodingCombo->insertItem(encodings[i]);
    if (encodings[i] == KalleryGlobals::ref()->options.encoding)
      pos = i;
  }
  EncodingCombo->setCurrentItem(pos);
  PageTitleEdit->setText(KalleryGlobals::ref()->options.galleryTitle);
  ColumnNumSpinBox->setValue(KalleryGlobals::ref()->options.columnNum);
  TableColorFrame->setBackgroundColor(KalleryGlobals::ref()->options.tableColor);
  BackColorFrame->setBackgroundColor(KalleryGlobals::ref()->options.backColor);
  TextColorFrame->setBackgroundColor(KalleryGlobals::ref()->options.textColor);
  VisitedColorFrame->setBackgroundColor(KalleryGlobals::ref()->options.visitedColor);

  if (KalleryGlobals::ref()->options.galleryCSSFile.isEmpty())
  {
    UseGalleryCSS->setChecked(false);
  }
  else
  {
    UseGalleryCSS->setChecked(true);
    OwnGalleryCSSName->setText(KalleryGlobals::ref()->options.galleryCSSFile);
  }

  BeforeHtmlEdit->setText(KalleryGlobals::ref()->options.beforeHtmlFile);
  AfterHtmlEdit->setText(KalleryGlobals::ref()->options.afterHtmlFile);
}


Generated by  Doxygen 1.6.0   Back to index