QVBoxLayout * globalLayout = new QVBoxLayout;
QHBoxLayout * filenameLayout = new QHBoxLayout;
QHBoxLayout * nameLayout = new QHBoxLayout;
filenameLabel = new QLabel(tr("Filename"));
QFont * myFont = new QFont;
myFont->setBold(true);
myFont->setPointSize(24);
filenameLabel->setFont(*myFont);
filenameLabel->setStyleSheet("color:red");
filenameEdit = new QLineEdit;
openFileBtn = new QPushButton("open");
connect(openFileBtn, SIGNAL(clicked()),this, SLOT(on_openFile()));
nameLabel = new QLabel(tr("name"));
nameLabel->setFont(*myFont);
nameLabel->setStyleSheet("color:red");
nameEdit = new QLineEdit;
nameComBox = new QComboBox;
nameComBox->setEditable(true);
nameComBox->addItem("Cytophaga hutchinsonii");
nameComBox->addItem("Dyadobacter fermentans");
nameComBox->addItem("Dyadobactor tibetensis");
nameComBox->addItem("Fibrella aestuarina");
nameComBox->addItem("Fibrisome limi");
nameComBox->addItem("Fibrobacter succinogenes");
nameComBox->addItem("Runella slithyformis");
nameComBox->addItem("Leadbetterella byssophilla");
nameComBox->addItem("Sporocytophaga myxococcoides");
nameComBox->addItem("Spirosoma linguale");
exeBtn = new QPushButton("execute");
connect(exeBtn, SIGNAL(clicked()), this, SLOT(on_exe()));
filenameLayout->addWidget(filenameLabel);
filenameLayout->addWidget(filenameEdit);
filenameLayout->addWidget(openFileBtn);
nameLayout->addWidget(nameLabel);
nameLayout->addWidget(nameComBox);
globalLayout->addLayout(filenameLayout);
globalLayout->addLayout(nameLayout);
globalLayout->addWidget(exeBtn);
this->setLayout(globalLayout);
}
void PfamToMyDBDlg::on_exe()
{
filename = filenameEdit->text().trimmed();
name = nameComBox->currentText().trimmed();
// qDebug() << name;
this->close();
}
void PfamToMyDBDlg::on_openFile()
{
QString temp = QFileDialog::getOpenFileName(this, "open", "c:/desktop/", "files(*.*)");
filenameEdit->setText(temp);
}
要提取的部分不包括后面的序列。中间部分的特点是以换行符区分不同字段,所以如果不做复杂分析的话,可以将这部分结果直接拷贝到excel进行分析。
|