About FCEUX window in work.
This commit is contained in:
parent
210e04fe92
commit
32116210b8
|
@ -385,6 +385,7 @@ set(SRC_DRIVERS_SDL
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/HotKeyConf.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/ConsoleVideoConf.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/ConsoleSoundConf.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/AboutWindow.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/fceuWrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/config.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/input.cpp
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
// AboutWindow.cpp
|
||||
//
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QUrl>
|
||||
#include <QDesktopServices>
|
||||
#include "Qt/icon.xpm"
|
||||
#include "Qt/AboutWindow.h"
|
||||
#include "../../version.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
AboutWindow::AboutWindow(QWidget *parent)
|
||||
: QDialog( parent )
|
||||
{
|
||||
QVBoxLayout *mainLayout;
|
||||
QHBoxLayout *hbox1;
|
||||
QPixmap pm( icon_xpm );
|
||||
QLabel *lbl;
|
||||
|
||||
setWindowTitle( tr("About fceuX") );
|
||||
|
||||
resize( 512, 512 );
|
||||
|
||||
mainLayout = new QVBoxLayout();
|
||||
|
||||
hbox1 = new QHBoxLayout();
|
||||
lbl = new QLabel();
|
||||
lbl->setPixmap(pm);
|
||||
|
||||
hbox1->addWidget( lbl );
|
||||
hbox1->setAlignment( Qt::AlignCenter );
|
||||
|
||||
mainLayout->addLayout( hbox1 );
|
||||
|
||||
hbox1 = new QHBoxLayout();
|
||||
lbl = new QLabel( tr("fceuX") );
|
||||
|
||||
hbox1->addWidget( lbl );
|
||||
hbox1->setAlignment( Qt::AlignCenter );
|
||||
|
||||
mainLayout->addLayout( hbox1 );
|
||||
|
||||
hbox1 = new QHBoxLayout();
|
||||
lbl = new QLabel( tr(FCEU_VERSION_STRING) );
|
||||
|
||||
hbox1->addWidget( lbl );
|
||||
hbox1->setAlignment( Qt::AlignCenter );
|
||||
|
||||
mainLayout->addLayout( hbox1 );
|
||||
|
||||
hbox1 = new QHBoxLayout();
|
||||
lbl = new QLabel();
|
||||
lbl->setText("<a href=\"http://fceux.com\">Website</a>");
|
||||
lbl->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
lbl->setOpenExternalLinks(true);
|
||||
|
||||
hbox1->addWidget( lbl );
|
||||
hbox1->setAlignment( Qt::AlignCenter );
|
||||
|
||||
mainLayout->addLayout( hbox1 );
|
||||
|
||||
hbox1 = new QHBoxLayout();
|
||||
lbl = new QLabel( tr("License: GPL") );
|
||||
|
||||
hbox1->addWidget( lbl );
|
||||
hbox1->setAlignment( Qt::AlignCenter );
|
||||
|
||||
mainLayout->addLayout( hbox1 );
|
||||
|
||||
hbox1 = new QHBoxLayout();
|
||||
lbl = new QLabel( tr("© 2016 FceuX Development Team") );
|
||||
|
||||
hbox1->addWidget( lbl );
|
||||
hbox1->setAlignment( Qt::AlignCenter );
|
||||
|
||||
mainLayout->addLayout( hbox1 );
|
||||
|
||||
setLayout( mainLayout );
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
AboutWindow::~AboutWindow(void)
|
||||
{
|
||||
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
|
@ -0,0 +1,35 @@
|
|||
// GamePadConf.h
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QComboBox>
|
||||
#include <QCheckBox>
|
||||
#include <QPushButton>
|
||||
#include <QLabel>
|
||||
#include <QFrame>
|
||||
#include <QGroupBox>
|
||||
#include <QTreeView>
|
||||
#include <QTreeWidget>
|
||||
|
||||
#include "Qt/main.h"
|
||||
|
||||
class AboutWindow : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AboutWindow(QWidget *parent = 0);
|
||||
~AboutWindow(void);
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
private slots:
|
||||
|
||||
};
|
|
@ -20,6 +20,7 @@
|
|||
#include "Qt/HotKeyConf.h"
|
||||
#include "Qt/ConsoleSoundConf.h"
|
||||
#include "Qt/ConsoleVideoConf.h"
|
||||
#include "Qt/AboutWindow.h"
|
||||
#include "Qt/fceuWrapper.h"
|
||||
#include "Qt/keyscan.h"
|
||||
#include "Qt/nes_shm.h"
|
||||
|
@ -1046,7 +1047,18 @@ void consoleWin_t::fdsLoadBiosFile(void)
|
|||
|
||||
void consoleWin_t::aboutFCEUX(void)
|
||||
{
|
||||
printf("About FCEUX\n");
|
||||
AboutWindow *aboutWin;
|
||||
|
||||
//printf("About FCEUX Window\n");
|
||||
|
||||
aboutWin = new AboutWindow(this);
|
||||
|
||||
aboutWin->show();
|
||||
aboutWin->exec();
|
||||
|
||||
delete aboutWin;
|
||||
|
||||
//printf("About Window Destroyed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue