1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
/****************************************************************
**
** Attal : Lords of Doom
**
** gainLevel.cpp
** Dialog when lord gain a new level
**
** Version : $Id: gainLevel.cpp,v 1.1.1.1 2003/06/15 19:02:02 audoux Exp $
**
** Author(s) : Pascal Audoux
**
** Date : 10/12/2000
**
** Licence :
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2, or (at your option)
** any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
****************************************************************/
#include "gainLevel.h"
// generic include files
// include files for QT
#include <qlayout.h>
#include <qpixmap.h>
#include <qlabel.h>
// application specific include
#include "libClient/gui.h"
#include "libClient/widget.h"
extern QString IMAGE_PATH;
/*! Constructs an empty
*/
GainLevel::GainLevel( QWidget * parent, const char * name )
:QDialog( parent, name, true )
{
_skill = SKI_ATTACK;
QVBoxLayout * layout = new QVBoxLayout( this );
_title = new Sentence( this );
_title->setText( "Actarius gain a level" );
layout->addSpacing( 5 );
layout->addWidget( _title );
layout->addSpacing( 10 );
_photo = new Icon( this );
_photo->setPixmap( QPixmap( IMAGE_PATH + "lords/lord_001.png" ) );
Icon * panel1 = new Icon( this );
panel1->setPixmap( QPixmap( IMAGE_PATH + "misc/exp.png" ) );
Icon * panel2 = new Icon( this );
panel2->setPixmap( QPixmap( IMAGE_PATH + "misc/exp.png" ) );
QHBoxLayout * lay1 = new QHBoxLayout();
lay1->addStretch( 1 );
lay1->addWidget( panel1 );
lay1->addStretch( 1 );
lay1->addWidget( _photo );
lay1->addStretch( 1 );
lay1->addWidget( panel2 );
lay1->addStretch( 1 );
layout->addLayout( lay1, 1 );
layout->addSpacing( 10 );
_level = new Sentence( this );
_level->setText( "Actarius is now a level 6 hacker" );
layout->addWidget( _level );
layout->addSpacing( 5 );
layout->addStretch( 1 );
layout->addSpacing( 5 );
_spec = new Sentence( this );
_spec->setText( "Knowledge + 1" );
layout->addWidget( _spec );
layout->addSpacing( 5 );
_choice1 = new QPushButton( this );
_choice1->setPixmap( QPixmap( IMAGE_PATH + "skills/skill_001.png" ) );
_choice1->setFixedSize( 40, 40 );
_choice2 = new QPushButton( this );
_choice2->setPixmap( QPixmap( IMAGE_PATH + "skills/skill_002.png" ) );
_choice2->setFixedSize( 40, 40 );
QHBoxLayout * lay3 = new QHBoxLayout();
lay3->addStretch( 1 );
lay3->addWidget( _choice1 );
lay3->addStretch( 1 );
lay3->addWidget( _choice2 );
lay3->addStretch( 1 );
layout->addLayout( lay3, 1 );
layout->addSpacing( 5 );
QHBoxLayout * lay4 = new QHBoxLayout();
lay4->addStretch( 5 );
_butOk = createButtonOk( this );
lay4->addWidget( _butOk );
lay4->addStretch( 1 );
layout->addLayout( lay4 );
layout->addSpacing( 5 );
layout->activate();
setFixedSize( 420, 480 );
connect( _butOk, SIGNAL( clicked() ), SLOT( accept() ) );
connect( _choice1, SIGNAL( clicked() ), SLOT( slot_choice1() ) );
connect( _choice2, SIGNAL( clicked() ), SLOT( slot_choice2() ) );
}
void GainLevel::reinit()
{
_choice = -1;
_butOk->setEnabled( false );
}
|