r23839 by jghali - Rename a few print dialog widgets to make code more understandable

scribus-commit scribus-commit at lists.scribus.net
Tue May 26 12:45:59 UTC 2020


Author: jghali
Date: Tue May 26 12:45:59 2020
New Revision: 23839

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23839
Log:
Rename a few print dialog widgets to make code more understandable

Modified:
    trunk/Scribus/scribus/ui/printdialog.cpp
    trunk/Scribus/scribus/ui/printdialog.h
    trunk/Scribus/scribus/ui/printdialogbase.ui

Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23839&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp	Tue May 26 12:45:59 2020
@@ -61,18 +61,18 @@
 	markOffset->setNewUnit(m_unit);
 	markOffset->setMinimum(0);
 	markOffset->setMaximum(3000 * m_unitRatio);
-	BleedBottom->setNewUnit(m_unit);
-	BleedBottom->setMinimum(0);
-	BleedBottom->setMaximum(3000 * m_unitRatio);
-	BleedLeft->setNewUnit(m_unit);
-	BleedLeft->setMinimum(0);
-	BleedLeft->setMaximum(3000 * m_unitRatio);
-	BleedRight->setNewUnit(m_unit);
-	BleedRight->setMinimum(0);
-	BleedRight->setMaximum(3000 * m_unitRatio);
-	BleedTop->setNewUnit(m_unit);
-	BleedTop->setMinimum(0);
-	BleedTop->setMaximum(3000 * m_unitRatio);
+	bleedBottom->setNewUnit(m_unit);
+	bleedBottom->setMinimum(0);
+	bleedBottom->setMaximum(3000 * m_unitRatio);
+	bleedLeft->setNewUnit(m_unit);
+	bleedLeft->setMinimum(0);
+	bleedLeft->setMaximum(3000 * m_unitRatio);
+	bleedRight->setNewUnit(m_unit);
+	bleedRight->setMinimum(0);
+	bleedRight->setMaximum(3000 * m_unitRatio);
+	bleedTop->setNewUnit(m_unit);
+	bleedTop->setMinimum(0);
+	bleedTop->setMaximum(3000 * m_unitRatio);
 
 	if (ScCore->haveGS() || ScCore->isWinGUI())
 		previewButton->setEnabled(!previewDinUse);
@@ -110,13 +110,13 @@
 	    };
 	size_t sepArray = sizeof(sep) / sizeof(*sep);
 	for (uint prop = 0; prop < sepArray; ++prop)
-		SepArt->addItem(sep[prop]);
-	SepArt->addItems(spots);
+		separationsCombo->addItem(sep[prop]);
+	separationsCombo->addItems(spots);
 
 	if (m_doc->pagePositioning() != 0)
 	{
-		BleedTxt3->setText( tr( "Inside:" ) );
-		BleedTxt4->setText( tr( "Outside:" ) );
+		bleedLeftText->setText( tr( "Inside:" ) );
+		bleedRightText->setText( tr( "Outside:" ) );
 	}
 
 	QString prnDevice = printOptions.printer;
@@ -127,29 +127,29 @@
 		PrintDest->setCurrentIndex(PrintDest->count()-1);
 		prefs->set("CurrentPrn", PrintDest->currentText());
 		DateiT->setEnabled(true);
-		LineEdit1->setEnabled(true);
+		fileNameEdit->setEnabled(true);
 		if (!printOptions.filename.isEmpty())
-			LineEdit1->setText(QDir::toNativeSeparators(printOptions.filename));
-		ToolButton1->setEnabled(true);
+			fileNameEdit->setText(QDir::toNativeSeparators(printOptions.filename));
+		selectFileButton->setEnabled(true);
 	}
 
 	setMaximumSize(sizeHint());
 	PrintDest->setFocus();
 
 	// signals and slots connections
-	connect( OKButton, SIGNAL( clicked() ), this, SLOT( okButtonClicked() ) );
-	connect( CancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
-	connect( PrintDest, SIGNAL(activated(const QString&)), this, SLOT(SelPrinter(const QString&)));
-	connect( printEngines, SIGNAL(activated(const QString&)), this, SLOT(SelEngine(const QString&)));
-	connect( RadioButton1, SIGNAL(toggled(bool)), this, SLOT(SelRange(bool)));
-	connect( CurrentPage, SIGNAL(toggled(bool)), this, SLOT(SelRange(bool)));
+	connect( okButton, SIGNAL( clicked() ), this, SLOT( okButtonClicked() ) );
+	connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
+	connect( PrintDest, SIGNAL(activated(const QString&)), this, SLOT(selectPrinter(const QString&)));
+	connect( printEngines, SIGNAL(activated(const QString&)), this, SLOT(selectEngine(const QString&)));
+	connect( printAllRadio, SIGNAL(toggled(bool)), this, SLOT(selectRange(bool)));
+	connect( printCurrentRadio, SIGNAL(toggled(bool)), this, SLOT(selectRange(bool)));
 	connect( pageNrButton, SIGNAL(clicked()), this, SLOT(createPageNumberRange()));
-	connect( PrintSep, SIGNAL(activated(int)), this, SLOT(SelMode(int)));
-	connect( ToolButton1, SIGNAL(clicked()), this, SLOT(SelFile()));
-	connect( OtherCom, SIGNAL(clicked()), this, SLOT(SelComm()));
+	connect( printSepCombo, SIGNAL(activated(int)), this, SLOT(selectSepMode(int)));
+	connect( selectFileButton, SIGNAL(clicked()), this, SLOT(selectFile()));
+	connect( altComCheckBox, SIGNAL(clicked()), this, SLOT(selectCommand()));
 	connect( previewButton, SIGNAL(clicked()), this, SLOT(previewButtonClicked()));
 	connect( docBleeds, SIGNAL(clicked()), this, SLOT(doDocBleeds()));
-	connect( OptButton, SIGNAL( clicked() ), this, SLOT( SetOptions() ) );
+	connect( optionsButton, SIGNAL( clicked() ), this, SLOT( selectOptions() ) );
 
 	setStoredValues(printOptions.filename, gcr);
 #if defined(_WIN32)
@@ -178,7 +178,7 @@
 	m_cupsOptions = nullptr;
 }
 
-void PrintDialog::SetOptions()
+void PrintDialog::selectOptions()
 {
 #ifdef HAVE_CUPS
 	if (!m_cupsOptions)
@@ -282,28 +282,28 @@
 #endif
 }
 
-void PrintDialog::SelComm()
-{
-	bool test = OtherCom->isChecked();
+void PrintDialog::selectCommand()
+{
+	bool test = altComCheckBox->isChecked();
 	OthText->setEnabled(test);
-	Command->setEnabled(test);
+	altCommand->setEnabled(test);
 	PrintDest->setEnabled(!test);
-	if (OtherCom->isChecked())
+	if (altComCheckBox->isChecked())
 	{
 		DateiT->setEnabled(false);
-		LineEdit1->setEnabled(false);
-		ToolButton1->setEnabled(false);
-		OptButton->setEnabled(false);
+		fileNameEdit->setEnabled(false);
+		selectFileButton->setEnabled(false);
+		optionsButton->setEnabled(false);
 	}
 	else
 	{
-		SelPrinter(PrintDest->currentText());
+		selectPrinter(PrintDest->currentText());
 		if (PrintDest->currentText() != tr("File"))
-			OptButton->setEnabled(true);
-	}
-}
-
-void PrintDialog::SelEngine(const QString& eng)
+			optionsButton->setEnabled(true);
+	}
+}
+
+void PrintDialog::selectEngine(const QString& eng)
 {
 	prefs->set("CurrentPrnEngine", m_printEngineMap[printEngines->currentText()]);
 	bool psSupported = outputToFile();
@@ -312,26 +312,26 @@
 	psSupported |= (eng == CommonStrings::trPostScript3);
 	if (psSupported)
 	{
-		PrintSep->setEnabled(true);
+		printSepCombo->setEnabled(true);
 		usePDFMarks->setEnabled(true);
 	}
 	else
 	{
-		setCurrentComboItem(PrintSep, tr("Print Normal"));
-		PrintSep->setEnabled(false);
-		setCurrentComboItem(SepArt, tr("All"));
-		SepArt->setEnabled(false);
+		setCurrentComboItem(printSepCombo, tr("Print Normal"));
+		printSepCombo->setEnabled(false);
+		setCurrentComboItem(separationsCombo, tr("All"));
+		separationsCombo->setEnabled(false);
 		usePDFMarks->setEnabled(false);
 	}
 }
 
-void PrintDialog::SelPrinter(const QString& prn)
+void PrintDialog::selectPrinter(const QString& prn)
 {
 	bool toFile = prn == tr("File");
 	DateiT->setEnabled(toFile);
-	LineEdit1->setEnabled(toFile);
-	ToolButton1->setEnabled(toFile);
-	OptButton->setEnabled(!toFile);
+	fileNameEdit->setEnabled(toFile);
+	selectFileButton->setEnabled(toFile);
+	optionsButton->setEnabled(!toFile);
 #if defined(_WIN32)
 	if (!toFile)
 	{
@@ -339,11 +339,11 @@
 			qWarning( tr("Failed to retrieve printer settings").toLatin1().data() );
 	}
 #endif
-	if (toFile && LineEdit1->text().isEmpty())
+	if (toFile && fileNameEdit->text().isEmpty())
 	{
 		QFileInfo fi(m_doc->documentFileName());
 		if (fi.isRelative()) // if (m_doc->DocName.startsWith( tr("Document")))
-			LineEdit1->setText( QDir::toNativeSeparators(QDir::currentPath() + "/" + m_doc->documentFileName() + ".ps") );
+			fileNameEdit->setText( QDir::toNativeSeparators(QDir::currentPath() + "/" + m_doc->documentFileName() + ".ps") );
 		else
 		{
 			QString completeBaseName = fi.completeBaseName();
@@ -351,7 +351,7 @@
 				if (completeBaseName.length() > 4) completeBaseName.chop(4);
 			if (completeBaseName.endsWith(".gz", Qt::CaseInsensitive))
 				if (completeBaseName.length() > 3) completeBaseName.chop(3);
-			LineEdit1->setText( QDir::toNativeSeparators(fi.path() + "/" + completeBaseName + ".ps") );
+			fileNameEdit->setText( QDir::toNativeSeparators(fi.path() + "/" + completeBaseName + ".ps") );
 		}
 	}
 
@@ -369,50 +369,50 @@
 	if (psSupported || toFile)
 	{
 		printEngines->setEnabled(true);
-		PrintSep->setEnabled(true);
+		printSepCombo->setEnabled(true);
 		usePDFMarks->setEnabled(true);
 	}
 	else
 	{
 		printEngines->setEnabled(false);
-		setCurrentComboItem(PrintSep, tr("Print Normal"));
-		PrintSep->setEnabled(false);
-		setCurrentComboItem(SepArt, tr("All"));
-		SepArt->setEnabled(false);
+		setCurrentComboItem(printSepCombo, tr("Print Normal"));
+		printSepCombo->setEnabled(false);
+		setCurrentComboItem(separationsCombo, tr("All"));
+		separationsCombo->setEnabled(false);
 		usePDFMarks->setEnabled(false);
 	}
 }
 
