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

void CFormMain::slotLanguage (  )  [protected, virtual, slot]

Switches the current language.

Definition at line 533 of file formmain.cpp.

References app, CSailApp::findHandbook(), handbook, CPrefs::language, languageChange(), CSailApp::loadTranslation(), and prefs.

Referenced by setupMenuBar().

{
    QString locale;

    QAction *a = qobject_cast<QAction *>(sender());
    if ( !a ) return;

    locale = a->data().toString();

    prefs->language = locale;
    app->loadTranslation(locale);

    // try to locate handbook
    handbook = app->findHandbook(locale);

    languageChange();
}


Generated by  Doxygen 1.6.0   Back to index