Logo Search packages:      
Sourcecode: qbrew version File versions

generaldialogpage.cpp

/****************************************************************************
** Form implementation generated from reading ui file './generaldialogpage.ui'
**
** Created: Sun Oct 3 21:44:54 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 "generaldialogpage.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qgroupbox.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qtoolbutton.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qspinbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

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

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

    lookfeel = new QComboBox( FALSE, appbox, "lookfeel" );
    lookfeel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 10, 0, lookfeel->sizePolicy().hasHeightForWidth() ) );
    lookfeel->setDuplicatesEnabled( FALSE );

    appboxLayout->addWidget( lookfeel, 1, 1 );

    appdirlabel = new QLabel( appbox, "appdirlabel" );
    appdirlabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 10, 0, appdirlabel->sizePolicy().hasHeightForWidth() ) );

    appboxLayout->addWidget( appdirlabel, 0, 0 );

    apptool = new QToolButton( appbox, "apptool" );

    appboxLayout->addWidget( apptool, 0, 2 );

    appdir = new QLineEdit( appbox, "appdir" );
    appdir->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 10, 0, appdir->sizePolicy().hasHeightForWidth() ) );

    appboxLayout->addWidget( appdir, 0, 1 );

    largeicons = new QCheckBox( appbox, "largeicons" );
    largeicons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 1, 0, largeicons->sizePolicy().hasHeightForWidth() ) );

    appboxLayout->addWidget( largeicons, 2, 0 );

    lookfeellabel = new QLabel( appbox, "lookfeellabel" );
    lookfeellabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 10, 0, lookfeellabel->sizePolicy().hasHeightForWidth() ) );

    appboxLayout->addWidget( lookfeellabel, 1, 0 );
    generaldialogpageLayout->addWidget( appbox );

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

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

    autosave = new QCheckBox( filebox, "autosave" );
    autosave->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, autosave->sizePolicy().hasHeightForWidth() ) );

    filelayout->addWidget( autosave, 1, 0 );

    recentlabel = new QLabel( filebox, "recentlabel" );

    filelayout->addWidget( recentlabel, 0, 0 );

    saveinterval = new QSpinBox( filebox, "saveinterval" );
    saveinterval->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, saveinterval->sizePolicy().hasHeightForWidth() ) );
    saveinterval->setMaxValue( 30 );
    saveinterval->setLineStep( 5 );
    saveinterval->setValue( 5 );

    filelayout->addWidget( saveinterval, 1, 1 );

    recentnum = new QSpinBox( filebox, "recentnum" );
    recentnum->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, recentnum->sizePolicy().hasHeightForWidth() ) );
    recentnum->setMaxValue( 50 );
    recentnum->setValue( 5 );

    filelayout->addWidget( recentnum, 0, 1 );

    autobackup = new QCheckBox( filebox, "autobackup" );

    filelayout->addWidget( autobackup, 2, 0 );

    loadlast = new QCheckBox( filebox, "loadlast" );

    filelayout->addMultiCellWidget( loadlast, 3, 3, 0, 1 );
    fileboxLayout->addLayout( filelayout );
    generaldialogpageLayout->addWidget( filebox );
    spacer = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
    generaldialogpageLayout->addItem( spacer );
    languageChange();

    // buddies
    appdirlabel->setBuddy( appdir );
    lookfeellabel->setBuddy( lookfeel );
    recentlabel->setBuddy( recentnum );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GeneralDialogPage::languageChange()
{
    setCaption( tr( "generaldialogpage" ) );
    appbox->setTitle( tr( "Application Options" ) );
    QWhatsThis::add( lookfeel, tr( "You may select a different look and feel for the application. This will affect the appearance of the application's controls and widgets." ) );
    appdirlabel->setText( tr( "Application &directory" ) );
    apptool->setText( QString::null );
    QToolTip::add( apptool, tr( "Select a directory" ) );
    QWhatsThis::add( apptool, tr( "This button will present a dialog that you can use to browse for the application directory." ) );
    QWhatsThis::add( appdir, tr( "Enter the root directory where the application is installed. This is either a specific application directory or an installation \"prefix\"." ) );
    largeicons->setText( tr( "Use large &icons" ) );
    largeicons->setAccel( QKeySequence( tr( "Alt+I" ) ) );
    QWhatsThis::add( largeicons, tr( "You may choose to use larger icons on the toolbars, or not." ) );
    lookfeellabel->setText( tr( "&Look and feel" ) );
    filebox->setTitle( tr( "File Options" ) );
    autosave->setText( tr( "Enable &autosave" ) );
    autosave->setAccel( QKeySequence( tr( "Alt+A" ) ) );
    QWhatsThis::add( autosave, tr( "Enables autosaving of files. If this is checked, files will be automatically saved at the selected interval." ) );
    recentlabel->setText( tr( "Number of &recent files" ) );
    saveinterval->setSuffix( tr( " Minutes" ) );
    QWhatsThis::add( saveinterval, tr( "This field will allow you to select the Autosave interval." ) );
    QWhatsThis::add( recentnum, tr( "Use this to set the number of files displayed in the <b>Open Recent...</b> menu" ) );
    autobackup->setText( tr( "Enable auto&backup" ) );
    autobackup->setAccel( QKeySequence( tr( "Alt+B" ) ) );
    QWhatsThis::add( autobackup, tr( "Selecting this will cause the program to automatically backup every file that you open and modify." ) );
    loadlast->setText( tr( "Load last &file" ) );
    loadlast->setAccel( QKeySequence( tr( "Alt+F" ) ) );
    QWhatsThis::add( loadlast, tr( "Select this option to automatically load the last file used in this program." ) );
}

#include "generaldialogpage.moc"

Generated by  Doxygen 1.6.0   Back to index