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

void DCOptions::slotSelectLanguage (  )  [private, slot]

Definition at line 1960 of file dcoptions.cpp.

Referenced by InitDocument().

{
      int id;
      QPopupMenu *m;
      CString s = "";

      m = new QPopupMenu(this);

      DCMenuHandler::InsertMenu( m, emiLANGUAGE_BOSNIAN );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_BRAZILIAN );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_CZECH );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_DANISH );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_DUTCH );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_ENGLISH );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_FINNISH );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_FRENCH );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_GERMAN );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_GREEK );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_HUNGARIAN );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_ICELANDIC );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_ITALIAN );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_LATVIAN );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_NORWEGIAN );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_POLISH );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_ROMANIAN );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_RUSSIAN );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_SLOVAKIAN );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_SPANISH );
      DCMenuHandler::InsertMenu( m, emiLANGUAGE_SWEDISH );

      id = m->exec(QCursor::pos());

      delete m;

      if ( id == emiLANGUAGE_BOSNIAN )
            s = "valknut.bs.qm";
      else if ( id == emiLANGUAGE_BRAZILIAN )
            s = "valknut.pt_br.qm";
      else if ( id == emiLANGUAGE_CZECH )
            s = "valknut.cs.qm";
      else if ( id == emiLANGUAGE_DANISH )
            s = "valknut.da.qm";
      else if ( id == emiLANGUAGE_DUTCH )
            s = "valknut.nl.qm";
      else if ( id == emiLANGUAGE_ENGLISH )
            s = "";
      else if ( id == emiLANGUAGE_FINNISH )
            s = "valknut.fi.qm";
      else if ( id == emiLANGUAGE_FRENCH )
            s = "valknut.fr.qm";
      else if ( id == emiLANGUAGE_GERMAN )
            s = "valknut.de.qm";
      else if ( id == emiLANGUAGE_GREEK )
            s = "valknut.el.qm";
      else if ( id == emiLANGUAGE_HUNGARIAN )
            s = "valknut.hu.qm";
      else if ( id == emiLANGUAGE_ICELANDIC )
            s = "valknut.is.qm";
      else if ( id == emiLANGUAGE_ITALIAN )
            s = "valknut.it.qm";
      else if ( id == emiLANGUAGE_LATVIAN )
            s = "valknut.lv.qm";
      else if ( id == emiLANGUAGE_NORWEGIAN )
            s = "valknut.nb.qm";
      else if ( id == emiLANGUAGE_POLISH )
            s = "valknut.pl.qm";
      else if ( id == emiLANGUAGE_ROMANIAN )
            s = "valknut.ro.qm";
      else if ( id == emiLANGUAGE_RUSSIAN )
            s = "valknut.rus.qm";
      else if ( id == emiLANGUAGE_SLOVAKIAN )
            s = "valknut.sk.qm";
      else if ( id == emiLANGUAGE_SPANISH )
            s = "valknut.es.qm";
      else if ( id == emiLANGUAGE_SWEDISH )
            s = "valknut.sv.qm";

      if ( s != "" )
      {
            LineEdit_LANGUAGEFILE->setText(LineEdit_DATAFOLDER->text()+DIRSEPARATOR+"translation"+DIRSEPARATOR+s.Data());
      }
      else if ( id == emiLANGUAGE_ENGLISH )
      {
            LineEdit_LANGUAGEFILE->setText("");
      }
}


Generated by  Doxygen 1.6.0   Back to index