Qt4: Simple_Prefs, adding hotkeys/shortcuts configuration.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 25 Feb 2007 17:17:44 +0000 (17:17 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 25 Feb 2007 17:17:44 +0000 (17:17 +0000)
modules/gui/qt4/Modules.am
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.hpp
modules/gui/qt4/pixmaps/advanced_50x50.xpm [deleted file]
modules/gui/qt4/pixmaps/hotkeys_50x50.xpm [new file with mode: 0644]
modules/gui/qt4/ui/sprefs_hotkeys.ui [new file with mode: 0644]

index 7718931..cdc5e63 100644 (file)
@@ -25,6 +25,7 @@ TOUI =        \
        ui/sprefs_playlist \
        ui/sprefs_subtitles \
        ui/sprefs_video \
+       ui/sprefs_hotkeys \
        ui/streampanel \
        ui/sout
 
@@ -179,6 +180,7 @@ EXTRA_DIST += \
        ui/sprefs_input.ui \
        ui/sprefs_interface.ui \
        ui/sprefs_playlist.ui \
+       ui/sprefs_hotkeys.ui \
        ui/sprefs_subtitles.ui \
        ui/sprefs_video.ui \
        ui/streampanel.ui \
index ca1a4a3..320d1f0 100644 (file)
@@ -34,8 +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/hotkeys_50x50.xpm"
 #include "pixmaps/audio_50x50.xpm"
 #include "pixmaps/input_and_codecs_50x50.xpm"
 #include "pixmaps/interface_50x50.xpm"
@@ -47,6 +46,7 @@
 #include "ui/sprefs_input.h"
 #include "ui/sprefs_video.h"
 #include "ui/sprefs_subtitles.h"
+#include "ui/sprefs_hotkeys.h"
 //#include "ui/sprefs_playlist.h"
 #include "ui/sprefs_interface.h"
 
@@ -73,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("Hotkeys"), advanced_50x50_xpm );
+    ADD_CATEGORY( SPrefsHotkeys, qtr("Hotkeys"), hotkeys_50x50_xpm );
 
     setCurrentRow( SPrefsInterface );
 }
@@ -162,8 +162,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 
         END_SPREFS_CAT;
 
-        case SPrefsAdvanced: break;
-    }
+        START_SPREFS_CAT( Hotkeys );
+        END_SPREFS_CAT;
+        }
 }
 
 void SPrefsPanel::apply()
index 4f0358f..977c706 100644 (file)
@@ -35,7 +35,7 @@ enum {
 //    SPrefsPlaylist,
     SPrefsInterface,
     SPrefsSubtitles,
-    SPrefsAdvanced,
+    SPrefsHotkeys,
     SPrefsMax
 };
 #define SPrefsDefaultCat SPrefsInterface
