Exemplo n.º 1
0
void DatabaseTabWidget::connectDatabase(Database* newDb, Database* oldDb)
{
    if (oldDb) {
        oldDb->disconnect(this);
    }

    connect(newDb, SIGNAL(nameTextChanged()), SLOT(updateTabNameFromDbSender()));
    connect(newDb, SIGNAL(modified()), SLOT(modified()));
    newDb->setEmitModified(true);
}
Exemplo n.º 2
0
// ****************************************************************************
//  Method:  XMLEditFunctions::targetTextChanged
//
//  Programmer:  Brad Whitlock
//  Creation:    Thu Mar 6 15:56:05 PST 2008
//
//  Modifications:
//    Cyrus Harrison, Thu May 15 16:00:46 PDT 2008
//    First pass at porting to Qt 4.4.0
//
// ****************************************************************************
void
XMLEditFunctions::targetTextChanged(const QString &text)
{
    Attribute *a = xmldoc->attribute;
    int index = functionlist->currentRow();
    if (index == -1)
        return;
    Function *f = a->functions[index];

    f->target = text;
    nameTextChanged(f->name);
}
Exemplo n.º 3
0
Database::Database()
    : m_metadata(new Metadata(this))
    , m_timer(new QTimer(this))
    , m_cipher(KeePass2::CIPHER_AES)
    , m_compressionAlgo(CompressionGZip)
    , m_transformRounds(50000)
    , m_hasKey(false)
    , m_emitModified(false)
    , m_uuid(Uuid::random())
{
    setRootGroup(new Group());
    rootGroup()->setUuid(Uuid::random());
    m_timer->setSingleShot(true);

    m_uuidMap.insert(m_uuid, this);

    connect(m_metadata, SIGNAL(modified()), this, SIGNAL(modifiedImmediate()));
    connect(m_metadata, SIGNAL(nameTextChanged()), this, SIGNAL(nameTextChanged()));
    connect(this, SIGNAL(modifiedImmediate()), this, SLOT(startModifiedTimer()));
    connect(m_timer, SIGNAL(timeout()), SIGNAL(modified()));
}
Exemplo n.º 4
0
// ****************************************************************************
//  Method:  XMLEditConstants::targetTextChanged
//
//  Programmer:  Brad Whitlock
//  Creation:    Thu Mar 6 15:56:05 PST 2008
//
//  Modifications:
//    Cyrus Harrison, Thu May 15 16:00:46 PDT 200
//    First pass at porting to Qt 4.4.0
//
// ****************************************************************************
void
XMLEditConstants::targetTextChanged(const QString &text)
{
    Attribute *a = xmldoc->attribute;
    int index = constantlist->currentRow();
    if (index == -1)
        return;
    Constant *c = a->constants[index];

    c->target = text;
    nameTextChanged(c->name);
}
Exemplo n.º 5
0
void Metadata::setName(const QString& value)
{
    if (set(m_data.name, value, m_data.nameChanged)) {
        Q_EMIT nameTextChanged();
    }
}