Commit cc8c464f authored by Antoine Cellerier's avatar Antoine Cellerier

Simple prefs left hand side stuff (categories). Icons will of course be changed in the future :)

parent cfaa0cb3
...@@ -32,11 +32,27 @@ ...@@ -32,11 +32,27 @@
#include <QString> #include <QString>
#include <QFont> #include <QFont>
#include "pixmaps/audio.xpm" #include "pixmaps/advanced_50x50.xpm"
#include "pixmaps/video.xpm" #include "pixmaps/audio_50x50.xpm"
#include "pixmaps/input_and_codecs_50x50.xpm"
#include "pixmaps/interface_50x50.xpm"
#include "pixmaps/playlist_50x50.xpm"
#include "pixmaps/subtitles_50x50.xpm"
#include "pixmaps/video_50x50.xpm"
#include "ui/sprefs_trivial.h" #include "ui/sprefs_trivial.h"
#define ITEM_HEIGHT 25 #define ITEM_HEIGHT 50
enum {
SPrefsVideo,
SPrefsAudio,
SPrefsInputAndCodecs,
SPrefsPlaylist,
SPrefsInterface,
SPrefsSubtitles,
SPrefsAdvanced
};
/********************************************************************* /*********************************************************************
* The List of categories * The List of categories
...@@ -58,12 +74,19 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -58,12 +74,19 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) :
setFont( f ); setFont( f );
#endif #endif
addItem( "Very trivial" ); #define ADD_CATEGORY( id, label, icon ) \
item(0)->setIcon( QIcon( QPixmap( audio_xpm ) ) ); addItem( label ); \
item(0)->setData( Qt::UserRole, qVariantFromValue( 0 ) ); item( id )->setIcon( QIcon( QPixmap( icon ) ) ); \
addItem( "Video" ); item( id )->setData( Qt::UserRole, qVariantFromValue( (int)id ) );
item(1)->setIcon( QIcon( QPixmap( video_xpm ) ) );
item(1)->setData( Qt::UserRole, qVariantFromValue( 1 ) ); ADD_CATEGORY( SPrefsVideo, "Video", video_50x50_xpm );
ADD_CATEGORY( SPrefsAudio, "Audio", audio_50x50_xpm );
ADD_CATEGORY( SPrefsInputAndCodecs, "Input and Codecs",
input_and_codecs_50x50_xpm );
ADD_CATEGORY( SPrefsPlaylist, "Playlist", playlist_50x50_xpm );
ADD_CATEGORY( SPrefsInterface, "Interface", interface_50x50_xpm );
ADD_CATEGORY( SPrefsSubtitles, "Subtitles", subtitles_50x50_xpm );
ADD_CATEGORY( SPrefsAdvanced, "Advanced", advanced_50x50_xpm );
} }
void SPrefsCatList::ApplyAll() void SPrefsCatList::ApplyAll()
...@@ -88,21 +111,50 @@ void SPrefsCatList::DoAll( bool doclean ) ...@@ -88,21 +111,50 @@ void SPrefsCatList::DoAll( bool doclean )
SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
int number ) : QWidget( _parent ), p_intf( _p_intf ) int number ) : QWidget( _parent ), p_intf( _p_intf )
{ {
if( number == 0 ) switch( number )
{
case SPrefsVideo:
{ {
Ui::SPrefsTrivial ui; Ui::SPrefsTrivial ui;
ui.setupUi( this ); ui.setupUi( this );
module_config_t *p_config = config_FindConfig( VLC_OBJECT(p_intf), module_config_t *p_config =
"memcpy" ); config_FindConfig( VLC_OBJECT(p_intf), "memcpy" );
ConfigControl *control = new ModuleConfigControl( VLC_OBJECT(p_intf), ConfigControl *control =
new ModuleConfigControl( VLC_OBJECT(p_intf),
p_config, ui.memcpyLabel, ui.memcpyCombo, false ); p_config, ui.memcpyLabel, ui.memcpyCombo, false );
controls.append( control ); controls.append( control );
break;
} }
else
case SPrefsAudio:
{
break;
}
case SPrefsInputAndCodecs:
{
break;
}
case SPrefsPlaylist:
{
break;
}
case SPrefsInterface:
{ {
int *p = NULL; break;
fprintf( stderr, "Ha ha ca te fait bien la bite\n" ); }
*p=42;
case SPrefsSubtitles:
{
break;
}
case SPrefsAdvanced:
{
break;
}
} }
} }
......
/* XPM */
static char * advanced_50x50_xpm[] = {
"50 50 2 1",
" c #FFFFFF",
". c #000000",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .............................. ",
" ................................... ",
" .................................... ",
" .... ....... ",
" .... ",
" ... ",
" .... ... ",
" .... ... ",
" .... ... ... ....... ...... ",
" ... ... ... ............... ",
" ... ... ... ............... ",
" ... .... ... ...... ...... ",
" ... .... ... ......... .... ",
" ... .... ... ......... ..... ",
" .... ... ... ......... ...... ",
" ..... ... .... .... ... ....... ",
" ........ .... ... ............... ",
" ........ ... ... ........ ...... ",
" ...... ....... ..... ",
" .... ",
" .... ",
" ... ",
" ............................................ ",
" ............................................ ",
" ........................................... ",
" ",
" ",
" ... ",
" .............. .... ",
" ............... ..... ",
" ....................... ",
" ... ......... ",
" ... ....... ",
" ... ....... ",
" ... ... ",
" ... ... ",
" ... ... ",
" ... ... ",
" ... ... ",
" .... ",
" .... ",
" .... "};
/* XPM */
static char * audio_50x50_xpm[] = {
"50 50 228 2",
" c #FFFFFF",
". c #000000",
"+ c #474746",
"@ c #565656",
"# c #353535",
"$ c #444444",
"% c #545454",
"& c #646564",
"* c #141313",
"= c #232323",
"- c #333333",
"; c #434343",
"> c #535353",
", c #636263",
"' c #020202",
") c #111212",
"! c #212122",
"~ c #313131",
"{ c #414141",
"] c #515151",
"^ c #616060",
"/ c #100F10",
"( c #20201F",
"_ c #2F302F",
": c #3F3F40",
"< c #4F4F4F",
"[ c #5F5F5F",
"} c #6E6F6F",
"| c #0E0E0E",
"1 c #1E1E1E",
"2 c #2D2E2D",
"3 c #3E3E3E",
"4 c #4D4E4D",
"5 c #5E5E5D",
"6 c #6D6D6D",
"7 c #0C0C0D",
"8 c #1C1C1C",
"9 c #2B2C2C",
"0 c #3B3B3C",
"a c #4B4C4C",
"b c #5C5C5B",
"c c #6B6B6B",
"d c #7B7B7C",
"e c #0A0B0A",
"f c #1A1A1B",
"g c #2A2A2B",
"h c #3A3A3A",
"i c #4A4A4A",
"j c #5A5A5A",
"k c #6A6A69",
"l c #797979",
"m c #898989",
"n c #090909",
"o c #191818",
"p c #282828",
"q c #383939",
"r c #484848",
"s c #585758",
"t c #686867",
"u c #787778",
"v c #878787",
"w c #979897",
"x c #070707",
"y c #171716",
"z c #272726",
"A c #373736",
"B c #464646",
"C c #666666",
"D c #767576",
"E c #858585",
"F c #969696",
"G c #A5A5A6",
"H c #050506",
"I c #151515",
"J c #252525",
"K c #343535",
"L c #454545",
"M c #545455",
"N c #656565",
"O c #747474",
"P c #848484",
"Q c #949494",
"R c #A3A3A3",
"S c #030303",
"T c #131313",
"U c #525353",
"V c #626263",
"W c #727273",
"X c #828383",
"Y c #929292",
"Z c #A2A2A2",
"` c #B1B2B2",
" . c #020201",
".. c #121212",
"+. c #222121",
"@. c #313232",
"#. c #616160",
"$. c #717170",
"%. c #818080",
"&. c #909190",
"*. c #A0A0A0",
"=. c #B0B0B0",
"-. c #C0C0C0",
";. c #101010",
">. c #201F20",
",. c #2F2F2F",
"'. c #3F403F",
"). c #5F5E5F",
"!. c #6F6F6E",
"~. c #7F7F7E",
"{. c #8E8E8E",
"]. c #9F9F9F",
"^. c #AEAEAE",
"/. c #BEBEBE",
"(. c #CECECE",
"_. c #2D2D2E",
":. c #3E3E3D",
"<. c #4D4D4E",
"[. c #5D5D5D",
"}. c #7D7D7D",
"|. c #8D8D8D",
"1. c #9C9C9D",
"2. c #ADACAC",
"3. c #BCBDBC",
"4. c #CCCCCC",
"5. c #DBDCDB",
"6. c #0C0C0C",
"7. c #1C1D1C",
"8. c #2C2C2B",
"9. c #4C4C4C",
"0. c #5C5B5B",
"a. c #7B7B7B",
"b. c #8A8B8B",
"c. c #9B9B9B",
"d. c #ABABAB",
"e. c #BBBBBB",
"f. c #CBCBCB",
"g. c #DADADA",
"h. c #EAEAE9",
"i. c #0B0B0A",
"j. c #1A1A1A",
"k. c #2A2A2A",
"l. c #696969",
"m. c #989898",
"n. c #A9A9A9",
"o. c #B9B8B9",
"p. c #C8C9C8",
"q. c #D9D8D9",
"r. c #E8E8E8",
"s. c #F8F8F8",
"t. c #080809",
"u. c #191919",
"v. c #292828",
"w. c #383938",
"x. c #494848",
"y. c #575858",
"z. c #686868",
"A. c #888887",
"B. c #979797",
"C. c #A7A7A7",
"D. c #B7B7B7",
"E. c #C6C7C7",
"F. c #D6D6D6",
"G. c #E6E6E6",
"H. c #F6F6F6",
"I. c #171717",
"J. c #272727",
"K. c #373737",
"L. c #464747",
"M. c #565657",
"N. c #767676",
"O. c #868586",
"P. c #969595",
"Q. c #A5A6A6",
"R. c #B5B5B6",
"S. c #C5C5C4",
"T. c #D5D5D5",
"U. c #E5E5E4",
"V. c #F5F5F5",
"W. c #454544",
"X. c #545554",
"Y. c #646464",
"Z. c #848384",
"`. c #949493",
" + c #A3A4A4",
".+ c #B4B4B3",
"++ c #C3C3C3",
"@+ c #D3D4D3",
"#+ c #E3E3E3",
"$+ c #F2F2F3",
"%+ c #131413",
"&+ c #424343",
"*+ c #525352",
"=+ c #727272",
"-+ c #B2B2B2",
";+ c #C1C1C2",
">+ c #D1D2D1",
",+ c #E1E1E1",
"'+ c #F1F1F1",
")+ c #212121",
"!+ c #414142",
"~+ c #515051",
"{+ c #606161",
"]+ c #717071",
"^+ c #818081",
"/+ c #919091",
"(+ c #AFB0B0",
"_+ c #C0BFBF",
":+ c #CFCFCF",
"<+ c #DFDFDF",
"[+ c #EFEFEF",
"}+ c #302F2F",
"|+ c #504F4F",
"1+ c #5F5F5E",
"2+ c #6F6F6F",
"3+ c #7F7E7E",
"4+ c #8E8F8F",
"5+ c #CDCECD",
"6+ c #DEDEDE",
"7+ c #EDEEED",
"8+ c #FDFDFE",
"9+ c #9C9C9C",
"0+ c #ACADAC",
"a+ c #BCBCBC",
"b+ c #DBDCDC",
"c+ c #ECECEC",
"d+ c #FCFCFB",
"e+ c #F9F9F9",
" ",
" ",
" ",
" ",
" . . . ",
" . . . . . . . ",
" . . . . . . . . . . . . . ",
" . . . . . . . . . . . . . . . . ",
" . . . . . . . . . + @ . . . . . . . . ",
" . . . . . . . . # $ % & . . . . . . . . . ",
" . . . . . . * = - ; > , . . . . . . . . . . ",
" . . . . . ' ) ! ~ { ] ^ . . . . . . . . . ",
" . . . . . . . . . . . . . . . . / ( _ : < [ } . . . . . . . . ",
" . . . . . . . . . . . . . . . | 1 2 3 4 5 6 . . . . . . . . ",
" . . . . . . . . . . . . . . . 7 8 9 0 a b c d . . . . . . . . ",
" . . . . . . . . . . . . . . e f g h i j k l m . . . . . . . ",
" . . . . . . . . . . . . . n o p q r s t u v w . . . . . . ",
" . . . . . . . . . . . . x y z A B @ C D E F G . . . . . . . ",
" . . . . . . . . . . . H I J K L M N O P Q R . . . . . . . . ",
" . . . . . . . . . . S T = - ; U V W X Y Z ` . . . . . . . ",
" . . . . . . . . . ...+.@.{ ] #.$.%.&.*.=.-.. . . . . . . ",
" . . . . . . . . . ;.>.,.'.< ).!.~.{.].^./.(.. . . . . . ",
" . . . . . . . . | 1 _.:.<.[.6 }.|.1.2.3.4.5.. . . . . . ",
" . . . . . . . 6.7.8.0 9.0.c a.b.c.d.e.f.g.h.. . . . . . ",
" . . . . . . i.j.k.h i j l.l m m.n.o.p.q.r.s.. . . . . . ",
" . . . . . t.u.v.w.x.y.z.u A.B.C.D.E.F.G.H. . . . . . . ",
" . . . . x I.J.K.L.M.C N.O.P.Q.R.S.T.U.V. . . . . . . ",
" . . . H I J K W.X.Y.O Z.`. +.+++@+#+$+ . . . . . . ",
" . . . %+= - &+*+, =+X Y Z -+;+>+,+'+ . . . . . . ",
" . . . )+~ !+~+{+]+^+/+*.(+_+:+<+[+ . . . . . . ",
" . . . }+: |+1+2+3+4+].^./.5+6+7+8+ . . . . . . ",
" . . . . . . . . . 9+0+a+4.b+c+d+ . . . . . . . ",
" . . . . . . . . . . . . . . e+ . . . . . . . . ",
" . . . . . . . . . . . . . . . . . . . . . . . . ",
" . . . . . . . . . . . . . . . . ",
" . . . . . . . . . . . ",
" . . . . . . . . . . ",
" . . . . . . . . . . . ",
" . . . . . . . . . . . . ",
" . . . . . . . . . . . ",
" . . . . . . . . . . . ",
" . . . . . . . . . . . . ",
" . . . . . . . . . . . . . . ",
" . . . . . . . . . . . . . ",
" . . . . . . . . . . . . ",
" . . . . . . . . . . . . . . ",
" . . . . . . . . . . . . . . ",
" . . . . . . . . . . . . ",
" . . . . . . . . . . ",
" "};
/* XPM */
static char * input_and_codecs_50x50_xpm[] = {
"50 50 5 1",
" c #FFFFFF",
". c #000000",
"+ c #00FF00",
"@ c #FF0000",
"# c #FF00FF",
" ..... +++++ ......... ",
" ..... ++++++........ @@@@@@ ",
" ..... +++++........@@@@@@@@@@ ",
" ..... ### +++++....@@@@@@@@@@@@@@@ ",
" ..... ####++++@@@@@@@@@@@@@@@@ ",
" ..... ######+@@@@@@@@@@@@@ ",
" ..... ....######@@@@@@@@ ",
"+ .... ....+#######@ ",
"+ .... ....++++###### ..... @",
"++ .....@@@+++++@#######.... @@@@",
"+++ ..@@@@@@+++++@ ######... @@@@@@@",
"+++ ...@@@@@@@++++ ######.. @@@@@@@@@@@",
"++++ ...@@@@@@@@++++ ######@@@@@@@@@@@@@ ",
"+++++..@@@@@@...++++ ######@@@@@@@@@ ",
"@++++++@@@@@ .++++ ######@@@@ ",
".@++++++@@ +++++ @@##### ",
".@@+++++++++ ++++. @@@@@###### ",
"@@@@@+++++++ ++++... @@@@@@@@@@ ###### ",
"@@@@@@++++++ ++++..@@@@@@@@@@@@@@. ###### ",
"@@@ @@@@@@@.+++@@@@@@@@@@@@@@@... #####... ",
"@ .@@@@@@+++@@@@@@@@@@.......+++ ..######. ",
" @@@@@@@@@@@++++@@@@@............+++....###### ",
" @@@@@@@@@@@++++@@ .............++++....###### ",
" @@@@@@@@@@+++++ ............++++......#####..",
" ... ++++@@ ..............++++ ....#####.",
" ... ..+++@@@@@......... .... +++++ +++++#####",
" ......++++@@@@@@....... ... ++++++++++++####",
"..........++++.@@@@@@@..... ... .++++++++++++###",
"..........+++... @@@@@@ ... ... ..+++++++... ##",
".........++++.. @@@@@@.... .....++++++++. #",
" .... ++++.. @@@@........+++++++++++ ",
". .....+++... @@@@......++++++ +++++ ",
".... ...++++... @@@@@...+++++++ ++++++ ",
".....+++++++. @@@@.+++++++ .++++++ ",
"+++++++++++............@+++++++++. ..++++++ ",
"+++++++++++..........++++++++++... ....++++++ ",
"+++++++++++..........++++++++@.... ....+++++++ ",
"@ ++++...........+++++@@@@@@ ... +++++++ ",
" ++++ ........+++...@@@@@@ ... ++++++ ",
" ++++ ..... ........@@@@@@@ ... +++++ ",
" ++++ .......... ...@@@@@@ ... +++++ ",
" ++++ .......... ....@@@@@@... +++++",
" +++++ .............. ......@@@@@@. ++++",
". +++++ .....@@@..................@@@@@@ +++",
".+++++.......@@@ ..............@@@@@@.. +++",
"+++++.....@@@@@@@@@@@@@@@@@@@@@ .....@@@@@.... ++",
"++++....@@@@@@@@@@@@@@@@@@@@@@@ ......@@@@@......+",
"+++ ....@@@@@@@@@@@@@@@@@@@@@@@...... @@@@@......",
"++ ....@@@@ @@@@@@@@ .......... @@@@@@@@..",
"+ ....@@@.. ......... @@@@@@@@@"};
/* XPM */
static char * interface_50x50_xpm[] = {
"50 50 2 1",
" c #FFFFFF",
". c #000000",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ...... ",
" ............ ",
" .................... ",
" ...................... ........... ",
" .................................... ",
" ... ............................ ",
" ... ...................... ",
" ... ........ ... ",
" ... ............. ",
" ... ... ......... ",
" ... .... ....... ",
" ... ...... .... ....... ",
" ... ......... .............. ",
" ... .......... .............. ",
" ... ................ .............. ",
" ... ......... ... ...... ",
" ... ......... .... ",
" ... ...... .... ",
" ... ...... ..... ",
" ... ............. ",
" ... .............. ",
" ... .............. ",
" ... ........ .... ",
" ... ....... .... ",
" ... .... ",
" ... .............. ",
" ... .............. ",
" .... ............ ",
" .... ",
" ... ",
" ... ",
" .... ...",
" .............. ........",
" .................... ............",
" ............................................",
" ............................. ",
" .................. ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * playlist_50x50_xpm[] = {
"50 50 2 1",
" c #FFFFFF",
". c #000000",
" ",
" ",
" ",
" ",
" ",
" ..... ",
" ...... ",
" ...... ",
" ...... ....... ",
" ...... ......... ",
" ...... .............. ",
" ...... ............. ",
" ..... ................. ",
" .................. ",
" .............. ",
" ........ ",
" ",
" .... ",
" ...... ",
" ........ ",
" .......... ",
" .......... ........ ",
" .......... ..................... ",
" .......... ..................... ",
" .......... ............... ",
" ......... ",
" ... ...... ",
" ....... ",
" ........ ",
" ........ ....... ",
" ........ .................................",
" ....... .................................",
" ............................",
" ... ",
" ........ ... ",
" ........ ... ",
" ......... ... ",
" ......... ... ...... ",
" ......... ................. ......... ",
" ......... ........................... ",
" ......... ....................... ",
" ..... ...... ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * subtitles_50x50_xpm[] = {
"50 50 2 1",
" c #FFFFFF",
". c #000000",
" ",
" ... ",
" ... ",
" ... ",
" ... ",
" .... ",
" ... .... ....... ",
" .... .... ........... ",
" .... .... ............ ",
" ... ...... ... .... .... ",
" .... ........ ... ... .... ",
" .... ......... .... ... .... ",
" ........ .... .... ... ...... ",
" ....... ... ... ................ ",
" ...... .... ................ ",
" ............ ......... ..... ",
" .......... ",
" ....... ... ",
" ... ....... ",
" ... ........ ",
" .... ... .......... ",
" .... ... .... ... ",
" .... ... ... ... ",
" .... ...... ... ... .... ",
" ..... ....... ... .... .... ",
" .... ....... ... .......... ",
" .... .... .... ... ......... ",
" ..... .... .... .... ........ ",
" ........... ... ..... ........ ",
" ......... ... .... .... ",
" ....... ..... ... ... ",
" .... ...... .... ",
" ........... .... ",
" ... ........ ... ",
" ... ...... ... ... ....... ",
" .... ...... ... ........ ",
" ..... ....... .... ........... ",
" .... ......... .... ... .... ",
" ..... .... ..... ... ... .... ",
" ...... ..... .... ... .... ..... ",
" .......... ... ... ..... ..... ",
" ....... ... .... ......... ",
" ...... ... .... ........ ",
" ....... ... .... ....... ",
" ............. ..... ...... ",
" ............. ...... ... ",
" ......... ..... ..... ",
" ..... .... ..... ",
" .... ",
" "};
/* XPM */
static char * video_50x50_xpm[] = {
"50 50 3 1",
" c #FFFFFF",
". c #000000",
"+ c #00FF00",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ......... ",
" ............... ",
" ................... ",
"........ ........... ",
".... .... .......... ",
".... .................... ",
"+++................ ...... ",
"++.................. ....... ",
"+.......+++++++...... .......... ...... ",
"+....++++.....+++................................ ",
"+...++++......++++............................... ",
"+...++++......++++......... .................. ",
"++++++++......+++.............. .... ........ ",
"++++++++......+++.....+......................... ",
"+++++++++.....+++...+++++....................... ",
"++++++++++...++++...+++++++++................. ",
"++++++++++...++++...++++++++++++++... ",
"++++++++++...++++...+++.......++++... ",
"++++++++......+++...+++.......++++... ",
"++++++++......+++...+++.......++++... ",
"++++++++......+++...+++......+++++... .... ",
"....................+++......+++++... .... ",
"....................++++....++++++... .... ",
".....................+++...+++++++... ...... ",
" ... .............++++++... ...... ",
" .... ............++++++... ..... ",
" ........ ............++++++... ... ",
" ........... ... .....+++++++++... ..... ",
" ............... ....++++++++... ..... ",
" .......... .....+++++++... ......... ",
" ........ ......++++++... .......... ",
" ................................... ",
" .............................. ",
" ........................ .....",
" ............. ... ...........",
" ..........................",
" .................... ",
" .............. ",
" ",
" ",
" "};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment