Пример #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();
}