⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 settingsdlg.cpp

📁 KDE下的西门子手机管理程序
💻 CPP
字号:
#include <klocale.h>/****************************************************************************** Form implementation generated from reading ui file './settingsdlg.ui'**** Created: Tue Feb 20 15:19:38 2001**      by:  The User Interface Compiler (uic)**** WARNING! All changes made in this file will be lost!****************************************************************************/#include "settingsdlg.h"#include <qcombobox.h>#include <qlabel.h>#include <qlineedit.h>#include <qpushbutton.h>#include <qtabwidget.h>#include <qwidget.h>#include <qlayout.h>#include <qvariant.h>#include <qtooltip.h>#include <qwhatsthis.h>/*  *  Constructs a SettingsDlg which is a child of 'parent', with the  *  name 'name' and widget flags set to 'f'  * *  The dialog will by default be modeless, unless you set 'modal' to *  TRUE to construct a modal dialog. */SettingsDlg::SettingsDlg( QWidget* parent,  const char* name, bool modal, WFlags fl )    : QDialog( parent, name, modal, fl ){    if ( !name )	setName( "settingsdlg" );    resize( 369, 207 );     setCaption( i18n( "Settings" ) );    setSizeGripEnabled( TRUE );    settingsdlgLayout = new QVBoxLayout( this );     settingsdlgLayout->setSpacing( 6 );    settingsdlgLayout->setMargin( 11 );    tabWidget = new QTabWidget( this, "tabWidget" );    tabWidget->setTabPosition( QTabWidget::Top );    tabWidget->setMinimumSize( QSize( 300, 80 ) );    tabWidget->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, tabWidget->sizePolicy().hasHeightForWidth() ) );    communicationTab = new QWidget( tabWidget, "communicationTab" );    communicationTabLayout = new QVBoxLayout( communicationTab );     communicationTabLayout->setSpacing( 6 );    communicationTabLayout->setMargin( 11 );    Layout4 = new QGridLayout;     Layout4->setSpacing( 6 );    Layout4->setMargin( 0 );    deviceEdit = new QLineEdit( communicationTab, "deviceEdit" );    Layout4->addMultiCellWidget( deviceEdit, 0, 0, 1, 2 );    TextLabel1 = new QLabel( communicationTab, "TextLabel1" );    TextLabel1->setText( i18n( "Device:" ) );    TextLabel1->setFrameShape( QLabel::Box );    TextLabel1->setFrameShadow( QLabel::Sunken );    TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)1, TextLabel1->sizePolicy().hasHeightForWidth() ) );    TextLabel1->setMinimumSize( QSize( 80, 0 ) );    Layout4->addWidget( TextLabel1, 0, 0 );    TextLabel2 = new QLabel( communicationTab, "TextLabel2" );    TextLabel2->setText( i18n( "Data Rate:" ) );    TextLabel2->setFrameShadow( QLabel::Sunken );    TextLabel2->setFrameShape( QLabel::Box );    TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)1, TextLabel2->sizePolicy().hasHeightForWidth() ) );    TextLabel2->setMinimumSize( QSize( 80, 0 ) );    Layout4->addWidget( TextLabel2, 1, 0 );    TextLabel3 = new QLabel( communicationTab, "TextLabel3" );    TextLabel3->setText( i18n( "Bit/s" ) );    TextLabel3->setFrameShape( QLabel::Box );    TextLabel3->setFrameShadow( QLabel::Sunken );    Layout4->addWidget( TextLabel3, 1, 2 );    bitrateEdit = new QComboBox( FALSE, communicationTab, "bitrateEdit" );    bitrateEdit->insertItem( i18n( "9600" ) );    bitrateEdit->insertItem( i18n( "19200" ) );    bitrateEdit->insertItem( i18n( "38400" ) );    bitrateEdit->insertItem( i18n( "76800" ) );    bitrateEdit->insertItem( i18n( "115200" ) );    bitrateEdit->setInsertionPolicy( QComboBox::NoInsertion );    bitrateEdit->setCurrentItem( 4 );    Layout4->addWidget( bitrateEdit, 1, 1 );    communicationTabLayout->addLayout( Layout4 );    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );    communicationTabLayout->addItem( spacer );    tabWidget->insertTab( communicationTab, i18n( "Communication" ) );    settingsdlgLayout->addWidget( tabWidget );    Layout1 = new QHBoxLayout;     Layout1->setSpacing( 6 );    Layout1->setMargin( 0 );    buttonHelp = new QPushButton( this, "buttonHelp" );    buttonHelp->setText( i18n( "&Help" ) );    buttonHelp->setAutoDefault( TRUE );    Layout1->addWidget( buttonHelp );    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );    Layout1->addItem( spacer_2 );    buttonApply = new QPushButton( this, "buttonApply" );    buttonApply->setText( i18n( "&Apply" ) );    buttonApply->setAutoDefault( TRUE );    Layout1->addWidget( buttonApply );    buttonOk = new QPushButton( this, "buttonOk" );    buttonOk->setText( i18n( "&OK" ) );    buttonOk->setAutoDefault( TRUE );    buttonOk->setDefault( TRUE );    Layout1->addWidget( buttonOk );    buttonCancel = new QPushButton( this, "buttonCancel" );    buttonCancel->setText( i18n( "&Cancel" ) );    buttonCancel->setAutoDefault( TRUE );    Layout1->addWidget( buttonCancel );    settingsdlgLayout->addLayout( Layout1 );    // signals and slots connections    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );}/*   *  Destroys the object and frees any allocated resources */SettingsDlg::~SettingsDlg(){    // no need to delete child widgets, Qt does it all for us}#include "settingsdlg.moc"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -