QTfrontend/hwform.cpp
changeset 5651 a7de68f4f87f
parent 5567 44c9a577b082
child 5734 d710db47a1ef
equal deleted inserted replaced
5650:cda8ca932708 5651:a7de68f4f87f
    35 #include <QDataWidgetMapper>
    35 #include <QDataWidgetMapper>
    36 #include <QTableView>
    36 #include <QTableView>
    37 #include <QCryptographicHash>
    37 #include <QCryptographicHash>
    38 #include <QSignalMapper>
    38 #include <QSignalMapper>
    39 #include <QShortcut>
    39 #include <QShortcut>
       
    40 #include <QDesktopServices>
    40 
    41 
    41 #include "hwform.h"
    42 #include "hwform.h"
    42 #include "game.h"
    43 #include "game.h"
    43 #include "team.h"
    44 #include "team.h"
    44 #include "namegen.h"
    45 #include "namegen.h"
   216 
   217 
   217     connect(ui.pageRoomsList->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
   218     connect(ui.pageRoomsList->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
   218     connect(ui.pageRoomsList->BtnAdmin, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
   219     connect(ui.pageRoomsList->BtnAdmin, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
   219     pageSwitchMapper->setMapping(ui.pageRoomsList->BtnAdmin, ID_PAGE_ADMIN);
   220     pageSwitchMapper->setMapping(ui.pageRoomsList->BtnAdmin, ID_PAGE_ADMIN);
   220 
   221 
       
   222     connect(ui.pageInfo->BtnSnapshots, SIGNAL(clicked()), this, SLOT(OpenSnapshotFolder()));
   221     connect(ui.pageInfo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
   223     connect(ui.pageInfo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
   222 
   224 
   223     connect(ui.pageGameStats->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
   225     connect(ui.pageGameStats->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
   224 
   226 
   225     connect(ui.pageSinglePlayer->BtnSimpleGamePage, SIGNAL(clicked()), this, SLOT(SimpleGame()));
   227     connect(ui.pageSinglePlayer->BtnSimpleGamePage, SIGNAL(clicked()), this, SLOT(SimpleGame()));
   572     // need to work on this, can cause invalid state for admin quit trying to prevent bad state message on kick
   574     // need to work on this, can cause invalid state for admin quit trying to prevent bad state message on kick
   573     //if (curid == ID_PAGE_NETGAME && (!game || game->gameState != gsStarted)) hwnet->partRoom();
   575     //if (curid == ID_PAGE_NETGAME && (!game || game->gameState != gsStarted)) hwnet->partRoom();
   574 
   576 
   575     if (curid == ID_PAGE_SCHEME)
   577     if (curid == ID_PAGE_SCHEME)
   576         ammoSchemeModel->Save();
   578         ammoSchemeModel->Save();
       
   579 }
       
   580 
       
   581 void HWForm::OpenSnapshotFolder()
       
   582 {
       
   583     QString path = QDir::toNativeSeparators(cfgdir->absolutePath() + "/Screenshots");
       
   584     QDesktopServices::openUrl(QUrl("file:///" + path));
   577 }
   585 }
   578 
   586 
   579 void HWForm::btnExitPressed()
   587 void HWForm::btnExitPressed()
   580 {
   588 {
   581     eggTimer.start();
   589     eggTimer.start();