Commit b3f25c75 authored by Dirk Wilden's avatar Dirk Wilden

updated drawMode in optionsWidget

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3069 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 59d684bf
This diff is collapsed.
......@@ -64,6 +64,11 @@ std::vector< QString > drawModeToList(unsigned int _drawMode);
DLLEXPORT
unsigned int ListToDrawMode ( std::vector< QString > _draw_modes );
DLLEXPORT
std::vector< QString > drawModeToDescriptions(unsigned int _drawMode);
DLLEXPORT
unsigned int descriptionsToDrawMode ( std::vector< QString > _draw_modes );
//=============================================================================
#endif // DRAWMODECONVERTER_HH defined
......
......@@ -113,20 +113,20 @@ enum {OPT_HELP , OPT_STEREO, OPT_BATCH ,OPT_CONSOLE_LOG , OPT_DEBUGGING, OPT_FUL
OPT_REMOTE};
CSimpleOpt::SOption g_rgOptions[] = {
{ OPT_DEBUGGING , "--debug" , SO_NONE },
{ OPT_HELP , "-?" , SO_NONE },
{ OPT_HELP , "--help" , SO_NONE },
{ OPT_HELP , "-h" , SO_NONE },
{ OPT_STEREO , "--enable-stereo" , SO_NONE },
{ OPT_BATCH , "-b" , SO_NONE },
{ OPT_CONSOLE_LOG , "-c" , SO_NONE },
{ OPT_CONSOLE_LOG , "--log-to-console" , SO_NONE },
{ OPT_FULLSCREEN , "-f" , SO_NONE },
{ OPT_HIDDDEN_LOGGER , "-l" , SO_NONE },
{ OPT_NOSPLASH , "--no-splash" , SO_NONE },
{ OPT_HIDDDEN_TOOLBOX , "-t" , SO_NONE },
{ OPT_LOAD_POLYMESHES , "-p" , SO_NONE },
{ OPT_REMOTE , "--remote-control" , SO_NONE },
{ OPT_DEBUGGING , (char*) "--debug" , SO_NONE },
{ OPT_HELP , (char*) "-?" , SO_NONE },
{ OPT_HELP , (char*) "--help" , SO_NONE },
{ OPT_HELP , (char*) "-h" , SO_NONE },
{ OPT_STEREO , (char*) "--enable-stereo" , SO_NONE },
{ OPT_BATCH , (char*) "-b" , SO_NONE },
{ OPT_CONSOLE_LOG , (char*) "-c" , SO_NONE },
{ OPT_CONSOLE_LOG , (char*) "--log-to-console" , SO_NONE },
{ OPT_FULLSCREEN , (char*) "-f" , SO_NONE },
{ OPT_HIDDDEN_LOGGER , (char*) "-l" , SO_NONE },
{ OPT_NOSPLASH , (char*) "--no-splash" , SO_NONE },
{ OPT_HIDDDEN_TOOLBOX , (char*) "-t" , SO_NONE },
{ OPT_LOAD_POLYMESHES , (char*) "-p" , SO_NONE },
{ OPT_REMOTE , (char*) "--remote-control" , SO_NONE },
SO_END_OF_OPTIONS // END
};
......
......@@ -53,13 +53,17 @@ OptionsWidget::OptionsWidget(std::vector<PluginInfo>& _plugins, std::vector<KeyB
uint mode = 2;
for (uint i=1; i < 22; i++) {
std::vector< QString > dm = drawModeToList( mode );
std::vector< QString > dm = drawModeToDescriptions( mode );
if ( !dm.empty() && dm[0].trimmed() != ""){
QListWidgetItem* item = new QListWidgetItem(dm[0]);
item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable);
item->setCheckState(Qt::Unchecked);
// if (OpenFlipper::Options::standardDrawMode() )
// item->setCheckState(Qt::Checked);
// else
item->setCheckState(Qt::Unchecked);
availDrawModes->addItem( item );
}
......@@ -330,7 +334,7 @@ void OptionsWidget::slotApply() {
if (availDrawModes->item(i)->checkState() == Qt::Checked)
mode.push_back( availDrawModes->item(i)->text() );
OpenFlipper::Options::standardDrawMode( ListToDrawMode(mode) );
OpenFlipper::Options::standardDrawMode( descriptionsToDrawMode(mode) );
emit applyOptions();
emit saveOptions();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment