r19351 by craig - Some button renaming in PDF export, change Change button to a push button

scribus-commit scribus-commit at lists.scribus.net
Wed Jul 16 22:41:27 UTC 2014


Author: craig
Date: Wed Jul 16 22:41:27 2014
New Revision: 19351

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19351
Log:
Some button renaming in PDF export, change Change button to a push button

Modified:
    trunk/Scribus/scribus/ui/pdfopts.cpp
    trunk/Scribus/scribus/ui/pdfopts.h

Modified: trunk/Scribus/scribus/ui/pdfopts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19351&path=/trunk/Scribus/scribus/ui/pdfopts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pdfopts.cpp (original)
+++ trunk/Scribus/scribus/ui/pdfopts.cpp Wed Jul 16 22:41:27 2014
@@ -97,10 +97,10 @@
 		}
 	}
 	NameLayout->addWidget( fileNameLineEdit, 0, 0 );
-	FileC = new QToolButton( Name );
-	FileC->setText( tr( "Cha&nge..." ) );
-	FileC->setMinimumSize( QSize( 88, 24 ) );
-	NameLayout->addWidget( FileC, 0, 1 );
+	changeButton = new QPushButton( Name );
+	changeButton->setText( tr( "Cha&nge..." ) );
+	changeButton->setMinimumSize( QSize( 88, 24 ) );
+	NameLayout->addWidget( changeButton, 0, 1 );
 	multiFile = new QCheckBox( tr( "Output one file for eac&h page" ), Name );
 	multiFile->setChecked(m_opts.doMultiFile);
 	NameLayout->addWidget( multiFile, 1, 0 );
@@ -118,25 +118,25 @@
 	Layout7->setMargin( 0 );
 	QSpacerItem* spacer_2 = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );
 	Layout7->addItem( spacer_2 );
-	OK = new QPushButton( tr( "&Save" ), this );
-	OK->setAutoDefault( true );
-	OK->setDefault( true );
-	Layout7->addWidget( OK );
-	Cancel = new QPushButton( CommonStrings::tr_Cancel, this );
-	Layout7->addWidget( Cancel );
+	okButton = new QPushButton( tr( "&Save" ), this );
+	okButton->setAutoDefault( true );
+	okButton->setDefault( true );
+	Layout7->addWidget( okButton );
+	cancelButton = new QPushButton( CommonStrings::tr_Cancel, this );
+	Layout7->addWidget( cancelButton );
 	PDFExportLayout->addLayout( Layout7 );
 	if ((m_opts.Version == PDFOptions::PDFVersion_X3) && (Options->InfoString->text().isEmpty()))
-		OK->setEnabled(false);
+		okButton->setEnabled(false);
 	resize(sizeHint());
 //	setMaximumSize( sizeHint() );
 //tooltips
 	multiFile->setToolTip( "<qt>" + tr( "This enables exporting one individually named PDF file for each page in the document. Page numbers are added automatically. This is most useful for imposing PDF for commercial printing.") + "</qt>" );
 	openAfterExportCheckBox->setToolTip( "<qt>" + tr( "Open the exported PDF with the PDF viewer as set in External Tools preferences, when not exporting to a multi-file export destination.") + "</qt>" );
-	OK->setToolTip( "<qt>" + tr( "The save button will be disabled if you are trying to export PDF/X and the info string is missing from the PDF/X tab.") + "</qt>" );
+	okButton->setToolTip( "<qt>" + tr( "The save button will be disabled if you are trying to export PDF/X and the info string is missing from the PDF/X tab.") + "</qt>" );
 	// signals and slots connections
-	connect( FileC, SIGNAL( clicked() ), this, SLOT( ChangeFile() ) );
-	connect( OK, SIGNAL( clicked() ), this, SLOT( DoExport() ) );
-	connect( Cancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+	connect( changeButton, SIGNAL( clicked() ), this, SLOT( ChangeFile() ) );
+	connect( okButton, SIGNAL( clicked() ), this, SLOT( DoExport() ) );
+	connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
 	connect( fileNameLineEdit, SIGNAL( editingFinished() ), this, SLOT( fileNameChanged() ) );
 	connect( Options, SIGNAL(noInfo()), this, SLOT(disableSave()));
 	connect( Options, SIGNAL(hasInfo()), this, SLOT(enableSave()));
@@ -144,12 +144,12 @@
 
 void PDFExportDialog::enableSave()
 {
-	OK->setEnabled(true);
+	okButton->setEnabled(true);
 }
 
 void PDFExportDialog::disableSave()
 {
-	OK->setEnabled(false);
+	okButton->setEnabled(false);
 }
 
 void PDFExportDialog::DoExport()
@@ -210,13 +210,12 @@
 
 void PDFExportDialog::ChangeFile()
 {
-	QString fn;
 	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
 	QString wdir = dirs->get("pdf", ".");
 	QString d = QFileDialog::getSaveFileName(this, tr("Save As"), wdir, tr("PDF Files (*.pdf);;All Files (*)"), 0, QFileDialog::DontConfirmOverwrite);
 	if (d.length()>0)
 	{
-		fn = QDir::fromNativeSeparators(d);
+		QString fn(QDir::fromNativeSeparators(d));
 		dirs->set("pdf", fn.left(fn.lastIndexOf("/")));
 		fileNameLineEdit->setText( d );
 	}	

Modified: trunk/Scribus/scribus/ui/pdfopts.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19351&path=/trunk/Scribus/scribus/ui/pdfopts.h
==============================================================================
--- trunk/Scribus/scribus/ui/pdfopts.h (original)
+++ trunk/Scribus/scribus/ui/pdfopts.h Wed Jul 16 22:41:27 2014
@@ -69,9 +69,9 @@
 	QGroupBox* Name;
 	QCheckBox* multiFile;
 	QCheckBox* openAfterExportCheckBox;
-	QToolButton* FileC;
-	QPushButton* OK;
-	QPushButton* Cancel;
+	QPushButton* changeButton;
+	QPushButton* okButton;
+	QPushButton* cancelButton;
 	QLineEdit* fileNameLineEdit;
 	TabPDFOptions* Options;
 




More information about the scribus-commit mailing list