/trunk/Scribus/scribus/CMakeLists.txt |
---|
416,6 → 416,8 |
ui/pageselector.h |
ui/patternpropsdialog.h |
ui/pdfexportdialog.h |
ui/pdfversioncombo.h |
ui/pdfversionmodel.h |
ui/picsearch.h |
ui/picsearchoptions.h |
ui/picstatus.h |
910,6 → 912,8 |
ui/pageselector.cpp |
ui/patternpropsdialog.cpp |
ui/pdfexportdialog.cpp |
ui/pdfversioncombo.cpp |
ui/pdfversionmodel.cpp |
ui/picsearch.cpp |
ui/picsearchoptions.cpp |
ui/picstatus.cpp |
/trunk/Scribus/scribus/ui/pdfversioncombo.cpp |
---|
0,0 → 1,128 |
/* |
For general Scribus (>=1.3.2) copyright and licensing information please refer |
to the COPYING file provided with the program. Following this notice may exist |
a copyright and/or license notice that predates the release of Scribus 1.3.2 |
for which a new license (GPL+exception) is in place. |
*/ |
#include "pdfversioncombo.h" |
#include "pdfversionmodel.h" |
PdfVersionCombo::PdfVersionCombo(QWidget* parent) : QComboBox(parent) |
{ |
m_isPdfXEnabled = false; |
m_pdfVersionModel = new PdfVersionModel(this); |
setEditable(false); |
setModel(m_pdfVersionModel); |
} |
PdfVersionCombo::~PdfVersionCombo() |
{ |
if (m_pdfVersionModel) |
{ |
delete m_pdfVersionModel; |
m_pdfVersionModel = 0; |
} |
} |
PDFOptions::PDFVersion PdfVersionCombo::version() const |
{ |
int curIndex = currentIndex(); |
if (curIndex == PdfVersionModel::ItemPDF_13) |
return PDFOptions::PDFVersion_13; |
if (curIndex == PdfVersionModel::ItemPDF_14) |
return PDFOptions::PDFVersion_14; |
if (curIndex == PdfVersionModel::ItemPDF_15) |
return PDFOptions::PDFVersion_15; |
if (curIndex == PdfVersionModel::ItemPDFX_1a) |
return PDFOptions::PDFVersion_X1a; |
if (curIndex == PdfVersionModel::ItemPDFX_3) |
return PDFOptions::PDFVersion_X3; |
if (curIndex == PdfVersionModel::ItemPDFX_4) |
return PDFOptions::PDFVersion_X4; |
return PDFOptions::PDFVersion_14; |
} |
bool PdfVersionCombo::versionIs(PDFOptions::PDFVersion version) const |
{ |
int curIndex = currentIndex(); |
if (version == PDFOptions::PDFVersion_13) |
return (curIndex == PdfVersionModel::ItemPDF_13); |
if (version == PDFOptions::PDFVersion_14) |
return (curIndex == PdfVersionModel::ItemPDF_14); |
if (version == PDFOptions::PDFVersion_15) |
return (curIndex == PdfVersionModel::ItemPDF_15); |
if (version == PDFOptions::PDFVersion_X1a) |
return (curIndex == PdfVersionModel::ItemPDFX_1a); |
if (version == PDFOptions::PDFVersion_X3) |
return (curIndex == PdfVersionModel::ItemPDFX_3); |
if (version == PDFOptions::PDFVersion_X4) |
return (curIndex == PdfVersionModel::ItemPDFX_4); |
return false; |
} |
bool PdfVersionCombo::versionIsPDFX() const |
{ |
int curIndex = currentIndex(); |
if (curIndex == PdfVersionModel::ItemPDFX_1a) |
return true; |
if (curIndex == PdfVersionModel::ItemPDFX_3) |
return true; |
if (curIndex == PdfVersionModel::ItemPDFX_4) |
return true; |
return false; |
} |
void PdfVersionCombo::setVersion(PDFOptions::PDFVersion version) |
{ |
if ((version == PDFOptions::PDFVersion_X1a) && !m_isPdfXEnabled) |
{ |
setCurrentIndex(PdfVersionModel::ItemPDF_13); |
return; |
} |
if ((version == PDFOptions::PDFVersion_X3) && !m_isPdfXEnabled) |
{ |
setCurrentIndex(PdfVersionModel::ItemPDF_13); |
return; |
} |
if ((version == PDFOptions::PDFVersion_X4) && !m_isPdfXEnabled) |
{ |
setCurrentIndex(PdfVersionModel::ItemPDF_15); |
return; |
} |
if (version == PDFOptions::PDFVersion_13) |
setCurrentIndex(PdfVersionModel::ItemPDF_13); |
else if (version == PDFOptions::PDFVersion_14) |
setCurrentIndex(PdfVersionModel::ItemPDF_14); |
else if (version == PDFOptions::PDFVersion_15) |
setCurrentIndex(PdfVersionModel::ItemPDF_15); |
else if (version == PDFOptions::PDFVersion_X1a) |
setCurrentIndex(PdfVersionModel::ItemPDFX_1a); |
else if (version == PDFOptions::PDFVersion_X3) |
setCurrentIndex(PdfVersionModel::ItemPDFX_3); |
else if (version == PDFOptions::PDFVersion_X4) |
setCurrentIndex(PdfVersionModel::ItemPDFX_4);; |
} |
void PdfVersionCombo::setPDFXEnabled(bool enabled) |
{ |
if (m_isPdfXEnabled == enabled) |
return; |
m_isPdfXEnabled = enabled; |
PDFOptions::PDFVersion oldVersion = version(); |
if (!enabled) |
{ |
if ((oldVersion == PDFOptions::PDFVersion_X1a) && !enabled) |
setCurrentIndex((int) PdfVersionModel::ItemPDF_13); |
if ((oldVersion == PDFOptions::PDFVersion_X3) && !enabled) |
setCurrentIndex((int) PdfVersionModel::ItemPDF_13); |
if ((oldVersion == PDFOptions::PDFVersion_X4) && !enabled) |
setCurrentIndex((int) PdfVersionModel::ItemPDF_15); |
} |
m_pdfVersionModel->setPdfXEnabled(enabled); |
} |
/trunk/Scribus/scribus/ui/pdfversioncombo.h |
---|
0,0 → 1,42 |
/* |
For general Scribus (>=1.3.2) copyright and licensing information please refer |
to the COPYING file provided with the program. Following this notice may exist |
a copyright and/or license notice that predates the release of Scribus 1.3.2 |
for which a new license (GPL+exception) is in place. |
*/ |
#ifndef PDFVERSIONCOMBO_H |
#define PDFVERSIONCOMBO_H |
#include <QComboBox> |
#include "scribusapi.h" |
#include "pdfoptions.h" |
class PdfVersionModel; |
/*! |
\class PdfVersionCombo pdfversioncombo.h |
\brief The PdfVersionCombo widget is a combo box for displaying PDF versions |
*/ |
class SCRIBUS_API PdfVersionCombo : public QComboBox |
{ |
Q_OBJECT |
public: |
PdfVersionCombo(QWidget* parent=0); |
~PdfVersionCombo(); |
PDFOptions::PDFVersion version() const; |
bool versionIs(PDFOptions::PDFVersion version) const; |
bool versionIsPDFX() const; |
void setVersion(PDFOptions::PDFVersion version); |
void setPDFXEnabled(bool enabled); |
private: |
bool m_isPdfXEnabled; |
PdfVersionModel* m_pdfVersionModel; |
}; |
#endif |
/trunk/Scribus/scribus/ui/pdfversionmodel.cpp |
---|
0,0 → 1,123 |
/* |
For general Scribus (>=1.3.2) copyright and licensing information please refer |
to the COPYING file provided with the program. Following this notice may exist |
a copyright and/or license notice that predates the release of Scribus 1.3.2 |
for which a new license (GPL+exception) is in place. |
*/ |
#include "pdfversionmodel.h" |
#include "commonstrings.h" |
#include "pdfoptions.h" |
PdfVersionModel::PdfVersionModel(QObject *parent) |
: QAbstractItemModel(parent) |
{ |
m_enabledVec << true << true << true << false << false << false; |
} |
void PdfVersionModel::clear() |
{ |
qDebug() << "PdfVersionModel: this model cannot be cleared"; |
} |
int PdfVersionModel::columnCount(const QModelIndex &/*parent*/) const |
{ |
return 1; |
} |
QVariant PdfVersionModel::data(const QModelIndex &index, int role) const |
{ |
if (!index.isValid()) |
return QVariant(); |
bool* pEnabled = static_cast<bool*>(index.internalPointer()); |
if (!pEnabled) |
return QVariant(); |
if (role == Qt::DisplayRole) |
{ |
int row = index.row(); |
if (row == ItemPDF_13) |
return tr("PDF 1.3 (Acrobat 4)"); |
if (row == ItemPDF_14) |
return tr("PDF 1.4 (Acrobat 5)"); |
if (row == ItemPDF_15) |
return tr("PDF 1.5 (Acrobat 6)"); |
if (row == ItemPDFX_1a) |
return tr("PDF/X-1a"); |
if (row == ItemPDFX_3) |
return tr("PDF/X-3"); |
if (row == ItemPDFX_4) |
return tr("PDF/X-4"); |
return QVariant(); |
} |
return QVariant(); |
} |
Qt::ItemFlags PdfVersionModel::flags(const QModelIndex &index) const |
{ |
if (!index.isValid()) |
return 0; |
Qt::ItemFlags flags = 0; |
if (m_enabledVec[index.row()]) |
flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable; |
return flags; |
} |
QModelIndex PdfVersionModel::index(int row, int column, const QModelIndex &parent) const |
{ |
if (!hasIndex(row, column, parent)) |
return QModelIndex(); |
bool* pEnabled = static_cast<bool*>(parent.internalPointer()); |
if (pEnabled) |
return QModelIndex(); |
if (row < 0 || (row >= rowCount()) || (column != 0)) |
return QModelIndex(); |
const bool& modeEnabled = m_enabledVec.at(row); |
return createIndex(row, column, const_cast<bool*>(&modeEnabled)); |
} |
QModelIndex PdfVersionModel::parent(const QModelIndex &/*child*/) const |
{ |
return QModelIndex(); |
} |
bool PdfVersionModel::removeRow(int row, const QModelIndex& parent) |
{ |
qDebug() << "PdfVersionModel: this model cannot have rows removed"; |
return false; |
} |
bool PdfVersionModel::removeRows(int row, int count, const QModelIndex& parent) |
{ |
qDebug() << "PdfVersionModel: this model cannot have rows removed"; |
return false; |
} |
int PdfVersionModel::rowCount(const QModelIndex &parent) const |
{ |
if (m_enabledVec.count() == 0) |
return 0; |
bool* pEnabled = static_cast<bool*>(parent.internalPointer()); |
if (pEnabled) |
return 0; |
return m_enabledVec.count(); |
} |
void PdfVersionModel::setPdfXEnabled(bool enabled) |
{ |
//beginResetModel(); |
m_enabledVec[ItemPDFX_1a] = enabled; |
m_enabledVec[ItemPDFX_3] = enabled; |
m_enabledVec[ItemPDFX_4] = enabled; |
//endResetModel(); |
} |
/trunk/Scribus/scribus/ui/pdfversionmodel.h |
---|
0,0 → 1,70 |
/* |
For general Scribus (>=1.3.2) copyright and licensing information please refer |
to the COPYING file provided with the program. Following this notice may exist |
a copyright and/or license notice that predates the release of Scribus 1.3.2 |
for which a new license (GPL+exception) is in place. |
*/ |
#ifndef PDFVERSIONMODEL_H |
#define PDFVERSIONMODEL_H |
#include <QAbstractItemModel> |
#include <QVector> |
#include "scribusapi.h" |
class ScribusDoc; |
class SCRIBUS_API PdfVersionModel : public QAbstractItemModel |
{ |
Q_OBJECT |
public: |
//! Constructor |
PdfVersionModel(QObject *parent = 0); |
enum PdfVersionItem |
{ |
ItemPDF_13 = 0, |
ItemPDF_14 = 1, |
ItemPDF_15 = 2, |
ItemPDFX_1a = 3, |
ItemPDFX_3 = 4, |
ItemPDFX_4 = 5 |
}; |
//! Remove all colors from list; |
void clear(); |
//! Reimplement QAbstractItemModel columnCount() |
int columnCount(const QModelIndex &parent = QModelIndex()) const; |
//! Reimplement QAbstractItemModel data() |
QVariant data(const QModelIndex &index, int role) const; |
//! Reimplement QAbstractItemModel flags() |
Qt::ItemFlags flags(const QModelIndex &index) const; |
//! Reimplement QAbstractItemModel index() |
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; |
//! Reimplement QAbstractItemModel parent() |
QModelIndex parent(const QModelIndex &child) const; |
//! Reimplement QAbstractItemModel removeRow() |
bool removeRow(int row, const QModelIndex& parent = QModelIndex()); |
//! Reimplement QAbstractItemModel removeRowz() |
bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()); |
//! Reimplement QAbstractItemModel rowCount() |
int rowCount(const QModelIndex &parent = QModelIndex()) const; |
//! Allow or disallow no font embedding mode |
void setPdfXEnabled(bool enabled); |
protected: |
//! The color list |
QVector<bool> m_enabledVec; |
}; |
#endif // PDFVERSIONMODEL_H |
/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp |
---|
270,23 → 270,9 |
pageMirrorVerticalToolButton->setChecked(prefsData->pdfPrefs.MirrorV); |
clipToPrinterMarginsCheckBox->setChecked(prefsData->pdfPrefs.doClip); |
bool cmsUse = m_doc ? (ScCore->haveCMS() && m_doc->HasCMS) : false; |
int newCMSIndex=0; |
if (cmsUse) |
{ |
if (prefsData->pdfPrefs.Version == PDFOptions::PDFVersion_X1a) |
newCMSIndex=3; |
if (prefsData->pdfPrefs.Version == PDFOptions::PDFVersion_X3) |
newCMSIndex=4; |
if (prefsData->pdfPrefs.Version == PDFOptions::PDFVersion_X4) |
newCMSIndex=5; |
} |
if (prefsData->pdfPrefs.Version == PDFOptions::PDFVersion_13) |
newCMSIndex=0; |
if (prefsData->pdfPrefs.Version == PDFOptions::PDFVersion_14) |
newCMSIndex=1; |
if (prefsData->pdfPrefs.Version == PDFOptions::PDFVersion_15) |
newCMSIndex=2; |
pdfVersionComboBox->setCurrentIndex(newCMSIndex); |
if (!cmsUse) |
pdfVersionComboBox->setVersion(PDFOptions::PDFVersion_14); |
pdfVersionComboBox->setVersion(prefsData->pdfPrefs.Version); |
pageBindingComboBox->setCurrentIndex(prefsData->pdfPrefs.Binding); |
generateThumbnailsCheckBox->setChecked(prefsData->pdfPrefs.Thumbnails); |
saveLinkedTextFramesAsArticlesCheckBox->setChecked(prefsData->pdfPrefs.Articles); |
724,18 → 710,7 |
prefsData->pdfPrefs.PassOwner = passwordOwnerLineEdit->text(); |
prefsData->pdfPrefs.PassUser = passwordUserLineEdit->text(); |
} |
if (pdfVersionComboBox->currentIndex() == 0) |
prefsData->pdfPrefs.Version = PDFOptions::PDFVersion_13; |
if (pdfVersionComboBox->currentIndex() == 1) |
prefsData->pdfPrefs.Version = PDFOptions::PDFVersion_14; |
if (pdfVersionComboBox->currentIndex() == 2) |
prefsData->pdfPrefs.Version = PDFOptions::PDFVersion_15; |
if (pdfVersionComboBox->currentIndex() == 3) |
prefsData->pdfPrefs.Version = PDFOptions::PDFVersion_X1a; |
if (pdfVersionComboBox->currentIndex() == 4) |
prefsData->pdfPrefs.Version = PDFOptions::PDFVersion_X3; |
if (pdfVersionComboBox->currentIndex() == 5) |
prefsData->pdfPrefs.Version = PDFOptions::PDFVersion_X4; |
prefsData->pdfPrefs.Version = pdfVersionComboBox->version(); |
if (outputIntentionComboBox->currentIndex() == 0) |
{ |
prefsData->pdfPrefs.isGrayscale = false; |
852,7 → 827,7 |
{ |
enableLPI(i); |
bool setter = false; |
if (i == 1 && pdfVersionComboBox->currentIndex() != 3) |
if (i == 1 && (!pdfVersionComboBox->versionIs(PDFOptions::PDFVersion_X1a))) |
setter = true; |
enableSolidsImagesWidgets(setter); |
} |
1123,20 → 1098,11 |
void Prefs_PDFExport::addPDFVersions(bool addPDFXStrings) |
{ |
disconnect(pdfVersionComboBox, SIGNAL(activated(int)), this, SLOT(enablePDFX(int))); |
int i = pdfVersionComboBox->currentIndex(); |
pdfVersionComboBox->clear(); |
pdfVersionComboBox->addItem("PDF 1.3 (Acrobat 4)"); |
pdfVersionComboBox->addItem("PDF 1.4 (Acrobat 5)"); |
pdfVersionComboBox->addItem("PDF 1.5 (Acrobat 6)"); |
if (addPDFXStrings) |
{ |
pdfVersionComboBox->addItem("PDF/X-1a"); |
pdfVersionComboBox->addItem("PDF/X-3"); |
pdfVersionComboBox->addItem("PDF/X-4"); |
} |
else |
i=qMin(i,2); |
pdfVersionComboBox->setCurrentIndex(i); |
PDFOptions::PDFVersion currVersion = pdfVersionComboBox->version(); |
pdfVersionComboBox->setPDFXEnabled(addPDFXStrings); |
if (!addPDFXStrings) |
currVersion = qMax(PDFOptions::PDFVersion_13, qMin(currVersion, PDFOptions::PDFVersion_15)); |
pdfVersionComboBox->setVersion(currVersion); |
connect(pdfVersionComboBox, SIGNAL(activated(int)), this, SLOT(enablePDFX(int))); |
} |
1307,20 → 1273,20 |
void Prefs_PDFExport::SelSFont(QListWidgetItem *c) |
{ |
if (c != NULL) |
if (!c) |
return; |
if (pdfVersionComboBox->versionIsPDFX()) |
{ |
if (pdfVersionComboBox->currentIndex() == 4) |
{ |
if ((AllFonts[c->text()].type() == ScFace::OTF) || (AllFonts[c->text()].subset())) |
fromSubsetButton->setEnabled(false); |
else |
fromSubsetButton->setEnabled(true); |
} |
if ((AllFonts[c->text()].type() == ScFace::OTF) || (AllFonts[c->text()].subset())) |
fromSubsetButton->setEnabled(false); |
else |
fromSubsetButton->setEnabled(true); |
toSubsetButton->setEnabled(false); |
embeddedFontsListWidget->clearSelection(); |
} |
else |
fromSubsetButton->setEnabled(true); |
toSubsetButton->setEnabled(false); |
embeddedFontsListWidget->clearSelection(); |
} |
void Prefs_PDFExport::PagePr() |
/trunk/Scribus/scribus/ui/prefs_pdfexportbase.ui |
---|
275,7 → 275,7 |
</widget> |
</item> |
<item row="0" column="1"> |
<widget class="QComboBox" name="pdfVersionComboBox"/> |
<widget class="PdfVersionCombo" name="pdfVersionComboBox"/> |
</item> |
<item row="1" column="0"> |
<widget class="QLabel" name="label_10"> |
681,7 → 681,7 |
<rect> |
<x>0</x> |
<y>0</y> |
<width>577</width> |
<width>266</width> |
<height>606</height> |
</rect> |
</property> |
1008,7 → 1008,7 |
<rect> |
<x>0</x> |
<y>0</y> |
<width>577</width> |
<width>313</width> |
<height>436</height> |
</rect> |
</property> |
1799,6 → 1799,11 |
<header location="global">ui/newmarginwidget.h</header> |
<container>1</container> |
</customwidget> |
<customwidget> |
<class>PdfVersionCombo</class> |
<extends>QComboBox</extends> |
<header>ui/pdfversioncombo.h</header> |
</customwidget> |
</customwidgets> |
<tabstops> |
<tabstop>tabWidget</tabstop> |
/trunk/Scribus/scribus/ui/tabpdfoptions.cpp |
---|
27,6 → 27,7 |
#include <QListWidgetItem> |
#include <QPixmap> |
#include <QPushButton> |
#include <QSignalBlocker> |
#include <QSpacerItem> |
#include <QSpinBox> |
#include <QStandardItem> |
71,16 → 72,8 |
MirrorV->setCheckable( true ); |
fileOptionsLayout->setAlignment( Qt::AlignTop ); |
PDFVersionCombo->addItem("PDF 1.3 (Acrobat 4)"); |
PDFVersionCombo->addItem("PDF 1.4 (Acrobat 5)"); |
PDFVersionCombo->addItem("PDF 1.5 (Acrobat 6)"); |
cms = (ScCore->haveCMS() && m_Doc->HasCMS); |
if (cms && (!PDFXProfiles.isEmpty())) |
{ |
PDFVersionCombo->addItem("PDF/X-1a"); |
PDFVersionCombo->addItem("PDF/X-3"); |
PDFVersionCombo->addItem("PDF/X-4"); |
} |
PDFVersionCombo->setPDFXEnabled(cms && (!PDFXProfiles.isEmpty())); |
Resolution->setMaximum( 4000 ); |
Resolution->setMinimum( 35 ); |
Resolution->setSuffix( tr( " dpi" ) ); |
354,23 → 347,9 |
MirrorV->setChecked(Opts.MirrorV); |
ClipMarg->setChecked(Opts.doClip); |
bool cmsUse = (ScCore->haveCMS() && m_Doc->HasCMS); |
if (cmsUse) |
{ |
if (Opts.Version == PDFOptions::PDFVersion_X1a) |
PDFVersionCombo->setCurrentIndex(3); |
if (Opts.Version == PDFOptions::PDFVersion_X3) |
PDFVersionCombo->setCurrentIndex(4); |
if (Opts.Version == PDFOptions::PDFVersion_X4) |
PDFVersionCombo->setCurrentIndex(5); |
} |
else |
PDFVersionCombo->setCurrentIndex(0); |
if (Opts.Version == PDFOptions::PDFVersion_13) |
PDFVersionCombo->setCurrentIndex(0); |
if (Opts.Version == PDFOptions::PDFVersion_14) |
PDFVersionCombo->setCurrentIndex(1); |
if (Opts.Version == PDFOptions::PDFVersion_15) |
PDFVersionCombo->setCurrentIndex(2); |
if (!cmsUse) |
PDFVersionCombo->setVersion(PDFOptions::PDFVersion_14); |
PDFVersionCombo->setVersion(Opts.Version); |
ComboBind->setCurrentIndex(Opts.Binding); |
CheckBox1->setChecked(Opts.Thumbnails); |
Article->setChecked(Opts.Articles); |
783,18 → 762,7 |
pdfOptions.PassOwner = PassOwner->text(); |
pdfOptions.PassUser = PassUser->text(); |
} |
if (PDFVersionCombo->currentIndex() == 0) |
pdfOptions.Version = PDFOptions::PDFVersion_13; |
if (PDFVersionCombo->currentIndex() == 1) |
pdfOptions.Version = PDFOptions::PDFVersion_14; |
if (PDFVersionCombo->currentIndex() == 2) |
pdfOptions.Version = PDFOptions::PDFVersion_15; |
if (PDFVersionCombo->currentIndex() == 3) |
pdfOptions.Version = PDFOptions::PDFVersion_X1a; |
if (PDFVersionCombo->currentIndex() == 4) |
pdfOptions.Version = PDFOptions::PDFVersion_X3; |
if (PDFVersionCombo->currentIndex() == 5) |
pdfOptions.Version = PDFOptions::PDFVersion_X4; |
pdfOptions.Version = PDFVersionCombo->version(); |
if (OutCombo->currentIndex() == 0) |
{ |
pdfOptions.isGrayscale = false; |
862,7 → 830,7 |
void TabPDFOptions::checkInfo() |
{ |
if ((PDFVersionCombo->currentIndex() >= 3) && (InfoString->text().isEmpty())) |
if ((PDFVersionCombo->versionIsPDFX()) && (InfoString->text().isEmpty())) |
emit noInfo(); |
else |
emit hasInfo(); |
877,24 → 845,14 |
void TabPDFOptions::enableCMS(bool enable) |
{ |
disconnect(PDFVersionCombo, SIGNAL(activated(int)), this, SLOT(EnablePDFX(int))); |
int a = PDFVersionCombo->currentIndex(); |
PDFVersionCombo->clear(); |
PDFVersionCombo->addItem("PDF 1.3 (Acrobat 4)"); |
PDFVersionCombo->addItem("PDF 1.4 (Acrobat 5)"); |
PDFVersionCombo->addItem("PDF 1.5 (Acrobat 6)"); |
cms=enable; |
if (enable) |
{ |
PDFVersionCombo->addItem("PDF/X-1a"); |
PDFVersionCombo->addItem("PDF/X-3"); |
PDFVersionCombo->addItem("PDF/X-4"); |
} |
else |
a = qMin(a, 2); |
PDFVersionCombo->setCurrentIndex(a); |
QSignalBlocker blocker(PDFVersionCombo); |
PDFOptions::PDFVersion currVersion = PDFVersionCombo->version(); |
PDFVersionCombo->setPDFXEnabled(enable); |
cms = enable; |
if (!enable) |
currVersion = qMax(PDFOptions::PDFVersion_13, qMin(currVersion, PDFOptions::PDFVersion_15)); |
PDFVersionCombo->setVersion(currVersion); |
EnablePr(1); |
connect(PDFVersionCombo, SIGNAL(activated(int)), this, SLOT(EnablePDFX(int))); |
} |
void TabPDFOptions::EnablePDFX(int a) |
1046,12 → 1004,7 |
EnableLPI(a); |
bool setter = false; |
if (a == 1) |
{ |
if (PDFVersionCombo->currentIndex() == 3) |
setter = false; |
else |
setter = true; |
} |
setter = !PDFVersionCombo->versionIs(PDFOptions::PDFVersion_X1a); |
solidsProfileGroup->setEnabled(setter); |
imageProfileGroup->setEnabled(setter); |
/trunk/Scribus/scribus/ui/tabpdfoptions.ui |
---|
212,7 → 212,7 |
</widget> |
</item> |
<item row="0" column="1" colspan="2"> |
<widget class="QComboBox" name="PDFVersionCombo"> |
<widget class="PdfVersionCombo" name="PDFVersionCombo"> |
<property name="editable"> |
<bool>false</bool> |
</property> |
1915,6 → 1915,11 |
<extends>QComboBox</extends> |
<header>ui/fontembeddingcombo.h</header> |
</customwidget> |
<customwidget> |
<class>PdfVersionCombo</class> |
<extends>QComboBox</extends> |
<header>ui/pdfversioncombo.h</header> |
</customwidget> |
</customwidgets> |
<tabstops> |
<tabstop>AllPages</tabstop> |
/trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj |
---|
601,6 → 601,8 |
<moc Include="..\..\..\scribus\ui\pagepropertiesdialog.h" /> |
<moc Include="..\..\..\scribus\ui\fontembeddingcombo.h" /> |
<moc Include="..\..\..\scribus\ui\fontembeddingmodel.h" /> |
<moc Include="..\..\..\scribus\ui\pdfversioncombo.h" /> |
<moc Include="..\..\..\scribus\ui\pdfversionmodel.h" /> |
<ClInclude Include="..\..\..\scribus\ui\propertywidgetbase.h" /> |
<moc Include="..\..\..\scribus\pslib.h" /> |
<moc Include="..\..\..\scribus\ui\query.h" /> |
1198,6 → 1200,8 |
<ClCompile Include="..\..\..\scribus\pdfoptionsio.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\pdfexportdialog.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\pdftoolbar.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\pdfversioncombo.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\pdfversionmodel.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\picsearch.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\picsearchoptions.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\picstatus.cpp" /> |
/trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj.filters |
---|
791,6 → 791,12 |
<ClInclude Include="..\..\..\scribus\colormgmt\sce308tables.h"> |
<Filter>colorMgmt</Filter> |
</ClInclude> |
<ClInclude Include="..\..\..\scribus\ui\pdfversioncombo.h"> |
<Filter>Header Files</Filter> |
</ClInclude> |
<ClInclude Include="..\..\..\scribus\ui\pdfversionmodel.h"> |
<Filter>Header Files</Filter> |
</ClInclude> |
</ItemGroup> |
<ItemGroup> |
<ClCompile Include="..\..\..\scribus\desaxe\digester.cpp"> |
2461,6 → 2467,12 |
<ClCompile Include="..\..\..\scribus\colormgmt\sce308tables.cpp"> |
<Filter>colorMgmt</Filter> |
</ClCompile> |
<ClCompile Include="..\..\..\scribus\ui\pdfversioncombo.cpp"> |
<Filter>Source Files</Filter> |
</ClCompile> |
<ClCompile Include="..\..\..\scribus\ui\pdfversionmodel.cpp"> |
<Filter>Source Files</Filter> |
</ClCompile> |
</ItemGroup> |
<ItemGroup> |
<ResourceCompile Include="Scribus.rc"> |
/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj |
---|
601,6 → 601,8 |
<moc Include="..\..\..\scribus\ui\pagepropertiesdialog.h" /> |
<moc Include="..\..\..\scribus\ui\fontembeddingcombo.h" /> |
<moc Include="..\..\..\scribus\ui\fontembeddingmodel.h" /> |
<moc Include="..\..\..\scribus\ui\pdfversioncombo.h" /> |
<moc Include="..\..\..\scribus\ui\pdfversionmodel.h" /> |
<ClInclude Include="..\..\..\scribus\ui\propertywidgetbase.h" /> |
<moc Include="..\..\..\scribus\pslib.h" /> |
<moc Include="..\..\..\scribus\ui\query.h" /> |
1198,6 → 1200,8 |
<ClCompile Include="..\..\..\scribus\pdfoptionsio.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\pdfexportdialog.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\pdftoolbar.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\pdfversioncombo.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\pdfversionmodel.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\picsearch.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\picsearchoptions.cpp" /> |
<ClCompile Include="..\..\..\scribus\ui\picstatus.cpp" /> |
/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters |
---|
791,6 → 791,12 |
<ClInclude Include="..\..\..\scribus\colormgmt\sce308tables.h"> |
<Filter>colorMgmt</Filter> |
</ClInclude> |
<ClInclude Include="..\..\..\scribus\ui\pdfversioncombo.h"> |
<Filter>Header Files</Filter> |
</ClInclude> |
<ClInclude Include="..\..\..\scribus\ui\pdfversionmodel.h"> |
<Filter>Header Files</Filter> |
</ClInclude> |
</ItemGroup> |
<ItemGroup> |
<ClCompile Include="..\..\..\scribus\desaxe\digester.cpp"> |
2461,6 → 2467,12 |
<ClCompile Include="..\..\..\scribus\colormgmt\sce308tables.cpp"> |
<Filter>colorMgmt</Filter> |
</ClCompile> |
<ClCompile Include="..\..\..\scribus\ui\pdfversioncombo.cpp"> |
<Filter>Source Files</Filter> |
</ClCompile> |
<ClCompile Include="..\..\..\scribus\ui\pdfversionmodel.cpp"> |
<Filter>Source Files</Filter> |
</ClCompile> |
</ItemGroup> |
<ItemGroup> |
<ResourceCompile Include="Scribus.rc"> |