-void PrintDialog::SelRange(bool e)
+void PrintDialog::selectRange(bool e)
 {
 	pageNr->setEnabled(!e);
 	pageNrButton->setEnabled(!e);
 }
 
-void PrintDialog::SelMode(int e)
-{
-	SepArt->setEnabled(e != 0);
-}
-
-void PrintDialog::SelFile()
+void PrintDialog::selectSepMode(int e)
+{
+	separationsCombo->setEnabled(e != 0);
+}
+
+void PrintDialog::selectFile()
 {
 	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString wdir = dirs->get("printdir", ".");
 	CustomFDialog dia(this, wdir, tr("Save As"), tr("PostScript Files (*.ps);;All Files (*)"), fdNone | fdHidePreviewCheckBox);
-	if (!LineEdit1->text().isEmpty())
-		dia.setSelection(LineEdit1->text());
+	if (!fileNameEdit->text().isEmpty())
+		dia.setSelection(fileNameEdit->text());
 	if (dia.exec() == QDialog::Accepted)
 	{
 		QString selectedFile = dia.selectedFile();
 		dirs->set("printdir", selectedFile.left(selectedFile.lastIndexOf("/")));
-		LineEdit1->setText( QDir::toNativeSeparators(selectedFile) );
+		fileNameEdit->setText( QDir::toNativeSeparators(selectedFile) );
 	}
 }
 
 void PrintDialog::setMinMax(int min, int max, int cur)
 {
 	QString tmp, tmp2;
-	CurrentPage->setText( tr( "Print Current Pa&ge" )+" ("+tmp.setNum(cur)+")");
+	printCurrentRadio->setText( tr( "Print Current Pa&ge" )+" ("+tmp.setNum(cur)+")");
 	pageNr->setText(tmp.setNum(min)+"-"+tmp2.setNum(max));
 }
 
@@ -421,7 +421,7 @@
 	getOptions(); // options were not set get last options with this hack
 
 	m_doc->Print_Options.printer = PrintDest->currentText();
-	m_doc->Print_Options.filename = QDir::fromNativeSeparators(LineEdit1->text());
+	m_doc->Print_Options.filename = QDir::fromNativeSeparators(fileNameEdit->text());
 	m_doc->Print_Options.toFile = outputToFile();
 	m_doc->Print_Options.copies = numCopies();
 	m_doc->Print_Options.outputSeparations = outputSeparations();
@@ -439,10 +439,10 @@
 	m_doc->Print_Options.prnEngine= printEngine();
 	m_doc->Print_Options.setDevParam = doDev();
 	m_doc->Print_Options.useDocBleeds  = docBleeds->isChecked();
-	m_doc->Print_Options.bleeds.setTop(BleedTop->value() / m_doc->unitRatio());
-	m_doc->Print_Options.bleeds.setLeft(BleedLeft->value() / m_doc->unitRatio());
-	m_doc->Print_Options.bleeds.setRight(BleedRight->value() / m_doc->unitRatio());
-	m_doc->Print_Options.bleeds.setBottom(BleedBottom->value() / m_doc->unitRatio());
+	m_doc->Print_Options.bleeds.setTop(bleedTop->value() / m_doc->unitRatio());
+	m_doc->Print_Options.bleeds.setLeft(bleedLeft->value() / m_doc->unitRatio());
+	m_doc->Print_Options.bleeds.setRight(bleedRight->value() / m_doc->unitRatio());
+	m_doc->Print_Options.bleeds.setBottom(bleedBottom->value() / m_doc->unitRatio());
 	m_doc->Print_Options.markLength = markLength->value() / m_doc->unitRatio();
 	m_doc->Print_Options.markOffset = markOffset->value() / m_doc->unitRatio();
 	m_doc->Print_Options.cropMarks  = cropMarks->isChecked();
