akregator/src

settings_browser.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './settings_browser.ui'
00005 **
00006 ** Created: Thu Mar 29 06:02:51 2007
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "settings_browser.h"
00013 
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qbuttongroup.h>
00017 #include <qradiobutton.h>
00018 #include <qlineedit.h>
00019 #include <qcheckbox.h>
00020 #include <qcombobox.h>
00021 #include <qlabel.h>
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qwhatsthis.h>
00025 
00026 /*
00027  *  Constructs a Akregator::SettingsBrowser as a child of 'parent', with the
00028  *  name 'name' and widget flags set to 'f'.
00029  */
00030 Akregator::SettingsBrowser::SettingsBrowser( QWidget* parent, const char* name, WFlags fl )
00031     : QWidget( parent, name, fl )
00032 {
00033     if ( !name )
00034     setName( "SettingsBrowser" );
00035     SettingsBrowserLayout = new QGridLayout( this, 1, 1, 0, 6, "SettingsBrowserLayout"); 
00036 
00037     buttonGroup1 = new QButtonGroup( this, "buttonGroup1" );
00038     buttonGroup1->setExclusive( FALSE );
00039     buttonGroup1->setColumnLayout(0, Qt::Vertical );
00040     buttonGroup1->layout()->setSpacing( 6 );
00041     buttonGroup1->layout()->setMargin( 11 );
00042     buttonGroup1Layout = new QGridLayout( buttonGroup1->layout() );
00043     buttonGroup1Layout->setAlignment( Qt::AlignTop );
00044 
00045     kcfg_ExternalBrowserUseKdeDefault = new QRadioButton( buttonGroup1, "kcfg_ExternalBrowserUseKdeDefault" );
00046     kcfg_ExternalBrowserUseKdeDefault->setChecked( TRUE );
00047 
00048     buttonGroup1Layout->addMultiCellWidget( kcfg_ExternalBrowserUseKdeDefault, 0, 0, 0, 1 );
00049 
00050     kcfg_ExternalBrowserUseCustomCommand = new QRadioButton( buttonGroup1, "kcfg_ExternalBrowserUseCustomCommand" );
00051 
00052     buttonGroup1Layout->addWidget( kcfg_ExternalBrowserUseCustomCommand, 1, 0 );
00053 
00054     kcfg_ExternalBrowserCustomCommand = new QLineEdit( buttonGroup1, "kcfg_ExternalBrowserCustomCommand" );
00055     kcfg_ExternalBrowserCustomCommand->setEnabled( FALSE );
00056 
00057     buttonGroup1Layout->addWidget( kcfg_ExternalBrowserCustomCommand, 1, 1 );
00058 
00059     SettingsBrowserLayout->addWidget( buttonGroup1, 1, 0 );
00060 
00061     kcfg_CloseButtonOnTabs = new QCheckBox( this, "kcfg_CloseButtonOnTabs" );
00062 
00063     SettingsBrowserLayout->addWidget( kcfg_CloseButtonOnTabs, 2, 0 );
00064     spacer1 = new QSpacerItem( 31, 16, QSizePolicy::Minimum, QSizePolicy::Expanding );
00065     SettingsBrowserLayout->addItem( spacer1, 3, 0 );
00066 
00067     layout2 = new QGridLayout( 0, 1, 1, 0, 6, "layout2"); 
00068 
00069     kcfg_LMBBehaviour = new QComboBox( FALSE, this, "kcfg_LMBBehaviour" );
00070     kcfg_LMBBehaviour->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, kcfg_LMBBehaviour->sizePolicy().hasHeightForWidth() ) );
00071 
00072     layout2->addWidget( kcfg_LMBBehaviour, 0, 1 );
00073 
00074     textLabel1 = new QLabel( this, "textLabel1" );
00075     textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
00076 
00077     layout2->addWidget( textLabel1, 1, 0 );
00078 
00079     textLabel1_3 = new QLabel( this, "textLabel1_3" );
00080     textLabel1_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, textLabel1_3->sizePolicy().hasHeightForWidth() ) );
00081 
00082     layout2->addWidget( textLabel1_3, 0, 0 );
00083 
00084     kcfg_MMBBehaviour = new QComboBox( FALSE, this, "kcfg_MMBBehaviour" );
00085     kcfg_MMBBehaviour->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, kcfg_MMBBehaviour->sizePolicy().hasHeightForWidth() ) );
00086 
00087     layout2->addWidget( kcfg_MMBBehaviour, 1, 1 );
00088 
00089     SettingsBrowserLayout->addLayout( layout2, 0, 0 );
00090     languageChange();
00091     resize( QSize(340, 299).expandedTo(minimumSizeHint()) );
00092     clearWState( WState_Polished );
00093 
00094     // signals and slots connections
00095     connect( kcfg_ExternalBrowserUseCustomCommand, SIGNAL( toggled(bool) ), kcfg_ExternalBrowserCustomCommand, SLOT( setEnabled(bool) ) );
00096 }
00097 
00098 /*
00099  *  Destroys the object and frees any allocated resources
00100  */
00101 Akregator::SettingsBrowser::~SettingsBrowser()
00102 {
00103     // no need to delete child widgets, Qt does it all for us
00104 }
00105 
00106 /*
00107  *  Sets the strings of the subwidgets using the current
00108  *  language.
00109  */
00110 void Akregator::SettingsBrowser::languageChange()
00111 {
00112     setCaption( tr2i18n( "ExternalBrowser" ) );
00113     buttonGroup1->setTitle( tr2i18n( "For External Browsing" ) );
00114     kcfg_ExternalBrowserUseKdeDefault->setText( tr2i18n( "Use default KDE web browser" ) );
00115     kcfg_ExternalBrowserUseCustomCommand->setText( tr2i18n( "Use this command:" ) );
00116     kcfg_ExternalBrowserCustomCommand->setText( tr2i18n( "firefox %u" ) );
00117     kcfg_CloseButtonOnTabs->setText( tr2i18n( "Show tab close button on hover" ) );
00118     kcfg_LMBBehaviour->clear();
00119     kcfg_LMBBehaviour->insertItem( tr2i18n( "Open in Tab" ) );
00120     kcfg_LMBBehaviour->insertItem( tr2i18n( "Open in Background Tab" ) );
00121     kcfg_LMBBehaviour->insertItem( tr2i18n( "Open in External Browser" ) );
00122     textLabel1->setText( tr2i18n( "Middle mouse click:" ) );
00123     textLabel1_3->setText( tr2i18n( "Left mouse click:" ) );
00124     kcfg_MMBBehaviour->clear();
00125     kcfg_MMBBehaviour->insertItem( tr2i18n( "Open in Tab" ) );
00126     kcfg_MMBBehaviour->insertItem( tr2i18n( "Open in Background Tab" ) );
00127     kcfg_MMBBehaviour->insertItem( tr2i18n( "Open in External Browser" ) );
00128 }
00129 
00130 #include "settings_browser.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys