]> git.sesse.net Git - vlc/commitdiff
Qt: Move code around and simplify the inclusion of headers.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 28 Dec 2008 22:00:59 +0000 (23:00 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 30 Dec 2008 12:19:34 +0000 (13:19 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.hpp
modules/gui/qt4/components/controller_widget.cpp
modules/gui/qt4/components/controller_widget.hpp
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/dialogs/toolbar.hpp

index 05fbf70b0ec3b5af6c000c29e5f98828e4fe4aff..fc5d56d3c03c5fe682fa32abfc94548503e67f3e 100644 (file)
 #include <vlc_vout.h>
 #include <vlc_keys.h>
 
-#include "dialogs_provider.hpp"
+#include "components/controller.hpp"
+#include "components/controller_widget.hpp"
 #include "components/interface_widgets.hpp"
-#include "main_interface.hpp"
+
+#include "dialogs_provider.hpp"
 #include "input_manager.hpp"
-#include "menus.hpp"
-#include "util/input_slider.hpp"
-#include "util/customwidgets.hpp"
 
-#include <QLabel>
+#include "util/input_slider.hpp" /* InputSlider */
+#include "util/customwidgets.hpp" /* qEventToKey */
+
 #include <QSpacerItem>
-#include <QCursor>
 #include <QToolButton>
 #include <QHBoxLayout>
-#include <QMenu>
-#include <QPalette>
-#include <QResizeEvent>
-#include <QDate>
 #include <QSignalMapper>
 #include <QTimer>
 
@@ -689,6 +685,7 @@ void AbstractController::frame()
     if( p_input )
         var_SetVoid( p_input, "frame-next" );
 }
+
 #include <QHBoxLayout>
 /*****************************
  * DA Control Widget !
index 45f64d2b9f56e876ffc329527ff6e176277c8fd5..c498b242f0610dfd018f0d75e9ef3383beb6d837 100644 (file)
 # include "config.h"
 #endif
 
-#include <vlc_common.h>
-#include <vlc_interface.h>
-
 #include "qt4.hpp"
-#include "main_interface.hpp"
-#include "input_manager.hpp"
 
-#include <QWidget>
 #include <QFrame>
-#include <QToolButton>
+#include <QString>
 
 #define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
 
 class QPixmap;
 class QLabel;
+
 class QGridLayout;
+class QHBoxLayout;
+class QBoxLayout;
 
-class InputSlider;
 class QAbstractSlider;
-
 class QAbstractButton;
+class InputSlider;
 
 class VolumeClickHandler;
-class QSignalMapper;
+class WidgetListing;
 
+class QSignalMapper;
 class QTimer;
-class WidgetListing;
 
 typedef enum buttonType_e
 {
@@ -94,7 +90,6 @@ typedef enum buttonType_e
     WIDGET_MAX,
 } buttonType_e;
 
-#include <QString>
 
 static const QString nameL[BUTTON_MAX] = { "Play", "Stop", "Open",
     "Previous", "Next", "Slower", "Faster", "Fullscreen", "De-Fullscreen",
@@ -142,6 +137,7 @@ enum
    WIDGET_SHINY  = 0x4,
 };
 
+class AdvControlsWidget;
 class AbstractController : public QFrame
 {
     friend class WidgetListing; /* For ToolBar Edition HACKS */
index 71b99a744eebf1fa1456bc0b9805014571a1dfe6..21f95609b515ebc145f6ccfb5e29d5b0ec088edd 100644 (file)
@@ -4,10 +4,7 @@
  * Copyright ( C ) 2006-2008 the VideoLAN team
  * $Id$
  *
- * Authors: Clément Stenac <zorglub@videolan.org>
- *          Jean-Baptiste Kempf <jb@videolan.org>
- *          Rafaël Carré <funman@videolanorg>
- *          Ilkka Ollakka <ileoo@videolan.org>
+ * Authors: 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
 # include "config.h"
 #endif
 
-//#include <vlc_vout.h>
-//#include <vlc_keys.h>
-
 #include "controller_widget.hpp"
 
-#include "dialogs_provider.hpp"
-#include "components/interface_widgets.hpp"
-#include "main_interface.hpp"
-#include "input_manager.hpp"
-#include "menus.hpp"
-#include "util/input_slider.hpp"
-#include "util/customwidgets.hpp"
+#include "input_manager.hpp"         /* Get notification of Volume Change */
+#include "util/input_slider.hpp"     /* SoundSlider */
+
+#include <vlc_aout.h>                /* Volume functions */
 
 #include <QLabel>
-#include <QSpacerItem>
-#include <QCursor>
-#include <QToolButton>
 #include <QHBoxLayout>
-#include <QMenu>
-#include <QPalette>
-#include <QResizeEvent>
-#include <QDate>
-#include <QSignalMapper>
-#include <QTimer>
-
+#include <QSpinBox>
 
 SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
                           bool b_shiny )
@@ -175,3 +157,16 @@ void AtoB_Button::setIcons( bool timeA, bool timeB )
     }
 }
 
