[vlc-devel] commit: Qt: Split inputBox from convert dialog. (Jean-Baptiste Kempf )

git version control git at videolan.org
Thu Mar 5 21:20:04 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Mar  5 18:02:24 2009 +0100| [066390d34d3919a8201d06d65e8d7afac778fb01] | committer: Jean-Baptiste Kempf 

Qt: Split inputBox from convert dialog.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=066390d34d3919a8201d06d65e8d7afac778fb01
---

 modules/gui/qt4/Modules.am                       |    3 +
 modules/gui/qt4/components/sout/sout_widgets.cpp |   57 ++++++++++++++++++++++
 modules/gui/qt4/components/sout/sout_widgets.hpp |   40 +++++++++++++++
 modules/gui/qt4/dialogs/convert.cpp              |   28 +----------
 4 files changed, 102 insertions(+), 26 deletions(-)

diff --git a/modules/gui/qt4/Modules.am b/modules/gui/qt4/Modules.am
index c899be1..12c6e35 100644
--- a/modules/gui/qt4/Modules.am
+++ b/modules/gui/qt4/Modules.am
@@ -54,6 +54,7 @@ nodist_SOURCES_qt4 = \
 		components/playlist/panels.moc.cpp \
 		components/playlist/selector.moc.cpp \
 		components/sout/profile_selector.moc.cpp \
+		components/sout/sout_widgets.moc.cpp \
 		util/input_slider.moc.cpp \
 		util/customwidgets.moc.cpp \
 		resources.cpp \
@@ -226,6 +227,7 @@ SOURCES_qt4 = 	qt4.cpp \
 		components/playlist/playlist.cpp \
 		components/playlist/selector.cpp \
 		components/sout/profile_selector.cpp \
+		components/sout/sout_widgets.cpp \
 		util/input_slider.cpp \
 		util/customwidgets.cpp \
 		util/registry.cpp
@@ -272,6 +274,7 @@ noinst_HEADERS = \
 	components/playlist/selector.hpp \
 	components/playlist/sorting.h \
 	components/sout/profile_selector.hpp \
+	components/sout/sout_widgets.hpp \
 	components/sout/profiles.hpp \
 	util/input_slider.hpp \
 	util/customwidgets.hpp \
diff --git a/modules/gui/qt4/components/sout/sout_widgets.cpp b/modules/gui/qt4/components/sout/sout_widgets.cpp
new file mode 100644
index 0000000..81557f1
--- /dev/null
+++ b/modules/gui/qt4/components/sout/sout_widgets.cpp
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * profile_selector.cpp : A small profile selector and editor
+ ****************************************************************************
+ * Copyright (C) 2009 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Jean-Baptiste Kempf <jb at 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
+ * (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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#include "components/sout/sout_widgets.hpp"
+
+#include <QGroupBox>
+#include <QGridLayout>
+#include <QLabel>
+#include <QLineEdit>
+
+SoutInputBox::SoutInputBox( QWidget *_parent ) : QWidget( _parent )
+{
+    /**
+     * Source Block
+     **/
+    QGroupBox *sourceBox = new QGroupBox( qtr( "Source" ) );
+    QGridLayout *sourceLayout = new QGridLayout( sourceBox );
+
+    QLabel *sourceLabel = new QLabel( qtr( "Source:" ) );
+    sourceLayout->addWidget( sourceLabel, 0, 0 );
+
+    QLineEdit *sourceLine = new QLineEdit;
+    sourceLine->setReadOnly( true );
+    sourceLabel->setBuddy( sourceLine );
+    sourceLayout->addWidget( sourceLine, 0, 1 );
+
+    QLabel *sourceTypeLabel = new QLabel( qtr( "Type:" ) );
+    sourceLayout->addWidget( sourceTypeLabel, 1, 0 );
+    QLabel *sourceValueLabel = new QLabel;
+    sourceLayout->addWidget( sourceValueLabel, 1, 1 );
+
+    /* Line */
+    QFrame *line = new QFrame;
+    line->setFrameStyle( QFrame::HLine |QFrame::Sunken );
+    sourceLayout->addWidget( line, 2, 0, 1, -1 );
+}
+
diff --git a/modules/gui/qt4/components/sout/sout_widgets.hpp b/modules/gui/qt4/components/sout/sout_widgets.hpp
new file mode 100644
index 0000000..faeba1d
--- /dev/null
+++ b/modules/gui/qt4/components/sout/sout_widgets.hpp
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * profile_selector.hpp : A small profile selector and editor
+ ****************************************************************************
+ * Copyright (C) 2009 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Jean-Baptiste Kempf <jb at 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
+ * (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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef SOUT_WIDGETS_H
+#define SOUT_WIDGETS_H
+
+#include "qt4.hpp"
+
+#include <QWidget>
+
+#include "util/qvlcframe.hpp"
+
+class SoutInputBox : public QWidget
+{
+    public:
+        SoutInputBox( QWidget *);
+
+};
+
+#endif
diff --git a/modules/gui/qt4/dialogs/convert.cpp b/modules/gui/qt4/dialogs/convert.cpp
index 369346e..b9680ab 100644
--- a/modules/gui/qt4/dialogs/convert.cpp
+++ b/modules/gui/qt4/dialogs/convert.cpp
@@ -27,6 +27,7 @@
 
 #include "dialogs/sout.hpp"
 #include "dialogs/convert.hpp"
+#include "components/sout/sout_widgets.hpp"
 
 #include "util/qt_dirs.hpp"
 
@@ -42,32 +43,7 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf)
     setWindowTitle( qtr( "Convert" ) );
 
     QGridLayout *mainLayout = new QGridLayout( this );
-
-    /**
-     * Source Block
-     **/
-    QGroupBox *sourceBox = new QGroupBox( qtr( "Source" ) );
-    QGridLayout *sourceLayout = new QGridLayout( sourceBox );
-
-    QLabel *sourceLabel = new QLabel( qtr( "Source:" ) );
-    sourceLayout->addWidget( sourceLabel, 0, 0 );
-
-    QLineEdit *sourceLine = new QLineEdit;
-    sourceLine->setReadOnly( true );
-    sourceLabel->setBuddy( sourceLine );
-    sourceLayout->addWidget( sourceLine, 0, 1 );
-
-    QLabel *sourceTypeLabel = new QLabel( qtr( "Type:" ) );
-    sourceLayout->addWidget( sourceTypeLabel, 1, 0 );
-    QLabel *sourceValueLabel = new QLabel;
-    sourceLayout->addWidget( sourceValueLabel, 1, 1 );
-
-    /* Line */
-    QFrame *line = new QFrame;
-    line->setFrameStyle( QFrame::HLine |QFrame::Sunken );
-    sourceLayout->addWidget( line, 2, 0, 1, -1 );
-
-    mainLayout->addWidget( sourceBox, 0, 0, 1, -1  );
+    mainLayout->addWidget( new SoutInputBox( this ), 0, 0, 1, -1  );
 
     /**
      * Destination




More information about the vlc-devel mailing list