indent fixes tab = 4 chars

This commit is contained in:
doitux
2010-03-30 12:25:30 +00:00
parent 0da0b4f8a0
commit 598b26c5ff
11 changed files with 2494 additions and 2497 deletions
@@ -39,9 +39,9 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
waitStartGameMsgBox = new QMessageBox(this);
waitStartGameMsgBox->setText(tr("Starting game. Please wait ..."));
waitStartGameMsgBox->setWindowModality(Qt::NonModal);
#ifdef __APPLE__
#ifdef __APPLE__
waitStartGameMsgBox->setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
#endif
#endif
waitStartGameMsgBox->setStandardButtons(QMessageBox::NoButton);
waitStartGameMsgBoxTimer = new QTimer(this);
@@ -373,7 +373,7 @@ void gameLobbyDialogImpl::gameSelected(const QModelIndex &index, const QModelInd
hideShowGameDescription(TRUE);
label_SmallBlind->setText(QString("%L1").arg(info.data.firstSmallBlind));
label_StartCash->setText(QString("%L1").arg(info.data.startMoney));
// label_MaximumNumberOfPlayers->setText(QString::number(info.data.maxNumberOfPlayers));s
// label_MaximumNumberOfPlayers->setText(QString::number(info.data.maxNumberOfPlayers));s
updateDialogBlinds(info.data);
label_TimeoutForPlayerAction->setText(QString::number(info.data.playerActionTimeoutSec));
@@ -485,7 +485,7 @@ void gameLobbyDialogImpl::updateGameItem(QList <QStandardItem*> itemList, unsign
itemList.at(4)->setData("nonpriv", 16);
}
// treeView_GameList->sortByColumn(myConfig->readConfigInt("DlgGameLobbyGameListSortingSection"), (Qt::SortOrder)myConfig->readConfigInt("DlgGameLobbyGameListSortingOrder") );
// treeView_GameList->sortByColumn(myConfig->readConfigInt("DlgGameLobbyGameListSortingSection"), (Qt::SortOrder)myConfig->readConfigInt("DlgGameLobbyGameListSortingOrder") );
refreshGameStats();
}
@@ -1031,26 +1031,26 @@ void gameLobbyDialogImpl::kickPlayer() {
void gameLobbyDialogImpl::keyPressEvent ( QKeyEvent * event ) {
// qDebug() << event->key() << "\n";
// qDebug() << event->key() << "\n";
if (event->key() == Qt::Key_Enter && lineEdit_ChatInput->hasFocus()) { myChat->sendMessage(); }
if (event->key() == Qt::Key_Up && lineEdit_ChatInput->hasFocus()) {
if((keyUpCounter + 1) <= myChat->getChatLinesHistorySize()) { keyUpCounter++; }
// std::cout << "Up keyUpCounter: " << keyUpCounter << "\n";
// std::cout << "Up keyUpCounter: " << keyUpCounter << "\n";
myChat->showChatHistoryIndex(keyUpCounter);
}
else if(event->key() == Qt::Key_Down && lineEdit_ChatInput->hasFocus()) {
if((keyUpCounter - 1) >= 0) { keyUpCounter--; }
// std::cout << "Down keyUpCounter: " << keyUpCounter << "\n";
// std::cout << "Down keyUpCounter: " << keyUpCounter << "\n";
myChat->showChatHistoryIndex(keyUpCounter);
}
else { keyUpCounter = 0; }
// if (event->key() == Qt::Key_Tab) event->ignore(); else { /*blah*/ }
// if (event->key() == Qt::Key_Tab) event->ignore(); else { /*blah*/ }
// if (event->key() == Qt::Key_N) showInvitationDialog();
// if (event->key() == Qt::Key_M) guestUserMode();
// if (event->key() == Qt::Key_N) showInvitationDialog();
// if (event->key() == Qt::Key_M) guestUserMode();
}
@@ -1138,9 +1138,9 @@ void gameLobbyDialogImpl::writeDialogSettings(int saveMode)
{
switch(saveMode) {
case 0: {
// myConfig->writeConfigInt("DlgGameLobbyGameListSortingSection", myGameListSortFilterProxyModel->sortColumn());
// myConfig->writeConfigInt("DldgGameLobbyGameListSortingOrder", myGameListSortFilterProxyModel->sortOrder());
// qt 4.4.* compatibility
// myConfig->writeConfigInt("DlgGameLobbyGameListSortingSection", myGameListSortFilterProxyModel->sortColumn());
// myConfig->writeConfigInt("DldgGameLobbyGameListSortingOrder", myGameListSortFilterProxyModel->sortOrder());
// qt 4.4.* compatibility
QHeaderView *header = treeView_GameList->header();
myConfig->writeConfigInt("DlgGameLobbyGameListSortingSection", header->sortIndicatorSection());
myConfig->writeConfigInt("DlgGameLobbyGameListSortingOrder", header->sortIndicatorOrder());
@@ -1200,48 +1200,48 @@ void gameLobbyDialogImpl::changeGameListFilter(int index) {
}
break;
// case 5: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp("open", Qt::CaseInsensitive, QRegExp::FixedString));
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("nonpriv", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
// case 6: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp("open", Qt::CaseInsensitive, QRegExp::FixedString));
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("private", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
// case 7: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp("nonfull", Qt::CaseInsensitive, QRegExp::FixedString));
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp());
// }
// break;
// case 8: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp("nonfull", Qt::CaseInsensitive, QRegExp::FixedString));
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("nonpriv", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
// case 9: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp("nonfull", Qt::CaseInsensitive, QRegExp::FixedString));
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("private", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
// case 10: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("nonpriv", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
// case 11: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("private", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
// case 5: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp("open", Qt::CaseInsensitive, QRegExp::FixedString));
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("nonpriv", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
// case 6: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp("open", Qt::CaseInsensitive, QRegExp::FixedString));
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("private", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
// case 7: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp("nonfull", Qt::CaseInsensitive, QRegExp::FixedString));
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp());
// }
// break;
// case 8: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp("nonfull", Qt::CaseInsensitive, QRegExp::FixedString));
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("nonpriv", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
// case 9: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp("nonfull", Qt::CaseInsensitive, QRegExp::FixedString));
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("private", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
// case 10: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("nonpriv", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
// case 11: {
// myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp());
// myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("private", Qt::CaseInsensitive, QRegExp::FixedString));
// }
// break;
default:;
}
myGameListSortFilterProxyModel->setFilterRegExp(QString());
@@ -1378,4 +1378,5 @@ void gameLobbyDialogImpl::chatInfoPlayerRejectedInviation(unsigned gameId, unsig
if(reason == DENY_GAME_INVITATION_BUSY) string = tr("<span style='color:red;'>Player %1 can not join %2 because he is busy.</span>");
textBrowser_ChatDisplay->append(string.arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerIdWho).playerName.c_str())).arg(QString::fromUtf8(mySession->getClientGameInfo(gameId).name.c_str())));
}
@@ -35,7 +35,7 @@ class MyGameListSortFilterProxyModel;
*/
class gameLobbyDialogImpl: public QDialog, public Ui::gameLobbyDialog {
Q_OBJECT
Q_OBJECT
public:
gameLobbyDialogImpl(startWindowImpl *parent = 0, ConfigFile* = 0);
@@ -146,7 +146,7 @@ private:
bool inviteDialogIsCurrentlyShown;
protected:
protected:
bool eventFilter(QObject *obj, QEvent *event);
};
+8 -3
View File
@@ -186,6 +186,11 @@ void GuiWrapper::SignalLobbyPlayerJoined(unsigned playerId, const string &nickNa
void GuiWrapper::SignalLobbyPlayerKicked(const std::string &nickName, const std::string &byWhom, const std::string &reason) { myStartWindow->signalLobbyPlayerKicked(QString::fromUtf8(nickName.c_str()), QString::fromUtf8(byWhom.c_str()), QString::fromUtf8(reason.c_str())); }
void GuiWrapper::SignalLobbyPlayerLeft(unsigned playerId) { myStartWindow->signalLobbyPlayerLeft(playerId); }
void GuiWrapper::SignalSelfGameInvitation(unsigned gameId, unsigned playerIdFrom) { myStartWindow->signalSelfGameInvitation(gameId, playerIdFrom); }
void GuiWrapper::SignalPlayerGameInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom) { myStartWindow->signalPlayerGameInvitation(gameId, playerIdWho, playerIdFrom); }
void GuiWrapper::SignalRejectedGameInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason) { myStartWindow->signalRejectedGameInvitation(gameId, playerIdWho, reason); }
void GuiWrapper::SignalSelfGameInvitation(unsigned gameId, unsigned
playerIdFrom) { myStartWindow->signalSelfGameInvitation(gameId, playerIdFrom);
} void GuiWrapper::SignalPlayerGameInvitation(unsigned gameId, unsigned
playerIdWho, unsigned playerIdFrom) {
myStartWindow->signalPlayerGameInvitation(gameId, playerIdWho, playerIdFrom); }
void GuiWrapper::SignalRejectedGameInvitation(unsigned gameId, unsigned
playerIdWho, DenyGameInvitationReason reason) {
myStartWindow->signalRejectedGameInvitation(gameId, playerIdWho, reason); }
+8 -8
View File
@@ -59,13 +59,13 @@ startWindowImpl::startWindowImpl(ConfigFile *c)
{
mySession.reset(new Session(myGuiInterface.get(), myConfig));
mySession->init(); // TODO handle error
// myGuiInterface->setSession(session);
// myGuiInterface->setSession(session);
}
// #ifdef __APPLE__
// setWindowModality(Qt::ApplicationModal);
// setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
// #endif
// #ifdef __APPLE__
// setWindowModality(Qt::ApplicationModal);
// setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
// #endif
setupUi(this);
this->setWindowTitle(QString(tr("PokerTH %1").arg(POKERTH_BETA_RELEASE_STRING)));
@@ -77,7 +77,7 @@ startWindowImpl::startWindowImpl(ConfigFile *c)
centralwidget->setStyleSheet(".QWidget { background-image: url(\""+myAppDataPath+"gfx/gui/misc/startwindowbg.png\"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
// Dialogs
// Dialogs
myNewGameDialog = new newGameDialogImpl(this, myConfig);
mySelectAvatarDialog = new selectAvatarDialogImpl(this, myConfig);
mySettingsDialog = new settingsDialogImpl(this, myConfig, mySelectAvatarDialog);
@@ -150,7 +150,7 @@ startWindowImpl::startWindowImpl(ConfigFile *c)
connect(this, SIGNAL(signalNetClientShowTimeoutDialog(int, unsigned)), this, SLOT(showTimeoutDialog(int, unsigned)));
connect(this, SIGNAL(signalLobbyPlayerJoined(unsigned, QString)), myGameLobbyDialog, SLOT(playerJoinedLobby(unsigned, QString)));
// connect(this, SIGNAL(signalLobbyPlayerKicked(QString, QString, QString)), myGameLobbyDialog, SLOT(playerKicked(QString, QString, QString)));
connect(this, SIGNAL(signalLobbyPlayerKicked(QString, QString, QString)), myGameLobbyDialog, SLOT(playerKicked(QString, QString, QString)));
connect(this, SIGNAL(signalLobbyPlayerLeft(unsigned)), myGameLobbyDialog, SLOT(playerLeftLobby(unsigned)));
@@ -351,7 +351,7 @@ void startWindowImpl::callInternetGameLoginDialog() {
void startWindowImpl::callCreateNetworkGameDialog() {
myCreateNetworkGameDialog->exec();
//
//
if (myCreateNetworkGameDialog->result() == QDialog::Accepted ) {
// Stop local game.
+4 -13
View File
@@ -47,7 +47,7 @@ class serverListDialogImpl;
class internetGameLoginDialogImpl;
class startWindowImpl: public QMainWindow, public Ui::startWindow {
Q_OBJECT
Q_OBJECT
public:
startWindowImpl(ConfigFile *c =0);
@@ -56,7 +56,7 @@ public:
boost::shared_ptr< GuiInterface > getMyServerGuiInterface() const { return myServerGuiInterface; }
connectToServerDialogImpl* getMyConnectToServerDialog() const { return myConnectToServerDialog; }
// void keyPressEvent( QKeyEvent *);
// void keyPressEvent( QKeyEvent *);
signals:
void signalShowClientDialog();
@@ -89,15 +89,6 @@ signals:
void signalNetClientLobbyChatMsg(QString nickName, QString msg);
void signalNetClientMsgBox(QString msg);
// void signalIrcConnect(QString server);
// void signalIrcSelfJoined(QString nickName, QString channel);
// void signalIrcPlayerJoined(QString nickName);
// void signalIrcPlayerChanged(QString oldNick, QString newNick);
// void signalIrcPlayerKicked(QString nickName, QString byWhom, QString reason);
// void signalIrcPlayerLeft(QString nickName);
// void signalIrcChatMessage(QString nickName, QString msg);
// void signalIrcError(int errorCode);
// void signalIrcServerError(int errorCode);
void signalLobbyPlayerJoined(unsigned playerId, QString nickName);
void signalLobbyPlayerKicked(QString nickName, QString byWhom, QString reason);
void signalLobbyPlayerLeft(unsigned playerId);
@@ -139,7 +130,7 @@ private:
boost::shared_ptr<Session> mySession;
boost::shared_ptr<GuiInterface> myServerGuiInterface;
// Dialogs
// Dialogs
aboutPokerthImpl *myAboutPokerthDialog;
newGameDialogImpl *myNewGameDialog;
settingsDialogImpl *mySettingsDialog;
@@ -155,7 +146,7 @@ private:
serverListDialogImpl *myServerListDialog;
internetGameLoginDialogImpl *myInternetGameLoginDialog;
friend class GuiWrapper;
friend class GuiWrapper;
};
#endif
+8 -8
View File
@@ -44,7 +44,7 @@
using namespace std;
Session::Session(GuiInterface *g, ConfigFile *c)
: currentGameNum(0), myGui(g), myConfig(c), myGameType(GAME_TYPE_NONE)
: currentGameNum(0), myGui(g), myConfig(c), myGameType(GAME_TYPE_NONE)
{
myQtToolsInterface = CreateQtToolsWrapper();
}
@@ -305,11 +305,11 @@ void Session::startNetworkServer(bool dedicated)
ServerMode mode;
if (dedicated)
{
#ifdef POKERTH_OFFICIAL_SERVER
#ifdef POKERTH_OFFICIAL_SERVER
mode = SERVER_MODE_INTERNET_AUTH;
#else
#else
mode = SERVER_MODE_INTERNET_NOAUTH;
#endif
#endif
}
else
mode = SERVER_MODE_LAN;
@@ -425,7 +425,7 @@ void Session::selectServer(unsigned serverId)
}
void
Session::setLogin(const std::string &userName, const std::string &password, bool isGuest)
Session::setLogin(const std::string &userName, const std::string &password, bool isGuest)
{
if (!myNetClient)
return; // only act if client is running.
@@ -433,7 +433,7 @@ Session::setLogin(const std::string &userName, const std::string &password, bool
}
void
Session::invitePlayerToCurrentGame(unsigned playerId)
Session::invitePlayerToCurrentGame(unsigned playerId)
{
if (!myNetClient)
return; // only act if client is running.
@@ -441,7 +441,7 @@ Session::invitePlayerToCurrentGame(unsigned playerId)
}
void
Session::acceptGameInvitation(unsigned gameId)
Session::acceptGameInvitation(unsigned gameId)
{
if (!myNetClient)
return; // only act if client is running.
@@ -449,7 +449,7 @@ Session::acceptGameInvitation(unsigned gameId)
}
void
Session::rejectGameInvitation(unsigned gameId, DenyGameInvitationReason reason)
Session::rejectGameInvitation(unsigned gameId, DenyGameInvitationReason reason)
{
if (!myNetClient)
return; // only act if client is running.