Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2448 → Rev 2449

/branches/Version13x/Scribus/scribus/fileloader.cpp
848,6 → 848,7
tocsetup.name=tocElem.attribute("Name");
tocsetup.itemAttrName=tocElem.attribute("ItemAttributeName");
tocsetup.frameName=tocElem.attribute("FrameName");
tocsetup.listNonPrintingFrames=tocElem.attribute("ListNonPrinting");
tocsetup.textStyle=tocElem.attribute("Style");
QString numberPlacement=tocElem.attribute("NumberPlacement");
if (numberPlacement=="Beginning")
1473,7 → 1474,7
currItem->PLineArt = Qt::PenStyle(QStoInt(obj->attribute("PLINEART")));
currItem->PLineEnd = Qt::PenCapStyle(QStoInt(obj->attribute("PLINEEND","0")));
currItem->PLineJoin = Qt::PenJoinStyle(QStoInt(obj->attribute("PLINEJOIN","0")));
currItem->isPrintable = QStoInt(obj->attribute("PRINTABLE"));
currItem->setPrintable(QStoInt(obj->attribute("PRINTABLE")));
currItem->isAnnotation = QStoInt(obj->attribute("ANNOTATION","0"));
currItem->AnType = QStoInt(obj->attribute("ANTYPE","0"));
QString AnName = obj->attribute("ANNAME","");
/branches/Version13x/Scribus/scribus/mpalette.cpp
977,7 → 977,7
connect(NameEdit, SIGNAL(Leaved()), this, SLOT(NewName()));
connect(startArrow, SIGNAL(activated(int)), this, SLOT(setStartArrow(int )));
connect(endArrow, SIGNAL(activated(int)), this, SLOT(setEndArrow(int )));
NoPrint->setOn(!i->isPrintable);
NoPrint->setOn(!i->printable());
setter = i->locked();
Kette2->setOn(false);
Width->setReadOnly(setter);
3217,7 → 3217,7
{
for ( uint a = 0; a < ScApp->view->SelItem.count(); ++a)
{
ScApp->view->SelItem.at(a)->isPrintable = !NoPrint->isOn();
ScApp->view->SelItem.at(a)->setPrintable(!NoPrint->isOn());
}
emit DocChanged();
}
/branches/Version13x/Scribus/scribus/util.cpp
1200,7 → 1200,7
Buffer->flippedV = currItem->imageFlippedV();
Buffer->BBoxX = currItem->BBoxX;
Buffer->BBoxH = currItem->BBoxH;
Buffer->isPrintable = currItem->isPrintable;
Buffer->isPrintable = currItem->printable();
Buffer->isBookmark = currItem->isBookmark;
Buffer->BMnr = currItem->BMnr;
Buffer->isAnnotation = currItem->isAnnotation;
/branches/Version13x/Scribus/scribus/tocindexprefs.ui.h
97,7 → 97,10
itemNumberPlacementComboBox->setCurrentText(trStrPNBeginning);
else
itemNumberPlacementComboBox->setCurrentText(trStrPNEnd);
 
disconnect(itemListNonPrintingCheckBox, SIGNAL(toggled(bool)), this, SLOT(nonPrintingFramesSelected(bool)));
itemListNonPrintingCheckBox->setChecked(localToCSetupVector[num].listNonPrintingFrames);
connect(itemListNonPrintingCheckBox, SIGNAL(toggled(bool)), this, SLOT(nonPrintingFramesSelected(bool)));
if (currDoc!=NULL)
{
if (localToCSetupVector[num].frameName==strNone)
137,6 → 140,7
newToCEntry.frameName=strNone;
newToCEntry.textStyle=strNone;
newToCEntry.pageLocation=End;
newToCEntry.listNonPrintingFrames=false;
localToCSetupVector.append(newToCEntry);
updateToCListBox();
tocListBox->setCurrentItem(localToCSetupVector.count()-1);
286,3 → 290,17
(*it).name=newName;
}
}
 
 
void TOCIndexPrefs::nonPrintingFramesSelected( bool showNonPrinting )
{
int numberSelected=tocListBox->currentItem();
if (numberSelected>=0)
{
int i=0;
ToCSetupVector::Iterator it;
for(it = localToCSetupVector.begin(); it!= localToCSetupVector.end(), i<numberSelected ; ++it, ++i)
;
(*it).listNonPrintingFrames=showNonPrinting;
}
}
/branches/Version13x/Scribus/scribus/scribusXml.cpp
379,7 → 379,7
ob->setAttribute("ISIZE",item->ISize / 10.0 );
ob->setAttribute("SCALETYPE", item->ScaleType ? 1 : 0);
ob->setAttribute("RATIO", item->AspectRatio ? 1 : 0);
ob->setAttribute("PRINTABLE", item->isPrintable ? 1 : 0);
ob->setAttribute("PRINTABLE", item->printable() ? 1 : 0);
if(item->isAnnotation)
{
ob->setAttribute("ANNOTATION",1);
3412,6 → 3412,7
tocsetup.setAttribute("Name", (*tocSetupIt).name);
tocsetup.setAttribute("ItemAttributeName", (*tocSetupIt).itemAttrName);
tocsetup.setAttribute("FrameName", (*tocSetupIt).frameName);
tocsetup.setAttribute("ListNonPrinting", (*tocSetupIt).listNonPrintingFrames);
tocsetup.setAttribute("Style", (*tocSetupIt).textStyle);
switch ((*tocSetupIt).pageLocation)
{
3804,6 → 3805,7
tocsetup.setAttribute("Name", (*tocSetupIt).name);
tocsetup.setAttribute("ItemAttributeName", (*tocSetupIt).itemAttrName);
tocsetup.setAttribute("FrameName", (*tocSetupIt).frameName);
tocsetup.setAttribute("ListNonPrinting", (*tocSetupIt).listNonPrintingFrames);
tocsetup.setAttribute("Style", (*tocSetupIt).textStyle);
tocsetup.setAttribute("NumberPlacement", (*tocSetupIt).pageLocation);
tocElem.appendChild(tocsetup);
4213,6 → 4215,7
tocsetup.name=tocElem.attribute("Name");
tocsetup.itemAttrName=tocElem.attribute("ItemAttributeName");
tocsetup.frameName=tocElem.attribute("FrameName");
tocsetup.listNonPrintingFrames=tocElem.attribute("ListNonPrinting");
tocsetup.textStyle=tocElem.attribute("Style");
QString numberPlacement=tocElem.attribute("NumberPlacement");
if (numberPlacement=="Beginning")
/branches/Version13x/Scribus/scribus/pageitem.h
71,7 → 71,8
Q_PROPERTY(QString language READ language WRITE setLanguage DESIGNABLE false)
Q_PROPERTY(bool textFlowsAroundFrame READ textFlowsAroundFrame WRITE setTextFlowsAroundFrame DESIGNABLE false)
Q_PROPERTY(bool textFlowUsesBoundingBox READ textFlowUsesBoundingBox WRITE setTextFlowUsesBoundingBox DESIGNABLE false)
 
Q_PROPERTY(bool isPrintable READ printable WRITE setPrintable DESIGNABLE false)
// FIXME: QMetaProperty can't translate these to/from enumerator names, probably because the
// properties aren't moc'd in the Qt sources. They work fine in their
// current state as plain integer properties.
297,8 → 298,6
int CPos;
/** Text des Elements */
QPtrList<ScText> itemText;
/** Flag ob Element gedruckt wird */
bool isPrintable;
/** Flag fuer PDF-Bookmark */
bool isBookmark;
int BMnr;
771,6 → 770,16
* Usually of the form 'Copy of <name>' or 'Copy of <name> (n)'
*/
QString generateUniqueCopyName(const QString originalName) const;
/**
* @brief Is this item printed?
* @sa setPrintable()
*/
bool printable() const;
/**
* @brief Tells if the frame is set to be printed or not
* @sa printable()
*/
void setPrintable(bool toPrint);
 
protected:
/**
921,7 → 930,7
 
/**
* @brief Should text flow around the item's contour line?
* @sa PageItem::textFlowUsesContourLine(), PageItem::setTextFlowUsesContourLine
* @sa PageItem::textFlowUsesContourLine(), PageItem::setTextFlowUsesContourLine()
*/
bool textFlowUsesContourLineVal;
 
930,6 → 939,13
* @sa
*/
ObjAttrVector pageItemAttributes;
/**
* @brief Is this item set to be printed/exported
* @sa PageItem::printable(), PageItem::setPrintable()
*/
bool isPrintable;
 
};
 
#endif
/branches/Version13x/Scribus/scribus/picstatus.cpp
103,7 → 103,7
connect(tb2, SIGNAL(clicked()), this, SLOT(GotoPic()));
QCheckBox *cp2 = new QCheckBox(this, tmp.setNum(Zeilen2));
cp2->setText( tr("Yes"));
cp2->setChecked(doc->MasterItems.at(i)->isPrintable);
cp2->setChecked(doc->MasterItems.at(i)->printable());
cp2->setEraseColor(white);
FlagsPic.append(cp2);
PicTable->setCellWidget(Zeilen2, 4, cp2);
138,7 → 138,7
connect(tb2, SIGNAL(clicked()), this, SLOT(GotoPic()));
QCheckBox *cp2 = new QCheckBox(this, tmp.setNum(Zeilen2));
cp2->setText( tr("Yes"));
cp2->setChecked(doc->Items.at(i)->isPrintable);
cp2->setChecked(doc->Items.at(i)->printable());
cp2->setEraseColor(white);
FlagsPic.append(cp2);
PicTable->setCellWidget(Zeilen2, 4, cp2);
315,7 → 315,7
uint ItNr = ItemNrs[ZNr];
// uint PgNr = PicTable->text(ZNr, 2).toInt()-1;
if (PicTable->cellWidget(ZNr, 3)->isEnabled())
doc->Items.at(ItNr)->isPrintable = FlagsPic.at(ZNr)->isChecked();
doc->Items.at(ItNr)->setPrintable(FlagsPic.at(ZNr)->isChecked());
else
doc->MasterItems.at(ItNr)->isPrintable = FlagsPic.at(ZNr)->isChecked();
doc->MasterItems.at(ItNr)->setPrintable(FlagsPic.at(ZNr)->isChecked());
}
/branches/Version13x/Scribus/scribus/pageitem.cpp
4830,3 → 4830,13
assert(!nameExists(newname));
return newname;
}
 
