void QG_ImageOptionsDialog::init() {
    graphicSize = RS_Vector(0.0,0.0);
    updateEnabled = true;

    RS_SETTINGS->beginGroup("/ExportImage");
    leWidth->setText(RS_SETTINGS->readEntry("/Width", "640"));
    leHeight->setText(RS_SETTINGS->readEntry("/Height", "480"));
    if (RS_SETTINGS->readEntry("/BlackBackground", "0")=="1") {
        rbBlack->setChecked(true);
    }
    if (RS_SETTINGS->readEntry("/Blackwhite", "0")=="1") {
        rbBlackWhite->setChecked(true);
    }
    leLeftRight->setText(RS_SETTINGS->readEntry("/BorderLeftRight", "5"));
    leTopBottom->setText(RS_SETTINGS->readEntry("/BorderTopBottom", "5"));
    if (RS_SETTINGS->readEntry("/BorderSameSize", "0")=="1") {
        cbSameBorders->setChecked(true);
        sameBordersChanged();
    }
    RS_SETTINGS->endGroup();
}
void QG_ImageOptionsDialog::init() {
    graphicSize = RS_Vector(0.0,0.0);
    updateEnabled = false;
    useResolution = true;

    RS_SETTINGS->beginGroup("/Export");
    if (RS_SETTINGS->readEntry("/UseResolution", "1")=="1") {
        cbResolution->setCurrentIndex(cbResolution->findText(QString("%1").arg(RS_SETTINGS->readEntry("/Resolution","1"))));
	}
    else {
		leWidth->setText(RS_SETTINGS->readEntry("/Width", "640"));
        leHeight->setText(RS_SETTINGS->readEntry("/Height", "480"));
    }
    if (RS_SETTINGS->readEntry("/BlackBackground", "0")=="1") {
        rbBlack->setChecked(true);
        rbWhite->setChecked(false);
    }
    else {
    	rbBlack->setChecked(false);
		rbWhite->setChecked(true);
    }
    if (RS_SETTINGS->readEntry("/BlackWhite", "1")=="1") {
        rbBlackWhite->setChecked(true);
        rbColoured->setChecked(false);
    }
    else {
    	rbBlackWhite->setChecked(false);
    	rbColoured->setChecked(true);
    }
    leLeftRight->setText(RS_SETTINGS->readEntry("/BorderLeftRight", "5"));
    leTopBottom->setText(RS_SETTINGS->readEntry("/BorderTopBottom", "5"));
    if (RS_SETTINGS->readEntry("/BorderSameSize", "1")=="1") {
        cbSameBorders->setChecked(true);
        sameBordersChanged();
    }
    RS_SETTINGS->endGroup();

    updateEnabled = true;
}