2 Copyright (C) 1998-2001 Andreas Zehender <az@azweb.de>
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2 of the License, or
6 (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef KSPACEDUEL_DIALOGS_H
19 #define KSPACEDUEL_DIALOGS_H
26 #include <kconfigdialog.h>
32 class ConfigSetup
:public QWidget
36 explicit ConfigSetup(SConfig
*custom
,QWidget
*parent
=0);
40 void updateSettings();
42 void updateWidgetsDefault();
48 void configSelected(int num
);
49 void sliderChanged(int val
);
51 void valueChanged(int ednum
,int val
);
52 void valueChanged(int ednum
,double val
);
53 void displayConfig(SConfig cfg
);
54 void setValue(int ednum
,int val
);
55 void setValue(int ednum
,double val
);
56 void setValue(int ednum
,unsigned val
);
58 enum {EditGamespeed
=0,
59 EditShotSpeed
,EditShotEnergyNeed
,EditMaxBullets
,EditBulletDamage
,
60 EditBulletLifeTime
,EditBulletReloadTime
,
61 EditMineFuel
,EditMineEnergyNeed
,EditMineActivateTime
,
62 EditMineDamage
,EditMaxMines
,EditMineReloadTime
,
63 EditAcc
,EditEnergyNeed
,EditRotationSpeed
,
64 EditRotationEnergyNeed
,EditShipDamage
,
65 EditSunEnergy
,EditGravity
,
66 EditPosX
,EditPosY
,EditVelX
,EditVelY
,
67 EditPowerupRefreshTime
,EditPowerupLifeTime
,
68 EditPowerupEnergyAmount
,EditPowerupShieldAmount
,
70 enum {TabGeneral
=0,TabBullet
,TabMine
,
71 TabShip
,TabSun
,TabStart
,TabPowerups
,TabNum
};
72 enum Type
{VarInt
,VarFloat
};
74 static char LabelName
[EditNum
][25];
75 static int Parent
[EditNum
];
76 static int Position
[EditNum
];
77 static const char *TabName
[TabNum
];
78 static double EditVal
[EditNum
][3];
79 static int EditDiv
[EditNum
];
80 static Type VarType
[EditNum
];
84 QSlider
*slider
[EditNum
];
85 QLCDNumber
*value
[EditNum
];
87 QComboBox
*configCombo
;
88 SConfig
*customConfig
,config
;
93 class SettingsDialog
: public KConfigDialog
97 explicit SettingsDialog(SConfig
*customConfig
, QWidget
*parent
=0, const char *name
=0);
101 void settingsUpdated();
104 void updateWidgets();
105 void updateWidgetsDefault();
106 void updateSettings();
116 #endif // KSPACEDUEL_DIALOGS_H