void	win_char_editor::background_on_off(int state)
{
	bg_list->setEnabled(background->isChecked());
	if (background->isChecked())
		background_changed(bg_list->currentIndex());
	else
		{
		c->bg_cs.char_lines.clear();
		c->bg_cs.char_points.clear();
		}
	c->setUpdatesEnabled(FALSE);
	c->setUpdatesEnabled(TRUE);
}
void AbstractMainWindow::setup_n_start()
{
    AbstractMainWindow * primaryWindow = Q_NULLPTR;
    for(int monitorCount = 0; monitorCount < QApplication::desktop()->screenCount(); monitorCount++)
    {
        AbstractMainWindow * win;
        if(monitorCount == QApplication::desktop()->primaryScreen())
        {
            //do inititalize a primary window
            win = new PrimaryWindow(monitorCount);
            primaryWindow = win;
        }else
        {
            //create the other windows
            win = new AbstractMainWindow(monitorCount);
        }
        AbstractMainWindow::windowList.push_back(win);
    }

    /*
     * Walk through the list again and do -
     * 1. connect primary's background changed signal to all's set_background
     * 2. show em up
     */
    if(primaryWindow != Q_NULLPTR)
    {
        for(QVector<AbstractMainWindow*>::iterator it = AbstractMainWindow::windowList.begin();
            it != AbstractMainWindow::windowList.end(); it++)
        {
            AbstractMainWindow * win = *it;
            qDebug()<<QWidget::connect(primaryWindow,SIGNAL(background_changed(QString)),win,SLOT(set_background(QString)));
            win->show();
            // has to set the back ground explicitly for the first time
            win->set_background(AbstractMainWindow::settings.value(KEY_IMG_ABS_PATH,
                                                                   DEF_IMG_ABS_PATH).toString());
        }
        //set primary window focused
        primaryWindow->setFocus(Qt::OtherFocusReason);
        primaryWindow->activateWindow();
    }else
    {
        qDebug() << "Could not determine Primary Screen. Exitng ...";
        qApp->exit(-1);
    }
}