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
|
/****************************************************************
**
** Attal : Lords of Doom
**
** unitExchange.h
** dialog for creature exchange between units
**
** Version : $Id: unitExchange.h,v 1.1.1.1 2003/06/15 19:02:02 audoux Exp $
**
** Author(s) : Pascal Audoux - Cyrille Verrier
**
** Date : 04/01/2001
**
** 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.
**
****************************************************************/
#ifndef UNITEXCHANGE_H
#define UNITEXCHANGE_H
// generic include files
// include files for QT
#include <qdialog.h>
#include <qlcdnumber.h>
// application specific include files
class QScrollBar;
class Icon;
class GenericFightUnit;
/* ------------------------------
* UnitExchange
* ------------------------------ */
/** comment for the class */
class UnitExchange : public QDialog
{
Q_OBJECT
public:
/** Constructor */
UnitExchange( QWidget * parent = 0, const char * name = 0 );
/** Set the min value */
void setMin( int val );
/** Set the max value */
void setMax( int val );
/** Set the nb of unith at left and at right */
void setUnits( GenericFightUnit * uniLeft, GenericFightUnit * uniRight );
/** Return the value on the rigth side */
int getRightValue() { return _rightLCD->intValue(); }
/** Return the value on the left side */
int getLeftValue() { return _leftLCD->intValue(); }
public slots:
/** Slot when 'Ok' button is clicked */
void slot_ok() { accept(); }
/** Slot when 'Cancel' button is clicked */
void slot_cancel() { reject(); }
/** Slot when the ScrollBar is moved */
void slot_barScrolled( int val );
private:
QScrollBar * _scroll;
QLCDNumber * _leftLCD, * _rightLCD;
Icon * _icoLeft, * _icoRight;
int _sum;
};
#endif // UNITEXCHANGE_H
|