diff --git a/project/qmake/vba-m.pro b/project/qmake/vba-m.pro index 1981c52b..91a872d2 100644 --- a/project/qmake/vba-m.pro +++ b/project/qmake/vba-m.pro @@ -22,9 +22,6 @@ SOURCES += ../../src/qt/main.cpp HEADERS += ../../src/qt/MainWnd.h SOURCES += ../../src/qt/MainWnd.cpp -HEADERS += ../../src/qt/glwidget.h -SOURCES += ../../src/qt/glwidget.cpp - FORMS += ../../src/qt/sidewidget_cheats.ui HEADERS += ../../src/qt/sidewidget_cheats.h SOURCES += ../../src/qt/sidewidget_cheats.cpp diff --git a/src/qt/MainWnd.cpp b/src/qt/MainWnd.cpp index 4ad69ced..fc1dccf6 100644 --- a/src/qt/MainWnd.cpp +++ b/src/qt/MainWnd.cpp @@ -19,7 +19,6 @@ #include "MainWnd.h" #include "version.h" -//#include "glwidget.h" #include "configdialog.h" #include "sidewidget_cheats.h" @@ -69,6 +68,11 @@ void MainWnd::loadSettings() { QVariant v; + v = settings->value( "MainWnd/geometry"); + if( v.isValid() ) { + restoreGeometry( v.toByteArray() ); + } + v = settings->value( "MainWnd/state" ); if( v.isValid() ) { restoreState( v.toByteArray() ); @@ -90,6 +94,9 @@ void MainWnd::saveSettings() { QVariant v; + v = saveGeometry(); + settings->setValue( "MainWnd/geometry", v ); + // state of toolbars and dock widgets // all memorizable widgets need an objectName! v = saveState(); diff --git a/src/qt/glwidget.cpp b/src/qt/glwidget.cpp deleted file mode 100644 index 9d5c6a71..00000000 --- a/src/qt/glwidget.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// VBA-M, A Nintendo Handheld Console Emulator -// Copyright (C) 2008 VBA-M development team -// -// 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, or(at your option) -// any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software Foundation, -// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - -#include "glwidget.h" - -GLWidget::GLWidget( QWidget *parent ) - : QGLWidget( parent ) -{ -} - -GLWidget::~GLWidget() -{ -} - -void GLWidget::initializeGL() -{ - qglClearColor( QColor( 0xFF, 0x00, 0xFF ) ); -} - -void GLWidget::paintGL() -{ - glClear( GL_COLOR_BUFFER_BIT ); -} - -void GLWidget::resizeGL( int width, int height ) -{ -} diff --git a/src/qt/glwidget.h b/src/qt/glwidget.h deleted file mode 100644 index 40fa3735..00000000 --- a/src/qt/glwidget.h +++ /dev/null @@ -1,38 +0,0 @@ -// VBA-M, A Nintendo Handheld Console Emulator -// Copyright (C) 2008 VBA-M development team -// -// 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, or(at your option) -// any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software Foundation, -// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - -#ifndef GL_WIDGET_H -#define GL_WIDGET_H - -#include "precompile.h" - -class GLWidget : public QGLWidget -{ - Q_OBJECT - -public: - GLWidget( QWidget *parent = 0 ); - ~GLWidget(); - -protected: - void initializeGL(); - void paintGL(); - void resizeGL( int width, int height ); -}; - -#endif // #ifndef GL_WIDGET_H