Logo Search packages:      
Sourcecode: bbconf version File versions  Download package

tb_menu_base.cc

/***************************************************************************
                         -- tb_menu_base.cc --
                         -------------------
    begin                : 2001-09-01
    copyright            : (C) 2001 - 2002
    authors              : Jason Kasper (vanRijn)
                         : Ben Jansens (xOr)
    URL                  : http://bbconf.sourceforge.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/
 // E_O_H_VR
/****************************************************************************
** Form implementation generated from reading ui file 'ui/tb_menu_base.ui'
**
** Created: Sun Mar 31 18:24:22 2002
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "tb_menu_base.h"

#include <qvariant.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qtabwidget.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

#include "color.h"
#include "tbwidg_textcolor.h"
#include "tbwidg_textsel.h"
static const char* const image0_data[] = { 
"22 22 2 1",
". c None",
"# c #a4c610",
"........######........",
".....###########......",
"....##############....",
"...################...",
"..######......######..",
"..#####........#####..",
".#####.......#..#####.",
".####.......###..####.",
"####.......#####..####",
"####......#####...####",
"####....#######...####",
"####....######....####",
"####...########...####",
".####.##########..####",
".####..####.#########.",
".#####..##...########.",
"..#####.......#######.",
"..######......######..",
"...###################",
"....##################",
"......###########.###.",
"........######.....#.."};


/* 
 *  Constructs a ToolboxMenuBase which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 */
