~qqworini/aesydict/online-improve

« back to all changes in this revision

Viewing changes to src/dict.cpp

  • Committer: Joey Chan
  • Date: 2015-04-02 15:10:17 UTC
  • Revision ID: qqworini@gmail.com-20150402151017-50skhy76lhkj7xgx
c++ functions initially done

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
    emit searchFinished(dictinfo->bookname, wordList, status);
68
68
}
69
69
 
 
70
void Dict::getWordDetail(const QString &dictName, const QString &word, const qint32 &offset, const qint32 &size)
 
71
{
 
72
    if (dictName != dictinfo->bookname) {
 
73
        return ;
 
74
    }
 
75
    QString detail = dictdata->get_datablock(offset, size);
 
76
    QJsonObject jsonObj;
 
77
    jsonObj.insert("dict", dictName);
 
78
    jsonObj.insert("word", word);
 
79
    jsonObj.insert("detail", detail);
 
80
    emit getWordDetailFinished(jsonObj);
 
81
}
 
82
 
70
83
 
71
84
 
72
85