#define _QVLCFRAME_H_
#include <QWidget>
+#include <QDialog>
#include <QSpacerItem>
#include <QHBoxLayout>
#include <QApplication>
#include <QPushButton>
#include "qt4.hpp"
#include <vlc/vlc.h>
-#include <charset.h>
+#include <vlc_charset.h>
class QVLCFrame : public QWidget
{
public:
- static void fixStyle( QWidget *w)
- {
- QStyle *style = qApp->style();
-#if 0
- // Plastique is too dark.
- /// theming ? getting KDE data ? ?
- if( qobject_cast<QPlastiqueStyle *>(style) )
- {
- QPalette plt( w->palette() );
- plt.setColor( QPalette::Active, QPalette::Highlight, Qt::gray );
- QColor vlg = (Qt::lightGray);
- vlg = vlg.toHsv();
- vlg.setHsv( vlg.hue(), vlg.saturation(), 235 );
- plt.setColor( QPalette::Active, QPalette::Window, vlg );
- plt.setColor( QPalette::Inactive, QPalette::Window, vlg );
- plt.setColor( QPalette::Inactive, QPalette::Button, vlg );
- plt.setColor( QPalette::Active, QPalette::Button, vlg );
- plt.setColor( QPalette::Active, QPalette::Text, Qt::yellow );
- w->setPalette( plt );
- }
-#endif
- }
static QHBoxLayout* doButtons( QWidget *w, QBoxLayout *l,
QPushButton **defaul, char *psz_default,
QPushButton **alt, char *psz_alt,
};
QVLCFrame( intf_thread_t *_p_intf ) : QWidget( NULL ), p_intf( _p_intf )
- {
- fixStyle( this );
- };
+ { };
virtual ~QVLCFrame() {};
void toggleVisible()
}
};
-class QVLCMW : public QMainWindow
+class QVLCDialog : public QDialog
{
public:
- QVLCMW( intf_thread_t *_p_intf ) : QMainWindow( NULL ), p_intf( _p_intf )
+ QVLCDialog( QWidget* parent, intf_thread_t *_p_intf ) :
+ QDialog( parent ), p_intf( _p_intf )
+ {}
+ virtual ~QVLCDialog() {};
+ void toggleVisible()
{
- QVLCFrame::fixStyle( this );
+ if( isVisible() ) hide();
+ else show();
}
+
+protected:
+ intf_thread_t *p_intf;
+};
+
+class QVLCMW : public QMainWindow
+{
+public:
+ QVLCMW( intf_thread_t *_p_intf ) : QMainWindow( NULL ), p_intf( _p_intf )
+ { }
virtual ~QVLCMW() {};
void toggleVisible()
{