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

void HtmlOptionsPage::loadTemplates (  )  [private]

Load gallery templates.

Load list of the avaliable filters.

Definition at line 282 of file htmloptionspage.cpp.

References defaultColumnsList, and galleryTemplateList.

{
  QFile tmpFile;
  QString tmpString;

  galleryTemplateList = KGlobal::dirs()-> findAllResources("data","kallery/templates/gallery/*.template", false, true);

  for (uint i = 0; i < galleryTemplateList.count(); i++)
  {
    tmpFile.setName(galleryTemplateList[i]);
    tmpFile.open(IO_ReadOnly);
    tmpFile.readLine(tmpString,200);
    tmpFile.readLine(tmpString,200);
    tmpString.replace(QRegExp("[<>!\n-]"),"");
    galleryTemplateList[i] = galleryTemplateList[i]+"|"+i18n(tmpString);
    defaultColumnsList.append(-1);
    while (!tmpFile.atEnd())
    {
      tmpFile.readLine(tmpString, 200);
      if (tmpString.contains("COLUMNS="))
      {
        tmpString.remove("COLUMNS=");
        defaultColumnsList[i] = tmpString.toInt();
        break;
      }
    }
    tmpFile.close();
  }
}


Generated by  Doxygen 1.6.0   Back to index