Main Page | Class List | File List | Class Members | Related Pages

/home/samy/kbilliards/src/kbilliards.h

00001 /*************************************************************************** 00002 kbilliards.h - description 00003 ------------------- 00004 begin : gio gen 24 13:37:53 CET 2002 00005 copyright : (C) 2002 by Samuele Catuzzi 00006 email : samuele_catuzzi@yahoo.it 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef KBILLIARDS_H 00019 #define KBILLIARDS_H 00020 00021 #ifdef HAVE_CONFIG_H 00022 #include <config.h> 00023 #endif 00024 00025 #include <kapp.h> 00026 #include <qwidget.h> 00027 #include <kmainwindow.h> 00028 #include <ktoolbar.h> 00029 #include <kconfig.h> 00030 #include <qcanvas.h> 00031 #include <qlist.h> 00032 #include <qlcdnumber.h> 00033 00034 #include "edgeobject.h" 00035 #include "ball.h" 00036 #include "throwvector.h" 00037 #include "psettings.h" 00038 #include "configuration.h" 00039 #include "dlgscores.h" 00040 #include "mcanvas.h" 00041 #include "soundmodule.h" // not work well :( 00042 00043 class Ball; 00044 class EdgeObject; 00045 00047 class Kbilliards : public KMainWindow 00048 { 00049 Q_OBJECT 00050 public: 00052 Kbilliards(QWidget* parent=0, const char *name=0); 00054 ~Kbilliards(); 00056 void placeedgeobjects(); 00058 void keyPressEvent( QKeyEvent * ); 00060 void placeballs(int,int); 00062 void BallinHole(int); 00064 void loadSettings(); 00066 void winner(); 00067 signals: // Signals 00069 void PBsignal(int); 00070 public: // Public attributes 00072 Configuration defaultconfig; 00074 Configuration actualconfig; 00076 MusicConfiguration actualmusicconfig; 00078 KMenuBar * menu; 00080 KStatusBar * status; 00082 KToolBar * toolbar; 00084 ThrowVector * throwvector; 00086 QList<Ball> ingameballs; 00088 QList<Ball> outgameballs; 00090 QList<EdgeObject> edgeobjects; 00092 int Score; 00094 QLCDNumber * ScoreDisplay; 00096 bool PowerBarFlag; 00098 double MaxThrowPower; 00100 KConfigBase * config; 00102 int nextBallseq; 00104 bool ballinhole; 00106 bool checkballstatus; 00108 SoundModule *Music; 00109 protected: // Protected attributes 00111 QCanvas * canvas; 00113 QCanvasView * BilliardArea; 00115 EdgeObject * holetl; 00117 EdgeObject * holetc; 00119 EdgeObject * holetr; 00121 EdgeObject * holebl; 00123 EdgeObject * holebc; 00125 EdgeObject * holebr; 00127 Ball * whiteball; 00130 int gamestatus; 00132 // SoundModule Sound; 00133 public slots: // Public slots 00135 void slotAbout(); 00137 void slotAboutKDE(); 00139 void throw_ball(); 00141 void newGame(); 00143 void confdialog(); 00145 void saveSettings(); 00147 void viewScores(); 00149 void clock(); 00150 protected: // Protected methods 00152 void timerEvent( QTimerEvent *); 00153 protected slots: // Protected slots 00155 void move_left_vector() ; 00157 void move_right_vector() ; 00158 private: // Private attributes 00160 int power; 00162 QString path_data; 00163 }; 00164 00165 #endif

Generated on Mon Nov 8 22:00:15 2004 for kbilliards.kdevelop by doxygen 1.3.7