Added framework for video config window. Still TODO writing logic.
This commit is contained in:
parent
b2c094a6bf
commit
ce0a8fdf63
|
@ -299,6 +299,7 @@ HEADERS += src/drivers/Qt/ConsoleViewerGL.h
|
||||||
HEADERS += src/drivers/Qt/ConsoleViewerSDL.h
|
HEADERS += src/drivers/Qt/ConsoleViewerSDL.h
|
||||||
HEADERS += src/drivers/Qt/GamePadConf.h
|
HEADERS += src/drivers/Qt/GamePadConf.h
|
||||||
HEADERS += src/drivers/Qt/HotKeyConf.h
|
HEADERS += src/drivers/Qt/HotKeyConf.h
|
||||||
|
HEADERS += src/drivers/Qt/ConsoleVideoConf.h
|
||||||
HEADERS += src/drivers/Qt/ConsoleSoundConf.h
|
HEADERS += src/drivers/Qt/ConsoleSoundConf.h
|
||||||
SOURCES += src/drivers/Qt/main.cpp
|
SOURCES += src/drivers/Qt/main.cpp
|
||||||
SOURCES += src/drivers/Qt/ConsoleWindow.cpp
|
SOURCES += src/drivers/Qt/ConsoleWindow.cpp
|
||||||
|
@ -306,6 +307,7 @@ SOURCES += src/drivers/Qt/ConsoleViewerGL.cpp
|
||||||
SOURCES += src/drivers/Qt/ConsoleViewerSDL.cpp
|
SOURCES += src/drivers/Qt/ConsoleViewerSDL.cpp
|
||||||
SOURCES += src/drivers/Qt/GamePadConf.cpp
|
SOURCES += src/drivers/Qt/GamePadConf.cpp
|
||||||
SOURCES += src/drivers/Qt/HotKeyConf.cpp
|
SOURCES += src/drivers/Qt/HotKeyConf.cpp
|
||||||
|
SOURCES += src/drivers/Qt/ConsoleVideoConf.cpp
|
||||||
SOURCES += src/drivers/Qt/ConsoleSoundConf.cpp
|
SOURCES += src/drivers/Qt/ConsoleSoundConf.cpp
|
||||||
SOURCES += src/drivers/Qt/fceuWrapper.cpp
|
SOURCES += src/drivers/Qt/fceuWrapper.cpp
|
||||||
SOURCES += src/drivers/Qt/config.cpp
|
SOURCES += src/drivers/Qt/config.cpp
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
// ConsoleVideoConf.cpp
|
||||||
|
//
|
||||||
|
#include "Qt/config.h"
|
||||||
|
#include "Qt/fceuWrapper.h"
|
||||||
|
#include "Qt/ConsoleVideoConf.h"
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------
|
||||||
|
ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
|
: QDialog( parent )
|
||||||
|
{
|
||||||
|
QVBoxLayout *main_vbox;
|
||||||
|
QHBoxLayout *hbox1;
|
||||||
|
QLabel *lbl;
|
||||||
|
|
||||||
|
setWindowTitle("Video Config");
|
||||||
|
|
||||||
|
main_vbox = new QVBoxLayout();
|
||||||
|
|
||||||
|
// Video Driver Select
|
||||||
|
lbl = new QLabel( tr("Driver:") );
|
||||||
|
|
||||||
|
drvSel = new QComboBox();
|
||||||
|
|
||||||
|
drvSel->addItem( tr("OpenGL"), 0 );
|
||||||
|
//drvSel->addItem( tr("SDL"), 1 );
|
||||||
|
|
||||||
|
hbox1 = new QHBoxLayout();
|
||||||
|
|
||||||
|
hbox1->addWidget( lbl );
|
||||||
|
hbox1->addWidget( drvSel );
|
||||||
|
|
||||||
|
main_vbox->addLayout( hbox1 );
|
||||||
|
|
||||||
|
// Enable OpenGL Linear Filter
|
||||||
|
gl_LF_chkBox = new QCheckBox( tr("Enable OpenGL Linear Filter") );
|
||||||
|
|
||||||
|
main_vbox->addWidget( gl_LF_chkBox );
|
||||||
|
|
||||||
|
// Region Select
|
||||||
|
lbl = new QLabel( tr("Region:") );
|
||||||
|
|
||||||
|
regionSelect = new QComboBox();
|
||||||
|
|
||||||
|
regionSelect->addItem( tr("NTSC") , 0 );
|
||||||
|
regionSelect->addItem( tr("PAL") , 1 );
|
||||||
|
regionSelect->addItem( tr("Dendy"), 2 );
|
||||||
|
|
||||||
|
hbox1 = new QHBoxLayout();
|
||||||
|
|
||||||
|
hbox1->addWidget( lbl );
|
||||||
|
hbox1->addWidget( regionSelect );
|
||||||
|
|
||||||
|
main_vbox->addLayout( hbox1 );
|
||||||
|
|
||||||
|
setLayout( main_vbox );
|
||||||
|
|
||||||
|
}
|
||||||
|
//----------------------------------------------------
|
||||||
|
ConsoleVideoConfDialog_t::~ConsoleVideoConfDialog_t(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
//----------------------------------------------------
|
|
@ -0,0 +1,40 @@
|
||||||
|
// ConsoleVideoConf.h
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef __ConsoleVideoH__
|
||||||
|
#define __ConsoleVideoH__
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QSlider>
|
||||||
|
#include <QFrame>
|
||||||
|
#include <QGroupBox>
|
||||||
|
|
||||||
|
class ConsoleVideoConfDialog_t : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ConsoleVideoConfDialog_t(QWidget *parent = 0);
|
||||||
|
~ConsoleVideoConfDialog_t(void);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QCheckBox *gl_LF_chkBox;
|
||||||
|
QComboBox *drvSel;
|
||||||
|
QComboBox *regionSelect;
|
||||||
|
|
||||||
|
//void setCheckBoxFromProperty( QCheckBox *cbx, const char *property );
|
||||||
|
//void setComboBoxFromProperty( QComboBox *cbx, const char *property );
|
||||||
|
//void setSliderFromProperty( QSlider *slider, QLabel *lbl, const char *property );
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -9,6 +9,7 @@
|
||||||
#include "Qt/GamePadConf.h"
|
#include "Qt/GamePadConf.h"
|
||||||
#include "Qt/HotKeyConf.h"
|
#include "Qt/HotKeyConf.h"
|
||||||
#include "Qt/ConsoleSoundConf.h"
|
#include "Qt/ConsoleSoundConf.h"
|
||||||
|
#include "Qt/ConsoleVideoConf.h"
|
||||||
#include "Qt/fceuWrapper.h"
|
#include "Qt/fceuWrapper.h"
|
||||||
#include "Qt/keyscan.h"
|
#include "Qt/keyscan.h"
|
||||||
#include "Qt/nes_shm.h"
|
#include "Qt/nes_shm.h"
|
||||||
|
@ -150,6 +151,14 @@ void consoleWin_t::createMainMenu(void)
|
||||||
|
|
||||||
optMenu->addAction(gameSoundConfig);
|
optMenu->addAction(gameSoundConfig);
|
||||||
|
|
||||||
|
// Options -> Video Config
|
||||||
|
gameVideoConfig = new QAction(tr("Video Config"), this);
|
||||||
|
//gameVideoConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
|
gameVideoConfig->setStatusTip(tr("Video Configure"));
|
||||||
|
connect(gameVideoConfig, SIGNAL(triggered()), this, SLOT(openGameVideoConfWin(void)) );
|
||||||
|
|
||||||
|
optMenu->addAction(gameVideoConfig);
|
||||||
|
|
||||||
// Options -> HotKey Config
|
// Options -> HotKey Config
|
||||||
hotkeyConfig = new QAction(tr("Hotkey Config"), this);
|
hotkeyConfig = new QAction(tr("Hotkey Config"), this);
|
||||||
//hotkeyConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
//hotkeyConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
|
@ -280,6 +289,22 @@ void consoleWin_t::openGameSndConfWin(void)
|
||||||
//printf("Sound Config Window Destroyed\n");
|
//printf("Sound Config Window Destroyed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void consoleWin_t::openGameVideoConfWin(void)
|
||||||
|
{
|
||||||
|
ConsoleVideoConfDialog_t *vidConfWin;
|
||||||
|
|
||||||
|
//printf("Open Video Config Window\n");
|
||||||
|
|
||||||
|
vidConfWin = new ConsoleVideoConfDialog_t(this);
|
||||||
|
|
||||||
|
vidConfWin->show();
|
||||||
|
vidConfWin->exec();
|
||||||
|
|
||||||
|
delete vidConfWin;
|
||||||
|
|
||||||
|
//printf("Video Config Window Destroyed\n");
|
||||||
|
}
|
||||||
|
|
||||||
void consoleWin_t::openHotkeyConfWin(void)
|
void consoleWin_t::openHotkeyConfWin(void)
|
||||||
{
|
{
|
||||||
HotKeyConfDialog_t *hkConfWin;
|
HotKeyConfDialog_t *hkConfWin;
|
||||||
|
|
|
@ -56,6 +56,7 @@ class consoleWin_t : public QMainWindow
|
||||||
QAction *quitAct;
|
QAction *quitAct;
|
||||||
QAction *gamePadConfig;
|
QAction *gamePadConfig;
|
||||||
QAction *gameSoundConfig;
|
QAction *gameSoundConfig;
|
||||||
|
QAction *gameVideoConfig;
|
||||||
QAction *hotkeyConfig;
|
QAction *hotkeyConfig;
|
||||||
QAction *aboutAct;
|
QAction *aboutAct;
|
||||||
|
|
||||||
|
@ -79,6 +80,7 @@ class consoleWin_t : public QMainWindow
|
||||||
void aboutQPlot(void);
|
void aboutQPlot(void);
|
||||||
void openGamePadConfWin(void);
|
void openGamePadConfWin(void);
|
||||||
void openGameSndConfWin(void);
|
void openGameSndConfWin(void);
|
||||||
|
void openGameVideoConfWin(void);
|
||||||
void openHotkeyConfWin(void);
|
void openHotkeyConfWin(void);
|
||||||
void updatePeriodic(void);
|
void updatePeriodic(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue