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

void DCOptions::setupIconThemeComboBoxes (  )  [private]

Definition at line 2350 of file dcoptions.cpp.

Referenced by InitDocument().

{
      QDir appiconsdir, emoticonsdir, usericonsdir;
      QString basedir;
      
      basedir = g_pConfig->GetValknutDataPath();
      
      ComboBox_APPLICATION_ICONS->clear();
      ComboBox_USERLIST_ICONS->clear();
      ComboBox_EMOTICONS->clear();
      
      appiconsdir.setPath( basedir + "/icons/appl/" );
      appiconsdir.setFilter( QDir::Dirs | QDir::Readable | QDir::Executable );
      appiconsdir.setSorting( QDir::Name );
      
      const QFileInfoList * applist = appiconsdir.entryInfoList();
      if ( applist != 0 )
      {
            QFileInfoListIterator appit( *applist );
            QFileInfo *appfi;
            
            while ( (appfi = appit.current()) != 0 )
            {
                  if ( (appfi->fileName() == ".") || (appfi->fileName() == "..") )
                  {
                        // skip
                  }
                  else
                  {
                        ComboBox_APPLICATION_ICONS->insertItem(appfi->fileName());
                  }
                  ++appit;
            }
      }
      
      emoticonsdir.setPath( basedir + "/icons/emot/" );
      emoticonsdir.setFilter( QDir::Dirs | QDir::Readable | QDir::Executable );
      emoticonsdir.setSorting( QDir::Name );
      
      const QFileInfoList * emotlist = emoticonsdir.entryInfoList();
      if ( emotlist != 0 )
      {
            QFileInfoListIterator emotit ( *emotlist );
            QFileInfo *emotfi;
            
            while ( (emotfi = emotit.current()) != 0 )
            {
                  if ( (emotfi->fileName() == ".") || (emotfi->fileName() == "..") )
                  {
                        // skip
                  }
                  else
                  { 
                        ComboBox_EMOTICONS->insertItem(emotfi->fileName());
                  }
                  ++emotit;
            }
      }
      
      usericonsdir.setPath( basedir + "/icons/user/" );
      usericonsdir.setFilter( QDir::Dirs | QDir::Readable | QDir::Executable );
      usericonsdir.setSorting( QDir::Name );
      
      const QFileInfoList * usericonslist = usericonsdir.entryInfoList();
      if ( usericonslist != 0 )
      {
            QFileInfoListIterator uit ( *usericonslist );
            QFileInfo *userfi;
            
            while ( (userfi = uit.current()) != 0 )
            {
                  if ( (userfi->fileName() == ".") || (userfi->fileName() == "..") )
                  {
                        // skip
                  }
                  else
                  {
                        ComboBox_USERLIST_ICONS->insertItem(userfi->fileName());
                  }
                  ++uit;
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index