/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename slots use Qt Designer which will
** update this file, preserving your code. Create an init() slot in place of
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/

#include <stdlib.h>

void fireflier_main::fileExit()
{
    exit(0);
}

void fireflier_main::helpAbout()
{

}

void fireflier_main::view_source()
{

}

void fireflier_main::accept_clicked()
{

}

void fireflier_main::deny_clicked()
{

}

void fireflier_main::clear_checkboxes()
{
    cb_ip_src->setChecked(false);
    cb_ip_dst->setChecked(false);
    cb_port_src->setChecked(false);
    cb_port_dst->setChecked(false);
    cb_protocol->setChecked(false);
    cb_program->setChecked(false);
    cb_interface_in->setChecked(false);
    cb_interface_out->setChecked(false);
    cb_conntrack->setChecked(false);

    cb_conntrack->setEnabled(true);
    if (strcmp(cb_program->text(), "not available")) // a little hack
	cb_program->setEnabled(true);

    ch_timeout->setCurrentItem(0);
}



void fireflier_main::activate_checkbox3()
{
    cb_create_rule->setChecked(true);
}

void fireflier_main::program_clicked()
{
    if (cb_program->isChecked())
    {
	cb_conntrack->setEnabled(false);
	cb_conntrack->setChecked(false);
    }
    else
    {
	cb_conntrack->setEnabled(true);
    }
}

void fireflier_main::conntrack_clicked()
{
    if (cb_conntrack->isChecked())
    {
	cb_program->setEnabled(false);
	cb_program->setChecked(false);
    }
    else
    {
        if (strcmp(cb_program->text(), "not available")) // a little hack
	    cb_program->setEnabled(true);
    }
}

void fireflier_main::view_iptables()
{

}

void fireflier_main::view_userspace()
{

}
