コード例 #1
0
 void NaClGLSupport::addConfig(void)
 {
     LogManager::getSingleton().logMessage("\tGLSupport addConfig called");
     
     // Currently no config options supported
     refreshConfig();
 }
コード例 #2
0
 void EGLSupport::setConfigOption(const String &name, const String &value)
 {
     GLESSupport::setConfigOption(name, value);
     if (name == "Video Mode")
     {
         refreshConfig();
     }
 }
コード例 #3
0
ファイル: playlistwidget.cpp プロジェクト: pilhoo/Ursus
PlayListWidget::PlayListWidget(QWidget* parent) : QTreeWidget(parent){
// 	qDebug() << this << "constructor()";
	setRootIsDecorated(false);
	setSortingEnabled(false);
	setAcceptDrops(true);
	setDragEnabled(true);
	setItemsExpandable(false);
	setTabKeyNavigation(false);
	setSelectionMode(QAbstractItemView::ExtendedSelection);
	setAlternatingRowColors(true);
	setAllColumnsShowFocus(true);
	setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);

	header()->setContextMenuPolicy(Qt::CustomContextMenu);
	connect(
		header(),	SIGNAL(customContextMenuRequested(const QPoint&)),
		this,		SLOT(headerContextMenu(const QPoint&))
	);

	QStringList headerLabels;
	headerLabels << "*" << "Artist" << "Album" << "Title"  << "Date" << "Genre"<< "Track No." << "Length";
	setHeaderLabels(headerLabels);

	tabs=(PlayListTabs*) parentWidget();

	dropPointer=new DropPointer(this);
	dropPointer->hide();
	dropPointer->setWidth(visibleWidth());
	dropPointer->moveTo(0);

	refreshConfig();

	connectConfigUpdate();

	connect(
		this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
		this, SLOT(doubleClicked(QTreeWidgetItem*,int))
	);
	connect(
		this,	SIGNAL(playItem(PlayListItem*)),
		tabs,	SLOT(playItem(PlayListItem*))
	);
	connect(
		this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
		this, SLOT(deselect(QTreeWidgetItem*,int))
	);

	connect(
		verticalScrollBar(),	SIGNAL(valueChanged(int)),
		this,					SLOT(printPos(int))
	);

	firstShow=true;
	scrollPosition=0;
}
コード例 #4
0
void deviceConfigHandleRawData(char header,
        InputStream* inputStream,
        OutputStream* outputStream) {
    if (header == COMMAND_CONFIG) {
        // Send ack first
        appendAck(outputStream);

        // can take a little time
        refreshConfig();
        append(outputStream, COMMAND_CONFIG);
        appendHex4(outputStream, config);
    }
}
コード例 #5
0
/**
 * Returns a String corresponding to the configuration
 * '1' when the bit is set, '0' when not set
 */
void appendStringConfig(OutputStream* outputStream) {
    refreshConfig();
    signed int i;
    for (i = CONFIG_BIT_COUNT - 1; i >= 0; i--) {
        char c;
		if ((config & (1 << i)) > 0) {
			c = '1';
		}
        else {
            c = '0';
		}
	    append(outputStream, c);
    }
}
コード例 #6
0
	//-------------------------------------------------------------------------------------------------//
	void GLXGLSupport::setConfigOption(const String &name, const String &value)
	{
		ConfigOptionMap::iterator option = mOptions.find(name);
		
		if(option == mOptions.end())
		{
			OGRE_EXCEPT( Exception::ERR_INVALIDPARAMS, "Option named " + name + " does not exist.", "GLXGLSupport::setConfigOption" );
		}
		else
		{
			option->second.currentValue = value;
		}
		
		if (name == "Video Mode")
		{
			ConfigOptionMap::iterator opt;
			if((opt = mOptions.find("Full Screen")) != mOptions.end())
			{
				if (opt->second.currentValue == "Yes")
					refreshConfig();
			}
		}
	}
