Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 5359 → Rev 5358

/branches/Version13x/Scribus/scribus/scribusdoc.cpp
270,7 → 270,6
ll.isViewable = true;
ll.isPrintable = true;
ll.isEditable = true;
ll.flowControl = true;
Layers.append(ll);
// Fixme: Check PDF version input
PDF_Options.Version = (PDFOptions::PDFVersion)prefsData.PDF_Options.Version;
1131,7 → 1130,6
ll.isViewable = true;
ll.isPrintable = true;
ll.isEditable = true;
ll.flowControl = true;
Layers.append(ll);
if (activate)
setActiveLayer(ll.LNr);
1398,35 → 1396,6
return false;
}
 
bool ScribusDoc::setLayerFlow(const int layerNumber, const bool flow)
{
QValueList<Layer>::iterator itend=Layers.end();
QValueList<Layer>::iterator it;
bool found=false;
for (it = Layers.begin(); it != itend; ++it)
{
if ((*it).LNr == layerNumber)
{
(*it).flowControl = flow;
found=true;
break;
}
}
return found;
}
 
bool ScribusDoc::layerFlow(const int layerNumber)
{
QValueList<Layer>::iterator itend=Layers.end();
QValueList<Layer>::iterator it;
for (it = Layers.begin(); it != itend; ++it)
{
if ((*it).LNr == layerNumber)
return (*it).flowControl;
}
return false;
}
 
