/*****************************************************************************
* prefs_dialog.cpp : Preferences
- ****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ *****************************************************************************
+ * Copyright (C) 2006-2007 the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
- *
+ *
* 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
*
* 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
#include "dialogs/prefs_dialog.hpp"
#include "dialogs_provider.hpp"
#include <QCheckBox>
#include <QScrollArea>
#include <QMessageBox>
-#include <QKeyEvent>
PrefsDialog *PrefsDialog::instance = NULL;
{
config_ResetAll( p_intf );
// TODO reset changes ?
- config_SaveConfigFile( p_intf, NULL );
- }
-}
-
-void PrefsDialog::keyPressEvent( QKeyEvent *e )
-{
- if( e->key() == Qt::Key_Escape )
- {
- cancel();
+ config_SaveConfigFile( p_intf, NULL );
}
}
/*****************************************************************************
* prefs_dialog.hpp : Preferences
- ****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ *****************************************************************************
+ * Copyright (C) 2006-2007 the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
* 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- ****************************************************************************/
+ *****************************************************************************/
#ifndef _PREFS_DIALOG_H_
#define _PREFS_DIALOG_H_
void save();
void cancel();
void reset();
- void keyPressEvent( QKeyEvent * );
};
#endif
/*****************************************************************************
* qvlcframe.hpp : A few helpers
- ****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ *****************************************************************************
+ * Copyright (C) 2006-2007 the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
*
* 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
#ifndef _QVLCFRAME_H_
#define _QVLCFRAME_H_
#include <QMainWindow>
#include <QPlastiqueStyle>
#include <QPushButton>
+#include <QKeyEvent>
#include "qt4.hpp"
#include <vlc/vlc.h>
#include <vlc_charset.h>
settings.setValue( "pos", pos() );
settings.endGroup();
}
+ void cancel()
+ {
+ hide();
+ }
+ void keyPressEvent( QKeyEvent *keyEvent )
+ {
+ if( keyEvent->key() == Qt::Key_Escape )
+ {
+ cancel();
+ }
+ }
};
class QVLCDialog : public QDialog
protected:
intf_thread_t *p_intf;
+
+ void cancel()
+ {
+ hide();
+ }
+ void keyPressEvent( QKeyEvent *keyEvent )
+ {
+ if( keyEvent->key() == Qt::Key_Escape )
+ {
+ cancel();
+ }
+ }
};
class QVLCMW : public QMainWindow