コード例 #7
0
    void EGLSupport::addConfig(void)
    {
        ConfigOption optFullScreen;
        ConfigOption optVideoMode;
        ConfigOption optDisplayFrequency;
        ConfigOption optFSAA;
        ConfigOption optRTTMode;

        optFullScreen.name = "Full Screen";
        optFullScreen.immutable = false;

        optVideoMode.name = "Video Mode";
        optVideoMode.immutable = false;

        optDisplayFrequency.name = "Display Frequency";
        optDisplayFrequency.immutable = false;

        optFSAA.name = "FSAA";
        optFSAA.immutable = false;

        optRTTMode.name = "RTT Preferred Mode";
        optRTTMode.immutable = false;

        optFullScreen.possibleValues.push_back("No");
        optFullScreen.possibleValues.push_back("Yes");

        optFullScreen.currentValue = optFullScreen.possibleValues[1];

        VideoModes::const_iterator value = mVideoModes.begin();
        VideoModes::const_iterator end = mVideoModes.end();

        for (; value != end; value++)
        {
            String mode = StringConverter::toString(value->first.first,4) + " x " + StringConverter::toString(value->first.second,4);
            optVideoMode.possibleValues.push_back(mode);
        }
        removeDuplicates(optVideoMode.possibleValues);

        optVideoMode.currentValue = StringConverter::toString(mCurrentMode.first.first,4) + " x " + StringConverter::toString(mCurrentMode.first.second,4);

        refreshConfig();
        if (!mSampleLevels.empty())
        {
            StringVector::const_iterator value = mSampleLevels.begin();
            StringVector::const_iterator end = mSampleLevels.end();

            for (; value != end; value++)
            {
                optFSAA.possibleValues.push_back(*value);
            }

            optFSAA.currentValue = optFSAA.possibleValues[0];
        }

        optRTTMode.possibleValues.push_back("Copy");
        optRTTMode.currentValue = optRTTMode.possibleValues[0];

        mOptions[optFullScreen.name] = optFullScreen;
        mOptions[optVideoMode.name] = optVideoMode;
        mOptions[optDisplayFrequency.name] = optDisplayFrequency;
        mOptions[optFSAA.name] = optFSAA;
        mOptions[optRTTMode.name] = optRTTMode;

        refreshConfig();
    }
コード例 #8
0
unsigned char isConfigBalise() {
    refreshConfig();
    return isConfigSet(CONFIG_USE_BALISE_MASK);
}
コード例 #9
0
int isConfigSet(unsigned int configMask) {
	refreshConfig();
	int intersection = (config & configMask);
    return intersection != 0;
}
コード例 #10
0
unsigned int getConfigValue(void) {
    refreshConfig();
    return config;
}
コード例 #11
0
BOOL isConfigDeviceOk(void) {
    refreshConfig();
    return getConfigValue() < MAX_UNSIGNEDINT;
}
コード例 #12
0
void initConfig(void) {
    refreshConfig();
}
コード例 #13
0
unsigned char getStrategy() {
    refreshConfig();
    return config & CONFIG_STRATEGY_MASK;
}
コード例 #14
0
	//-------------------------------------------------------------------------------------------------//
	void GLXGLSupport::addConfig(void) 
	{
		ConfigOption optFullScreen;
		ConfigOption optVideoMode;
		ConfigOption optDisplayFrequency;
		ConfigOption optVSync;
		ConfigOption optFSAA;
		ConfigOption optRTTMode;
		ConfigOption optSRGB;
#ifdef RTSHADER_SYSTEM_BUILD_CORE_SHADERS
		ConfigOption optEnableFixedPipeline;
#endif
		
		optFullScreen.name = "Full Screen";
		optFullScreen.immutable = false;
		
		optVideoMode.name = "Video Mode";
		optVideoMode.immutable = false;
		
		optDisplayFrequency.name = "Display Frequency";
		optDisplayFrequency.immutable = false;
		
		optVSync.name = "VSync";
		optVSync.immutable = false;
		
		optFSAA.name = "FSAA";
		optFSAA.immutable = false;
		
		optRTTMode.name = "RTT Preferred Mode";
		optRTTMode.immutable = false;
		
		optSRGB.name = "sRGB Gamma Conversion";
		optSRGB.immutable = false;

#ifdef RTSHADER_SYSTEM_BUILD_CORE_SHADERS
		optEnableFixedPipeline.name = "Fixed Pipeline Enabled";
		optEnableFixedPipeline.possibleValues.push_back( "Yes" );
		optEnableFixedPipeline.possibleValues.push_back( "No" );
		optEnableFixedPipeline.currentValue = "Yes";
		optEnableFixedPipeline.immutable = false;
#endif

		optFullScreen.possibleValues.push_back("No");
		optFullScreen.possibleValues.push_back("Yes");
		
		optFullScreen.currentValue = optFullScreen.possibleValues[1];
		
		VideoModes::const_iterator value = mVideoModes.begin();
		VideoModes::const_iterator end = mVideoModes.end();
		
		for (; value != end; value++)
		{
			String mode = StringConverter::toString(value->first.first,4) + " x " + StringConverter::toString(value->first.second,4);
			
			optVideoMode.possibleValues.push_back(mode);
		}
		
		remove_duplicates(optVideoMode.possibleValues);
		
		optVideoMode.currentValue = StringConverter::toString(mCurrentMode.first.first,4) + " x " + StringConverter::toString(mCurrentMode.first.second,4);
		
		refreshConfig();
		
		if (GLXEW_SGI_swap_control)
		{
			optVSync.possibleValues.push_back("No");
			optVSync.possibleValues.push_back("Yes");
			
			optVSync.currentValue = optVSync.possibleValues[0];
		}
		
		// Is it worth checking for GL_EXT_framebuffer_object ?
		optRTTMode.possibleValues.push_back("FBO");
		
		if (GLXEW_VERSION_1_3)
		{
			optRTTMode.possibleValues.push_back("PBuffer");
		}
		
		optRTTMode.possibleValues.push_back("Copy");
		
		optRTTMode.currentValue = optRTTMode.possibleValues[0];
		
		if (! mSampleLevels.empty())
		{
			StringVector::const_iterator value = mSampleLevels.begin();
			StringVector::const_iterator end = mSampleLevels.end();
			
			for (; value != end; value++)
			{
				optFSAA.possibleValues.push_back(*value);
			}
			
			optFSAA.currentValue = optFSAA.possibleValues[0];
		}
		
		if (GLXEW_EXT_framebuffer_sRGB)
		{	
			optSRGB.possibleValues.push_back("No");
			optSRGB.possibleValues.push_back("Yes");

			optSRGB.currentValue = optSRGB.possibleValues[0];
		}

		mOptions[optFullScreen.name] = optFullScreen;
		mOptions[optVideoMode.name] = optVideoMode;
		mOptions[optDisplayFrequency.name] = optDisplayFrequency;
		mOptions[optVSync.name] = optVSync;
		mOptions[optRTTMode.name] = optRTTMode;
		mOptions[optFSAA.name] = optFSAA;
		mOptions[optSRGB.name] = optSRGB;
#ifdef RTSHADER_SYSTEM_BUILD_CORE_SHADERS
		mOptions[optEnableFixedPipeline.name] = optEnableFixedPipeline;
#endif
		
		refreshConfig();
	}
