コード例 #1
0
// --------------- ProVariable ----------------
ProVariable::ProVariable(const QString &name, ProBlock *parent)
    : ProBlock(parent)
{
    setBlockKind(ProBlock::VariableKind);
    m_variable = name;
    m_variableKind = SetOperator;
}
コード例 #2
0
// --------------- ProFile ----------------
ProFile::ProFile(const QString &fileName)
    : ProBlock(0)
{
    m_modified = false;
    setBlockKind(ProBlock::ProFileKind);
    m_fileName = fileName;

    QFileInfo fi(fileName);
    m_displayFileName = fi.fileName();
    m_directoryName = fi.absolutePath();
}
コード例 #3
0
ProFile::ProFile(const QString &fileName)
    : ProBlock()
{
    setBlockKind(ProBlock::ProFileKind);
    m_fileName = fileName;

    int nameOff = fileName.lastIndexOf(QLatin1Char('/'));
    m_displayFileName = QString(fileName.constData() + nameOff + 1,
                                fileName.length() - nameOff - 1);
    m_directoryName = QString(fileName.constData(), nameOff);
}