diff options
author | Denis Kozadaev <denis@dilos.org> | 2020-03-28 17:45:12 +0300 |
---|---|---|
committer | Denis Kozadaev <denis@dilos.org> | 2020-03-28 17:45:12 +0300 |
commit | b93fd6da0b9fd56962db2ea64f98da30d5f93538 (patch) | |
tree | 9e20e7301f6d6ed7b45750718d6998a0d39e2ced /qnetchess/src/main.cpp | |
parent | 62af0157e055222214ab132575e41f924e997ff1 (diff) | |
download | tdegames-b93fd6da0b9fd56962db2ea64f98da30d5f93538.tar.gz tdegames-b93fd6da0b9fd56962db2ea64f98da30d5f93538.zip |
Network Chess game for two playersqnetchess
Signed-off-by: Denis Kozadaev <denis@dilos.org>
Diffstat (limited to 'qnetchess/src/main.cpp')
-rw-r--r-- | qnetchess/src/main.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/qnetchess/src/main.cpp b/qnetchess/src/main.cpp new file mode 100644 index 00000000..d58a6cce --- /dev/null +++ b/qnetchess/src/main.cpp @@ -0,0 +1,54 @@ +/* + * $Id: main.cpp,v 0.1 2005/01/08 12:19:58 denis Exp $ + * + * Author: Denis Kozadaev (denis@tambov.ru) + * Description: + * + * See also: style(9) + * + * Hacked by: + */ + +#include <ntqapplication.h> +#include <ntqmessagebox.h> +#include <ntqtextcodec.h> +#include <ntqtranslator.h> + +#include "mainwindow.h" + +const int + XSize = 800, + YSize = 600; + +int +main(int argc, const char *argv[]) +{ + TQApplication *app; + MainWindow *mw; +// TQTranslator *qt; + int result = 0; + + app = new TQApplication(argc, (char **)argv); +/* FIXME: how does TQTranslator() work in TQt? + qt = new TQTranslator(); + if (qt->load(LOCALE_FILE)) + app->installTranslator(qt);*/ + mw = new MainWindow(); + + if (mw->sockOk()) { + app->setMainWidget(mw); + mw->show(); + mw->resize(XSize, YSize); + mw->setMinimumSize(mw->size()); + result = app->exec(); + } else + TQMessageBox::critical(NULL, TQObject::tr("Socket Error"), + TQObject::tr("Cannot create a server socket!")); + + delete mw; +// delete qt; + delete app; + + return (result); +} + |