1 /*****************************************************************************
2  * PokerTH - The open source texas holdem engine                             *
3  * Copyright (C) 2006-2012 Felix Hammer, Florian Thauer, Lothar May          *
4  *                                                                           *
5  * This program is free software: you can redistribute it and/or modify      *
6  * it under the terms of the GNU Affero General Public License as            *
7  * published by the Free Software Foundation, either version 3 of the        *
8  * License, or (at your option) any later version.                           *
9  *                                                                           *
10  * This program is distributed in the hope that it will be useful,           *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
13  * GNU Affero General Public License for more details.                       *
14  *                                                                           *
15  * You should have received a copy of the GNU Affero General Public License  *
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.     *
17  *                                                                           *
18  *                                                                           *
19  * Additional permission under GNU AGPL version 3 section 7                  *
20  *                                                                           *
21  * If you modify this program, or any covered work, by linking or            *
22  * combining it with the OpenSSL project's OpenSSL library (or a             *
23  * modified version of that library), containing parts covered by the        *
24  * terms of the OpenSSL or SSLeay licenses, the authors of PokerTH           *
25  * (Felix Hammer, Florian Thauer, Lothar May) grant you additional           *
26  * permission to convey the resulting work.                                  *
27  * Corresponding Source for a non-source form of such a combination          *
28  * shall include the source code for the parts of OpenSSL used as well       *
29  * as that of the covered work.                                              *
30  *****************************************************************************/
31 #ifndef MYMESSAGEDIALOGIMPL_H
32 #define MYMESSAGEDIALOGIMPL_H
33 
34 #ifdef GUI_800x480
35 #include "ui_mymessagedialog_800x480.h"
36 #else
37 #include "ui_mymessagedialog.h"
38 #endif
39 
40 enum MESSAGE_CONTENT {
41 	NONE=0,                           //0: not set ;)
42 	BACKTO_LOBBY_QUESTION,          //1: leave lobby during online game: Question(Do you really wanna leave?)
43 	INFO_AFTER_JOIN_INVITE_GAME,    //2: join invite only game: Info(You can invite people with right click ...)
44 	JOIN_INVITE_GAME_QUESTION,      //3: reciev invite to game: Question(You've been invited to the game <b>%1</b> by <b>%2</b>.<br>Do you want to join this game?)
45 	IGNORE_PLAYER_QUESTION,        //4: click ignore player: Question(Do you really want to put this player on ignore List?)
46 	GT_VALUES_MISSING,              //5: Selected game table style \"%1\" seems to be incomplete or defective. \n\nThe value(s) of: \n%2 \nis/are missing.
47 	CLOSE_GAMETABLE_QUESTION,       //6: close gametable: Do you really wanna quit?
48 	GT_PICS_MISSING,                //7: One or more pictures from current game table style \"%1\" were not found:
49 	GT_OUTDATED,                    //8: Selected game table style \"%1\" seems to be outdated. \nThe current PokerTH game table style version is
50 	CD_VALUES_MISSING,              //9:
51 	CD_PICS_MISSING,                //10:
52 	CD_OUTDATED,                    //11:
53 	UNIGNORE_PLAYER_QUESTION       //12: click unignore player: Question(Do you really want to remove this player from ignore List?)
54 };
55 
56 class ConfigFile;
57 
58 class myMessageDialogImpl: public QDialog, public Ui::myMessageDialog
59 {
60 	Q_OBJECT
61 public:
62 
63 	myMessageDialogImpl(ConfigFile *, QWidget *parent = 0);
64 
65 public slots:
66 
67 	bool checkIfMesssageWillBeDisplayed(int id);
68 	int exec(int messageId, QString msg, QString title, QPixmap pix, QDialogButtonBox::StandardButtons buttons, bool showCheckBox = false);
69 	void show(int messageId, QString msg, QString title, QPixmap pix, QDialogButtonBox::StandardButtons buttons, bool showCheckBox = false);
70 	void accept();
71 	void reject();
72 	void writeConfig();
73 
74 private:
75 
76 	ConfigFile *myConfig;
77 	int currentMsgId;
78 	std::list<std::string> currentMsgShowList;
79 
80 };
81 
82 #endif
83 
84