/***************************************************************************
ksnes9xconfig.h - description
-------------------
begin : Tue Oct 12 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 KSNES9XCONFIG_H
#define KSNES9XCONFIG_H
#define BOOL_OPTIONS 32
#define INT_OPTIONS 6
#define STR_OPTIONS 5
#include "resource.h"
#include <qstring.h>
struct bValue {
bool value;
bool def;
};
struct iValue {
int range[2];
int value;
int def;
};
struct range {
int min;
int max;
};
/**Classe que gerencia as opcoes do Snes9x, os argumentos para a linha de comando, etc.
*@author Perdig
*/
class KSnes9xConfig {
public:
KSnes9xConfig();
~KSnes9xConfig();
/** Seta a opcao
*/
void setValue(int _id, int Value);
/** Seta a opcao */
void setValue(int _id, bool Value);
/** Retorna o valor binario da opção correspondente */
bool boolValue(int _id);
/** Retorna o valor da opção numerica */
int intValue(int _id);
/** Seta para a opcao default */
void setDefault(int _id);
/** Retorna o número de opções numéricas */
int intOptions();
/** Retorna o número de opções binárias n */
int boolOptions();
/** Retorna o valor minimo e maximo da opcao */
range getRange(int _id);
/** Retorna a string com todas as opções */
QString optString();
/** Retorna o número de opções de texto */
int strOptions();
void setValue(int _id, QString Value);
/** Retorna a string correspondente a id */
QString strValue(int _id);
/** */
QString statusString(int _id);
private: // Private attributes
/** Array guardando as opções binárias */
bValue bV[BOOL_OPTIONS];
/** Array guardando as opções numéricas */
iValue iV[INT_OPTIONS];
/** Array contendo os valores das opções de texto */
QString sV[STR_OPTIONS];
/** Lista dos comandos para as opções numéricas */
QString intCmdList[INT_OPTIONS];
/** Lista das linhas de comando para as opções binárias */
QString boolCmdList[BOOL_OPTIONS];
/** Lista das linhas de comando para os comandos de texto */
QString strCmdList[STR_OPTIONS];
private: // Private methods
/** Arruma as opções default */
void setDefaults();
};
#endif
Documentation generated by Perdig@perdig.com.br on Mon Nov 22 11:16:22 EDT 1999