コード例 #15
0
    //-------------------------------------------------------------------------------------------------//
    void GLXGLSupport::addConfig(void)
    {
        ConfigOption optFullScreen;
        ConfigOption optVideoMode;
        ConfigOption optDisplayFrequency;
        ConfigOption optVSync;
        ConfigOption optFSAA;
        ConfigOption optRTTMode;
        ConfigOption optSRGB;
        ConfigOption optEnableFixedPipeline;

        optFullScreen.name = "Full Screen";
        optFullScreen.immutable = false;

        optVideoMode.name = "Video Mode";
        optVideoMode.immutable = false;

        optDisplayFrequency.name = "Display Frequency";
        optDisplayFrequency.immutable = false;

        optVSync.name = "VSync";
        optVSync.immutable = false;

        optFSAA.name = "FSAA";
        optFSAA.immutable = false;

        optRTTMode.name = "RTT Preferred Mode";
        optRTTMode.immutable = false;

        optSRGB.name = "sRGB Gamma Conversion";
        optSRGB.immutable = false;

        optEnableFixedPipeline.name = "Fixed Pipeline Enabled";
        optEnableFixedPipeline.possibleValues.push_back( "Yes" );
        optEnableFixedPipeline.possibleValues.push_back( "No" );
        optEnableFixedPipeline.currentValue = "Yes";
        optEnableFixedPipeline.immutable = false;

        optFullScreen.possibleValues.push_back("No");
        optFullScreen.possibleValues.push_back("Yes");

        optFullScreen.currentValue = optFullScreen.possibleValues[1];

        VideoModes::const_iterator value = mVideoModes.begin();
        VideoModes::const_iterator end = mVideoModes.end();

        for (; value != end; value++)
        {
            String mode = StringConverter::toString(value->first.first,4) + " x " + StringConverter::toString(value->first.second,4);

            optVideoMode.possibleValues.push_back(mode);
        }

        remove_duplicates(optVideoMode.possibleValues);

        optVideoMode.currentValue = StringConverter::toString(mCurrentMode.first.first,4) + " x " + StringConverter::toString(mCurrentMode.first.second,4);

        refreshConfig();

        optVSync.possibleValues.push_back("No");
        optVSync.possibleValues.push_back("Yes");
        optVSync.currentValue = optVSync.possibleValues[0];

        optRTTMode.possibleValues.push_back("FBO");
        optRTTMode.currentValue = optRTTMode.possibleValues[0];

        if (! mSampleLevels.empty())
        {
            StringVector::const_iterator sampleLevel = mSampleLevels.begin();

            for (; sampleLevel != mSampleLevels.end(); sampleLevel++)
            {
                optFSAA.possibleValues.push_back(*sampleLevel);
            }

            optFSAA.currentValue = optFSAA.possibleValues[0];
        }

        optSRGB.possibleValues.push_back("No");
        optSRGB.possibleValues.push_back("Yes");

        optSRGB.currentValue = optSRGB.possibleValues[0];

        mOptions[optFullScreen.name] = optFullScreen;
        mOptions[optVideoMode.name] = optVideoMode;
        mOptions[optDisplayFrequency.name] = optDisplayFrequency;
        mOptions[optVSync.name] = optVSync;
        mOptions[optRTTMode.name] = optRTTMode;
        mOptions[optFSAA.name] = optFSAA;
        mOptions[optSRGB.name] = optSRGB;
        mOptions[optEnableFixedPipeline.name] = optEnableFixedPipeline;

        refreshConfig();
    }