Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 1267 → Rev 1268

/branches/Version13x/Scribus/scribus/checkDocument.cpp
12,9 → 12,11
#include <qmap.h>
#include <qlabel.h>
#include <qcombobox.h>
#include "scribus.h"
#include "scribusdoc.h"
#include "page.h"
extern QPixmap loadIcon(QString nam);
extern ScribusApp* ScApp;
 
static const unsigned char image0_data[] =
{
138,6 → 140,9
checkDocumentLayout->addWidget( reportDisplay );
languageChange();
itemMap.clear();
pageMap.clear();
templatePageMap.clear();
templateItemMap.clear();
resize( QSize(306, 259).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
connect(curCheckProfile, SIGNAL(activated(const QString&)), this, SLOT(newScan(const QString&)));
151,19 → 156,33
 
void CheckDocument::slotSelect(QListViewItem* ite)
{
if (document->TemplateMode)
return;
if (itemMap.contains(ite))
{
emit selectElement(document->Items.at(itemMap[ite])->OwnPage, itemMap[ite]);
if (document->TemplateMode)
ScApp->ActWin->muster->close();
emit selectElement(document->DocItems.at(itemMap[ite])->OwnPage, itemMap[ite]);
return;
}
if (pageMap.contains(ite))
{
if (document->TemplateMode)
ScApp->ActWin->muster->close();
emit selectPage(pageMap[ite]);
return;
}
if (templatePageMap.contains(ite))
{
emit selectTemplatePage(templatePageMap[ite]);
return;
}
if (templateItemMap.contains(ite))
{
if (!document->TemplateMode)
emit selectTemplatePage(document->MasterItems.at(templateItemMap[ite])->OnMasterPage);
emit selectElement(-1, templateItemMap[ite]);
return;
}
}
 
void CheckDocument::newScan(const QString& name)
{
178,6 → 197,8
reportDisplay->clear();
itemMap.clear();
pageMap.clear();
templatePageMap.clear();
templateItemMap.clear();
}
 
void CheckDocument::buildErrorList(ScribusDoc *doc)
220,6 → 241,7
hasError = false;
bool pageGraveError = false;
QListViewItem * page = new QListViewItem( item, pagep );
templatePageMap.insert(page, doc->MasterPages.at(a)->PageNam);
pagep = page;
QMap<int, errorCodes>::Iterator it2;
for (it2 = doc->masterItemErrors.begin(); it2 != doc->masterItemErrors.end(); ++it2)
229,6 → 251,7
hasError = true;
bool itemError = false;
QListViewItem * object = new QListViewItem( page, 0 );
templateItemMap.insert(object, doc->MasterItems.at(it2.key())->ItemNr);
object->setText(0, doc->MasterItems.at(it2.key())->AnName);
errorCodes::Iterator it3;
if (it2.data().count() == 1)
307,6 → 330,7
break;
}
}
object->setOpen( true );
}
if (itemError)
object->setPixmap( 0, graveError );
320,6 → 344,7
page->setPixmap( 0, graveError );
else
page->setPixmap( 0, onlyWarning );
page->setOpen( true );
}
else
page->setPixmap( 0, noErrors );
420,6 → 445,7
break;
}
}
object->setOpen( true );
}
if (itemError)
object->setPixmap( 0, graveError );
433,6 → 459,7
page->setPixmap( 0, graveError );
else
page->setPixmap( 0, onlyWarning );
page->setOpen( true );
}
else
page->setPixmap( 0, noErrors );
533,6 → 560,7
break;
}
}
object->setOpen( true );
}
if (pageGraveError)
object->setPixmap( 0, graveError );
546,6 → 574,7
page->setPixmap( 0, graveError );
else
page->setPixmap( 0, onlyWarning );
page->setOpen( true );
}
else
page->setPixmap( 0, noErrors );
/branches/Version13x/Scribus/scribus/muster.h
1,11 → 1,3
/****************************************************************************
** Form interface generated from reading ui file 'Muster.ui'
**
** Created: Thu Nov 1 09:45:36 2001
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef MUSTERPAGES_H
#define MUSTERPAGES_H
 
27,9 → 19,12
MusterPages( QWidget* parent, ScribusDoc *pCurrentDoc, ScribusView *pCurrentView, QString temp);
~MusterPages() {};
void closeEvent(QCloseEvent *closeEvent);
void updateTemplateList(QString templateName);
 
public slots:
void selectTemplate(QString name);
 
private:
void updateTemplateList(QString templateName);
QListBox* templateData;
QPushButton* appendButton;
QPushButton* newButton;
/branches/Version13x/Scribus/scribus/muster.cpp
296,6 → 296,20
currentView->ShowTemplate(currentDoc->MasterNames[sMuster]);
}
 
void MusterPages::selectTemplate(QString name)
{
sMuster = name;
deleteButton->setEnabled(currentDoc->MasterNames.count() == 1 ? false : true);
if (sMuster == tr("Normal"))
{
sMuster = "Normal";
deleteButton->setEnabled(false);
}
else
deleteButton->setEnabled(true);
currentView->ShowTemplate(currentDoc->MasterNames[sMuster]);
}
 
void MusterPages::updateTemplateList(QString templateName)
{
templateData->clear();
/branches/Version13x/Scribus/scribus/libabout/about.cpp
65,7 → 65,7
tabLayout1->addWidget( pixmapLabel1 );
buildID = new QLabel( tab, "BB" );
buildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg("24").arg("January").arg("2005");
QString bu = tr("%1. %2 %3 ").arg("25").arg("January").arg("2005");
#ifdef HAVE_CMS
bu += "C";
#else
/branches/Version13x/Scribus/scribus/scribus.cpp
817,6 → 817,7
connect(docChecker, SIGNAL(rescan()), this, SLOT(slotCheckDoc()));
connect(docChecker, SIGNAL(selectElement(int, int)), this, SLOT(SelectFromOutl(int, int)));
connect(docChecker, SIGNAL(selectPage(int)), this, SLOT(SelectFromOutlS(int)));
connect(docChecker, SIGNAL(selectTemplatePage(QString)), this, SLOT(ManageTemp(QString)));
connect(Tpal, SIGNAL(Schliessen()), this, SLOT(ToggleTpal()));
connect(Tpal, SIGNAL(CloseMpal()), this, SLOT(ToggleMpal()));
connect(Tpal, SIGNAL(CloseSpal()), this, SLOT(ToggleBpal()));
8400,17 → 8401,24
 
void ScribusApp::ManageTemp(QString temp)
{
if (HaveDoc)
{
if (doc->TemplateMode)
{
ActWin->muster->updateTemplateList(temp);
ActWin->muster->selectTemplate(temp);
}
else
{
MusterPages *dia = new MusterPages(this, doc, view, temp);
connect(dia, SIGNAL(createNew(int)), this, SLOT(slotNewPageT(int)));
connect(dia, SIGNAL(loadPage(QString, int, bool)), this, SLOT(LadeSeite(QString, int, bool)));
connect(dia, SIGNAL(finished()), this, SLOT(ManTempEnd()));
scrActions["pageInsert"]->setEnabled(false);
scrActions["pageDelete"]->setEnabled(false);
scrActions["pageCopy"]->setEnabled(false);
scrActions["pageMove"]->setEnabled(false);
scrActions["pageApplyTemplate"]->setEnabled(false);
 
scrActions["editTemplates"]->setEnabled(false);
ActWin->MenuStat[0] = scrActions["fileSave"]->isEnabled();
ActWin->MenuStat[1] = scrActions["fileRevert"]->isEnabled();
8429,6 → 8437,8
ActWin->muster = dia;
doc->OpenNodes = Tpal->buildReopenVals();
}
}
}
 
void ScribusApp::ManTempEnd()
{
10056,9 → 10066,9
if (itemError.count() != 0)
doc->masterItemErrors.insert(it->ItemNr, itemError);
}
for (uint d = 0; d < doc->Items.count(); ++d)
for (uint d = 0; d < doc->DocItems.count(); ++d)
{
it = doc->Items.at(d);
it = doc->DocItems.at(d);
itemError.clear();
if (((it->Transparency != 0.0) || (it->TranspStroke != 0.0)) && (checkerSettings.checkTransparency))
itemError.insert(6, 0);
/branches/Version13x/Scribus/scribus/checkDocument.h
31,6 → 31,8
QListView* reportDisplay;
QMap<QListViewItem*, int> itemMap;
QMap<QListViewItem*, int> pageMap;
QMap<QListViewItem*, QString> templatePageMap;
QMap<QListViewItem*, int> templateItemMap;
 
public slots:
void slotSelect(QListViewItem* ite);
41,6 → 43,9
void closePal(bool);
void selectElement(int, int);
void selectPage(int);
void selectTemplatePage(QString);
void selectTemplateElement(QString, int);
void selectNormal();
 
protected:
QVBoxLayout* checkDocumentLayout;