+bool VolumeClickHandler::eventFilter( QObject *obj, QEvent *e )
+{
+    if (e->type() == QEvent::MouseButtonPress  )
+    {
+        aout_VolumeMute( p_intf, NULL );
+        audio_volume_t i_volume;
+        aout_VolumeGet( p_intf, &i_volume );
+//        m->updateVolume( i_volume *  VOLUME_MAX / (AOUT_VOLUME_MAX/2) );
+        return true;
+    }
+    return false;
+}
+
index 8089a434d703767c9b9ae1f1f53417020b7abd19..38bb76f386a7ca235bedf0964f39fe0129d5eae1 100644 (file)
@@ -1,12 +1,10 @@
 /*****************************************************************************
- * interface_widgets.hpp : Custom widgets for the main interface
+ * Controller_widget.cpp : Controller Widget for the controllers
  ****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ * Copyright (C) 2006-2008 the VideoLAN team
  * $Id$
  *
- * Authors: Clément Stenac <zorglub@videolan.org>
- *          Jean-Baptiste Kempf <jb@videolan.org>
- *          Rafaël Carré <funman@videolanorg>
+ * Authors: 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
 # include "config.h"
 #endif
 
-#include <vlc_common.h>
-#include <vlc_interface.h>
-
 #include "qt4.hpp"
-#include "main_interface.hpp"
-#include "input_manager.hpp"
 
 #include <QWidget>
-#include <QFrame>
 #include <QToolButton>
 
 #define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
 
-class QPixmap;
 class QLabel;
-class QGridLayout;
-
-class InputSlider;
+class QSpinBox;
 class QAbstractSlider;
 
-class QAbstractButton;
-
-class VolumeClickHandler;
-class QSignalMapper;
-
-class QTimer;
-class WidgetListing;
-
 /**
  * SPECIAL Widgets that are a bit more than just a ToolButton
  * and have an icon/behaviour that changes depending on the context:
@@ -93,6 +74,9 @@ private slots:
     void toggleTeletextTransparency( bool );
 };
 
+#define VOLUME_MAX 200
+class VolumeClickHandler;
+
 class SoundWidget : public QWidget
 {
     Q_OBJECT
@@ -113,4 +97,16 @@ protected slots:
     void updateVolume( void );
 };
 
+class VolumeClickHandler : public QObject
+{
+public:
+    VolumeClickHandler( intf_thread_t *_p_intf, SoundWidget *_m ) : QObject(_m)
+    {m = _m; p_intf = _p_intf; }
+    virtual ~VolumeClickHandler() {};
+    virtual bool eventFilter( QObject *obj, QEvent *e );
+private:
+    SoundWidget *m;
+    intf_thread_t *p_intf;
+};
+
 #endif
index 87bc625b3716e6c655958e2c1232ba324ee4ffd8..99a600c50a8654c198fd73a4e8076ea4765bf46b 100644 (file)
@@ -521,16 +521,4 @@ void TimeLabel::setStatus( int i_status )
         setText( "Buffering" );
 }
 
-bool VolumeClickHandler::eventFilter( QObject *obj, QEvent *e )
-{
-    if (e->type() == QEvent::MouseButtonPress  )
-    {
-        aout_VolumeMute( p_intf, NULL );
-        audio_volume_t i_volume;
-        aout_VolumeGet( p_intf, &i_volume );
-//        m->updateVolume( i_volume *  VOLUME_MAX / (AOUT_VOLUME_MAX/2) );
-        return true;
-    }
-    return false;
-}
 
index 9ef35877037d232557044ce63f9912f0b6cbe532..607924b39c9b8b7abc6fc1f324101266086bad7d 100644 (file)
 
 #include <vlc_common.h>
 #include <vlc_interface.h>
-#include <vlc_aout.h>
+//#include <vlc_aout.h> Visualizer
 
 #include "qt4.hpp"
 #include "main_interface.hpp"
+#include "input_manager.hpp"
 #include "components/controller.hpp"
 #include "components/controller_widget.hpp"
 
@@ -124,19 +125,6 @@ private slots:
 };
 #endif
 
-#define VOLUME_MAX 200
-class VolumeClickHandler : public QObject
-{
-public:
-    VolumeClickHandler( intf_thread_t *_p_intf, SoundWidget *_m ) : QObject(_m)
-    {m = _m; p_intf = _p_intf; }
-    virtual ~VolumeClickHandler() {};
-    virtual bool eventFilter( QObject *obj, QEvent *e );
-private:
-    SoundWidget *m;
-    intf_thread_t *p_intf;
-};
-
 class TimeLabel : public QLabel
 {
     Q_OBJECT
index fafd288288d9090180e4b6fc7c8ad0969801c20d..61006858265c289bcba725f59ca30432b900afd7 100644 (file)
 
 #include <QRubberBand>
 #include <QListWidget>
+#include <QCheckBox>
 
 class ToolbarEditDialog;
 class DroppingController;
+class QCheckBox;
 
 class WidgetListing : public QListWidget
 {