QTfrontend/gameuiconfig.cpp
branchui-scaling
changeset 13389 24b531dcebe7
parent 13080 23a498a2b5b8
child 15283 c4fd2813b127
equal deleted inserted replaced
13388:32a1696ca93a 13389:24b531dcebe7
   173         {
   173         {
   174             m_binds[i].strbind = value(QString("Binds/%1").arg(m_binds[i].action), cbinds[i].strbind).toString();
   174             m_binds[i].strbind = value(QString("Binds/%1").arg(m_binds[i].action), cbinds[i].strbind).toString();
   175             if (m_binds[i].strbind.isEmpty() || m_binds[i].strbind == "default") m_binds[i].strbind = cbinds[i].strbind;
   175             if (m_binds[i].strbind.isEmpty() || m_binds[i].strbind == "default") m_binds[i].strbind = cbinds[i].strbind;
   176         }
   176         }
   177     }
   177     }
       
   178 
       
   179     Form->ui.pageOptions->sbChatSize->setValue(value("chat/size", 100).toInt());
   178 }
   180 }
   179 
   181 
   180 void GameUIConfig::reloadVideosValues(void)
   182 void GameUIConfig::reloadVideosValues(void)
   181 {
   183 {
   182     // one pass with default values
   184     // one pass with default values
   318     { // save colors
   320     { // save colors
   319         QStandardItemModel * model = DataManager::instance().colorsModel();
   321         QStandardItemModel * model = DataManager::instance().colorsModel();
   320         for(int i = model->rowCount() - 1; i >= 0; --i)
   322         for(int i = model->rowCount() - 1; i >= 0; --i)
   321             setValue(QString("colors/color%1").arg(i), model->item(i)->data().value<QColor>().name());
   323             setValue(QString("colors/color%1").arg(i), model->item(i)->data().value<QColor>().name());
   322     }
   324     }
       
   325 
       
   326     setValue("chat/size", Form->ui.pageOptions->sbChatSize->value());
   323 
   327 
   324     sync();
   328     sync();
   325 }
   329 }
   326 
   330 
   327 void GameUIConfig::SaveVideosOptions()
   331 void GameUIConfig::SaveVideosOptions()
   590     {
   594     {
   591         Form->ui.pageOptions->editNetPassword->setText("");
   595         Form->ui.pageOptions->editNetPassword->setText("");
   592     }
   596     }
   593 }
   597 }
   594 
   598 
       
   599 int GameUIConfig::chatSize()
       
   600 {
       
   601     return Form->ui.pageOptions->sbChatSize->value();
       
   602 }
       
   603 
   595 quint8 GameUIConfig::volume()
   604 quint8 GameUIConfig::volume()
   596 {
   605 {
   597     return Form->ui.pageOptions->SLVolume->value() * 128 / 100;
   606     return Form->ui.pageOptions->SLVolume->value() * 128 / 100;
   598 }
   607 }
   599 
   608