|
From: Audoux <au...@us...> - 2001-01-03 08:34:13
|
Update of /cvsroot/attal/src/client
In directory usw-pr-cvs1:/tmp/cvs-serv10923
Modified Files:
game.cpp game.h gameInfo.cpp gameInfo.h
Log Message:
add 'Calendar display' in GameInfo
Index: game.cpp
===================================================================
RCS file: /cvsroot/attal/src/client/game.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** game.cpp 2001/01/03 00:32:15 1.29
--- game.cpp 2001/01/03 08:34:10 1.30
***************
*** 40,43 ****
--- 40,44 ----
#include "common/pathFinder.h"
#include "common/attalSocket.h"
+ #include "common/calendar.h"
#include "client/lord.h"
#include "client/building.h"
***************
*** 57,60 ****
--- 58,62 ----
: QWidget( parent,name )
{
+ _calendar = new Calendar();
_map = new Map( this );
_socket = 0;
***************
*** 79,83 ****
_miniMap = new MiniMap( this );
! _gameInfo = new GameInfo( this );
_control = new GameControl( this );
--- 81,85 ----
_miniMap = new MiniMap( this );
! _gameInfo = new GameInfo( _calendar, this );
_control = new GameControl( this );
Index: game.h
===================================================================
RCS file: /cvsroot/attal/src/client/game.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** game.h 2001/01/03 00:32:15 1.12
--- game.h 2001/01/03 08:34:10 1.13
***************
*** 45,48 ****
--- 45,49 ----
class DisplayLord;
class GameInfo;
+ class Calendar;
/* ------------------------------
***************
*** 93,96 ****
--- 94,98 ----
DisplayLord * _dispLord;
MiniMap * _miniMap;
+ Calendar * _calendar;
};
Index: gameInfo.cpp
===================================================================
RCS file: /cvsroot/attal/src/client/gameInfo.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** gameInfo.cpp 2001/01/03 00:31:03 1.1
--- gameInfo.cpp 2001/01/03 08:34:10 1.2
***************
*** 31,46 ****
#include <qlabel.h>
#include <qpixmap.h>
// application specific include files
extern QString IMAGE_PATH;
/** add comments here */
! GameInfo::GameInfo( QWidget * parent, const char * name )
:QWidget( parent, name )
{
QVBoxLayout * layout = new QVBoxLayout( this );
QLabel * main = new QLabel( this );
main->setPixmap( QPixmap( IMAGE_PATH + "misc/logo.xpm" ) );
! layout->addWidget( main, 1 );
layout->activate();
--- 31,80 ----
#include <qlabel.h>
#include <qpixmap.h>
+ #include <qstring.h>
// application specific include files
+ #include "common/calendar.h"
+ #include "client/gui.h"
extern QString IMAGE_PATH;
/** add comments here */
! GameInfo::GameInfo( Calendar * calendar, QWidget * parent, const char * name )
:QWidget( parent, name )
{
+ _calendar = calendar;
+
QVBoxLayout * layout = new QVBoxLayout( this );
+
+ layout->addStretch( 1 );
QLabel * main = new QLabel( this );
main->setPixmap( QPixmap( IMAGE_PATH + "misc/logo.xpm" ) );
! FIXEDSIZE( main );
! layout->addWidget( main );
!
! QHBoxLayout * layH1 = new QHBoxLayout();
! layH1->addStretch( 1 );
!
! _dateM = new QLabel( this );
! _dateM->setText( "Month : " + QString::number( _calendar->getMonth() ) );
! //_dateM->setFixedSize( _dateM->sizeHint().width(), 20 );
! FIXEDSIZE( _dateM );
! layH1->addWidget( _dateM );
! layH1->addStretch( 1 );
!
! _dateW = new QLabel( this );
! _dateW->setText( "Week : " + QString::number( _calendar->getWeek() ) );
! //_dateW->setFixedSize( _dateW->sizeHint().width(), 20 );
! FIXEDSIZE( _dateW );
! layH1->addWidget( _dateW );
! layH1->addStretch( 1 );
!
! _dateD = new QLabel( this );
! _dateD->setText( "Day : " + QString::number( _calendar->getDay() ) );
! //_dateD->setFixedSize( _dateD->sizeHint().width(), 20 );
! FIXEDSIZE( _dateD );
! layH1->addWidget( _dateD );
! layH1->addStretch( 1 );
!
! layout->addLayout( layH1 );
layout->activate();
Index: gameInfo.h
===================================================================
RCS file: /cvsroot/attal/src/client/gameInfo.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** gameInfo.h 2001/01/03 00:31:03 1.1
--- gameInfo.h 2001/01/03 08:34:10 1.2
***************
*** 36,40 ****
// application specific include files
!
/* ------------------------------
* GameInfo
--- 36,42 ----
// application specific include files
! class QLabel;
! class Calendar;
!
/* ------------------------------
* GameInfo
***************
*** 49,55 ****
public:
/** this is the construtor */
! GameInfo( QWidget * parent = 0, const char * name = 0 );
!
};
--- 51,60 ----
public:
/** this is the construtor */
! GameInfo( Calendar * calendar, QWidget * parent = 0, const char * name = 0 );
!
+ private:
+ QLabel * _dateM, * _dateW, * _dateD;
+ Calendar * _calendar;
};
|