Exemplo n.º 1
0
Prefs_Printer::Prefs_Printer(QWidget* parent, ScribusDoc* doc)
	: Prefs_Pane(parent)
{
	setupUi(this);
	languageChange();
	connect(useAltPrinterCmdCheckBox, SIGNAL(clicked()), this, SLOT(selOtherComm()));
}
Exemplo n.º 2
0
void Prefs_Printer::restoreDefaults(struct ApplicationPrefs *prefsData)
{
	int docUnitIndex = prefsData->docSetupPrefs.docUnitIndex;
	unitChange(docUnitIndex);
	double unitRatio = unitGetRatioFromIndex(docUnitIndex);

	QString Pcap;
	QString printerName;
	QStringList printerNames = PrinterUtil::getPrinterNames();
	int numPrinters = printerNames.count();
	for( int i = 0; i < numPrinters; i++)
	{
		printerName = printerNames[i];
		destinationComboBox->addItem(printerName);
	}

	destinationComboBox->addItem( tr("File"));

	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getContext("print_options");

	QString selectedDest = prefs->get("CurrentPrn", "");
	int prnIndex = destinationComboBox->findText(selectedDest);
	if ((prnIndex > -1) && (prnIndex < destinationComboBox->count()))
		destinationComboBox->setCurrentIndex(prnIndex);
	useAltPrinterCmdCheckBox->setChecked(prefs->getBool("OtherCom", false));
	selOtherComm();
	altPrinterCmdLineEdit->setText(prefs->get("Command", ""));
	bool iccInUse = prefs->getBool("ICCinUse", false);
	bool psPrinter = PrinterUtil::isPostscriptPrinter(destinationComboBox->currentText());
	applyICCProfilesCheckBox->setChecked( psPrinter ? iccInUse : false );
	applyICCProfilesCheckBox->setEnabled( psPrinter );
	outputComboBox->setCurrentIndex(prefs->getInt("Separations", 0));
	postscriptPrintToColorComboBox->setCurrentIndex(prefs->getInt("PrintColor", 0));
	postscriptLevelComboBox->setCurrentIndex(prefs->getInt("PSLevel", 3)-1);
	pageMirrorHorizontallyCheckBox->setChecked(prefs->getBool("MirrorH", false));
	pageMirrorVerticallyCheckBox->setChecked(prefs->getBool("MirrorV", false));
	setMediaSizeCheckBox->setChecked(prefs->getBool("doDev", false));
	applyUnderColorRemovalCheckBox->setChecked(prefs->getBool("DoGCR", false));
	clipToPrinterMarginsCheckBox->setChecked(prefs->getBool("Clip", false));
	convertSpotsToProcessCheckBox->setChecked(!prefs->getBool("doSpot", true));
	MarginStruct bleeds;
	bleeds.set(prefs->getDouble("BleedTop",0.0),
			   prefs->getDouble("BleedBottom", 0.0),
			   prefs->getDouble("BleedRight", 0.0),
			   prefs->getDouble("BleedLeft", 0.0));
	bleedsWidget->setup(bleeds, 0, docUnitIndex, false, false);
	bleedsWidget->setPageWidth(prefsData->docSetupPrefs.pageWidth);
	bleedsWidget->setPageHeight(prefsData->docSetupPrefs.pageHeight);
	markLengthSpinBox->setValue(prefs->getDouble("markLength", 20.0) * unitRatio);
	markOffsetSpinBox->setValue(prefs->getDouble("markOffset", 0.0) * unitRatio);
	cropMarksCheckBox->setChecked(prefs->getBool("cropMarks", false));
	bleedMarksCheckBox->setChecked(prefs->getBool("bleedMarks", false));
	registrationMarksCheckBox->setChecked(prefs->getBool("registrationMarks", false));
	colorBarsCheckBox->setChecked(prefs->getBool("colorMarks", false));
	includePDFAnnotationsCheckBox->setChecked(prefs->getBool("includePDFMarks", true));
}
Exemplo n.º 3
0
TabPrinter::TabPrinter(QWidget* parent, const char* name)
	: QWidget(parent)
{
	setupUi(this);
	setObjectName(name);
	bleedTop->setToolTip( "<qt>" + tr( "Distance for bleed from the top of the physical page" ) + "</qt>" );
	bleedBottom->setToolTip( "<qt>" + tr( "Distance for bleed from the bottom of the physical page" ) + "</qt>" );
	bleedLeft->setToolTip( "<qt>" + tr( "Distance for bleed from the left of the physical page" ) + "</qt>" );
	bleedRight->setToolTip( "<qt>" + tr( "Distance for bleed from the right of the physical page" )  + "</qt>");
	setClip->setToolTip( "<qt>" + tr( "Do not show objects outside the margins on the printed page" ) + "</qt>" );
	useAltPrintCommand->setToolTip("<qt>" + tr( "Use an alternative print manager, such as kprinter or gtklp, to utilize additional printing options") + "</qt>" );
	psLevel->setToolTip("<qt>" +  tr( "Sets the PostScript Level.\n Setting to Level 1 or 2 can create huge files" ) + "</qt>" );
	doGCR->setToolTip( "<qt>" + tr( "A way of switching off some of the gray shades which are composed of cyan, yellow and magenta and using black instead. UCR most affects parts of images which are neutral and/or dark tones which are close to the gray. Use of this may improve printing some images and some experimentation and testing is need on a case by case basis. UCR reduces the possibility of over saturation with CMY inks." ) + "</qt>");
	convertSpots->setToolTip("<qt>" + tr( "Enables Spot Colors to be converted to composite colors. Unless you are planning to print spot colors at a commercial printer, this is probably best left enabled." ) + "</qt>");
	useICC->setToolTip("<qt>" + tr( "Allows you to embed color profiles in the print stream when color management is enabled" ) + "</qt>");
	setMedia->setToolTip( "<qt>" + tr( "This enables you to explicitely set the media size of the PostScript file. Not recommended unless requested by your printer." ) + "</qt>");
	connect(useAltPrintCommand, SIGNAL(clicked()), this, SLOT(selOtherComm()));
}