Ejemplo n.º 1
0
void LogConfig::fill()
{
    lstLevel->clear();
    addItem(I18N_NOOP("Error"), (m_plugin->getLogLevel() & L_ERROR) != 0, L_ERROR, 0);
    addItem(I18N_NOOP("Warning"), (m_plugin->getLogLevel() & L_WARN) != 0, L_WARN, 0);
    addItem(I18N_NOOP("Debug"), (m_plugin->getLogLevel() & L_DEBUG) != 0, L_DEBUG, 0);
    PacketType *type;
    ContactList::PacketIterator it;
    while ((type = ++it) != NULL){
        addItem(type->name(), m_plugin->isLogType(type->id()), 0, type->id());
    }
}
Ejemplo n.º 2
0
void MonitorWindow::adjustLog()
{
    menuLog->clear();
    PacketType *packet;
    ContactList::PacketIterator it;
    while ((packet = ++it) != NULL){
        menuLog->insertItem(i18n(packet->name()), packet->id());
        menuLog->setItemChecked(packet->id(), m_plugin->isLogType(packet->id()));
    }
    menuLog->insertSeparator();
    for (const level_def *d = levels; d->name; d++){
        menuLog->insertItem(i18n(d->name), d->level);
        menuLog->setItemChecked(d->level, (m_plugin->getLogLevel() & d->level) != 0);
    }
}
Ejemplo n.º 3
0
void LogConfig::fill()
{
    for (BOX_MAP::iterator it = m_boxes.begin(); it != m_boxes.end(); ++it)
        delete (*it).second;
    m_boxes.clear();
    QVBoxLayout *lay = static_cast<QVBoxLayout*>(layout());
    PacketType *packet;
    ContactList::PacketIterator it_packet;
    unsigned pos = 4;
    while ((packet = ++it_packet) != NULL){
        QCheckBox *box = new QCheckBox(i18n(packet->name()), this);
        lay->insertWidget(pos++, box);
        box->setChecked(m_plugin->isLogType(packet->id()));
        m_boxes.insert(BOX_MAP::value_type(packet->id(), box));
    }
	setMinimumSize(sizeHint());
}