/* krubik.h
*
* Pieter Eendebak ( pte@ddsw.nl )
*
*/
#ifndef RUBIK_H
#define RUBIK_H
#define STATUSBAR_INDEX 3
#define STATUS_MOVES 1
#define STATUS_TIME 2
#define STATUS_SCAT 3
#define STATUS_FAKE 4
#include <qpushbt.h>
#include <qpopmenu.h>
#include <qlabel.h>
#include <qmenubar.h>
#include <qevent.h>
#include <qmsgbox.h>
#include <qsize.h>
#include <qgrpbox.h>
#include <kapp.h>
#include <kmenubar.h>
#include <kpopmenu.h>
#include <ktopwidget.h>
#include <kmsgbox.h>
#include <kconfig.h>
#include <kkeyconf.h>
#include <kstdaccel.h>
#include <klocale.h>
#include <kdebug.h>
/**
* This is the class KRubik. The class is used only for the program
* Rubik's Kube.
*
* @short Basic class for Rubik's Kube
* @author Pieter Eendebak <pte@ddsw.nl>
* @version 0.99
*
*/
class KRubik : public KTopLevelWidget
{
Q_OBJECT
public:
/**
* The constructor method for class KFortune
*
* @see KRubik
* @param parent Parent widget, used for QWidget
* @param name Name for QWidget
*
*/
KRubik ( QWidget *parent=0, const char *name=0 );
/**
* The destrucor method for class KFortune
*/
~KRubik();
protected:
/**
* Only calls the function resizeEvent()
*
* @see #resizeEvent
*/
void resizeEvent ( QResizeEvent * );
/**
* Handels all the resizing of the main window of KRubik
*/
void resizeEvent ();
/**
* Handles the default keybindigs
*
* @see KKeyConfig
*/
void initKeys();
/**
* Creates the menubar and connects the menu-entries to the
* appropriate functions
*/
void createMenu();
/**
* Creates the statusbar.
*/
void createStatusBar();
/**
* Get the configuration from the config-file.
*/
void initConfig();
/**
* Save the current configuration to the config-file.
*/
void saveConfig();
/**
*
*/
KConfig *config;
KStdAccel *accel;
KMenuBar *menu;
QPopupMenu *file, *options, *help;
KStatusBar *statusbar;
QTimer *timer;
bool showstatus;
int statusID;
QPushButton *clean, *scramble;
QGroupBox *box;
Cube *kubus;
QLabel *moves, *counter;
public slots:
/**
* Start with a new cube.
*/
void newCube();
/**
* Saves the current cube to a file.
*/
void saveCube();
/**
* Load a cube from a file.
*/
void loadCube();
/**
* Clean the current cube.
*/
void cleanCube();
/**
* Scrambles the current cube.
*/
void scrambleCube();
/**
* Reset the colors of the cube to a default value.
*/
void resetColors();
/**
* Set the shading model of the cube
*/
void setShading(int level);
/**
* @return the shading level of the current cube
*/
int getShading();
/**
* Enables or disables the statusbar.
*/
void toggleStatusBar();
/**
* Updates the statusbar
*/
void status();
/**
* Quit the application
*/
void quitapp();
/**
* Shows a message telling the user that a function has
* not been implemented yet.
*/
void notImpl();
/**
* Shows a window for configuring the keybindings
*/
void configkeys();
/**
* Shows a window for configuring colors
*/
void configColors();
/**
* Shows information about the program
*/
void about();
/**
* Show the online-help
*/
void helpmenu();
};
#endif
Documentation generated by root@localhost.localdomain on Sat Jun 27 15:21:54 MET DST 1998