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

tbwidg_piccolor_base.cc

/****************************************************************************
** Form implementation generated from reading ui file 'ui/tbwidg_piccolor_base.ui'
**
** Created: Mon May 27 13:23:04 2002
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "tbwidg_piccolor_base.h"

#include <qvariant.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

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


/* 
 *  Constructs a TWPicColorBase which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 */
TWPicColorBase::TWPicColorBase( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    QPixmap image0( ( const char** ) image0_data );
    if ( !name )
      setName( "TWPicColorBase" );
    resize( 375, 96 ); 
    setCaption( trUtf8( "Form2" ) );
    TWPicColorBaseLayout = new QGridLayout( this, 1, 1, 2, 2, "TWPicColorBaseLayout"); 

    t2 = new QLabel( this, "t2" );
    t2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, t2->sizePolicy().hasHeightForWidth() ) );
    t2->setText( trUtf8( "Color:" ) );

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

    t6 = new QLabel( this, "t6" );
    t6->setText( trUtf8( "Gradient:" ) );

    TWPicColorBaseLayout->addWidget( t6, 2, 2 );

    interlaced = new QCheckBox( this, "interlaced" );
    interlaced->setText( trUtf8( "Interlaced" ) );

    TWPicColorBaseLayout->addWidget( interlaced, 1, 3 );

    color_to = new ColorButton( this, "color_to" );

    TWPicColorBaseLayout->addWidget( color_to, 2, 1 );

    piccolor = new ColorButton( this, "piccolor" );

    TWPicColorBaseLayout->addWidget( piccolor, 3, 1 );

    t4 = new QLabel( this, "t4" );
    t4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, t4->sizePolicy().hasHeightForWidth() ) );
    t4->setText( trUtf8( "Pic Color:" ) );

    TWPicColorBaseLayout->addWidget( t4, 3, 0 );

    gradient = new QComboBox( FALSE, this, "gradient" );
    gradient->insertItem( trUtf8( "Horizontal" ) );
    gradient->insertItem( trUtf8( "Vertical" ) );
    gradient->insertItem( trUtf8( "Diagonal" ) );
    gradient->insertItem( trUtf8( "CrossDiagonal" ) );
    gradient->insertItem( trUtf8( "Rectangle" ) );
    gradient->insertItem( trUtf8( "Pyramid" ) );
    gradient->insertItem( trUtf8( "PipeCross" ) );
    gradient->insertItem( trUtf8( "Elliptic" ) );

    TWPicColorBaseLayout->addWidget( gradient, 2, 3 );

    bevel = new QComboBox( FALSE, this, "bevel" );
    bevel->insertItem( trUtf8( "Bevel1" ) );
    bevel->insertItem( trUtf8( "Bevel2" ) );

    TWPicColorBaseLayout->addWidget( bevel, 3, 3 );

    t7 = new QLabel( this, "t7" );
    t7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, t7->sizePolicy().hasHeightForWidth() ) );
    t7->setText( trUtf8( "Bevel:" ) );

    TWPicColorBaseLayout->addWidget( t7, 3, 2 );

    t1 = new QLabel( this, "t1" );
    t1->setText( trUtf8( "Texture Height:" ) );

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

    texture_type = new QComboBox( FALSE, this, "texture_type" );
    texture_type->insertItem( trUtf8( "Gradient" ) );
    texture_type->insertItem( trUtf8( "Solid" ) );
    texture_type->insertItem( trUtf8( "ParentRelative" ) );

    TWPicColorBaseLayout->addWidget( texture_type, 0, 3 );

    texture_height = new QComboBox( FALSE, this, "texture_height" );
    texture_height->insertItem( trUtf8( "Sunken" ) );
    texture_height->insertItem( trUtf8( "Raised" ) );
    texture_height->insertItem( trUtf8( "Flat" ) );

    TWPicColorBaseLayout->addWidget( texture_height, 0, 1 );

    color = new ColorButton( this, "color" );

    TWPicColorBaseLayout->addWidget( color, 1, 1 );

    t5 = new QLabel( this, "t5" );
    t5->setText( trUtf8( "Texture Type:" ) );

    TWPicColorBaseLayout->addWidget( t5, 0, 2 );

    t3 = new QLabel( this, "t3" );
    t3->setText( trUtf8( "Color To:" ) );

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

    // signals and slots connections
    connect( texture_height, SIGNAL( activated(int) ), this, SLOT( modified() ) );
    connect( color, SIGNAL( changed() ), this, SLOT( modified() ) );
    connect( interlaced, SIGNAL( clicked() ), this, SLOT( modified() ) );
    connect( color_to, SIGNAL( changed() ), this, SLOT( modified() ) );
    connect( gradient, SIGNAL( activated(int) ), this, SLOT( modified() ) );
    connect( piccolor, SIGNAL( changed() ), this, SLOT( modified() ) );
    connect( bevel, SIGNAL( activated(int) ), this, SLOT( modified() ) );
    connect( texture_type, SIGNAL( activated(const QString&) ), this, SLOT( texture_changed(const QString&) ) );
    connect( texture_type, SIGNAL( activated(int) ), this, SLOT( modified() ) );

    // tab order
    setTabOrder( texture_height, color );
    setTabOrder( color, color_to );
    setTabOrder( color_to, piccolor );
    setTabOrder( piccolor, texture_type );
    setTabOrder( texture_type, interlaced );
    setTabOrder( interlaced, gradient );
    setTabOrder( gradient, bevel );
}

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

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

void TWPicColorBase::texture_changed(const QString&)
{
    qWarning( "TWPicColorBase::texture_changed(const QString&): Not implemented yet!" );
}


Generated by  Doxygen 1.6.0   Back to index