bool PageItem::printable() const
{
return isPrintable;
}
void PageItem::setPrintable(bool toPrint)
{
isPrintable=toPrint;
}
/branches/Version13x/Scribus/scribus/scribusview.cpp
496,7 → 496,7
continue;
if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->PageNr)))
continue;
if ((previewMode) && (!currItem->isPrintable))
if ((previewMode) && (!currItem->printable()))
continue;
currItem->savedOwnPage = currItem->OwnPage;
double OldX = currItem->Xpos;
614,7 → 614,7
++docItem;
if (currItem->LayerNr != ll.LNr)
continue;
if ((previewMode) && (!currItem->isPrintable))
if ((previewMode) && (!currItem->printable()))
continue;
if ((Doc->MasterP) && ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Doc->currentPage->PageNr))))
continue;
1646,7 → 1646,7
 
PrintCT->setText( tr("Print: "));
InfoGroupLayout->addWidget( PrintCT, row, 0, Qt::AlignRight );
if (currItem->isPrintable == true)
if (currItem->printable())
PrintC->setText( tr("Enabled"));
else
PrintC->setText( tr("Disabled"));
11271,7 → 11271,7
currItem->PLineArt = PenStyle(Buffer->PLineArt);
currItem->PLineEnd = PenCapStyle(Buffer->PLineEnd);
currItem->PLineJoin = PenJoinStyle(Buffer->PLineJoin);
currItem->isPrintable = Buffer->isPrintable;
currItem->setPrintable(Buffer->isPrintable);
currItem->isBookmark = Buffer->isBookmark;
currItem->BMnr = Buffer->BMnr;
currItem->isAnnotation = Buffer->isAnnotation;
/branches/Version13x/Scribus/scribus/tocindexprefs.ui
88,7 → 88,7
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout4</cstring>
<cstring>layout8</cstring>
</property>
<vbox>
<property name="name">
96,62 → 96,85
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout9</cstring>
<cstring>layout7</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="3" column="0">
<widget class="QComboBox" row="1" column="1">
<property name="name">
<cstring>tocParagraphStyleLabel</cstring>
<cstring>itemDestFrameComboBox</cstring>
</property>
<property name="text">
<string>Paragraph Style:</string>
<property name="toolTip" stdset="0">
<string>The frame the table of contents will be placed into</string>
</property>
</widget>
<widget class="QComboBox" row="0" column="1">
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>itemAttrComboBox</cstring>
<cstring>tocNumberPlacementLabel</cstring>
</property>
<property name="text">
<string>Page Numbers Placed:</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>tocDestFrameLabel</cstring>
<cstring>tocItemAttrLabel</cstring>
</property>
<property name="text">
<string>Destination Frame:</string>
<string>Item Attribute Name:</string>
</property>
</widget>
<widget class="QComboBox" row="1" column="1">
<widget class="QComboBox" row="0" column="1">
<property name="name">
<cstring>itemDestFrameComboBox</cstring>
<cstring>itemAttrComboBox</cstring>
</property>
<property name="toolTip" stdset="0">
<string>The Item Attribute that will be set on frames used as a basis for creation of the entries</string>
</property>
</widget>
<widget class="QComboBox" row="2" column="1">
<property name="name">
<cstring>itemNumberPlacementComboBox</cstring>
</property>
<property name="toolTip" stdset="0">
<string>Place page numbers of the entries at the beginning or the end of the line, or not at all</string>
</property>
</widget>
<widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>itemListNonPrintingCheckBox</cstring>
</property>
<property name="text">
<string>List Non-Printing Entries</string>
</property>
<property name="toolTip" stdset="0">
<string>Include frames that are set to not print as well</string>
</property>
</widget>
<widget class="QComboBox" row="3" column="1">
<property name="name">
<cstring>itemParagraphStyleComboBox</cstring>
</property>
<property name="toolTip" stdset="0">
<string>The paragraph style used for the entry lines</string>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<widget class="QLabel" row="3" column="0">
<property name="name">
<cstring>tocNumberPlacementLabel</cstring>
<cstring>tocParagraphStyleLabel</cstring>
</property>
<property name="text">
<string>Page Numbers Placed:</string>
<string>Paragraph Style:</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>tocItemAttrLabel</cstring>
<cstring>tocDestFrameLabel</cstring>
</property>
<property name="text">
<string>Item Attribute Name:</string>
<string>Destination Frame:</string>
</property>
</widget>
</grid>
168,8 → 191,8
</property>
<property name="sizeHint">
<size>
<width>10</width>
<height>21</height>
<width>16</width>
<height>36</height>
</size>
</property>
</spacer>
237,6 → 260,12
<receiver>TOCIndexPrefs</receiver>
<slot>setToCName(const QString&amp;)</slot>
</connection>
<connection>
<sender>itemListNonPrintingCheckBox</sender>
<signal>toggled(bool)</signal>
<receiver>TOCIndexPrefs</receiver>
<slot>nonPrintingFramesSelected(bool)</slot>
</connection>
</connections>
<includes>
<include location="local" impldecl="in declaration">pagestructs.h</include>
275,6 → 304,7
<slot>itemPageNumberPlacedSelected( const QString &amp; pageLocation )</slot>
<slot>itemParagraphStyleSelected( const QString &amp; itemStyle )</slot>
<slot>setToCName( const QString &amp; newName )</slot>
<slot>nonPrintingFramesSelected( bool )</slot>
</slots>
<functions>
<function access="private" specifier="non virtual">init()</function>
/branches/Version13x/Scribus/scribus/libpostscript/pslib.cpp
989,7 → 989,7
{
QString tmps;
PageItem *it = Doc->MasterItems.at(api);
if ((it->LayerNr != ll.LNr) || (!it->isPrintable))
if ((it->LayerNr != ll.LNr) || (!it->printable()))
continue;
int x = static_cast<int>(Doc->MasterPages.at(ap)->Xoffset);
int y = static_cast<int>(Doc->MasterPages.at(ap)->Yoffset);
1003,7 → 1003,7
continue;
if ((it->OwnPage != static_cast<int>(Doc->MasterPages.at(ap)->PageNr)) && (it->OwnPage != -1))
continue;
if ((it->itemType() == PageItem::ImageFrame) && (it->PicAvail) && (it->Pfile != "") && (it->isPrintable) && (!sep) && (farb))
if ((it->itemType() == PageItem::ImageFrame) && (it->PicAvail) && (it->Pfile != "") && (it->printable()) && (!sep) && (farb))
PS_ImageData(it, it->Pfile, it->itemName(), it->IProfile, it->UseEmbedded, Ic);
PS_TemplateStart(Doc->MasterPages.at(ap)->PageNam + tmps.setNum(it->ItemNr), Doc->pageWidth, Doc->pageHeight);
ProcessItem(Doc, Doc->MasterPages.at(ap), it, ap+1, sep, farb, Ic, gcr, true);
1074,7 → 1074,7
{
QString tmps;
PageItem *ite = Doc->Pages.at(a)->FromMaster.at(am);
if ((ite->LayerNr != ll.LNr) || (!ite->isPrintable))
if ((ite->LayerNr != ll.LNr) || (!ite->printable()))
continue;
if ((ite->itemType() != PageItem::TextFrame) && (ite->itemType() != PageItem::ImageFrame))
PS_UseTemplate(Doc->Pages.at(a)->MPageNam + tmps.setNum(ite->ItemNr));
1217,7 → 1217,7
PageItem *ite = Doc->Pages.at(a)->FromMaster.at(am);
if (!ite->isTableItem)
continue;
if (ite->isPrintable)
if (ite->printable())
{
PS_save();
if (ite->lineColor() != "None")
1293,7 → 1293,7
QValueList<double> dum;
dum.clear();
QString tmps, chx;
if (c->isPrintable)
if (c->printable())
{
PS_save();
if (c->fillColor() != "None")
1812,7 → 1812,7
continue;
if ((a->PageNam != "") && (c->OwnPage != static_cast<int>(a->PageNr)) && (c->OwnPage != -1))
continue;
if (c->isPrintable)
if (c->printable())
{
PS_save();
if (c->lineColor() != "None")
/branches/Version13x/Scribus/scribus/pagestructs.h
25,6 → 25,7
QString itemAttrName; //Attribute to Scan for
QString frameName; //Destination frame
TOCPageLocation pageLocation; //Place the page number for the TOC at the beginning, end or not at all
bool listNonPrintingFrames; //List non printing frames in the TOC
QString textStyle; //Paragraph style for text
//QString leaderParaStyle; //Paragraph style for leaders
//QString pageNumberParaStyle; //Paragraph style for page numbers
/branches/Version13x/Scribus/scribus/libpdf/pdflib.cpp
1018,7 → 1018,7
PDF_Transparenz(ite);
if ((ite->isBookmark) && (Options->Bookmarks))
PDF_Bookmark(ite->BMnr, pag->Height - (ite->Ypos - pag->Yoffset));
if (!ite->isPrintable || ((ite->itemType() == PageItem::TextFrame) && (pag->PageNam != "")))
if (!ite->printable() || ((ite->itemType() == PageItem::TextFrame) && (pag->PageNam != "")))
{
PutPage("Q\n");
continue;
1622,7 → 1622,7
for (uint am = 0; am < pag->FromMaster.count(); ++am)
{
ite = pag->FromMaster.at(am);
if ((ite->LayerNr != ll.LNr) || (!ite->isPrintable))
if ((ite->LayerNr != ll.LNr) || (!ite->printable()))
continue;
if ((pag->PageNam != "") && (ite->OwnPage != static_cast<int>(pag->PageNr)) && (ite->OwnPage != -1))
continue;
1745,7 → 1745,7
for (uint am = 0; am < pag->FromMaster.count(); ++am)
{
ite = pag->FromMaster.at(am);
if ((ite->LayerNr != ll.LNr) || (!ite->isPrintable))
if ((ite->LayerNr != ll.LNr) || (!ite->printable()))
continue;
if (ite->ChangedMasterItem)
continue;
1896,7 → 1896,7
PDF_Transparenz(ite);
if ((ite->isBookmark) && (Options->Bookmarks))
PDF_Bookmark(ite->BMnr, pag->Height - (ite->Ypos - pag->Yoffset));
if (!ite->isPrintable || ((ite->itemType() == PageItem::TextFrame) && (pag->PageNam != "")))
if (!ite->printable() || ((ite->itemType() == PageItem::TextFrame) && (pag->PageNam != "")))
{
PutPage("Q\n");
continue;
2339,7 → 2339,7
PutPage("q\n");
if (((ite->fillTransparency() != 0) || (ite->lineTransparency() != 0)) && (Options->Version >= 14))
PDF_Transparenz(ite);
if (!ite->isPrintable)
if (!ite->printable())
{
PutPage("Q\n");
continue;
/branches/Version13x/Scribus/scribus/tocgenerator.cpp
86,6 → 86,9
//Item not on a page, continue
if (currentDocItem->OwnPage==-1)
continue;
//If we dont want to list non printing frames and this one is set to not print, continue
if (!(*tocSetupIt).listNonPrintingFrames && !currentDocItem->printable())
continue;
ObjectAttribute objattr=currentDocItem->getObjectAttribute((*tocSetupIt).itemAttrName);
if (objattr.name!=QString::null)
{