@@ -450,9 +450,9 @@
 	m_doc->Print_Options.registrationMarks = registrationMarks->isChecked();
 	m_doc->Print_Options.colorMarks = colorMarks->isChecked();
 	m_doc->Print_Options.includePDFMarks = usePDFMarks->isChecked();
-	if (OtherCom->isChecked())
-	{
-		m_doc->Print_Options.printerCommand = Command->text();
+	if (altComCheckBox->isChecked())
+	{
+		m_doc->Print_Options.printerCommand = altCommand->text();
 		m_doc->Print_Options.useAltPrintCommand = true;
 	}
 	else
@@ -516,23 +516,23 @@
 		PrintDest->setCurrentIndex(selectedDest);
 		prefs->set("CurrentPrn", PrintDest->currentText());
 		if (PrintDest->currentText() == tr("File"))
-			LineEdit1->setText(fileName);
-		SelPrinter(PrintDest->currentText());
-	}
-	OtherCom->setChecked(m_doc->Print_Options.useAltPrintCommand);
-	if (OtherCom->isChecked())
-	{
-		SelComm();
-		Command->setText(m_doc->Print_Options.printerCommand);
-	}
-	RadioButton1->setChecked(prefs->getBool("PrintAll", true));
-	CurrentPage->setChecked(prefs->getBool("CurrentPage", false));
-	bool printRangeChecked=prefs->getBool("PrintRange", false);
-	RadioButton2->setChecked(printRangeChecked);
+			fileNameEdit->setText(fileName);
+		selectPrinter(PrintDest->currentText());
+	}
+	altComCheckBox->setChecked(m_doc->Print_Options.useAltPrintCommand);
+	if (altComCheckBox->isChecked())
+	{
+		selectCommand();
+		altCommand->setText(m_doc->Print_Options.printerCommand);
+	}
+	printAllRadio->setChecked(prefs->getBool("PrintAll", true));
+	printCurrentRadio->setChecked(prefs->getBool("CurrentPage", false));
+	bool printRangeChecked = prefs->getBool("PrintRange", false);
+	printRangeRadio->setChecked(printRangeChecked);
 	pageNr->setEnabled(printRangeChecked);
 	pageNr->setText(prefs->get("PageNr", "1-1"));
 	Copies->setValue(1);
-	PrintSep->setCurrentIndex(m_doc->Print_Options.outputSeparations);
+	printSepCombo->setCurrentIndex(m_doc->Print_Options.outputSeparations);
 	colorType->setCurrentIndex(m_doc->Print_Options.useColor ? 0 : 1);
 	ColorList usedSpots;
 	m_doc->getUsedColors(usedSpots, true);
@@ -543,36 +543,36 @@
 	spots.prepend( tr("Cyan"));
 	spots.prepend( tr("All"));
 	int selectedSep = spots.indexOf(m_doc->Print_Options.separationName);
-	if ((selectedSep > -1) && (selectedSep < SepArt->count()))
-		SepArt->setCurrentIndex(selectedSep);
-	if (PrintSep->currentIndex() == 1)
-		SepArt->setEnabled(true);
+	if ((selectedSep > -1) && (selectedSep < separationsCombo->count()))
+		separationsCombo->setCurrentIndex(selectedSep);
+	if (printSepCombo->currentIndex() == 1)
+		separationsCombo->setEnabled(true);
 	setPrintEngine(m_doc->Print_Options.prnEngine);
