QTfrontend/hwform.cpp
changeset 13862 b2cc4e4e380c
parent 13846 d012948b1eda
child 13867 d8e606cf8ff5
equal deleted inserted replaced
13772:219c2e588874 13862:b2cc4e4e380c
   244     pageSwitchMapper->setMapping(ui.pageMain->BtnInfo, ID_PAGE_INFO);
   244     pageSwitchMapper->setMapping(ui.pageMain->BtnInfo, ID_PAGE_INFO);
   245 
   245 
   246     connect(ui.pageMain->BtnDataDownload, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
   246     connect(ui.pageMain->BtnDataDownload, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
   247     pageSwitchMapper->setMapping(ui.pageMain->BtnDataDownload, ID_PAGE_DATADOWNLOAD);
   247     pageSwitchMapper->setMapping(ui.pageMain->BtnDataDownload, ID_PAGE_DATADOWNLOAD);
   248 
   248 
       
   249     connect(ui.pageMain->BtnHelp, SIGNAL(clicked()), this, SLOT(GoToHelp()));
   249 
   250 
   250 #ifdef VIDEOREC
   251 #ifdef VIDEOREC
   251     connect(ui.pageMain->BtnVideos, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
   252     connect(ui.pageMain->BtnVideos, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
   252     pageSwitchMapper->setMapping(ui.pageMain->BtnVideos, ID_PAGE_VIDEOS);
   253     pageSwitchMapper->setMapping(ui.pageMain->BtnVideos, ID_PAGE_VIDEOS);
   253 #endif
   254 #endif
   637 
   638 
   638 void HWForm::GoToEditScheme()
   639 void HWForm::GoToEditScheme()
   639 {
   640 {
   640     ui.pageScheme->selectScheme->setCurrentIndex(ui.pageOptions->SchemesName->currentIndex());
   641     ui.pageScheme->selectScheme->setCurrentIndex(ui.pageOptions->SchemesName->currentIndex());
   641     GoToPage(ID_PAGE_SCHEME);
   642     GoToPage(ID_PAGE_SCHEME);
       
   643 }
       
   644 
       
   645 void HWForm::GoToHelp()
       
   646 {
       
   647     // For now just opens the Hedgewars Wiki in external browser.
       
   648     // TODO: Replace this with an offline help someday (bug 660).
       
   649     QDesktopServices::openUrl(QUrl("https://hedgewars.org/wiki"));
   642 }
   650 }
   643 
   651 
   644 void HWForm::GoToVideos()
   652 void HWForm::GoToVideos()
   645 {
   653 {
   646     GoToPage(ID_PAGE_VIDEOS);
   654     GoToPage(ID_PAGE_VIDEOS);
  1863     connect(game, SIGNAL(SendNet(const QByteArray &)), hwnet, SLOT(SendNet(const QByteArray &)));
  1871     connect(game, SIGNAL(SendNet(const QByteArray &)), hwnet, SLOT(SendNet(const QByteArray &)));
  1864     connect(game, SIGNAL(SendChat(const QString &)), hwnet, SLOT(chatLineToNet(const QString &)));
  1872     connect(game, SIGNAL(SendChat(const QString &)), hwnet, SLOT(chatLineToNet(const QString &)));
  1865     connect(game, SIGNAL(SendConsoleCommand(const QString&)), hwnet, SLOT(consoleCommand(const QString&)));
  1873     connect(game, SIGNAL(SendConsoleCommand(const QString&)), hwnet, SLOT(consoleCommand(const QString&)));
  1866     connect(game, SIGNAL(SendTeamMessage(const QString &)), hwnet, SLOT(SendTeamMessage(const QString &)));
  1874     connect(game, SIGNAL(SendTeamMessage(const QString &)), hwnet, SLOT(SendTeamMessage(const QString &)));
  1867     connect(hwnet, SIGNAL(chatStringFromNet(const QString &)), game, SLOT(FromNetChat(const QString &)), Qt::QueuedConnection);
  1875     connect(hwnet, SIGNAL(chatStringFromNet(const QString &)), game, SLOT(FromNetChat(const QString &)), Qt::QueuedConnection);
       
  1876     connect(hwnet, SIGNAL(Warning(const QString&)), game, SLOT(FromNetWarning(const QString&)), Qt::QueuedConnection);
       
  1877     connect(hwnet, SIGNAL(Error(const QString&)), game, SLOT(FromNetError(const QString&)), Qt::QueuedConnection);
  1868 
  1878 
  1869     game->StartNet();
  1879     game->StartNet();
  1870 }
  1880 }
  1871 
  1881 
  1872 void HWForm::closeEvent(QCloseEvent *event)
  1882 void HWForm::closeEvent(QCloseEvent *event)