settingsform.ui.h

来自「在qt环境下开发的PPP拨号程序,具有良好的操作界面,方便开发通信程序」· C头文件 代码 · 共 57 行

H
57
字号
/****************************************************************************** ui.h extension file, included from the uic-generated form implementation.**** If you wish to add, delete or rename slots use Qt Designer which willdownloadCheckBox_toggled(bool)** update this file, preserving your code. Create an init() slot in place of** a constructor, and a destroy() slot in place of a destructor.*****************************************************************************/void settingsForm::init(){    QSettings settings;    mailCheckBox->setChecked(settings.readBoolEntry			     ("/myppp/checkmail", TRUE));    minuteSpinBox->setValue(settings.readNumEntry			     ("/myppp/checkmail_interval", 5));    downloadCheckBox->setChecked(settings.readBoolEntry				 ("/myppp/checkmail_download", TRUE));    readerle->setText(settings.readEntry		      ("/myppp/mailreader_command",		       "evolution evolution:/local/Inbox"));    okButton->setDefault(TRUE);    opt_checkmail();}void settingsForm::cancelButton_clicked() { this->close(); }void settingsForm::okButton_clicked(){    QSettings settings;    settings.writeEntry("/myppp/checkmail",			mailCheckBox->isChecked());    settings.writeEntry("/myppp/checkmail_interval",			minuteSpinBox->value());    settings.writeEntry("/myppp/checkmail_download",			downloadCheckBox->isChecked());    settings.writeEntry("/myppp/mailreader_command",			readerle->text());    this->close();}void settingsForm::opt_checkmail(){    if(mailCheckBox->isChecked())    {	minuteSpinBox->setEnabled(TRUE);	downloadCheckBox->setEnabled(TRUE);    }    else    {	minuteSpinBox->setEnabled(FALSE);	downloadCheckBox->setEnabled(FALSE);    }}void settingsForm::mailCheckBox_toggled( bool ) { opt_checkmail(); }

⌨️ 快捷键说明

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