QTfrontend/hwform.cpp
changeset 5849 b84b41aba275
parent 5773 c277657854a2
child 5865 35387d27f73a
equal deleted inserted replaced
5848:103e3a80daa6 5849:b84b41aba275
    91 // I started handing this down to each place it touches, but it was getting ridiculous
    91 // I started handing this down to each place it touches, but it was getting ridiculous
    92 // and this one flag does not warrant a static class
    92 // and this one flag does not warrant a static class
    93 bool frontendEffects = true;
    93 bool frontendEffects = true;
    94 QString playerHash;
    94 QString playerHash;
    95 
    95 
    96 HWForm::HWForm(QWidget *parent)
    96 HWForm::HWForm(QWidget *parent, QString styleSheet)
    97   : QMainWindow(parent), pnetserver(0), pRegisterServer(0), editedTeam(0), hwnet(0)
    97   : QMainWindow(parent), pnetserver(0), pRegisterServer(0), editedTeam(0), hwnet(0)
    98 {
    98 {
    99 #ifdef USE_XFIRE
    99 #ifdef USE_XFIRE
   100     xfire_init();
   100     xfire_init();
   101 #endif
   101 #endif
   102     game = NULL;
   102     game = NULL;
   103     gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat);
   103     gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat);
   104     frontendEffects = gameSettings->value("frontend/effects", true).toBool();
   104     frontendEffects = gameSettings->value("frontend/effects", true).toBool();
   105     playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toLatin1(), QCryptographicHash::Md5).toHex());
   105     playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toLatin1(), QCryptographicHash::Md5).toHex());
   106 
   106 
       
   107     this->setStyleSheet(styleSheet);
   107     ui.setupUi(this);
   108     ui.setupUi(this);
   108     setMinimumSize(760, 580);
   109     setMinimumSize(760, 580);
   109     //setFocusPolicy(Qt::StrongFocus);
   110     //setFocusPolicy(Qt::StrongFocus);
   110     CustomizePalettes();
   111     CustomizePalettes();
   111 
   112