Commit 565ff8e6 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[ADD] - default module icon added.

parent fe90179a
......@@ -51,4 +51,9 @@
#include "tango/preferences-system.xpm"
#include "QuestionMarks.xpm"
#include "empty.xpm"
#include "moduleDefault.xpm"
#endif // WICONS_H
/* XPM */
const char * empty_xpm[] = {
"32 32 1 1",
" c None",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
const char * moduleDefault_xpm[] = {
"32 32 129 2",
" c None",
". c #858585",
"+ c #BFBFBF",
"@ c #D0D0D0",
"# c #D6D6D6",
"$ c #C2C2C2",
"% c #848484",
"& c #949494",
"* c #FFFFFF",
"= c #F9F9F9",
"- c #939393",
"; c #B6B6B6",
"> c #FEFEFE",
", c #FAFAFA",
"' c #9C9C9C",
") c #727272",
"! c #EEEEEE",
"~ c #555555",
"{ c #DEDEDE",
"] c #F7F7F7",
"^ c #F6F6F6",
"/ c #CDCDCD",
"( c #333333",
"_ c #EDEDED",
": c #585858",
"< c #7F7F7F",
"[ c #F5F5F5",
"} c #F3F3F3",
"| c #606060",
"1 c #979797",
"2 c #EFEFEF",
"3 c #F4F4F4",
"4 c #F8F8F8",
"5 c #DBDBDB",
"6 c #8F8F8F",
"7 c #626262",
"8 c #F0F0F0",
"9 c #6A6A6A",
"0 c #757575",
"a c #F1F1F1",
"b c #F2F2F2",
"c c #494949",
"d c #D3D3D3",
"e c #EBEBEB",
"f c #E9E9E9",
"g c #ECECEC",
"h c #EAEAEA",
"i c #363636",
"j c #E4E4E4",
"k c #E7E7E7",
"l c #E8E8E8",
"m c #E1E1E1",
"n c #DDDDDD",
"o c #D4D4D4",
"p c #DCDCDC",
"q c #DFDFDF",
"r c #E0E0E0",
"s c #343434",
"t c #434343",
"u c #DADADA",
"v c #717171",
"w c #E2E2E2",
"x c #E6E6E6",
"y c #E5E5E5",
"z c #6F6F6F",
"A c #CACACA",
"B c #E3E3E3",
"C c #C9C9C9",
"D c #3C3C3C",
"E c #D7D7D7",
"F c #7D7D7D",
"G c #303030",
"H c #313131",
"I c #828282",
"J c #3D3D3D",
"K c #7A7A7A",
"L c #A7A7A7",
"M c #ADADAD",
"N c #C8C8C8",
"O c #D9D9D9",
"P c #D2D2D2",
"Q c #D8D8D8",
"R c #C3C3C3",
"S c #B0B0B0",
"T c #AFAFAF",
"U c #CECECE",
"V c #CFCFCF",
"W c #D5D5D5",
"X c #747474",
"Y c #777777",
"Z c #CBCBCB",
"` c #D1D1D1",
" . c #989898",
".. c #C7C7C7",
"+. c #959595",
"@. c #C5C5C5",
"#. c #C0C0C0",
"$. c #696969",
"%. c #737373",
"&. c #CCCCCC",
"*. c #8A8A8A",
"=. c #545454",
"-. c #999999",
";. c #B9B9B9",
">. c #8E8E8E",
",. c #4B4B4B",
"'. c #484848",
"). c #404040",
"!. c #B7B7B7",
"~. c #BBBBBB",
"{. c #C6C6C6",
"]. c #BDBDBD",
"^. c #676767",
"/. c #6C6C6C",
"(. c #373737",
"_. c #393939",
":. c #C1C1C1",
"<. c #616161",
"[. c #636363",
"}. c #515151",
"|. c #6B6B6B",
"1. c #505050",
"2. c #2B2B2B",
"3. c #8C8C8C",
"4. c #929292",
"5. c #595959",
"6. c #A6A6A6",
"7. c #AEAEAE",
"8. c #A4A4A4",
" ",
" . + @ # $ % ",
" & * = = * - ",
" ; > , , * ' ",
" ) ! ~ { ] ^ ^ = / ( _ : ",
" < , [ } | 1 2 * ^ 3 3 3 [ 4 * 5 6 7 8 ^ 3 9 ",
" 0 ^ ! ! a 4 [ a a a a b b b a a } ^ ^ a ! 2 8 c ",
" d e f g _ ! 2 8 2 8 b a a b 8 2 ! ! _ g e h _ + ",
" i j k l g _ 2 8 m { n d o p q r 8 g e h f f f s ",
" t g j l ! 8 { n q q q { { n u # e h l k _ ~ ",
" v k w j f q q q r q q q q n p 5 u l x y h z ",
" A r r y d u { r m k f l y q p 5 u n x B B C ",
" D j p q E o E 5 w q F G H I n m 5 u # r w q k J ",
" K L M N O u q P o E 5 n 5 { u Q E w { { R S T ",
" & U V P W O { V o E r X Y y u Q @ w n O E d P & ",
" - C Z V d E u U P # m k u E ` n 5 E o V U . ",
" 6 ..C / @ W o Z ` W { x u W V u O W ` / Z +. ",
" ' @...A U ` O #.V d q $. %.B Q o C n E d V &.Z *. ",
" =.*.-.;./ V W Z / @ # d Q u W ` Z u d P ;.>.< ,. ",
" '.@ Z @ &.A U ` Q W . -.{ r E ` V / o @ # ). ",
" !.C &.d ~.A U @ W 5 m B r p 5 O ` {.Q ` U ]. ",
" ^./ / @ P C &.V ` o E Q O O Q E P O o ` d /. ",
" (.` / @ d # @.U V ` d W W W # ` m m E @ # _. ",
" $ Z &.@ P W u C A U V V @ P O B r { 5 P U :. ",
" #.A C &.V P o E O p n n n q r { n p u Q W U U / ",
" c @ Z &.` Q O # E O u 5 u 5 5 5 p q q E d @ d <. ",
" [.W ` d }.%.&.w O Q O O O u B A |.1.W d # v ",
" : ].i t :.Q Q Q O :.t 2.:.<. ",
" 3.O E E 5 6 ",
" 4.{ u 5 r % ",
" 5.6.T 7.8.1. ",
" "};
......@@ -162,6 +162,8 @@ void WMainWindow::setupGUI()
m_iconManager.addIcon( std::string( "config" ), preferences_system_xpm );
m_iconManager.addIcon( std::string( "view" ), camera_xpm );
m_iconManager.addIcon( std::string( "missingModule" ), QuestionMarks_xpm );
m_iconManager.addIcon( std::string( "none" ), empty_xpm );
m_iconManager.addIcon( std::string( "DefaultModuleIcon" ), moduleDefault_xpm );
if( objectName().isEmpty() )
{
......
......@@ -39,6 +39,7 @@
#include "core/common/WPathHelper.h"
#include "WQt4Gui.h"
#include "WMainWindow.h"
#include "WQtModuleExcluder.h"
#include "WQtModuleExcluder.moc"
......@@ -167,6 +168,9 @@ WQtModuleExcluder::WQtModuleExcluder( QWidget* parent, Qt::WindowFlags f ):
layout->addWidget( m_list );
setLayout( layout );
// for modules without icon, use this
QIcon noIcon = WQt4Gui::getMainWindow()->getIconManager()->getIcon( "DefaultModuleIcon" );
// fill the list item
for( std::vector< WModule::ConstSPtr >::const_iterator iter = m_moduleList.begin(); iter != m_moduleList.end(); ++iter )
{
......@@ -190,21 +194,26 @@ WQtModuleExcluder::WQtModuleExcluder( QWidget* parent, Qt::WindowFlags f ):
m_moduleItemMap[ ( *iter )->getName() ] = check;
++column;
// now, an icon
QLabel* icon = new QLabel();
icon->setSizePolicy( sizePolicy );
// if there is an icon -> show it
if( ( *iter )->getXPMIcon() )
{
QLabel* icon = new QLabel();
icon->setSizePolicy( sizePolicy );
// we need to enforce some size
QPixmap qicon( ( *iter )->getXPMIcon() );
qicon = qicon.scaled( 32, 32, Qt::KeepAspectRatio );
icon->setPixmap( qicon );
layoutWidget->addWidget( icon, 0, column, 2, 1 );
++column;
}
else
{
icon->setPixmap( noIcon.pixmap( 32, 32 ) );
}
layoutWidget->addWidget( icon, 0, column, 2, 1 );
++column;
// Add Name and Description
layoutWidget->addWidget( new QLabel( "<b>" + QString::fromStdString( ( *iter )->getName() )+ "</b>" ), 0, column );
......
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