/***************************************************************************
ksnes9x.h - description
-------------------
begin : Sun Oct 10 14:14:06 EST 1999
copyright : (C) 1999 by Perdig
email : perdig@linuxbr.com.br
***************************************************************************/
/***************************************************************************
* *
* 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 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef KSNES9X_H
#define KSNES9X_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
// include files for KDE
#include <kapp.h>
#include <ktmainwindow.h>
#include <kaccel.h>
#include <kiconloader.h>
#include <kmsgbox.h>
#include <kfiledialog.h>
#include <kprocess.h>
#include <kconfig.h>
// include files for QT
#include <qwidget.h>
#include <qstrlist.h>
#include <qstring.h>
#include <qrect.h>
// Application specific include files
#include "resource.h"
#include "ksnes9xview.h"
#include "ksnes9xconfig.h"
#include "ksnes9xoptionsdialog.h"
#include "inputint.h"
#include "inputstring.h"
class KSnes9x : public KTMainWindow {
Q_OBJECT
public:
/** construtor */
KSnes9x(QWidget*parent=0,const char* name=0);
/** destructor */
~KSnes9x();
/** enables menuentries/toolbar items */
void enableCommand(int id_);
/** disables menuentries/toolbar items */
void disableCommand(int id_);
/** Salva as opções */
void saveOptions();
/** Reseta a configuracao */
void resetConfig();
/** Chama a tela de configuração */
void setup();
public slots:
/** switch argument for slot selection by menu or toolbar ID */
void commandCallback(int id_);
/** Muda o diretorio */
void slotStatusDir(char *text);
/** Roda o emulador */
void goForIt();
protected:
/** initKeyAccel creates the keyboard accelerator items for the available slots
and changes the menu accelerators. */
void initKeyAccel();
/** initMenuBar creates the menubar and inserts the menupopups as well as
creating the helpMenu. */
void initMenuBar();
/** view item */
KSnes9xView *view;
/** Config object */
KSnes9xConfig *cfg;
/** Events */
bool queryExit();
private:
/** the configuration object of the application */
KConfig *config;
/** the key accelerator container */
KAccel* key_accel;
/** menuBar items */
QPopupMenu *file_menu;
QPopupMenu *graphics_menu;
QPopupMenu *sound_menu;
QPopupMenu *cheat_menu;
QPopupMenu *speed_menu;
QPopupMenu *rom_menu;
QPopupMenu *joystick_menu;
QPopupMenu *help_menu;
QPopupMenu *profile_menu;
/** Processo a ser chamado */
KShellProcess p;
/** Profile em uso */
QString profile;
/** Lista de profiles */
QStrList profiles;
private: // Private methods
/** Inicializa os valores da MenuBar */
void initMenuBarValues();
/** Arruma os valores do cfg */
void setCfgValues();
/** Bool option checked in the menubar */
void slotBoolChecked(int _id);
/** Chama a inputint */
void slotIntChecked( int id );
/** Pede o nome do arquivo */
void loadSnapshot();
/** Inicializa a barra de status */
void initStatusBar();
/** Mostra uma messagem */
void slotStatusMsg(const char *text);
/** Temporary status bar text */
void slotStatusHelpMsg(const char *text);
/** Arruma os valores das opções gerais */
/** Opção de cheat selecionada */
/** */
void slotStrChecked(int id);
void setCustomValues();
/** */
void removeProfile();
/** */
void newProfile();
/** Inicializa o menu com todos os profiles */
void initProfileMenu();
/** */
void reloadPopupMenu();
/** */
void loadProfile(int id);
/** */
void clearProfile(QString group);
private slots: // Private slots
/** Mostra o texto de status correspondente */
void statusCallback(int id_);
};
#endif
Documentation generated by Perdig@perdig.com.br on Mon Nov 22 11:16:22 EDT 1999