Ejemplo n.º 1
0
void State::importCharset(const quint8 *charset, int charsetSize)
{
    Q_ASSERT(charset);
    Q_ASSERT(charsetSize <= CHAR_BUFFER_SIZE);

    resetCharsetBuffer();
    memcpy(_charset, charset, qMin(CHAR_BUFFER_SIZE, charsetSize));
}
Ejemplo n.º 2
0
void State::importCharset(const QString& filename, const quint8 *charset, int charsetSize)
{
    Q_ASSERT(charset);
    Q_ASSERT(charsetSize <= CHAR_BUFFER_SIZE);

    resetCharsetBuffer();
    memcpy(_charset, charset, qMin(CHAR_BUFFER_SIZE, charsetSize));
    _loadedFilename = filename;
}
Ejemplo n.º 3
0
void State::importCharset(const QString& filename, const quint8 *charset, int charsetSize)
{
    Q_ASSERT(charset);
    Q_ASSERT(charsetSize <= CHAR_BUFFER_SIZE);

    resetCharsetBuffer();
    memcpy(_charset, charset, qMin(CHAR_BUFFER_SIZE, charsetSize));

    _undoStack->clear();

    // if a new file is loaded, then reset the exported and saved values
    _savedFilename = "";
    _exportedFilename = "";
    _exportedAddress = -1;
    _loadedFilename = filename;

    emit fileLoaded();
    emit contentsChanged();
}