[atlantik-cvs] CVS: kdegames/atlantik/client atlantik.cpp,1.138,1.139 selectconfiguration_widget.cpp,1.33,1.34 selectconfiguration_widget.h,1.17,1.18

[email protected]
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
Update of /home/kde/kdegames/atlantik/client
In directory office:/tmp/cvs-serv25763/client

Modified Files:
	atlantik.cpp selectconfiguration_widget.cpp 
	selectconfiguration_widget.h 
Log Message:
update statuslabel when game configuration options have been retrieved

Index: atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- atlantik.cpp	8 Feb 2003 15:10:58 -0000	1.138
+++ atlantik.cpp	8 Feb 2003 15:36:02 -0000	1.139
@@ -301,6 +301,7 @@
 	m_selectConfiguration->show();
 
 	connect(m_atlantikNetwork, SIGNAL(gameOption(QString, QString, QString, QString, QString)), m_selectConfiguration, SLOT(gameOption(QString, QString, QString, QString, QString)));
+	connect(m_atlantikNetwork, SIGNAL(endConfigUpdate()), m_selectConfiguration, SLOT(slotEndUpdate()));
 	connect(m_selectConfiguration, SIGNAL(startGame()), m_atlantikNetwork, SLOT(startGame()));
 	connect(m_selectConfiguration, SIGNAL(leaveGame()), m_atlantikNetwork, SLOT(leaveGame()));
 	connect(m_selectConfiguration, SIGNAL(buttonCommand(QString)), m_atlantikNetwork, SLOT(writeData(QString)));

Index: selectconfiguration_widget.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/selectconfiguration_widget.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- selectconfiguration_widget.cpp	8 Feb 2003 15:10:58 -0000	1.33
+++ selectconfiguration_widget.cpp	8 Feb 2003 15:36:03 -0000	1.34
@@ -73,14 +73,19 @@
 	connect(m_startButton, SIGNAL(clicked()), this, SLOT(connectClicked()));
 
     // Status indicator.
-	status_label = new QLabel(this);
-	status_label->setText(i18n("Retrieving configuration list..."));
-	m_mainLayout->addWidget(status_label);
+	m_statusLabel = new QLabel(this);
+	m_statusLabel->setText(i18n("Retrieving configuration list..."));
+	m_mainLayout->addWidget(m_statusLabel);
+}
+
+SelectConfiguration::~SelectConfiguration()
+{
+	delete m_statusLabel;
 }
 
 void SelectConfiguration::connectClicked()
 {
-	status_label->setText(i18n("Game started. Retrieving full game data..."));
+	m_statusLabel->setText(i18n("Game started. Retrieving full game data..."));
 	emit startGame();
 }
 
@@ -130,18 +135,6 @@
 	// TODO: Enable edit for master only
 }
 
-/*
-// some old code i might want to reuse
-
-void ConfigureGame::slotPlayerlistEndUpdate(QString type)
-{
-	if (type=="full")
-		status_label->setText(i18n("Fetched list of players."));
-
-	emit statusChanged();
-}
-*/
-
 void SelectConfiguration::optionChanged()
 {
 	QString command = m_optionCommandMap[(QObject *)QObject::sender()];
@@ -151,6 +144,11 @@
 		command.append(QString::number(checkBox->isChecked()));
 		emit buttonCommand(command);
 	}
+}
+
+void SelectConfiguration::slotEndUpdate()
+{
+	m_statusLabel->setText(i18n("Retrieved configuration list."));
 }
 
 void SelectConfiguration::setCanStart(const bool &canStart)

Index: selectconfiguration_widget.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/selectconfiguration_widget.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- selectconfiguration_widget.h	8 Feb 2003 15:10:58 -0000	1.17
+++ selectconfiguration_widget.h	8 Feb 2003 15:36:03 -0000	1.18
@@ -37,6 +37,7 @@
 
 public:
 	SelectConfiguration(QWidget *parent, const char *name=0);
+	~SelectConfiguration();
 
 	void initPage();
 	void setCanStart(const bool &canStart);
@@ -49,6 +50,7 @@
 	void slotTokenSelected(const QString &name);
 	void gameOption(QString title, QString type, QString value, QString edit, QString command);
 	void optionChanged();
+	void slotEndUpdate();
 
 signals:
 	void startGame();
@@ -61,7 +63,7 @@
 
 private:
 	QVBoxLayout *m_mainLayout;
-	QLabel *status_label;
+	QLabel *m_statusLabel;
 	QVGroupBox *m_configBox, *m_messageBox;
 	KPushButton *m_backButton, *m_startButton, *m_tokenButton;
 	QMap <QObject *, QString> m_optionCommandMap;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.