Logo Search packages:      
Sourcecode: qbrew version File versions

recipedialogpage.cpp

/****************************************************************************
** Form implementation generated from reading ui file './recipedialogpage.ui'
**
** Created: Sun Oct 3 21:45:02 2004
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.3   edited Nov 24 2003 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "recipedialogpage.h"

#include <qvariant.h>
#include <qgroupbox.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "fixedspinbox.h"

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

    recipebox = new QGroupBox( this, "recipebox" );
    recipebox->setFrameShape( QGroupBox::GroupBoxPanel );
    recipebox->setFrameShadow( QGroupBox::Sunken );
    recipebox->setColumnLayout(0, Qt::Vertical );
    recipebox->layout()->setSpacing( 6 );
    recipebox->layout()->setMargin( 11 );
    recipeboxLayout = new QGridLayout( recipebox->layout() );
    recipeboxLayout->setAlignment( Qt::AlignTop );

    batch = new FixedSpinBox( recipebox, "batch" );

    recipeboxLayout->addWidget( batch, 0, 1 );

    style = new QComboBox( FALSE, recipebox, "style" );
    style->setDuplicatesEnabled( FALSE );

    recipeboxLayout->addWidget( style, 1, 1 );

    hopform = new QComboBox( FALSE, recipebox, "hopform" );
    hopform->setDuplicatesEnabled( FALSE );

    recipeboxLayout->addWidget( hopform, 2, 1 );

    batchlabel = new QLabel( recipebox, "batchlabel" );

    recipeboxLayout->addWidget( batchlabel, 0, 0 );

    stylelabel = new QLabel( recipebox, "stylelabel" );

    recipeboxLayout->addWidget( stylelabel, 1, 0 );

    hopformlabel = new QLabel( recipebox, "hopformlabel" );

    recipeboxLayout->addWidget( hopformlabel, 2, 0 );

    mash = new QCheckBox( recipebox, "mash" );

    recipeboxLayout->addWidget( mash, 3, 0 );
    recipedialogpageLayout->addWidget( recipebox );
    spacer = new QSpacerItem( 20, 50, QSizePolicy::Minimum, QSizePolicy::Expanding );
    recipedialogpageLayout->addItem( spacer );
    languageChange();

    // buddies
    stylelabel->setBuddy( style );
    hopformlabel->setBuddy( hopform );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void RecipeDialogPage::languageChange()
{
    setCaption( tr( "recipedialogpage" ) );
    recipebox->setTitle( tr( "Recipe Defaults" ) );
    QWhatsThis::add( batch, tr( "Select the default batch size you wish to use. You may always change an individual recipe's size, but this determines the default size for new recipes." ) );
    QWhatsThis::add( style, tr( "Select the default recipe style you wish to use. You may always change an individual recipe's style, but this determines the default style for new recipes." ) );
    QWhatsThis::add( hopform, tr( "Select the default hops form you wish to use. You may always change an individual hop's form, but this determines the default form when adding new hops to a recipe." ) );
    batchlabel->setText( tr( "&Batch size" ) );
    stylelabel->setText( tr( "&Recipe style" ) );
    hopformlabel->setText( tr( "&Hop form" ) );
    mash->setText( tr( "&Mash" ) );
    mash->setAccel( QKeySequence( tr( "Alt+M" ) ) );
    QWhatsThis::add( mash, tr( "Select whether your recipes are normally mashed.  You may always change this for an individual recipe, but this determines the default for new recipes." ) );
}

#include "recipedialogpage.moc"

Generated by  Doxygen 1.6.0   Back to index