-	MirrorHor->setChecked(m_doc->Print_Options.mirrorH);
-	MirrorVert->setChecked(m_doc->Print_Options.mirrorV);
-	devPar->setChecked(m_doc->Print_Options.setDevParam);
-	GcR->setChecked(m_doc->Print_Options.doGCR);
-	ClipMarg->setChecked(m_doc->Print_Options.doClip);
-	spotColors->setChecked(!m_doc->Print_Options.useSpotColors);
+	mirrorHor->setChecked(m_doc->Print_Options.mirrorH);
+	mirrorVert->setChecked(m_doc->Print_Options.mirrorV);
+	setMediaSize->setChecked(m_doc->Print_Options.setDevParam);
+	applyGCR->setChecked(m_doc->Print_Options.doGCR);
+	clipMargins->setChecked(m_doc->Print_Options.doClip);
+	convertSpots->setChecked(!m_doc->Print_Options.useSpotColors);
 	docBleeds->setChecked(m_doc->Print_Options.useDocBleeds);
 	if (docBleeds->isChecked())
 	{
-		BleedTop->setValue(m_doc->bleeds()->top() * m_unitRatio);
-		BleedBottom->setValue(m_doc->bleeds()->bottom() * m_unitRatio);
-		BleedRight->setValue(m_doc->bleeds()->right() * m_unitRatio);
-		BleedLeft->setValue(m_doc->bleeds()->left() * m_unitRatio);
+		bleedTop->setValue(m_doc->bleeds()->top() * m_unitRatio);
+		bleedBottom->setValue(m_doc->bleeds()->bottom() * m_unitRatio);
+		bleedRight->setValue(m_doc->bleeds()->right() * m_unitRatio);
+		bleedLeft->setValue(m_doc->bleeds()->left() * m_unitRatio);
 	}
 	else
 	{
-		BleedTop->setValue(m_doc->Print_Options.bleeds.top() * m_unitRatio);
-		BleedBottom->setValue(m_doc->Print_Options.bleeds.bottom() * m_unitRatio);
-		BleedRight->setValue(m_doc->Print_Options.bleeds.right() * m_unitRatio);
-		BleedLeft->setValue(m_doc->Print_Options.bleeds.left() * m_unitRatio);
-	}
-	BleedTop->setEnabled(!docBleeds->isChecked());
-	BleedBottom->setEnabled(!docBleeds->isChecked());
-	BleedRight->setEnabled(!docBleeds->isChecked());
-	BleedLeft->setEnabled(!docBleeds->isChecked());
+		bleedTop->setValue(m_doc->Print_Options.bleeds.top() * m_unitRatio);
+		bleedBottom->setValue(m_doc->Print_Options.bleeds.bottom() * m_unitRatio);
+		bleedRight->setValue(m_doc->Print_Options.bleeds.right() * m_unitRatio);
+		bleedLeft->setValue(m_doc->Print_Options.bleeds.left() * m_unitRatio);
+	}
+	bleedTop->setEnabled(!docBleeds->isChecked());
+	bleedBottom->setEnabled(!docBleeds->isChecked());
+	bleedRight->setEnabled(!docBleeds->isChecked());
+	bleedLeft->setEnabled(!docBleeds->isChecked());
 	markLength->setValue(m_doc->Print_Options.markLength * m_unitRatio);
 	markOffset->setValue(m_doc->Print_Options.markOffset * m_unitRatio);
 	cropMarks->setChecked(m_doc->Print_Options.cropMarks);
@@ -589,7 +589,7 @@
 
 QString PrintDialog::outputFileName()
 {
-	return QDir::fromNativeSeparators(LineEdit1->text());
+	return QDir::fromNativeSeparators(fileNameEdit->text());
 }
 
 bool PrintDialog::outputToFile()
