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

appearance.cpp

#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './appearance.ui'
**
** Created: Thu Dec 13 17:30:56 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "appearance.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qlineedit.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <kicondialog.h>
#include <qspinbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kicondialog.h"
#include "./appearance.ui.h"

/*
 *  Constructs a Appearance as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
Appearance::Appearance( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
      setName( "Appearance" );
    AppearanceLayout = new QGridLayout( this, 1, 1, 11, 6, "AppearanceLayout"); 

    Icons = new QLabel( this, "Icons" );
    QFont Icons_font(  Icons->font() );
    Icons_font.setBold( TRUE );
    Icons->setFont( Icons_font ); 
    Icons->setAlignment( int( QLabel::AlignBottom ) );

    AppearanceLayout->addMultiCellWidget( Icons, 0, 0, 0, 2 );

    kcfg_ShowExpander = new QCheckBox( this, "kcfg_ShowExpander" );

    AppearanceLayout->addMultiCellWidget( kcfg_ShowExpander, 12, 12, 2, 3 );

    kcfg_AlwaysCollapsed = new QCheckBox( this, "kcfg_AlwaysCollapsed" );
    kcfg_AlwaysCollapsed->setEnabled( TRUE );

    AppearanceLayout->addMultiCellWidget( kcfg_AlwaysCollapsed, 13, 13, 2, 3 );

    textLabel2 = new QLabel( this, "textLabel2" );
    textLabel2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    AppearanceLayout->addWidget( textLabel2, 10, 1 );

    textLabel1_4 = new QLabel( this, "textLabel1_4" );
    textLabel1_4->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    AppearanceLayout->addWidget( textLabel1_4, 5, 1 );
    spacer6 = new QSpacerItem( 79, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    AppearanceLayout->addItem( spacer6, 1, 0 );

    kcfg_ToolTipTitle = new QLineEdit( this, "kcfg_ToolTipTitle" );

    AppearanceLayout->addWidget( kcfg_ToolTipTitle, 7, 2 );

    textLabel1_2 = new QLabel( this, "textLabel1_2" );
    textLabel1_2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    AppearanceLayout->addWidget( textLabel1_2, 9, 1 );

    textLabel5 = new QLabel( this, "textLabel5" );
    textLabel5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    AppearanceLayout->addWidget( textLabel5, 7, 1 );

    ApplicationsList = new QLabel( this, "ApplicationsList" );
    QFont ApplicationsList_font(  ApplicationsList->font() );
    ApplicationsList_font.setBold( TRUE );
    ApplicationsList->setFont( ApplicationsList_font ); 
    ApplicationsList->setAlignment( int( QLabel::AlignBottom ) );

    AppearanceLayout->addMultiCellWidget( ApplicationsList, 11, 11, 0, 2 );

    textLabel3 = new QLabel( this, "textLabel3" );

    AppearanceLayout->addWidget( textLabel3, 9, 3 );

    MenuButton = new QLabel( this, "MenuButton" );
    QFont MenuButton_font(  MenuButton->font() );
    MenuButton_font.setBold( TRUE );
    MenuButton->setFont( MenuButton_font ); 
    MenuButton->setAlignment( int( QLabel::AlignBottom ) );

    AppearanceLayout->addMultiCellWidget( MenuButton, 4, 4, 0, 2 );

    textLabel4 = new QLabel( this, "textLabel4" );

    AppearanceLayout->addWidget( textLabel4, 10, 3 );

    kcfg_MenuButtonIconType = new QButtonGroup( this, "kcfg_MenuButtonIconType" );
    kcfg_MenuButtonIconType->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, kcfg_MenuButtonIconType->sizePolicy().hasHeightForWidth() ) );
    kcfg_MenuButtonIconType->setFrameShape( QButtonGroup::NoFrame );
    kcfg_MenuButtonIconType->setFrameShadow( QButtonGroup::Plain );
    kcfg_MenuButtonIconType->setColumnLayout(0, Qt::Vertical );
    kcfg_MenuButtonIconType->layout()->setSpacing( 6 );
    kcfg_MenuButtonIconType->layout()->setMargin( 0 );
    kcfg_MenuButtonIconTypeLayout = new QHBoxLayout( kcfg_MenuButtonIconType->layout() );
    kcfg_MenuButtonIconTypeLayout->setAlignment( Qt::AlignTop );

    kcfg_Icon = new QRadioButton( kcfg_MenuButtonIconType, "kcfg_Icon" );
    kcfg_Icon->setChecked( TRUE );
    kcfg_MenuButtonIconTypeLayout->addWidget( kcfg_Icon );

    MenuButtonIcon = new KIconButton( kcfg_MenuButtonIconType, "MenuButtonIcon" );
    MenuButtonIcon->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, MenuButtonIcon->sizePolicy().hasHeightForWidth() ) );
    kcfg_MenuButtonIconTypeLayout->addWidget( MenuButtonIcon );

    kcfg_MenuButtonIcon = new QLineEdit( kcfg_MenuButtonIconType, "kcfg_MenuButtonIcon" );
    kcfg_MenuButtonIcon->setEnabled( FALSE );
    kcfg_MenuButtonIconTypeLayout->addWidget( kcfg_MenuButtonIcon );

    kcfg_IconNone = new QRadioButton( kcfg_MenuButtonIconType, "kcfg_IconNone" );
    kcfg_MenuButtonIconTypeLayout->addWidget( kcfg_IconNone );

    AppearanceLayout->addMultiCellWidget( kcfg_MenuButtonIconType, 6, 6, 2, 3 );

    menuSize = new QLabel( this, "menuSize" );
    QFont menuSize_font(  menuSize->font() );
    menuSize_font.setBold( TRUE );
    menuSize->setFont( menuSize_font ); 
    menuSize->setAlignment( int( QLabel::AlignBottom ) );

    AppearanceLayout->addMultiCellWidget( menuSize, 8, 8, 0, 3 );

    textLabel1_3 = new QLabel( this, "textLabel1_3" );
    textLabel1_3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    AppearanceLayout->addWidget( textLabel1_3, 2, 1 );

    kcfg_DisplaySubText = new QCheckBox( this, "kcfg_DisplaySubText" );

    AppearanceLayout->addMultiCellWidget( kcfg_DisplaySubText, 3, 3, 2, 3 );

    kcfg_MenuButtonLabelType = new QButtonGroup( this, "kcfg_MenuButtonLabelType" );
    kcfg_MenuButtonLabelType->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, kcfg_MenuButtonLabelType->sizePolicy().hasHeightForWidth() ) );
    kcfg_MenuButtonLabelType->setFrameShape( QButtonGroup::NoFrame );
    kcfg_MenuButtonLabelType->setFrameShadow( QButtonGroup::Plain );
    kcfg_MenuButtonLabelType->setColumnLayout(0, Qt::Vertical );
    kcfg_MenuButtonLabelType->layout()->setSpacing( 6 );
    kcfg_MenuButtonLabelType->layout()->setMargin( 0 );
    kcfg_MenuButtonLabelTypeLayout = new QHBoxLayout( kcfg_MenuButtonLabelType->layout() );
    kcfg_MenuButtonLabelTypeLayout->setAlignment( Qt::AlignTop );

    kcfg_MenuButtonText = new QRadioButton( kcfg_MenuButtonLabelType, "kcfg_MenuButtonText" );
    kcfg_MenuButtonText->setChecked( TRUE );
    kcfg_MenuButtonLabelTypeLayout->addWidget( kcfg_MenuButtonText );

    kcfg_MenuButtonLabel = new QLineEdit( kcfg_MenuButtonLabelType, "kcfg_MenuButtonLabel" );
    kcfg_MenuButtonLabelTypeLayout->addWidget( kcfg_MenuButtonLabel );

    kcfg_MenuButtonNone = new QRadioButton( kcfg_MenuButtonLabelType, "kcfg_MenuButtonNone" );
    kcfg_MenuButtonLabelTypeLayout->addWidget( kcfg_MenuButtonNone );

    AppearanceLayout->addMultiCellWidget( kcfg_MenuButtonLabelType, 5, 5, 2, 3 );

    kcfg_MenuWidth = new QSpinBox( this, "kcfg_MenuWidth" );
    kcfg_MenuWidth->setMaxValue( 90 );
    kcfg_MenuWidth->setMinValue( 10 );
    kcfg_MenuWidth->setValue( 70 );

    AppearanceLayout->addWidget( kcfg_MenuWidth, 9, 2 );

    kcfg_MenuHeight = new QSpinBox( this, "kcfg_MenuHeight" );
    kcfg_MenuHeight->setMaxValue( 90 );
    kcfg_MenuHeight->setMinValue( 10 );
    kcfg_MenuHeight->setValue( 70 );

    AppearanceLayout->addWidget( kcfg_MenuHeight, 10, 2 );

    textLabel2_2 = new QLabel( this, "textLabel2_2" );
    textLabel2_2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    AppearanceLayout->addWidget( textLabel2_2, 6, 1 );
    spacer4 = new QSpacerItem( 78, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
    AppearanceLayout->addMultiCell( spacer4, 9, 10, 4, 4 );

    layout1 = new QGridLayout( 0, 1, 1, 0, 6, "layout1"); 

    textLabel1_5_3 = new QLabel( this, "textLabel1_5_3" );

    layout1->addWidget( textLabel1_5_3, 0, 2 );

    textLabel1_5_2 = new QLabel( this, "textLabel1_5_2" );

    layout1->addWidget( textLabel1_5_2, 0, 1 );

    kcfg_IconSize1 = new QSpinBox( this, "kcfg_IconSize1" );
    kcfg_IconSize1->setMaxValue( 48 );
    kcfg_IconSize1->setMinValue( 16 );
    kcfg_IconSize1->setValue( 22 );

    layout1->addWidget( kcfg_IconSize1, 1, 0 );

    kcfg_IconSize3 = new QSpinBox( this, "kcfg_IconSize3" );
    kcfg_IconSize3->setMaxValue( 48 );
    kcfg_IconSize3->setMinValue( 16 );
    kcfg_IconSize3->setValue( 22 );

    layout1->addWidget( kcfg_IconSize3, 1, 2 );

    kcfg_IconSize2 = new QSpinBox( this, "kcfg_IconSize2" );
    kcfg_IconSize2->setMaxValue( 48 );
    kcfg_IconSize2->setMinValue( 16 );
    kcfg_IconSize2->setValue( 22 );

    layout1->addWidget( kcfg_IconSize2, 1, 1 );

    textLabel1_5 = new QLabel( this, "textLabel1_5" );

    layout1->addWidget( textLabel1_5, 0, 0 );

    AppearanceLayout->addMultiCellLayout( layout1, 1, 1, 2, 3 );

    textLabel1 = new QLabel( this, "textLabel1" );
    textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
    textLabel1->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    AppearanceLayout->addWidget( textLabel1, 1, 1 );

    kcfg_ActionIconSize = new QSpinBox( this, "kcfg_ActionIconSize" );
    kcfg_ActionIconSize->setMaxValue( 48 );
    kcfg_ActionIconSize->setMinValue( 16 );

    AppearanceLayout->addWidget( kcfg_ActionIconSize, 2, 2 );
    languageChange();
    resize( QSize(520, 465).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_MenuButtonText, SIGNAL( toggled(bool) ), kcfg_IconNone, SLOT( setEnabled(bool) ) );
    connect( kcfg_Icon, SIGNAL( toggled(bool) ), kcfg_MenuButtonNone, SLOT( setEnabled(bool) ) );
    connect( kcfg_MenuButtonText, SIGNAL( toggled(bool) ), kcfg_MenuButtonLabel, SLOT( setEnabled(bool) ) );
    connect( kcfg_Icon, SIGNAL( toggled(bool) ), MenuButtonIcon, SLOT( setEnabled(bool) ) );
    connect( MenuButtonIcon, SIGNAL( iconChanged(QString) ), this, SLOT( iconChanged(QString) ) );

    // buddies
    textLabel2->setBuddy( kcfg_MenuHeight );
    textLabel1_2->setBuddy( kcfg_MenuWidth );
    textLabel1_3->setBuddy( kcfg_ActionIconSize );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Appearance::languageChange()
{
    setCaption( tr2i18n( "Form1" ) );
    Icons->setText( tr2i18n( "Applications list" ) );
    kcfg_ShowExpander->setText( tr2i18n( "Show tree e&xpanders" ) );
    kcfg_ShowExpander->setAccel( QKeySequence( tr2i18n( "Alt+X" ) ) );
    kcfg_AlwaysCollapsed->setText( tr2i18n( "Alwa&ys collapsed categories" ) );
    kcfg_AlwaysCollapsed->setAccel( QKeySequence( tr2i18n( "Alt+Y" ) ) );
    textLabel2->setText( tr2i18n( "Hei&ght:" ) );
    textLabel1_4->setText( tr2i18n( "Button label:" ) );
    QWhatsThis::add( kcfg_ToolTipTitle, tr2i18n( "What text should be displayed in the Kicker button tooltip instead of \"Tasty Menu\".\n"
"Empty means default." ) );
    textLabel1_2->setText( tr2i18n( "Wi&dth:" ) );
    textLabel5->setText( tr2i18n( "Tootip title:" ) );
    ApplicationsList->setText( tr2i18n( "Applications list" ) );
    textLabel3->setText( tr2i18n( "of the screen width" ) );
    MenuButton->setText( tr2i18n( "Menu button" ) );
    textLabel4->setText( tr2i18n( "of the screen height" ) );
    kcfg_MenuButtonIconType->setTitle( QString::null );
    kcfg_Icon->setText( tr2i18n( "&Icon:" ) );
    kcfg_Icon->setAccel( QKeySequence( tr2i18n( "Alt+I" ) ) );
    MenuButtonIcon->setText( QString::null );
    QWhatsThis::add( MenuButtonIcon, tr2i18n( "What icon should be displayed in the kicker button instead of the KMenu one.\n"
"Empty means default." ) );
    kcfg_IconNone->setText( tr2i18n( "N&one" ) );
    kcfg_IconNone->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) );
    menuSize->setText( tr2i18n( "Menu size" ) );
    textLabel1_3->setText( tr2i18n( "&Action icons size:" ) );
    kcfg_DisplaySubText->setText( tr2i18n( "&Display applications descriptions" ) );
    kcfg_DisplaySubText->setAccel( QKeySequence( tr2i18n( "Alt+D" ) ) );
    kcfg_MenuButtonLabelType->setTitle( QString::null );
    kcfg_MenuButtonText->setText( tr2i18n( "&Text:" ) );
    kcfg_MenuButtonText->setAccel( QKeySequence( tr2i18n( "Alt+T" ) ) );
    kcfg_MenuButtonLabel->setText( QString::null );
    QWhatsThis::add( kcfg_MenuButtonLabel, tr2i18n( "What label instead of \"Menu\" should be shown for the Kicker button.\n"
"Empty means default." ) );
    kcfg_MenuButtonNone->setText( tr2i18n( "&None" ) );
    kcfg_MenuButtonNone->setAccel( QKeySequence( tr2i18n( "Alt+N" ) ) );
    kcfg_MenuWidth->setSuffix( tr2i18n( "%" ) );
    kcfg_MenuHeight->setSuffix( tr2i18n( "%" ) );
    textLabel2_2->setText( tr2i18n( "Button icon:" ) );
    textLabel1_5_3->setText( tr2i18n( "third column:" ) );
    textLabel1_5_2->setText( tr2i18n( "second column:" ) );
    kcfg_IconSize1->setSuffix( tr2i18n( " pixels" ) );
    kcfg_IconSize3->setSuffix( tr2i18n( " pixels" ) );
    kcfg_IconSize2->setSuffix( tr2i18n( " pixels" ) );
    textLabel1_5->setText( tr2i18n( "first column:" ) );
    textLabel1->setText( tr2i18n( "Icons si&zes:" ) );
    kcfg_ActionIconSize->setSuffix( tr2i18n( " pixels" ) );
}

#include "appearance.moc"

Generated by  Doxygen 1.6.0   Back to index