• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • libtdegames
 

libtdegames

  • libtdegames
  • kgame
  • dialogs
kgameconnectdialog.h
1/*
2 This file is part of the TDE games library
3 Copyright (C) 2001 Martin Heni (martin@heni-online.de)
4 Copyright (C) 2001 Andreas Beckermann (b_mann@gmx.de)
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
9
10 This library 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 GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef __KGAMECONNECTDIALOG_H__
22#define __KGAMECONNECTDIALOG_H__
23
24#include <kdialogbase.h>
25
26class KGameConnectDialogPrivate;
27class KGameConnectWidgetPrivate;
28
29class KGameConnectWidget : public TQWidget
30{
31 TQ_OBJECT
32
33public:
34 KGameConnectWidget(TQWidget* parent);
35 virtual ~KGameConnectWidget();
36
40 void setHost(const TQString& host);
41
46 TQString host() const;
47
51 void setPort(unsigned short int port);
52
56 unsigned short int port() const;
57
62 void setDefault(int state);
63
70 void setType(const TQString& type);
71
75 TQString type() const;
76
82 void setName(const TQString& name);
83
87 TQString gameName() const;
88
89protected slots:
94 void slotTypeChanged(int);
95 void slotGamesFound();
96 void slotGameSelected(int);
97
98signals:
99 void signalNetworkSetup();
100 void signalServerTypeChanged(int);
101
102private:
103 void showDnssdControls();
104 KGameConnectWidgetPrivate* d;
105
106};
107
117class KGameConnectDialog : public KDialogBase
118{
119 TQ_OBJECT
120
121public:
122 KGameConnectDialog(TQWidget* parent = 0,int buttonmask=Ok|Cancel);
123 virtual ~KGameConnectDialog();
124
135 static int initConnection(unsigned short int& port, TQString& host, TQWidget* parent, bool server = false);
136
140 void setHost(const TQString& host);
141
146 TQString host() const;
147
151 void setPort(unsigned short int port);
152
156 unsigned short int port() const;
157
162 void setDefault(int state);
163
164signals:
165 void signalNetworkSetup();
166
167private:
168 KGameConnectDialogPrivate* d;
169};
170
171#endif
KGameConnectDialog
Dialog to ask for host and port.
Definition: kgameconnectdialog.h:118
KGameConnectDialog::initConnection
static int initConnection(unsigned short int &port, TQString &host, TQWidget *parent, bool server=false)
Shows a dialog to either connect to an existing game or to create a server game, depending on user's ...
Definition: kgameconnectdialog.cpp:230
KGameConnectDialog::host
TQString host() const
Definition: kgameconnectdialog.cpp:250
KGameConnectDialog::setHost
void setHost(const TQString &host)
Definition: kgameconnectdialog.cpp:260
KGameConnectDialog::port
unsigned short int port() const
Definition: kgameconnectdialog.cpp:255
KGameConnectDialog::setDefault
void setDefault(int state)
Specifies which state is the default (0 = server game; 1 = join game)
Definition: kgameconnectdialog.cpp:270
KGameConnectDialog::setPort
void setPort(unsigned short int port)
Definition: kgameconnectdialog.cpp:265

libtdegames

Skip menu "libtdegames"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

libtdegames

Skip menu "libtdegames"
  • libtdegames
Generated for libtdegames by doxygen 1.9.4
This website is maintained by Timothy Pearson.