Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2569 → Rev 2570

/branches/Version13x/Scribus/scribus/scribus.cpp
10802,7 → 10802,7
if (pageItem!=NULL)
{
PageItemAttributes *pageItemAttrs = new PageItemAttributes( this );
pageItemAttrs->setup(pageItem->getObjectAttributes());
pageItemAttrs->setup(pageItem->getObjectAttributes(), &doc->docItemAttributes);
//CB TODO Probably want this non modal in the future
if (pageItemAttrs->exec()==QDialog::Accepted)
pageItem->setObjectAttributes(pageItemAttrs->getNewAttributes());
/branches/Version13x/Scribus/scribus/pageitemattributes.ui
228,12 → 228,14
<include location="local" impldecl="in implementation">pageitemattributes.ui.h</include>
</includes>
<variables>
<variable access="public">ObjAttrVector localAttributes;</variable>
<variable>ObjAttrVector localDocAttributes;</variable>
<variable>ObjAttrVector localAttributes;</variable>
<variable>QStringList relationships;</variable>
<variable>QStringList relationshipsData;</variable>
<variable>QStringList nameList;</variable>
</variables>
<slots>
<slot>setup( ObjAttrVector * docItemAttrs )</slot>
<slot>setup( ObjAttrVector * pageItemAttrs, ObjAttrVector * docItemAttrs )</slot>
<slot>tableItemChanged( int row, int col )</slot>
<slot access="protected">addEntry()</slot>
<slot access="protected">deleteEntry()</slot>
/branches/Version13x/Scribus/scribus/pageitemattributes.ui.h
23,9 → 23,16
}
 
 
void PageItemAttributes::setup(ObjAttrVector *docItemAttrs)
void PageItemAttributes::setup(ObjAttrVector *pageItemAttrs, ObjAttrVector *docItemAttrs)
{
localAttributes=*docItemAttrs;
localAttributes=*pageItemAttrs;
localDocAttributes=*docItemAttrs;
nameList.clear();
nameList.append("");
for(ObjAttrVector::Iterator it = localDocAttributes.begin(); it!= localDocAttributes.end(); ++it)
nameList.append((*it).name);
updateTable();
}
 
156,7 → 163,11
{
uint i=0;
//Name
QTableItem *item1 = new QTableItem(attributesTable, QTableItem::WhenCurrent, (*it).name);
QComboTableItem *item1 = new QComboTableItem(attributesTable, nameList, true);
if (nameList.contains((*it).name))
item1->setCurrentItem((*it).name);
else
item1->setCurrentItem("");
attributesTable->setItem(row, i++, item1);
//Type
QTableItem *item2 = new QTableItem(attributesTable, QTableItem::WhenCurrent, (*it).type);