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

QStarDict::Application::Application ( int &  argc,
char **  argv 
)

Construct new QStarDict application.

Definition at line 38 of file application.cpp.

References QStarDict::MainWindow::setDict(), and QStarDict::PopupWindow::setDict().

    : QApplication(argc, argv)
{
    setOrganizationName("qstardict");
    setApplicationName("qstardict");
    setQuitOnLastWindowClosed(false);

#ifdef QSTARDICT_WITH_TRANSLATIONS
    m_translator = new QTranslator;
    m_translator->load(QSTARDICT_TRANSLATIONS_DIR "/qstardict-" + QLocale::system().name());
    installTranslator(m_translator);
#endif // QSTARDICT_WITH_TRANSLATIONS

    m_dictCore = new DictCore;
    m_popupWindow = new PopupWindow;
    m_popupWindow->setDict(m_dictCore);
    m_speaker = new Speaker;
    m_mainWindow = new MainWindow;
    m_mainWindow->setDict(m_dictCore);
    m_trayIcon = new TrayIcon;
#ifdef QSTARDICT_WITH_DBUS
    m_dbusAdaptor = new DBusAdaptor(m_mainWindow);
#endif // QSTARDICT_WITH_DBUS
}


Generated by  Doxygen 1.6.0   Back to index