Logo Search packages:      
Sourcecode: lemonpos-kde4 version File versions  Download package

void lemon::populateStyleList (  )  [protected]

Method used to populate available styles in the configuration list...

Definition at line 437 of file lemon.cpp.

Referenced by optionsPreferences().

{
  QString path = KStandardDirs::locate("appdata", "styles/");
  QDir dir(path);
  dir.setFilter(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot);
  dir.setSorting(QDir::Name | QDir::LocaleAware);
  QFileInfoList list = dir.entryInfoList();
  for (int i = 0; i < list.size(); ++i) {
    QFileInfo fileInfo = list.at(i);
    ui_pref_style.styleList->addItem(fileInfo.fileName());
  }
  //Select the style used...
  QList<QListWidgetItem *> itemLfound = ui_pref_style.styleList->findItems(Settings::styleName(), Qt::MatchExactly);
  if (itemLfound.count() == 1) {
    QListWidgetItem *item = itemLfound.first();
    ui_pref_style.styleList->setCurrentItem(item);
  }
}


Generated by  Doxygen 1.6.0   Back to index