Пример #1
0
KNGlobal::KNGlobal(QObject *parent) :
    QObject(parent),
    m_preference(nullptr),
    m_globalConfigure(nullptr)
{
    //Initial the managers.
    //Gerenate the configure manager.
    KNConfigureManager::initial(this);
    //Generate the font manager.
    KNFontManager::initial(this);
    //Generate the locale manager.
    KNLocaleManager::initial(this);
    //Generate the theme manager.
    KNThemeManager::initial(this);

    //Initial the infrastructure.
    initialInfrastrcture();
    //Update the infrastructure.
    // Load the language.
    knI18n->setLanguage(userConfigure()->data("Language").toString());

    //Link the retranslate.
    knI18n->link(this, &KNGlobal::retranslate);
    retranslate();
}
Пример #2
0
KNGlobal::KNGlobal(QObject *parent) :
    QObject(parent),
    #ifdef Q_OS_UNIX
    m_desktopEnviroment(NullShell),
    #endif
    m_writeImageFilter(QString()),
    m_mainWindow(nullptr),
    m_preference(nullptr),
    m_globalConfigure(nullptr),
    m_accountThread(new QThread(this))
{
    //Initial the managers.
    //Gerenate the configure manager.
    KNConfigureManager::initial(this);
    //Generate the font manager.
    KNFontManager::initial(this);
    //Generate the locale manager.
    KNLocaleManager::initial(this);
    //Generate the theme manager.
    KNThemeManager::initial(this);
    //Generate the notification manager.
    KNNotification::initial(this);
    //Generate the account system.
    KNAccount::initial();

    //Initial the infrastructure.
    initialInfrastrcture();
    //Update the infrastructure.
    // Load the language.
    knI18n->setLanguage(userConfigure()->data("Language").toString());

    //Link the retranslate.
    knI18n->link(this, &KNGlobal::retranslate);
    retranslate();
}