VersionManagerDialog::VersionManagerDialog(QString ver, Profile pro, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::VersionManagerDialog)
{
    ui->setupUi(this);

    this->pro = Profile(pro);

    this->setWindowTitle("Minecraft Version: " + ver);
    ui->chkGameDir->setChecked(pro.hasGameDir);
    if(pro.hasGameDir)
        ui->txtGameDir->setText(pro.gameDir);
    ui->chkJavaDir->setChecked(pro.hasJavaDir);
    if(pro.hasJavaDir)
        ui->txtJavaDir->setText(pro.javaDir);
    ui->chkJavaArgs->setChecked(pro.hasJavaArgs);
    if(pro.hasJavaArgs)
        ui->txtJavaArgs->setText(pro.javaArgs);
    ui->chkResolution->setChecked(pro.hasResolution);
    if(pro.hasResolution)
    {
        ui->txtHeight->setText(QString::number(pro.r.height));
        ui->txtWidth->setText(QString::number(pro.r.width));
    }
    ui->chkFullscreen->setChecked(pro.hasFullScreen);

    gameDirChanged();
    javaArgsChanged();
    javaDirChanged();
    resolutionChanged();
    fullscreenChanged();
}
Example #2
0
/**
 * It is call to update the list of vout handled by the fullscreen controller
 */
