コード例 #1
0
ファイル: Preferences.cpp プロジェクト: Michal7/FreeSSM
void Preferences::closeEvent(QCloseEvent *event)
{
	if (!_confirmed)
	{
		// Switch back to old translation:
		QLocale loc( _language_old );
		switchLanguage( __supportedLocales.indexOf(loc) );
		// Switch back to old GUI-style:
		switchGUIstyle( _style_old );
	}
	event->accept();
}
コード例 #2
0
ファイル: UIView.cpp プロジェクト: YurieCo/Nephilim
/// Hierarchicly sets the context to all children
void UIView::setContext(UICore* states)
{
	mCore = states;

	// -- Being inserted in a UICanvas hierarchy
	setPositionFlags(mCore->defaultPositionFlags);
	setSizeFlags(mCore->defaultSizeFlags);

	for(std::vector<UIView*>::iterator it = m_children.begin(); it != m_children.end(); ++it)
	{
		(*it)->setContext(states);
	}

	switchLanguage();
}
コード例 #3
0
void MainWindow::init()
{
    m_commandListener = new CommandListener( this );
    qApp->setWindowIcon ( QIcon ( ":/shellicons/Icon" ) );
    setWindowTitle ( About::applicationName() );
    m_settings = new QSettings ( this );
    m_cameraToggleAction = new QList < QAction *>;
    //m_cameraRemoveAction = new QList < QAction *>;
    m_centralWidget = new CameraViewer ( this );
    setCentralWidget ( m_centralWidget );

    m_controlBar = new ControlBar( this );
    m_layoutBar = new LayoutBar( this );
    initSettings();
    m_controlBar->updateControls();
    m_translator = Translator::instance();
    m_translator->setParent( this );
    connect ( m_translator , SIGNAL ( languageChanged( QString ) ), this, SLOT( switchLanguage( QString ) ) );

    installEventFilter( m_commandListener );
    //this is needed in Linux for a correct initial layout display.
    QTimer::singleShot(0, m_centralWidget, SLOT(layoutCurrentColLayout()));
}
コード例 #4
0
ファイル: I18nContext.cpp プロジェクト: artcom/mobile-spark
 void 
 I18nContext::realize() {
     Container::realize();
     switchLanguage(defaultLanguage_);
 }