@@ -604,30 +604,30 @@
 
 bool PrintDialog::outputSeparations()
 {
-	return SepArt->isEnabled();
+	return separationsCombo->isEnabled();
 }
 
 QString PrintDialog::separationName()
 {
-	if (SepArt->currentIndex() == 0)
+	if (separationsCombo->currentIndex() == 0)
 		return QString("All");
-	if (SepArt->currentIndex() == 1)
+	if (separationsCombo->currentIndex() == 1)
 		return QString("Cyan");
-	if (SepArt->currentIndex() == 2)
+	if (separationsCombo->currentIndex() == 2)
 		return QString("Magenta");
-	if (SepArt->currentIndex() == 3)
+	if (separationsCombo->currentIndex() == 3)
 		return QString("Yellow");
-	if (SepArt->currentIndex() == 4)
+	if (separationsCombo->currentIndex() == 4)
 		return QString("Black");
-	return SepArt->currentText();
+	return separationsCombo->currentText();
 }
 
 QStringList PrintDialog::allSeparations()
 {
 	QStringList ret;
-	for (int a = 1; a < SepArt->count(); ++a)
-	{
-		ret.append(SepArt->itemText(a));
+	for (int a = 1; a < separationsCombo->count(); ++a)
+	{
+		ret.append(separationsCombo->itemText(a));
 	}
 	return ret;
 }
@@ -639,22 +639,22 @@
 
 bool PrintDialog::mirrorHorizontal()
 {
-	return MirrorHor->isChecked();
+	return mirrorHor->isChecked();
 }
 
 bool PrintDialog::mirrorVertical()
 {
-	return MirrorVert->isChecked();
+	return mirrorVert->isChecked();
 }
 
 bool PrintDialog::doGCR()
 {
-	return GcR->isChecked();
+	return applyGCR->isChecked();
 }
 
 bool PrintDialog::doClip()
 {
-	return ClipMarg->isChecked();
+	return clipMargins->isChecked();
 }
 
 PrintEngine PrintDialog::printEngine()
@@ -664,22 +664,22 @@
 
 bool PrintDialog::doDev()
 {
-	return devPar->isChecked();
+	return setMediaSize->isChecked();
 }
 
 bool PrintDialog::doSpot()
 {
-	return !spotColors->isChecked();
+	return !convertSpots->isChecked();
 }
 
 bool PrintDialog::doPrintAll()
 {
-	return RadioButton1->isChecked();
+	return printAllRadio->isChecked();
 }
 
 bool PrintDialog::doPrintCurrentPage()
 {
-	return CurrentPage->isChecked();
+	return printCurrentRadio->isChecked();
 }
 
 QString PrintDialog::getPageString()
@@ -691,28 +691,28 @@
 {
 	if (docBleeds->isChecked())
 	{
-		prefs->set("BleedTop", BleedTop->value() / m_unitRatio);
-		prefs->set("BleedBottom", BleedBottom->value() / m_unitRatio);
-		prefs->set("BleedRight", BleedRight->value() / m_unitRatio);
-		prefs->set("BleedLeft", BleedLeft->value() / m_unitRatio);
-		BleedTop->setValue(m_doc->bleeds()->top() * m_unitRatio);
-		BleedBottom->setValue(m_doc->bleeds()->bottom() * m_unitRatio);
-		BleedRight->setValue(m_doc->bleeds()->right() * m_unitRatio);
-		BleedLeft->setValue(m_doc->bleeds()->left() * m_unitRatio);
+		prefs->set("BleedTop", bleedTop->value() / m_unitRatio);
+		prefs->set("BleedBottom", bleedBottom->value() / m_unitRatio);
+		prefs->set("BleedRight", bleedRight->value() / m_unitRatio);
+		prefs->set("BleedLeft", bleedLeft->value() / m_unitRatio);
+		bleedTop->setValue(m_doc->bleeds()->top() * m_unitRatio);
+		bleedBottom->setValue(m_doc->bleeds()->bottom() * m_unitRatio);
+		bleedRight->setValue(m_doc->bleeds()->right() * m_unitRatio);
+		bleedLeft->setValue(m_doc->bleeds()->left() * m_unitRatio);
 	}
 	else
 	{
-		BleedTop->setValue(prefs->getDouble("BleedTop",0.0) * m_unitRatio);
-		BleedBottom->setValue(prefs->getDouble("BleedBottom",0.0) * m_unitRatio);
-		BleedRight->setValue(prefs->getDouble("BleedRight",0.0) * m_unitRatio);
-		BleedLeft->setValue(prefs->getDouble("BleedLeft",0.0) * m_unitRatio);
+		bleedTop->setValue(prefs->getDouble("BleedTop",0.0) * m_unitRatio);
+		bleedBottom->setValue(prefs->getDouble("BleedBottom",0.0) * m_unitRatio);
+		bleedRight->setValue(prefs->getDouble("BleedRight",0.0) * m_unitRatio);
+		bleedLeft->setValue(prefs->getDouble("BleedLeft",0.0) * m_unitRatio);
 	}
 	bool isChecked = docBleeds->isChecked();
 	prefs->set("UseDocBleeds", isChecked);
-	BleedTop->setEnabled(!isChecked);
-	BleedBottom->setEnabled(!isChecked);
-	BleedRight->setEnabled(!isChecked);
-	BleedLeft->setEnabled(!isChecked);
+	bleedTop->setEnabled(!isChecked);
+	bleedBottom->setEnabled(!isChecked);
+	bleedRight->setEnabled(!isChecked);
+	bleedLeft->setEnabled(!isChecked);
 }
 
 void PrintDialog::createPageNumberRange( )

Modified: trunk/Scribus/scribus/ui/printdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23839&path=/trunk/Scribus/scribus/ui/printdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.h	(original)
+++ trunk/Scribus/scribus/ui/printdialog.h	Tue May 26 12:45:59 2020
@@ -55,13 +55,13 @@
 protected slots:
 	void doDocBleeds();
 	void createPageNumberRange();
-	void SetOptions();
-	void SelEngine(const QString& eng);
-	void SelPrinter(const QString& prn);
-	void SelRange(bool e);
-	void SelMode(int e);
-	void SelFile();
-	void SelComm();
+	void selectOptions();
+	void selectEngine(const QString& eng);
+	void selectPrinter(const QString& prn);
+	void selectRange(bool e);
+	void selectSepMode(int e);
+	void selectFile();
+	void selectCommand();
 	void okButtonClicked();
 	void previewButtonClicked();
 

Modified: trunk/Scribus/scribus/ui/printdialogbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23839&path=/trunk/Scribus/scribus/ui/printdialogbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/printdialogbase.ui	(original)
+++ trunk/Scribus/scribus/ui/printdialogbase.ui	Tue May 26 12:45:59 2020
@@ -54,7 +54,7 @@
          </widget>
         </item>
         <item>
-         <widget class="QPushButton" name="OptButton">
+         <widget class="QPushButton" name="optionsButton">
           <property name="text">
            <string>&Options...</string>
           </property>
@@ -95,15 +95,15 @@
            <string>&File:</string>
           </property>
           <property name="buddy">
-           <cstring>LineEdit1</cstring>
+           <cstring>fileNameEdit</cstring>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QLineEdit" name="LineEdit1"/>
+         <widget class="QLineEdit" name="fileNameEdit"/>
         </item>
         <item>
-         <widget class="QToolButton" name="ToolButton1">
+         <widget class="QToolButton" name="selectFileButton">
           <property name="enabled">
            <bool>false</bool>
           </property>
@@ -115,7 +115,7 @@
        </layout>
       </item>
       <item>
-       <widget class="QCheckBox" name="OtherCom">
+       <widget class="QCheckBox" name="altComCheckBox">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
           <horstretch>0</horstretch>
@@ -147,12 +147,12 @@
            <string>Co&mmand:</string>
           </property>
           <property name="buddy">
-           <cstring>Command</cstring>
+           <cstring>altCommand</cstring>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QLineEdit" name="Command">
+         <widget class="QLineEdit" name="altCommand">
           <property name="enabled">
            <bool>false</bool>
           </property>
@@ -185,7 +185,7 @@
        <number>5</number>
       </property>
       <item row="0" column="0">
-       <widget class="QRadioButton" name="RadioButton1">
+       <widget class="QRadioButton" name="printAllRadio">
         <property name="text">
          <string>Print &All</string>
         </property>
@@ -225,14 +225,14 @@
        </widget>
       </item>
       <item row="1" column="0" colspan="2">
-       <widget class="QRadioButton" name="CurrentPage">
+       <widget class="QRadioButton" name="printCurrentRadio">
         <property name="text">
          <string>Print Current Pa&ge</string>
         </property>
        </widget>
       </item>
       <item row="2" column="0">
-       <widget class="QRadioButton" name="RadioButton2">
+       <widget class="QRadioButton" name="printRangeRadio">
         <property name="text">
          <string>Print &Range</string>
         </property>
@@ -296,7 +296,7 @@
       </attribute>
       <layout class="QGridLayout" name="gridLayoutOptions">
        <item row="0" column="0">
-        <widget class="QComboBox" name="PrintSep">
+        <widget class="QComboBox" name="printSepCombo">
          <item>
           <property name="text">
            <string>Print Normal</string>
@@ -324,7 +324,7 @@
         </widget>
        </item>
        <item row="1" column="0">
-        <widget class="QComboBox" name="SepArt">
+        <widget class="QComboBox" name="separationsCombo">
          <property name="enabled">
           <bool>false</bool>
          </property>
@@ -361,21 +361,21 @@
          </property>
          <layout class="QVBoxLayout">
           <item>
-           <widget class="QCheckBox" name="MirrorHor">
+           <widget class="QCheckBox" name="mirrorHor">
             <property name="text">
              <string>Mirror Page(s) Horizontal</string>
             </property>
            </widget>
           </item>
           <item>
-           <widget class="QCheckBox" name="MirrorVert">
+           <widget class="QCheckBox" name="mirrorVert">
             <property name="text">
              <string>Mirror Page(s) Vertical</string>
             </property>
            </widget>
           </item>
           <item>
-           <widget class="QCheckBox" name="devPar">
+           <widget class="QCheckBox" name="setMediaSize">
             <property name="toolTip">
              <string>This enables you to explicitly set the media size of the PostScript file. Not recommended unless requested by your printer.</string>
             </property>
@@ -385,7 +385,7 @@
            </widget>
           </item>
           <item>
-           <widget class="QCheckBox" name="ClipMarg">
+           <widget class="QCheckBox" name="clipMargins">
             <property name="text">
              <string>Clip to Printer Margins</string>
             </property>
@@ -401,7 +401,7 @@
          </property>
          <layout class="QVBoxLayout">
           <item>
-           <widget class="QCheckBox" name="GcR">
+           <widget class="QCheckBox" name="applyGCR">
             <property name="toolTip">
              <string><qt>A way of switching off some of the gray shades which are composed of cyan, yellow and magenta and using black instead. Under Color Removal mostly 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. Under Color Removal reduces the possibility of over saturation with CMY inks.</qt></string>
             </property>
@@ -411,7 +411,7 @@
            </widget>
           </item>
           <item>
-           <widget class="QCheckBox" name="spotColors">
+           <widget class="QCheckBox" name="convertSpots">
             <property name="toolTip">
              <string><qt>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></string>
             </property>
@@ -549,56 +549,56 @@
       </attribute>
       <layout class="QGridLayout">
        <item row="1" column="0">
-        <widget class="QLabel" name="BleedTxt1">
+        <widget class="QLabel" name="bleedTopText">
          <property name="text">
           <string>Top:</string>
          </property>
         </widget>
        </item>
        <item row="1" column="1">
-        <widget class="ScrSpinBox" name="BleedTop">
+        <widget class="ScrSpinBox" name="bleedTop">
          <property name="toolTip">
           <string>Distance for bleed from the top of the physical page</string>
          </property>
         </widget>
        </item>
        <item row="1" column="2">
-        <widget class="QLabel" name="BleedTxt3">
+        <widget class="QLabel" name="bleedLeftText">
          <property name="text">
           <string>Left:</string>
          </property>
         </widget>
        </item>
        <item row="1" column="3">
-        <widget class="ScrSpinBox" name="BleedRight">
+        <widget class="ScrSpinBox" name="bleedRight">
          <property name="toolTip">
           <string>Distance for bleed from the right of the physical page</string>
          </property>
         </widget>
        </item>
        <item row="2" column="0">
-        <widget class="QLabel" name="BleedTxt2">
+        <widget class="QLabel" name="bleedBottomText">
          <property name="text">
           <string>Bottom:</string>
          </property>
         </widget>
        </item>
        <item row="2" column="1">
-        <widget class="ScrSpinBox" name="BleedBottom">
+        <widget class="ScrSpinBox" name="bleedBottom">
          <property name="toolTip">
           <string>Distance for bleed from the bottom of the physical page</string>
          </property>
         </widget>
        </item>
        <item row="2" column="2">
-        <widget class="QLabel" name="BleedTxt4">
+        <widget class="QLabel" name="bleedRightText">
          <property name="text">
           <string>Right:</string>
          </property>
         </widget>
        </item>
        <item row="2" column="3">
-        <widget class="ScrSpinBox" name="BleedLeft">
+        <widget class="ScrSpinBox" name="bleedLeft">
          <property name="toolTip">
           <string>Distance for bleed from the left of the physical page</string>
          </property>
@@ -644,7 +644,7 @@
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="OKButton">
+      <widget class="QPushButton" name="okButton">
        <property name="text">
         <string>&Print</string>
        </property>
@@ -654,7 +654,7 @@
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="CancelButton">
+      <widget class="QPushButton" name="cancelButton">
        <property name="text">
         <string>Cancel</string>
        </property>
@@ -676,29 +676,29 @@
  </customwidgets>
  <tabstops>
   <tabstop>PrintDest</tabstop>
-  <tabstop>OptButton</tabstop>
-  <tabstop>LineEdit1</tabstop>
-  <tabstop>ToolButton1</tabstop>
-  <tabstop>OtherCom</tabstop>
-  <tabstop>Command</tabstop>
-  <tabstop>RadioButton1</tabstop>
-  <tabstop>CurrentPage</tabstop>
-  <tabstop>RadioButton2</tabstop>
+  <tabstop>optionsButton</tabstop>
+  <tabstop>fileNameEdit</tabstop>
+  <tabstop>selectFileButton</tabstop>
+  <tabstop>altComCheckBox</tabstop>
+  <tabstop>altCommand</tabstop>
+  <tabstop>printAllRadio</tabstop>
+  <tabstop>printCurrentRadio</tabstop>
+  <tabstop>printRangeRadio</tabstop>
   <tabstop>pageNr</tabstop>
   <tabstop>pageNrButton</tabstop>
   <tabstop>Copies</tabstop>
   <tabstop>printOptions</tabstop>
-  <tabstop>PrintSep</tabstop>
+  <tabstop>printSepCombo</tabstop>
   <tabstop>colorType</tabstop>
-  <tabstop>SepArt</tabstop>
+  <tabstop>separationsCombo</tabstop>
   <tabstop>printEngines</tabstop>
   <tabstop>usePDFMarks</tabstop>
-  <tabstop>MirrorHor</tabstop>
-  <tabstop>MirrorVert</tabstop>
-  <tabstop>devPar</tabstop>
-  <tabstop>ClipMarg</tabstop>
-  <tabstop>GcR</tabstop>
-  <tabstop>spotColors</tabstop>
+  <tabstop>mirrorHor</tabstop>
+  <tabstop>mirrorVert</tabstop>
+  <tabstop>setMediaSize</tabstop>
+  <tabstop>clipMargins</tabstop>
+  <tabstop>applyGCR</tabstop>
+  <tabstop>convertSpots</tabstop>
   <tabstop>cropMarks</tabstop>
   <tabstop>bleedMarks</tabstop>
   <tabstop>colorMarks</tabstop>
@@ -706,18 +706,18 @@
   <tabstop>markLength</tabstop>
   <tabstop>markOffset</tabstop>
   <tabstop>docBleeds</tabstop>
-  <tabstop>BleedTop</tabstop>
-  <tabstop>BleedRight</tabstop>
-  <tabstop>BleedBottom</tabstop>
-  <tabstop>BleedLeft</tabstop>
+  <tabstop>bleedTop</tabstop>
+  <tabstop>bleedRight</tabstop>
+  <tabstop>bleedBottom</tabstop>
+  <tabstop>bleedLeft</tabstop>
   <tabstop>previewButton</tabstop>
-  <tabstop>OKButton</tabstop>
-  <tabstop>CancelButton</tabstop>
+  <tabstop>okButton</tabstop>
+  <tabstop>cancelButton</tabstop>
  </tabstops>
  <resources/>
  <connections>
   <connection>
-   <sender>OtherCom</sender>
+   <sender>altComCheckBox</sender>
    <signal>clicked(bool)</signal>
    <receiver>OthText</receiver>
    <slot>setEnabled(bool)</slot>
@@ -733,9 +733,9 @@
    </hints>
   </connection>
   <connection>
-   <sender>OtherCom</sender>
+   <sender>altComCheckBox</sender>
    <signal>clicked(bool)</signal>
-   <receiver>Command</receiver>
+   <receiver>altCommand</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
@@ -749,7 +749,7 @@
    </hints>
   </connection>
   <connection>
-   <sender>RadioButton2</sender>
+   <sender>printRangeRadio</sender>
    <signal>toggled(bool)</signal>
    <receiver>pageNr</receiver>
    <slot>setEnabled(bool)</slot>
@@ -765,7 +765,7 @@
    </hints>
   </connection>
   <connection>
-   <sender>RadioButton2</sender>
+   <sender>printRangeRadio</sender>
    <signal>toggled(bool)</signal>
    <receiver>pageNrButton</receiver>
    <slot>setEnabled(bool)</slot>




More information about the scribus-commit mailing list