ToolboxMenuBase::ToolboxMenuBase( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    QPixmap image0( ( const char** ) image0_data );
    if ( !name )
      setName( "ToolboxMenuBase" );
    resize( 492, 539 ); 
    setCaption( trUtf8( "Menu Settings" ) );
    ToolboxMenuBaseLayout = new QVBoxLayout( this, 5, 5, "ToolboxMenuBaseLayout"); 

    tab_top = new QTabWidget( this, "tab_top" );

    tab = new QWidget( tab_top, "tab" );
    tabLayout = new QVBoxLayout( tab, 5, 5, "tabLayout"); 

    gb1 = new QGroupBox( tab, "gb1" );
    gb1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, gb1->sizePolicy().hasHeightForWidth() ) );
    gb1->setTitle( trUtf8( "Menu Frame Settings" ) );
    gb1->setColumnLayout(0, Qt::Vertical );
    gb1->layout()->setSpacing( 6 );
    gb1->layout()->setMargin( 11 );
    gb1Layout = new QGridLayout( gb1->layout() );
    gb1Layout->setAlignment( Qt::AlignTop );

    menu_frame = new TWTextSelect( gb1, "menu_frame" );

    gb1Layout->addWidget( menu_frame, 0, 0 );
    tabLayout->addWidget( gb1 );

    gb2 = new QGroupBox( tab, "gb2" );
    gb2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, gb2->sizePolicy().hasHeightForWidth() ) );
    gb2->setTitle( trUtf8( "Menu Title Settings" ) );
    gb2->setColumnLayout(0, Qt::Vertical );
    gb2->layout()->setSpacing( 6 );
    gb2->layout()->setMargin( 11 );
    gb2Layout = new QGridLayout( gb2->layout() );
    gb2Layout->setAlignment( Qt::AlignTop );

    menu_title = new TWTextSelect( gb2, "menu_title" );

    gb2Layout->addWidget( menu_title, 0, 0 );
    tabLayout->addWidget( gb2 );
    tab_top->insertTab( tab, trUtf8( "Menu Frame / Title" ) );

    tab_2 = new QWidget( tab_top, "tab_2" );
    tabLayout_2 = new QVBoxLayout( tab_2, 5, 5, "tabLayout_2"); 

    GroupBox2_3_3_2_2_3_2 = new QGroupBox( tab_2, "GroupBox2_3_3_2_2_3_2" );
    GroupBox2_3_3_2_2_3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, GroupBox2_3_3_2_2_3_2->sizePolicy().hasHeightForWidth() ) );
    GroupBox2_3_3_2_2_3_2->setTitle( trUtf8( "Hilighted Menu Items" ) );
    GroupBox2_3_3_2_2_3_2->setColumnLayout(0, Qt::Vertical );
    GroupBox2_3_3_2_2_3_2->layout()->setSpacing( 6 );
    GroupBox2_3_3_2_2_3_2->layout()->setMargin( 11 );
    GroupBox2_3_3_2_2_3_2Layout = new QGridLayout( GroupBox2_3_3_2_2_3_2->layout() );
    GroupBox2_3_3_2_2_3_2Layout->setAlignment( Qt::AlignTop );

    menu_hilite = new TWText( GroupBox2_3_3_2_2_3_2, "menu_hilite" );

    GroupBox2_3_3_2_2_3_2Layout->addWidget( menu_hilite, 0, 0 );
    tabLayout_2->addWidget( GroupBox2_3_3_2_2_3_2 );

    GroupBox210 = new QGroupBox( tab_2, "GroupBox210" );
    GroupBox210->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, GroupBox210->sizePolicy().hasHeightForWidth() ) );
    GroupBox210->setTitle( trUtf8( "Menu Miscellaneous Settings" ) );
    GroupBox210->setColumnLayout(0, Qt::Vertical );
    GroupBox210->layout()->setSpacing( 6 );
    GroupBox210->layout()->setMargin( 11 );
    GroupBox210Layout = new QGridLayout( GroupBox210->layout() );
    GroupBox210Layout->setAlignment( Qt::AlignTop );

    t1 = new QLabel( GroupBox210, "t1" );
    t1->setText( trUtf8( "Menu Bullet Style:" ) );

    GroupBox210Layout->addWidget( t1, 0, 0 );

    t2 = new QLabel( GroupBox210, "t2" );
    t2->setText( trUtf8( "Menu Bullet Position:" ) );

    GroupBox210Layout->addWidget( t2, 1, 0 );

    menu_bullet_style = new QComboBox( FALSE, GroupBox210, "menu_bullet_style" );
    menu_bullet_style->insertItem( trUtf8( "Empty" ) );
    menu_bullet_style->insertItem( trUtf8( "Square" ) );
    menu_bullet_style->insertItem( trUtf8( "Triangle" ) );
    menu_bullet_style->insertItem( trUtf8( "Diamond" ) );

    GroupBox210Layout->addWidget( menu_bullet_style, 0, 1 );

    t3 = new QLabel( GroupBox210, "t3" );
    t3->setText( trUtf8( "Menu Frame DisableColor" ) );

    GroupBox210Layout->addWidget( t3, 2, 0 );

    menu_bullet_position = new QComboBox( FALSE, GroupBox210, "menu_bullet_position" );
    menu_bullet_position->insertItem( trUtf8( "Left" ) );
    menu_bullet_position->insertItem( trUtf8( "Right" ) );

    GroupBox210Layout->addWidget( menu_bullet_position, 1, 1 );

    menu_frame_disablecolor = new ColorButton( GroupBox210, "menu_frame_disablecolor" );
    menu_frame_disablecolor->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, menu_frame_disablecolor->sizePolicy().hasHeightForWidth() ) );

    GroupBox210Layout->addWidget( menu_frame_disablecolor, 2, 1 );
    tabLayout_2->addWidget( GroupBox210 );
    tab_top->insertTab( tab_2, trUtf8( "Menu Hilighted Selection / Misc." ) );
    ToolboxMenuBaseLayout->addWidget( tab_top );

    // signals and slots connections
    connect( menu_frame, SIGNAL( changed() ), this, SLOT( modified() ) );
    connect( menu_title, SIGNAL( changed() ), this, SLOT( modified() ) );
    connect( menu_hilite, SIGNAL( changed() ), this, SLOT( modified() ) );
    connect( menu_bullet_style, SIGNAL( activated(int) ), this, SLOT( modified() ) );
    connect( menu_bullet_position, SIGNAL( activated(int) ), this, SLOT( modified() ) );
    connect( menu_frame_disablecolor, SIGNAL( changed() ), this, SLOT( modified() ) );

    // tab order
    setTabOrder( tab_top, menu_frame );
    setTabOrder( menu_frame, menu_title );
    setTabOrder( menu_title, menu_hilite );
    setTabOrder( menu_hilite, menu_bullet_style );
    setTabOrder( menu_bullet_style, menu_bullet_position );
    setTabOrder( menu_bullet_position, menu_frame_disablecolor );
}

/*  
 *  Destroys the object and frees any allocated resources
 */
ToolboxMenuBase::~ToolboxMenuBase()
{
    // no need to delete child widgets, Qt does it all for us
}

void ToolboxMenuBase::modified()
{
    qWarning( "ToolboxMenuBase::modified(): Not implemented yet!" );
}


Generated by  Doxygen 1.6.0   Back to index