QTfrontend/gamecfgwidget.cpp
changeset 1898 f0ab0c77946d
parent 1895 7ba647a88b2f
child 1921 2a09f7f786a0
equal deleted inserted replaced
1897:e9dcb47013c7 1898:f0ab0c77946d
    46 
    46 
    47 	QGridLayout *GBoxOptionsLayout = new QGridLayout(GBoxOptions);
    47 	QGridLayout *GBoxOptionsLayout = new QGridLayout(GBoxOptions);
    48 
    48 
    49 	GameSchemes = new QComboBox(GBoxOptions);
    49 	GameSchemes = new QComboBox(GBoxOptions);
    50 	GBoxOptionsLayout->addWidget(GameSchemes, 0, 1);
    50 	GBoxOptionsLayout->addWidget(GameSchemes, 0, 1);
       
    51 	connect(GameSchemes, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeChanged(int)));
    51 
    52 
    52 	QPushButton * goToSchemePage = new QPushButton(GBoxOptions);
    53 	QPushButton * goToSchemePage = new QPushButton(GBoxOptions);
    53 	goToSchemePage->setText(tr("Edit schemes"));
    54 	goToSchemePage->setText(tr("Edit schemes"));
    54 	GBoxOptionsLayout->addWidget(goToSchemePage, 1, 0, 1, 2);
    55 	GBoxOptionsLayout->addWidget(goToSchemePage, 1, 0, 1, 2);
    55 	connect(goToSchemePage, SIGNAL(clicked()), this, SIGNAL(goToSchemes()));
    56 	connect(goToSchemePage, SIGNAL(clicked()), this, SIGNAL(goToSchemes()));
   238 
   239 
   239 void GameCFGWidget::themeChanged(const QString & value)
   240 void GameCFGWidget::themeChanged(const QString & value)
   240 {
   241 {
   241 	emit paramChanged("THEME", QStringList(value));
   242 	emit paramChanged("THEME", QStringList(value));
   242 }
   243 }
       
   244 
       
   245 void GameCFGWidget::schemeChanged(int value)
       
   246 {
       
   247 	QStringList sl;
       
   248 
       
   249 	int size = GameSchemes->model()->columnCount();
       
   250 	for(int i = 0; i < size; ++i)
       
   251 		sl << schemeData(i).toString();
       
   252 		
       
   253 	emit paramChanged("SCHEME", sl);
       
   254 }