int ScribusDoc::layerLevelFromNumber(const int layerNumber)
{
uint layerCount=Layers.count();
/branches/Version13x/Scribus/scribus/scribusdoc.h
208,19 → 208,6
*/
bool layerLocked(const int layerNumber);
/**
* @brief Set the layer flow via the layer number
* @param layerNumber Number of the layer
* @param flow true = Text flows around objects on this layer
* @return Success or failure
*/
bool setLayerFlow(const int layerNumber, const bool flow);
/**
* @brief does text flow around objects on this layer
* @param layerNumber Number of the layer
* @return flow or not
*/
bool layerFlow(const int layerNumber);
/**
* @brief Return the level of the requested layer
* @param layerNumber Number of the layer
* @return Level of the layer
/branches/Version13x/Scribus/scribus/scribusstructs.h
223,7 → 223,6
bool isPrintable;
bool isViewable;
bool isEditable;
bool flowControl;
};
 
struct PDFPresentationData
/branches/Version13x/Scribus/scribus/pageitem_textframe.cpp
116,7 → 116,7
{
PageItem* docItem = m_Doc->MasterItems.at(a);
int LayerLevItem = m_Doc->layerLevelFromNumber(docItem->LayerNr);
if (((docItem->ItemNr > ItemNr) && (docItem->LayerNr == LayerNr)) || (LayerLevItem > LayerLev) && (m_Doc->layerFlow(docItem->LayerNr)))
if (((docItem->ItemNr > ItemNr) && (docItem->LayerNr == LayerNr)) || (LayerLevItem > LayerLev))
{
// pp.begin(view->viewport());
if (docItem->textFlowsAroundFrame())
196,7 → 196,7
{
PageItem* docItem = m_Doc->Items->at(a);
int LayerLevItem = m_Doc->layerLevelFromNumber(docItem->LayerNr);
if (((docItem->ItemNr > ItemNr) && (docItem->LayerNr == LayerNr)) || (LayerLevItem > LayerLev) && (m_Doc->layerFlow(docItem->LayerNr)))
if (((docItem->ItemNr > ItemNr) && (docItem->LayerNr == LayerNr)) || (LayerLevItem > LayerLev))
{
if (docItem->textFlowsAroundFrame())
result = result.subtract(itemShape(docItem, m_Doc->view(), 0, 0));
/branches/Version13x/Scribus/scribus/fileloader.cpp
595,7 → 595,6
la.isViewable = pg.attribute("SICHTBAR").toInt();
la.isPrintable = pg.attribute("DRUCKEN").toInt();
la.isEditable = pg.attribute("EDIT", "1").toInt();
la.flowControl = pg.attribute("FLOW", "1").toInt();
bool laex = false;
uint layerCount=doc->layerCount();
for (uint la2 = 0; la2 < layerCount; ++la2)
1243,7 → 1242,6
la.isViewable = pg.attribute("SICHTBAR").toInt();
la.isPrintable = pg.attribute("DRUCKEN").toInt();
la.isEditable = pg.attribute("EDIT", "1").toInt();
la.flowControl = pg.attribute("FLOW", "1").toInt();
doc->Layers.append(la);
}
/* if(pg.tagName()=="Bookmark")
1760,7 → 1758,6
la.isViewable = true;
la.isPrintable = true;
la.isEditable = true;
la.flowControl = true;
doc->Layers.append(la);
}
if (LFrames.count() != 0)
/branches/Version13x/Scribus/scribus/scribusXml.cpp
860,7 → 860,6
la.isViewable = pg.attribute("SICHTBAR").toInt();
la.isPrintable = pg.attribute("DRUCKEN").toInt();
la.isEditable = true;
la.flowControl = true;
bool laex = false;
uint layerCount=doc->layerCount();
for (uint la2 = 0; la2 < layerCount; ++la2)
1363,7 → 1362,6
la.isViewable = pg.attribute("SICHTBAR").toInt();
la.isPrintable = pg.attribute("DRUCKEN").toInt();
la.isEditable = true;
la.flowControl = true;
doc->Layers.append(la);
}
if(pg.tagName()=="MultiLine")
3253,7 → 3251,6
la.setAttribute("SICHTBAR", static_cast<int>(doc->Layers[lay].isViewable));
la.setAttribute("DRUCKEN", static_cast<int>(doc->Layers[lay].isPrintable));
la.setAttribute("EDIT", static_cast<int>(doc->Layers[lay].isEditable));
la.setAttribute("FLOW", static_cast<int>(doc->Layers[lay].flowControl));
dc.appendChild(la);
}
QDomElement pdf = docu.createElement("PDF");
/branches/Version13x/Scribus/scribus/layers.cpp
48,7 → 48,7
{
if (a != row)
{
if (newCont == text(a, 4))
if (newCont == text(a, 3))
realAccept = false;
}
}
74,20 → 74,17
 
Table = new LayerTable( this );
Table->setNumRows( 0 );
Table->setNumCols( 5 );
Table->setNumCols( 4 );
QHeader *header = Table->horizontalHeader();
header->setLabel(0, loadIcon("16/show-object.png"), "");
header->setLabel(1, loadIcon("DateiPrint16.png"), "");
header->setLabel(2, loadIcon("locked.png"), "");
header->setLabel(3, loadIcon("16/layer-flow-around.png"), "");
Table->setColumnReadOnly(0, true);
Table->setColumnReadOnly(1, true);
Table->setColumnReadOnly(2, true);
Table->setColumnReadOnly(3, true);
Table->setColumnWidth(0, 24);
Table->setColumnWidth(1, 24);
Table->setColumnWidth(2, 24);
Table->setColumnWidth(3, 24);
Table->setRowMovingEnabled(false);
Table->setSorting(false);
Table->setSelectionMode( QTable::SingleRow );
144,7 → 141,7
 
void LayerPalette::updateName(int r)
{
changeName(r, 4);
changeName(r, 3);
ScMW->changeLayer(ScMW->doc->activeLayer());
}
 
156,7 → 153,6
Table->removeRow(0);
flagsPrintable.clear();
flagsVisible.clear();
flagsFlow.clear();
newLayerButton->setEnabled(false);
deleteLayerButton->setEnabled(false);
raiseLayerButton->setEnabled(false);
181,7 → 177,6
disconnect(Table, SIGNAL(currentChanged(int, int)), this, SLOT(setActiveLayer(int)));
flagsPrintable.clear();
flagsVisible.clear();
flagsFlow.clear();
QString tmp;
QValueList<Layer>::iterator it;
int layerCount=ScMW->doc->layerCount();
192,7 → 187,7
//TODO once "layers" is not set anymore, need to get layer number differently
int layerLevel=ScMW->doc->layerLevelFromNumber(layerNumber);
int row=layerCount-layerLevel-1;
Table->setText(row, 4, ScMW->doc->layerName(layerNumber));
Table->setText(row, 3, ScMW->doc->layerName(layerNumber));
QCheckBox *cp = new QCheckBox(this, tmp.setNum(layerLevel));
cp->setChecked(ScMW->doc->layerPrintable(layerNumber));
Table->setCellWidget(row, 1, cp);
208,15 → 203,10
flagsLocked.append(cp3);
connect(cp3, SIGNAL(clicked()), this, SLOT(lockLayer()));
Table->setCellWidget(row, 2, cp3);
QCheckBox *cp4 = new QCheckBox(this, tmp.setNum(layerLevel));
cp4->setChecked(ScMW->doc->layerFlow(layerNumber));
flagsFlow.append(cp4);
connect(cp4, SIGNAL(clicked()), this, SLOT(flowToggleLayer()));
Table->setCellWidget(row, 3, cp4);
Header->setLabel(row, tmp.setNum(layerLevel));
}
Table->setColumnStretchable(4, true);
Table->adjustColumn(4);
Table->setColumnStretchable(3, true);
Table->adjustColumn(3);
connect(Table, SIGNAL(currentChanged(int, int)), this, SLOT(setActiveLayer(int)));
}
 
289,7 → 279,7
 
void LayerPalette::changeName(int row, int col)
{
if (col == 4)
if (col == 3)
{
int layerLevel = ScMW->doc->layerCount()-1-row;
int layerNumber=ScMW->doc->layerNumberFromLevel(layerLevel);
344,21 → 334,6
}
}
 
void LayerPalette::flowToggleLayer()
{
int level = QString(sender()->name()).toInt();
int layerNumber=ScMW->doc->layerNumberFromLevel(level);
if (layerNumber==-1)
return;
const QObject* senderBox=sender();
if (senderBox->isA("QCheckBox"))
{
ScMW->doc->setLayerFlow(layerNumber,((QCheckBox*)(senderBox))->isChecked());
emit LayerChanged();
ScMW->slotDocCh();
}
}
 
void LayerPalette::markActiveLayer(int layerNumber)
{
disconnect(Table, SIGNAL(currentChanged(int, int)), this, SLOT(setActiveLayer(int)));
365,7 → 340,7
int layerToMark=layerNumber;
if (layerNumber==-1)
layerToMark=ScMW->doc->activeLayer();
Table->setCurrentCell(ScMW->doc->layerCount()-1-ScMW->doc->layerLevelFromNumber(layerToMark), 4);
Table->setCurrentCell(ScMW->doc->layerCount()-1-ScMW->doc->layerLevelFromNumber(layerToMark), 2);
connect(Table, SIGNAL(currentChanged(int, int)), this, SLOT(setActiveLayer(int)));
}
 
380,7 → 355,7
void LayerPalette::languageChange()
{
setCaption( tr( "Layers" ) );
Table->horizontalHeader()->setLabel(4, tr("Name"));
Table->horizontalHeader()->setLabel(3, tr("Name"));
QToolTip::remove( newLayerButton );
QToolTip::remove( deleteLayerButton );
QToolTip::remove( raiseLayerButton );
/branches/Version13x/Scribus/scribus/icons/Makefile.am
95,7 → 95,6
16/stroke-join-round.png \
16/transform-rotate.png \
22/transform-rotate.png \
16/layer-flow-around.png \
16/zoom.png \
22/zoom.png \
16/zoom-in.png \
502,7 → 501,6
$(INSTALL_DATA) $(srcdir)/22/zoom-original.png $(prefix)/share/scribus/icons/22/zoom-original.png
$(INSTALL_DATA) $(srcdir)/16/zoom-out.png $(prefix)/share/scribus/icons/16/zoom-out.png
$(INSTALL_DATA) $(srcdir)/22/zoom-out.png $(prefix)/share/scribus/icons/22/zoom-out.png
$(INSTALL_DATA) $(srcdir)/16/layer-flow-around.png $(prefix)/share/scribus/icons/16/layer-flow-around.png
 
 
 
900,4 → 898,3
-rm -f $(prefix)/share/scribus/icons/22/zoom-original.png
-rm -f $(prefix)/share/scribus/icons/16/zoom-out.png
-rm -f $(prefix)/share/scribus/icons/22/zoom-out.png
-rm -f $(prefix)/share/scribus/icons/16/layer-flow-around.png
/branches/Version13x/Scribus/scribus/icons/16/layer-flow-around.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/Version13x/Scribus/scribus/icons/CMakeLists.txt
===================================================================
--- branches/Version13x/Scribus/scribus/icons/CMakeLists.txt (revision 5359)
+++ branches/Version13x/Scribus/scribus/icons/CMakeLists.txt (revision 5358)
@@ -345,7 +345,6 @@
16/zoom-in.png
16/zoom-original.png
16/zoom-out.png
-16/layer-flow-around.png
DESTINATION ${ICONDIR}16
)
/branches/Version13x/Scribus/scribus/layers.h
60,7 → 60,6
void visibleLayer();
void printLayer();
void lockLayer();
void flowToggleLayer();
void setActiveLayer(int row);
void ClearInhalt();
void markActiveLayer(int layerNumber=-1);
81,7 → 80,6
QPtrList<QCheckBox> flagsPrintable;
QPtrList<QCheckBox> flagsVisible;
QPtrList<QCheckBox> flagsLocked;
QPtrList<QCheckBox> flagsFlow;
QValueList<Layer> *layers;
};