]> git.sesse.net Git - vlc/commitdiff
Qt4: Preferences, Simple_Preferences. A bit more, but a lot of things are missing...
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 25 Feb 2007 15:59:14 +0000 (15:59 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 25 Feb 2007 15:59:14 +0000 (15:59 +0000)
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/dialogs/prefs_dialog.cpp
modules/gui/qt4/ui/sprefs_audio.ui

index 9804020f0aecb7e299db82a825b53cfb45518a27..ca1a4a365525ab1ac98840e31060557bfdb66215 100644 (file)
@@ -34,6 +34,7 @@
 #include <vlc_config_cat.h>
 #include <assert.h>
 
+//TODO Rename all advanced to hotkeys since they will be no advanced section
 #include "pixmaps/advanced_50x50.xpm"
 #include "pixmaps/audio_50x50.xpm"
 #include "pixmaps/input_and_codecs_50x50.xpm"
@@ -72,7 +73,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) :
 //    ADD_CATEGORY( SPrefsPlaylist, qtr("Playlist"), playlist_50x50_xpm );
     ADD_CATEGORY( SPrefsInterface, qtr("Interface"), interface_50x50_xpm );
     ADD_CATEGORY( SPrefsSubtitles, qtr("Subtitles"), subtitles_50x50_xpm );
-    ADD_CATEGORY( SPrefsAdvanced, qtr("Advanced"), advanced_50x50_xpm );
+    ADD_CATEGORY( SPrefsAdvanced, qtr("Hotkeys"), advanced_50x50_xpm );
 
     setCurrentRow( SPrefsInterface );
 }
index 62d609ee8debd2d7485303a1652b2674465241d9..054e107ee08969fe9de9af4ca87c6139e0b49bfe 100644 (file)
@@ -34,7 +34,8 @@
 #include <QVBoxLayout>
 #include <QPushButton>
 #include <QCheckBox>
-
+#include <QScrollArea>
+#include <QLabel>
 PrefsDialog *PrefsDialog::instance = NULL;
 
 PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
@@ -42,6 +43,7 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
      QGridLayout *main_layout = new QGridLayout(this);
      setWindowTitle( qtr( "Preferences" ) );
      resize( 800, 450 );
+     setMaximumHeight (450);
 
      tree_panel = new QWidget(0);
      tree_panel_l = new QHBoxLayout;
@@ -50,28 +52,48 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
      main_panel_l = new QHBoxLayout;
      main_panel->setLayout( main_panel_l );
 
+
      // Choice for types
      types = new QGroupBox( "Show settings" );
-     QHBoxLayout *tl = new QHBoxLayout(0);
-     tl->setSpacing( 3 ); tl->setMargin( 3 );
-     small = new QRadioButton( "Basic", types ); tl->addWidget( small );
-     all = new QRadioButton( "All", types ); tl->addWidget( all );
-     types->setLayout(tl);
+     QHBoxLayout *types_l = new QHBoxLayout(0);
+     types_l->setSpacing( 3 ); types_l->setMargin( 3 );
+     small = new QRadioButton( "Basic", types ); types_l->addWidget( small );
+     all = new QRadioButton( "All", types ); types_l->addWidget( all );
+     types->setLayout(types_l);
      small->setChecked( true );
 
+     // Title Label
+     QLabel *panel_label = new QLabel;
+     QFont labelFont = QApplication::font( static_cast<QWidget*>(0) );
+     labelFont.setPointSize( labelFont.pointSize() + 4 ); 
+     labelFont.setBold( true );
+     panel_label->setFont( labelFont );
+
+     // Title <hr>
+     QFrame *title_line = new QFrame;
+     title_line->setFrameShape(QFrame::HLine);
+     title_line->setFrameShadow(QFrame::Sunken);
+
+     QScrollArea *scrollArea = new QScrollArea;
+
      advanced_tree = NULL;
      simple_tree = NULL;
      simple_panel = NULL;
      advanced_panel = NULL;
 
-     main_layout->addWidget( types, 0,0,1,1 );
-     main_layout->addWidget( tree_panel, 1,0,1,1 );
-     main_layout->addWidget( main_panel, 0, 1, 2, 1 );
+     main_layout->addWidget( tree_panel, 0, 0, 3, 1 );
+     main_layout->addWidget( types, 3, 0, 1, 1 );
+
+     main_layout->addWidget( panel_label, 0, 1, 1, 1 );
+     main_layout->addWidget( title_line, 1, 1, 1, 1 );
+     main_layout->addWidget( main_panel, 2, 1, 2, 1 );
 
      main_layout->setColumnMinimumWidth( 0, 200 );
      main_layout->setColumnStretch( 0, 1 );
      main_layout->setColumnStretch( 1,3 );
 
+     main_layout->setRowStretch( 2, 4);
+
      setSmall();
 
      QPushButton *save, *cancel;
@@ -79,9 +101,10 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
                                                         &save, _("Save"),
                                                         &cancel, _("Cancel"),
                                                         NULL, NULL );
-     main_layout->addLayout( buttonsLayout, 2,0, 1 ,3 );
+     main_layout->addLayout( buttonsLayout, 4, 0, 1 ,3 );
      setLayout( main_layout );
 
+
      BUTTONACT( save, save() );
      BUTTONACT( cancel, cancel() );
      BUTTONACT( small, setSmall() );
index 58cd81801f9e91ea5b81dcb7c4ef67224939313e..4ddb854c17e629a6cbf8d046d645c0ebc76238c9 100644 (file)
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>418</width>
-    <height>597</height>
+    <height>533</height>
    </rect>
   </property>
   <property name="windowTitle" >
      </property>
     </widget>
    </item>
-   <item>
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Fixed</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>20</width>
-       <height>10</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
    <item>
     <widget class="QGroupBox" name="groupBox_3" >
      <property name="title" >
@@ -282,7 +266,6 @@ p, li { white-space: pre-wrap; }
    </item>
   </layout>
  </widget>
- <includes/>
  <resources/>
  <connections/>
 </ui>