void SCgContentNumericDialog::contentInfo(SCgContent::ContInfo &info) { if (!mNumericLineEdit->text().isEmpty()) { info.data = QVariant(mNumericLineEdit->text().toDouble()); info.mimeType = "content/term"; info.fileName = ""; info.type = SCgContent::Real; } else info.setEmpty(); }
void SCgContentStringDialog::contentInfo(SCgContent::ContInfo &info) { if (!mTextEdit->toPlainText().isEmpty()) { info.data = QVariant(mTextEdit->toPlainText()); info.mimeType = QString("content/term"); info.fileName = QString(""); info.type = SCgContent::String; } else info.setEmpty(); }