Beispiel #1
0
void BookmarksProtocol::echoFolder( const KBookmarkGroup &folder )
{
  if (sizeOfGroup(folder.toGroup(), true) > 1)
  {
    QString descriptionAsTitle = folder.description();
    if (!descriptionAsTitle.isEmpty())
      descriptionAsTitle.prepend(QLatin1String("\" title=\""));

    if (folder.parentGroup() == tree)
    {
      if (config.readEntry("ShowBackgrounds", true))
        echo("<ul style=\"background-image: url(/background/" + folder.icon() + ")\">");
      else
        echo("<ul>");

      echo ("<li class=\"title" + descriptionAsTitle + "\">" + folder.fullText() + "</li>");
    }
    else
    {
      echo("<ul>");
      echo ("<li class=\"title" + descriptionAsTitle + "\"><img src=\"/icon/" + folder.icon() + "\"/>" + folder.text() + "</li>");
    }
    indent++;

    for (KBookmark bm = folder.first(); !bm.isNull(); bm = folder.next(bm))
    {
      if (bm.isGroup())
        echoFolder(bm.toGroup());
      else if (bm.isSeparator())
        echoSeparator();
      else
        echoBookmark(bm);
    }

    indent--;
    echo("</ul>");
  }
}
Beispiel #2
0
void HTMLExporter::visitEnter(const KBookmarkGroup &grp) {
    // //qDebug() << "visitEnter(" << grp.text() << ")";
    m_out << "<b>" << grp.fullText() << "</b><br>" << endl;
    m_out << "<div style=\"margin-left: 2em\">"<< endl;
}