示例#1
0
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();
}
示例#2
0
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();
}