void DialogShorcut::keyPressEvent(QKeyEvent *event)
{
    if(event->key() == Qt::Key_Escape)
    {
        reject();
    }
    else
    {
        emit notifyKey(event->key());
        accept();
    }
}
示例#2
0
String LanguageManager::getText(const String &culture, const String &name) const
{
    if(name.substr(0,1) == _S("~"))
        return name;

    String value = findText(culture, name, false);

    if(value.empty())
    {
        notifyUnknownKey(culture, name);
        return "~" + name + "~";
    }
    else
    {
        notifyKey(culture, name, value);

        if(m_dumpKey)
            return _S("{") + value + _S("}") + _S(" ~ ") + name + _S(" ~");
        else
            return value;
    }
}
void DialogShorcut::mousePressEvent(QMouseEvent *event)
{
    emit notifyKey(event->button());
    accept();
}