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

📄 addmaterialform.ui.h

📁 The purpose of this program is to enable building a config file to the radarFDTD package using a mo
💻 H
字号:
/****************************************************************************** ui.h extension file, included from the uic-generated form implementation.**** If you wish to add, delete or rename functions or slots use** Qt Designer which will update this file, preserving your code. Create an** init() function in place of a constructor, and a destroy() function in** place of a destructor.*****************************************************************************/void AddMaterialForm::OKSlot(){  QString name = materialNameLineEdit->text();  float eps = epsilonLineEdit->text().toFloat();  float sigma = sigmaLineEdit->text().toFloat();  QColor color(RlineEdit->text().toInt(),               GlineEdit->text().toInt(),               BlineEdit->text().toInt());  emit NewMaterial(name,eps,sigma,color);}void AddMaterialForm::CancelSlot(){  emit Cancel();}void AddMaterialForm::init(){  int R = rand()%156 + 100;  int G = rand()%156 + 100;  int B = rand()%156 + 100;  RlineEdit->setText(QString::number(R));  GlineEdit->setText(QString::number(G));  BlineEdit->setText(QString::number(B));  QColor col(R,G,B);  QPixmap pix(pixmapLabel->width(),pixmapLabel->height());  pix.fill(col);  pixmapLabel->setPixmap(pix);}void AddMaterialForm::colorSelectSlot(){  QColor color = QColorDialog::getColor();  if ((color.red() == 0)&&(color.green() == 0)&&(color.blue() == 0))    return;  RlineEdit->setText(QString::number(color.red()));  GlineEdit->setText(QString::number(color.green()));  BlineEdit->setText(QString::number(color.blue()));  QColor col(color.red(),color.green(),color.blue());  QPixmap pix(pixmapLabel->width(),pixmapLabel->height());  pix.fill(col);  pixmapLabel->setPixmap(pix);  }

⌨️ 快捷键说明

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