QTfrontend/pageeditteam.cpp
changeset 5252 ded882439548
parent 5238 46ddaf14509d
child 5308 c57a8878eebe
equal deleted inserted replaced
5251:f31d1073345e 5252:ded882439548
    22 #include <QLabel>
    22 #include <QLabel>
    23 #include <QLineEdit>
    23 #include <QLineEdit>
    24 #include <QTabWidget>
    24 #include <QTabWidget>
    25 #include <QGroupBox>
    25 #include <QGroupBox>
    26 #include <QToolBox>
    26 #include <QToolBox>
    27 #include <QApplication>
       
    28 
    27 
    29 #include "pageeditteam.h"
    28 #include "pageeditteam.h"
    30 #include "sdlkeys.h"
    29 #include "sdlkeys.h"
    31 #include "hwconsts.h"
    30 #include "hwconsts.h"
    32 #include "SquareLabel.h"
    31 #include "SquareLabel.h"
    33 #include "hats.h"
    32 #include "hats.h"
       
    33 #include "HWApplication.h"
    34 
    34 
    35 PageEditTeam::PageEditTeam(QWidget* parent, SDLInteraction * sdli) :
    35 PageEditTeam::PageEditTeam(QWidget* parent, SDLInteraction * sdli) :
    36   AbstractPage(parent)
    36   AbstractPage(parent)
    37 {
    37 {
    38     mySdli = sdli;
    38     mySdli = sdli;
   313                 l = new QLabel(curW);
   313                 l = new QLabel(curW);
   314                 l->setText("");
   314                 l->setText("");
   315                 pagelayout->addWidget(l, num++, 0, 1, 2);
   315                 pagelayout->addWidget(l, num++, 0, 1, 2);
   316             }
   316             }
   317             curW = new QWidget(this);
   317             curW = new QWidget(this);
   318             BindsBox->addItem(curW, QApplication::translate("binds (categories)", cbinds[i].category));
   318             BindsBox->addItem(curW, HWApplication::translate("binds (categories)", cbinds[i].category));
   319             pagelayout = new QGridLayout(curW);
   319             pagelayout = new QGridLayout(curW);
   320             num = 0;
   320             num = 0;
   321         }
   321         }
   322         if(cbinds[i].description != NULL)
   322         if(cbinds[i].description != NULL)
   323         {
   323         {
   324             l = new QLabel(curW);
   324             l = new QLabel(curW);
   325             l->setText((num > 0 ? QString("\n") : QString("")) + QApplication::translate("binds (descriptions)", cbinds[i].description));
   325             l->setText((num > 0 ? QString("\n") : QString("")) + HWApplication::translate("binds (descriptions)", cbinds[i].description));
   326             pagelayout->addWidget(l, num++, 0, 1, 2);
   326             pagelayout->addWidget(l, num++, 0, 1, 2);
   327         }
   327         }
   328 
   328 
   329         l = new QLabel(curW);
   329         l = new QLabel(curW);
   330         l->setText(QApplication::translate("binds", cbinds[i].name));
   330         l->setText(HWApplication::translate("binds", cbinds[i].name));
   331         l->setAlignment(Qt::AlignRight);
   331         l->setAlignment(Qt::AlignRight);
   332         pagelayout->addWidget(l, num, 0);
   332         pagelayout->addWidget(l, num, 0);
   333         CBBind[i] = new QComboBox(curW);
   333         CBBind[i] = new QComboBox(curW);
   334         for(int j = 0; sdlkeys[j][1][0] != '\0'; j++)
   334         for(int j = 0; sdlkeys[j][1][0] != '\0'; j++)
   335             CBBind[i]->addItem(QApplication::translate("binds (keys)", sdlkeys[j][1]).contains(": ") ? QApplication::translate("binds (keys)", sdlkeys[j][1]) : QApplication::translate("binds (keys)", "Keyboard") + QString(": ") + QApplication::translate("binds (keys)", sdlkeys[j][1]), sdlkeys[j][0]);
   335             CBBind[i]->addItem(HWApplication::translate("binds (keys)", sdlkeys[j][1]).contains(": ") ? HWApplication::translate("binds (keys)", sdlkeys[j][1]) : HWApplication::translate("binds (keys)", "Keyboard") + QString(": ") + HWApplication::translate("binds (keys)", sdlkeys[j][1]), sdlkeys[j][0]);
   336         pagelayout->addWidget(CBBind[i++], num++, 1);
   336         pagelayout->addWidget(CBBind[i++], num++, 1);
   337     }
   337     }
   338 }
   338 }
   339 
   339 
   340 void PageEditTeam::CBFort_activated(const QString & fortname)
   340 void PageEditTeam::CBFort_activated(const QString & fortname)