void FullscreenControllerWidget::setVoutList( vout_thread_t **pp_vout, int i_vout )
{
    QList<vout_thread_t*> del;
    QList<vout_thread_t*> add;

    QList<vout_thread_t*> set;

    /* */
    for( int i = 0; i < i_vout; i++ )
        set += pp_vout[i];

    /* Vout to remove */
    vlc_mutex_lock( &lock );
    foreach( vout_thread_t *p_vout, vout )
    {
        if( !set.contains( p_vout ) )
            del += p_vout;
    }
    vlc_mutex_unlock( &lock );

    foreach( vout_thread_t *p_vout, del )
    {
        var_DelCallback( p_vout, "fullscreen",
                         FullscreenControllerWidget::FullscreenChanged, this );
        vlc_mutex_lock( &lock );
        fullscreenChanged( p_vout, false, 0 );
        vout.removeAll( p_vout );
        vlc_mutex_unlock( &lock );

        vlc_object_release( VLC_OBJECT(p_vout) );
    }
Example #3
0
void Chimera_X11::setFullscreen( bool fs )
{
    if( m_quickViewPtr && m_pluginWindow ) {
        if( fs && !isFullscreen() ) {
            m_quickViewPtr->hide();
            m_quickViewPtr->setParent( 0 );
            m_quickViewPtr->showFullScreen();
            Q_EMIT fullscreenChanged( true );
        } else if( !fs && isFullscreen() ) {
            m_quickViewPtr->showNormal();
            m_quickViewPtr->hide();
            m_quickViewPtr->setParent( m_pluginWindow.data() );
            onWindowResized( 0, static_cast<FB::PluginWindowX11*>( GetWindow() ) );
            m_quickViewPtr->requestActivate();
            Q_EMIT fullscreenChanged( false );
        }
    }
}
Example #4
0
void MprisPlayer::setFullscreen(bool fullscreen)
{
    if (m_fullscreen == fullscreen) {
        return;
    }

    m_fullscreen = fullscreen;
    emit fullscreenChanged();
}
Example #5
0
void VideoEditor::setFullscreen(bool fullscreen)
{
    if (m_video == NULL || m_video->fullscreen() == fullscreen)
        return;

    Tardis::instance()->enqueueAction(Tardis::VideoSetFullscreen, m_video->id(), m_video->fullscreen(), fullscreen);
    m_video->setFullscreen(fullscreen);
    emit fullscreenChanged(fullscreen);
}
Example #6
0
void Environment::setFullscreen(bool enable) {
  if (fullscreen() == enable) return;

  if (enable)
    view()->showFullScreen();
  else
    view()->show();

  emit fullscreenChanged();
}
void SettingsDialog::loadSettings() {
    /* Load settings for panel rotation, fullscreen, and address from .ini file */
    
    _settings->beginGroup("settings");
    qDebug() << Q_FUNC_INFO << _settings->value("panelrotation").toInt();
    ui->panelRotationDial->setValue(_settings->value("panelrotation").toInt());
    ui->fullscreenCheckbox->setChecked(_settings->value("fullscreen", false).toBool());
    emit fullscreenChanged(ui->fullscreenCheckbox->isChecked());
    ui->serverAddressEdit->setText(_settings->value("serveraddress", "127.0.0.1:51000").toString());
    emit setServerAddress(ui->serverAddressEdit->text());
    _settings->endGroup();

}
Example #8
0
    foreach( vout_thread_t *p_vout, add )
    {
        vlc_object_hold( VLC_OBJECT(p_vout) );

        vlc_mutex_lock( &lock );
        vout.append( p_vout );
        var_AddCallback( p_vout, "fullscreen",
                         FullscreenControllerWidget::FullscreenChanged, this );
        /* I miss a add and fire */
        fullscreenChanged( p_vout, var_GetBool( THEPL, "fullscreen" ),
                           var_GetInteger( p_vout, "mouse-hide-timeout" ) );
        vlc_mutex_unlock( &lock );
    }
Example #9
0
int FullscreenControllerWidget::FullscreenChanged( vlc_object_t *obj,
        const char *, vlc_value_t, vlc_value_t new_val, void *data )
{
    vout_thread_t *p_vout = (vout_thread_t *) obj;

    msg_Dbg( p_vout, "Qt: Fullscreen state changed" );
    FullscreenControllerWidget *p_fs = (FullscreenControllerWidget *)data;

    p_fs->fullscreenChanged( p_vout, new_val.b_bool, var_GetInteger( p_vout, "mouse-hide-timeout" ) );
    p_fs->emit fullscreenChanged( new_val.b_bool );

    return VLC_SUCCESS;
}
Example #10
0
QObject *ApplicationInfo::systeminfoProvider(QQmlEngine *engine,
                                             QJSEngine *scriptEngine)
{
    Q_UNUSED(engine)
    Q_UNUSED(scriptEngine)
    /*
     * Connect the fullscreen change signal to applicationInfo in order to change
     * the QQuickWindow value
     */
    ApplicationInfo* appInfo = getInstance();
    connect(ApplicationSettings::getInstance(), SIGNAL(fullscreenChanged()), appInfo,
            SLOT(notifyFullscreenChanged()));
    return appInfo;
}
void VersionManagerDialog::on_chkFullscreen_clicked()
{
    fullscreenChanged();
}
ApplicationSettings::ApplicationSettings(QObject *parent): QObject(parent),
     m_baseFontSizeMin(-7), m_baseFontSizeMax(7),
     m_config(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) +
              "/gcompris/" + GCOMPRIS_APPLICATION_NAME + ".conf", QSettings::IniFormat)
{
    // initialize from settings file or default

    // general group
    m_config.beginGroup(GENERAL_GROUP_KEY);
    m_isAudioEffectsEnabled = m_config.value(ENABLE_AUDIO_EFFECTS_KEY, true).toBool();
    m_isFullscreen = m_config.value(FULLSCREEN_KEY, true).toBool();
	m_isAudioVoicesEnabled = m_config.value(ENABLE_AUDIO_VOICES_KEY, true).toBool();
    m_isVirtualKeyboard = m_config.value(VIRTUALKEYBOARD_KEY,
            ApplicationInfo::getInstance()->isMobile()).toBool();
    m_locale = m_config.value(LOCALE_KEY, GC_DEFAULT_LOCALE).toString();
    m_font = m_config.value(FONT_KEY, GC_DEFAULT_FONT).toString();
    m_fontCapitalization = m_config.value(FONT_CAPITALIZATION, GC_DEFAULT_FONT_CAPITALIZATION).toUInt();
    m_isEmbeddedFont = m_config.value(IS_CURRENT_FONT_EMBEDDED, true).toBool();

// The default demo mode based on the platform
#if defined(WITH_ACTIVATION_CODE)
    m_isDemoMode = m_config.value(DEMO_KEY, true).toBool();
#else
    m_isDemoMode = m_config.value(DEMO_KEY, false).toBool();
#endif

#if defined(WITH_KIOSK_MODE)
    m_isKioskMode = m_config.value(KIOSK_KEY, true).toBool();
#else
    m_isKioskMode = m_config.value(KIOSK_KEY, false).toBool();
#endif

    // Option only useful if we are in demo mode (else all the activities are available and unlocked)
    // By default, all the activities are displayed (even locked ones)
    m_showLockedActivities = m_config.value(SHOW_LOCKED_ACTIVITIES_KEY, m_isDemoMode).toBool();
	m_sectionVisible = m_config.value(SECTION_VISIBLE, true).toBool();
	m_isAutomaticDownloadsEnabled = m_config.value(ENABLE_AUTOMATIC_DOWNLOADS,
            !ApplicationInfo::getInstance()->isMobile() && ApplicationInfo::isDownloadAllowed()).toBool();
    m_filterLevelMin = m_config.value(FILTER_LEVEL_MIN, 1).toUInt();
    m_filterLevelMax = m_config.value(FILTER_LEVEL_MAX, 6).toUInt();
	m_defaultCursor = m_config.value(DEFAULT_CURSOR, false).toBool();
	m_noCursor = m_config.value(NO_CURSOR, false).toBool();
    setBaseFontSize(m_config.value(BASE_FONT_SIZE_KEY, 0).toInt());

	m_config.sync();  // make sure all defaults are written back
    m_config.endGroup();

    // admin group
    m_config.beginGroup(ADMIN_GROUP_KEY);
    m_downloadServerUrl = m_config.value(DOWNLOAD_SERVER_URL_KEY, "http://gcompris.net").toString();
    m_config.endGroup();

    // internal group
    m_config.beginGroup(INTERNAL_GROUP_KEY);
    m_exeCount = m_config.value(EXE_COUNT_KEY, 0).toUInt();
    m_config.endGroup();

    // no group
    m_isBarHidden = false;

    connect(this, SIGNAL(showLockedActivitiesChanged()), this, SLOT(notifyShowLockedActivitiesChanged()));
	connect(this, SIGNAL(audioVoicesEnabledChanged()), this, SLOT(notifyAudioVoicesEnabledChanged()));
	connect(this, SIGNAL(audioEffectsEnabledChanged()), this, SLOT(notifyAudioEffectsEnabledChanged()));
	connect(this, SIGNAL(fullscreenChanged()), this, SLOT(notifyFullscreenChanged()));
    connect(this, SIGNAL(localeChanged()), this, SLOT(notifyLocaleChanged()));
    connect(this, SIGNAL(fontChanged()), this, SLOT(notifyFontChanged()));
    connect(this, SIGNAL(virtualKeyboardChanged()), this, SLOT(notifyVirtualKeyboardChanged()));
    connect(this, SIGNAL(automaticDownloadsEnabledChanged()), this, SLOT(notifyAutomaticDownloadsEnabledChanged()));
    connect(this, SIGNAL(filterLevelMinChanged()), this, SLOT(notifyFilterLevelMinChanged()));
    connect(this, SIGNAL(filterLevelMaxChanged()), this, SLOT(notifyFilterLevelMaxChanged()));
	connect(this, SIGNAL(sectionVisibleChanged()), this, SLOT(notifySectionVisibleChanged()));
    connect(this, SIGNAL(demoModeChanged()), this, SLOT(notifyDemoModeChanged()));
    connect(this, SIGNAL(kioskModeChanged()), this, SLOT(notifyKioskModeChanged()));
    connect(this, SIGNAL(downloadServerUrlChanged()), this, SLOT(notifyDownloadServerUrlChanged()));
    connect(this, SIGNAL(exeCountChanged()), this, SLOT(notifyExeCountChanged()));
    connect(this, SIGNAL(barHiddenChanged()), this, SLOT(notifyBarHiddenChanged()));
}
Example #13
0
void DVQmlCommunication::ownerWindowStateChanged(Qt::WindowState windowState) {
    emit fullscreenChanged(windowState == Qt::WindowFullScreen);
}