diff --git a/modules/gui/qt4/pixmaps/advanced_50x50.xpm b/modules/gui/qt4/pixmaps/advanced_50x50.xpm
deleted file mode 100644 (file)
index 86c4dc3..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* XPM */
-static char * advanced_50x50_xpm[] = {
-"50 50 2 1",
-"      c #FFFFFF",
-".     c #000000",
-"                                                  ",
-"                                                  ",
-"                                                  ",
-"                                                  ",
-"                                                  ",
-"                                                  ",
-"                                                  ",
-"                                                  ",
-"             ..............................       ",
-"             ...................................  ",
-"            ....................................  ",
-"            ....                         .......  ",
-"            ....                                  ",
-"            ...                                   ",
-"           ....  ...                              ",
-"           ....  ...                              ",
-"           ....  ...    ...    .......  ......    ",
-"           ...   ...    ...    ...............    ",
-"           ...   ...    ...    ...............    ",
-"    ...   ....   ... ......         ......        ",
-"    ...   ....   ... .........        ....        ",
-"    ...   ....   ... .........       .....        ",
-"    ....  ...    ... .........      ......        ",
-"    ..... ...    ....    .... ...  .......        ",
-"     ........    ....     ... ...............     ",
-"     ........     ...     ... ........ ......     ",
-"       ......                  .......  .....     ",
-"       ....                                       ",
-"       ....                                       ",
-"  ...                                             ",
-"  ............................................    ",
-"  ............................................    ",
-"   ...........................................    ",
-"                                                  ",
-"                                                  ",
-"                 ...                              ",
-"             ..............     ....              ",
-"             ...............   .....              ",
-"             .......................              ",
-"                 ...     .........                ",
-"                 ...      .......                 ",
-"                 ...      .......                 ",
-"                 ...      ...                     ",
-"                 ...      ...                     ",
-"                 ...      ...                     ",
-"                 ...      ...                     ",
-"                 ...      ...                     ",
-"                          ....                    ",
-"                          ....                    ",
-"                          ....                    "};
diff --git a/modules/gui/qt4/pixmaps/hotkeys_50x50.xpm b/modules/gui/qt4/pixmaps/hotkeys_50x50.xpm
new file mode 100644 (file)
index 0000000..97f37de
--- /dev/null
@@ -0,0 +1,55 @@
+/* XPM */
+static char * hotkeys_50x50_xpm[] = {
+"50 50 2 1",
+"      c #FFFFFF",
+".     c #000000",
+"                                                  ",
+"                                                  ",
+"                                                  ",
+"                                                  ",
+"                                                  ",
+"                                                  ",
+"                                                  ",
+"                                                  ",
+"             ..............................       ",
+"             ...................................  ",
+"            ....................................  ",
+"            ....                         .......  ",
+"            ....                                  ",
+"            ...                                   ",
+"           ....  ...                              ",
+"           ....  ...                              ",
+"           ....  ...    ...    .......  ......    ",
+"           ...   ...    ...    ...............    ",
+"           ...   ...    ...    ...............    ",
+"    ...   ....   ... ......         ......        ",
+"    ...   ....   ... .........        ....        ",
+"    ...   ....   ... .........       .....        ",
+"    ....  ...    ... .........      ......        ",
+"    ..... ...    ....    .... ...  .......        ",
+"     ........    ....     ... ...............     ",
+"     ........     ...     ... ........ ......     ",
+"       ......                  .......  .....     ",
+"       ....                                       ",
+"       ....                                       ",
+"  ...                                             ",
+"  ............................................    ",
+"  ............................................    ",
+"   ...........................................    ",
+"                                                  ",
+"                                                  ",
+"                 ...                              ",
+"             ..............     ....              ",
+"             ...............   .....              ",
+"             .......................              ",
+"                 ...     .........                ",
+"                 ...      .......                 ",
+"                 ...      .......                 ",
+"                 ...      ...                     ",
+"                 ...      ...                     ",
+"                 ...      ...                     ",
+"                 ...      ...                     ",
+"                 ...      ...                     ",
+"                          ....                    ",
+"                          ....                    ",
+"                          ....                    "};
diff --git a/modules/gui/qt4/ui/sprefs_hotkeys.ui b/modules/gui/qt4/ui/sprefs_hotkeys.ui
new file mode 100644 (file)
index 0000000..99f3a03
--- /dev/null
@@ -0,0 +1,77 @@
+<ui version="4.0" >
+ <author>Jean-Baptiste Kempf</author>
+ <class>SPrefsHotkeys</class>
+ <widget class="QWidget" name="SPrefsVideo" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>426</width>
+    <height>474</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="2" column="1" >
+    <widget class="QLineEdit" name="shortcutValue" >
+     <property name="inputMask" >
+      <string/>
+     </property>
+     <property name="text" >
+      <string>Customize here</string>
+     </property>
+     <property name="echoMode" >
+      <enum>QLineEdit::Normal</enum>
+     </property>
+     <property name="readOnly" >
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" >
+    <widget class="QPushButton" name="customizeShortcut" >
+     <property name="text" >
+      <string>Customize</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="2" >
+    <widget class="QTreeWidget" name="shortcutsTree" >
+     <property name="columnCount" >
+      <number>2</number>
+     </property>
+     <column>
+      <property name="text" >
+       <string>Action</string>
+      </property>
+     </column>
+     <column>
+      <property name="text" >
+       <string>Shortcut</string>
+      </property>
+     </column>
+   </widget>
+   </item>
+   <item row="0" column="0" >
+    <widget class="QLabel" name="label" >
+     <property name="text" >
+      <string>Search</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" >
+    <widget class="QLineEdit" name="actionSearch" />
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>