Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2432 → Rev 2433

/branches/Version13x/Scribus/scribus-api/scribus___scribus_h.html
161,12 → 161,12
* information such as filename and does the serialization of your files.
*/
ScribusDoc *doc;
QLabel* FMess;
QProgressBar* FProg;
QLabel* XMess;
QLabel* XDat;
QLabel* YMess;
QLabel* YDat;
QLabel* mainWindowStatusLabel;
QProgressBar* mainWindowProgressBar;
QLabel* mainWindowXPosLabel;
QLabel* mainWindowXPosDataLabel;
QLabel* mainWindowYPosLabel;
QLabel* mainWindowYPosDataLabel;
Mpalette *propertiesPalette;
NodePalette *nodePalette;
Tree *outlinePalette;
/branches/Version13x/Scribus/scribus-api/ScribusApp.html
444,12 → 444,12
</LI>
<LI>ScribusView *<b><A HREF="#ref48">view</A></b></LI>
<LI>ScribusDoc *<b><A HREF="#ref49">doc</A></b></LI>
<LI>QLabel* <b><A HREF="#ref50">FMess</A></b></LI>
<LI>QProgressBar* <b><A HREF="#ref51">FProg</A></b></LI>
<LI>QLabel* <b><A HREF="#ref52">XMess</A></b></LI>
<LI>QLabel* <b><A HREF="#ref53">XDat</A></b></LI>
<LI>QLabel* <b><A HREF="#ref54">YMess</A></b></LI>
<LI>QLabel* <b><A HREF="#ref55">YDat</A></b></LI>
<LI>QLabel* <b><A HREF="#ref50">mainWindowStatusLabel</A></b></LI>
<LI>QProgressBar* <b><A HREF="#ref51">mainWindowProgressBar</A></b></LI>
<LI>QLabel* <b><A HREF="#ref52">mainWindowXPosLabel</A></b></LI>
<LI>QLabel* <b><A HREF="#ref53">mainWindowXPosDataLabel</A></b></LI>
<LI>QLabel* <b><A HREF="#ref54">mainWindowYPosLabel</A></b></LI>
<LI>QLabel* <b><A HREF="#ref55">mainWindowYPosDataLabel</A></b></LI>
<LI>Mpalette *<b><A HREF="#ref56">propertiesPalette</A></b></LI>
<LI>NodePalette *<b><A HREF="#ref57">nodePalette</A></b></LI>
<LI>Tree *<b><A HREF="#ref58">outlinePalette</A></b></LI>
629,13 → 629,13
</td><td align="right"><h3><strong>NoFonts</strong></h3></td></tr></table><p></p><A NAME="HaveDoc"></A><A NAME="ref46"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int <strong>HaveDoc</strong>
</td><td align="right"><h3><strong>HaveDoc</strong></h3></td></tr></table><p></p><A NAME="view"></A><A NAME="ref48"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="ScribusView.html">ScribusView</A> * <strong>view</strong>
</td><td align="right"><h3><strong>view</strong></h3></td></tr></table><p></p><A NAME="doc"></A><A NAME="ref49"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="ScribusDoc.html">ScribusDoc</A> * <strong>doc</strong>
</td><td align="right"><h3><strong>doc</strong></h3></td></tr></table><p></p><A NAME="FMess"></A><A NAME="ref50"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QLabel* <strong>FMess</strong>
</td><td align="right"><h3><strong>FMess</strong></h3></td></tr></table><p></p><A NAME="FProg"></A><A NAME="ref51"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QProgressBar* <strong>FProg</strong>
</td><td align="right"><h3><strong>FProg</strong></h3></td></tr></table><p></p><A NAME="XMess"></A><A NAME="ref52"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QLabel* <strong>XMess</strong>
</td><td align="right"><h3><strong>XMess</strong></h3></td></tr></table><p></p><A NAME="XDat"></A><A NAME="ref53"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QLabel* <strong>XDat</strong>
</td><td align="right"><h3><strong>XDat</strong></h3></td></tr></table><p></p><A NAME="YMess"></A><A NAME="ref54"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QLabel* <strong>YMess</strong>
</td><td align="right"><h3><strong>YMess</strong></h3></td></tr></table><p></p><A NAME="YDat"></A><A NAME="ref55"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QLabel* <strong>YDat</strong>
</td><td align="right"><h3><strong>YDat</strong></h3></td></tr></table><p></p><A NAME="propertiesPalette"></A><A NAME="ref56"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="Mpalette.html">Mpalette</A> * <strong>propertiesPalette</strong>
</td><td align="right"><h3><strong>doc</strong></h3></td></tr></table><p></p><A NAME="mainWindowStatusLabel"></A><A NAME="ref50"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QLabel* <strong>mainWindowStatusLabel</strong>
</td><td align="right"><h3><strong>mainWindowStatusLabel</strong></h3></td></tr></table><p></p><A NAME="mainWindowProgressBar"></A><A NAME="ref51"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QProgressBar* <strong>mainWindowProgressBar</strong>
</td><td align="right"><h3><strong>mainWindowProgressBar</strong></h3></td></tr></table><p></p><A NAME="mainWindowXPosLabel"></A><A NAME="ref52"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QLabel* <strong>mainWindowXPosLabel</strong>
</td><td align="right"><h3><strong>mainWindowXPosLabel</strong></h3></td></tr></table><p></p><A NAME="mainWindowXPosDataLabel"></A><A NAME="ref53"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QLabel* <strong>mainWindowXPosDataLabel</strong>
</td><td align="right"><h3><strong>mainWindowXPosDataLabel</strong></h3></td></tr></table><p></p><A NAME="mainWindowYPosLabel"></A><A NAME="ref54"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QLabel* <strong>mainWindowYPosLabel</strong>
</td><td align="right"><h3><strong>mainWindowYPosLabel</strong></h3></td></tr></table><p></p><A NAME="mainWindowYPosDataLabel"></A><A NAME="ref55"></A><table width="100%"><tr bgcolor="#eeeeee"><td>QLabel* <strong>mainWindowYPosDataLabel</strong>
</td><td align="right"><h3><strong>mainWindowYPosDataLabel</strong></h3></td></tr></table><p></p><A NAME="propertiesPalette"></A><A NAME="ref56"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="Mpalette.html">Mpalette</A> * <strong>propertiesPalette</strong>
</td><td align="right"><h3><strong>propertiesPalette</strong></h3></td></tr></table><p></p><A NAME="nodePalette"></A><A NAME="ref57"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="NodePalette.html">NodePalette</A> * <strong>nodePalette</strong>
</td><td align="right"><h3><strong>nodePalette</strong></h3></td></tr></table><p></p><A NAME="outlinePalette"></A><A NAME="ref58"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="Tree.html">Tree</A> * <strong>outlinePalette</strong>
</td><td align="right"><h3><strong>outlinePalette</strong></h3></td></tr></table><p></p><A NAME="scrapbookPalette"></A><A NAME="ref59"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="Biblio.html">Biblio</A> * <strong>scrapbookPalette</strong>
/branches/Version13x/Scribus/scribus/fileloader.cpp
186,7 → 186,7
ss->ReplacedFonts.clear();
ss->newReplacement = false;
ss->dummyFois.clear();
ret = ss->ReadDoc(FileName, app->Prefs.AvailFonts, app->doc, app->view, app->FProg);
ret = ss->ReadDoc(FileName, app->Prefs.AvailFonts, app->doc, app->view, app->mainWindowProgressBar);
QObject::disconnect(ss, SIGNAL(NewPage(int)), app, SLOT(slotNewPage(int)));
ReplacedFonts = ss->ReplacedFonts;
newReplacement = ss->newReplacement;
195,7 → 195,7
}
break;
case 1:
ret = ReadDoc(app, FileName, app->Prefs.AvailFonts, app->doc, app->view, app->FProg);
ret = ReadDoc(app, FileName, app->Prefs.AvailFonts, app->doc, app->view, app->mainWindowProgressBar);
break;
case 2:
app->pluginManager->dllInput = FileName;
/branches/Version13x/Scribus/scribus/doc/en/plugin_howto.html
220,7 → 220,7
<h4>How to show what are you doing to the user in Scribus's statusbar:</h4>
<blockquote><table width="100%" border="1" bgcolor="#eeeeee"><tr><td border="0"><small>
<pre>
plug->FMess->setText(QString(aText));
plug->mainWindowStatusLabel->setText(QString(aText));
</pre>
</small></td></tr></table></blockquote>
 
236,7 → 236,7
<blockquote><table width="100%" border="1" bgcolor="#eeeeee"><tr><td border="0"><small>
<pre>
for (uint i=0; i<plug->view->Pages.count(); i++) {
plug->FMess->setText(QObject::tr("Page: ")
plug->mainWindowStatusLabel->setText(QObject::tr("Page: ")
+ i
+ plug->view->Pages.at(i)->PageNam);
// do something with active page
/branches/Version13x/Scribus/scribus/gtaction.cpp
58,20 → 58,20
 
void gtAction::setProgressInfo()
{
ScApp->FMess->setText(QObject::tr("Importing text"));
ScApp->FProg->reset();
ScApp->FProg->setTotalSteps(0);
ScApp->mainWindowStatusLabel->setText(QObject::tr("Importing text"));
ScApp->mainWindowProgressBar->reset();
ScApp->mainWindowProgressBar->setTotalSteps(0);
}
 
void gtAction::setProgressInfoDone()
{
ScApp->FMess->setText("");
ScApp->FProg->reset();
ScApp->mainWindowStatusLabel->setText("");
ScApp->mainWindowProgressBar->reset();
}
 
void gtAction::setInfo(QString infoText)
{
ScApp->FMess->setText(infoText);
ScApp->mainWindowStatusLabel->setText(infoText);
}
 
void gtAction::clearFrame()
/branches/Version13x/Scribus/scribus/scribus.cpp
1369,22 → 1369,22
 
void ScribusApp::initStatusBar()
{
FMess = new QLabel( " ", statusBar(), "ft");
FProg = new QProgressBar(statusBar(), "p");
FProg->setCenterIndicator(true);
FProg->setFixedWidth( 100 );
FProg->reset();
XMess = new QLabel( "X-Pos:", statusBar(), "xt");
YMess = new QLabel( "Y-Pos:", statusBar(), "yt");
XDat = new QLabel( " ", statusBar(), "dt");
YDat = new QLabel( " ", statusBar(), "ydt");
mainWindowStatusLabel = new QLabel( " ", statusBar(), "ft");
mainWindowProgressBar = new QProgressBar(statusBar(), "p");
mainWindowProgressBar->setCenterIndicator(true);
mainWindowProgressBar->setFixedWidth( 100 );
mainWindowProgressBar->reset();
mainWindowXPosLabel = new QLabel( "X-Pos:", statusBar(), "xt");
mainWindowYPosLabel = new QLabel( "Y-Pos:", statusBar(), "yt");
mainWindowXPosDataLabel = new QLabel( " ", statusBar(), "dt");
mainWindowYPosDataLabel = new QLabel( " ", statusBar(), "ydt");
 
statusBar()->addWidget(FMess, 3, true);
statusBar()->addWidget(FProg, 0, true);
statusBar()->addWidget(XMess, 0, true);
statusBar()->addWidget(XDat, 1, true);
statusBar()->addWidget(YMess, 0, true);
statusBar()->addWidget(YDat, 1, true);
statusBar()->addWidget(mainWindowStatusLabel, 3, true);
statusBar()->addWidget(mainWindowProgressBar, 0, true);
statusBar()->addWidget(mainWindowXPosLabel, 0, true);
statusBar()->addWidget(mainWindowXPosDataLabel, 1, true);
statusBar()->addWidget(mainWindowYPosLabel, 0, true);
statusBar()->addWidget(mainWindowYPosDataLabel, 1, true);
}
 
void ScribusApp::setMousePositionOnStatusBar(double xp, double yp)
1394,8 → 1394,8
double divisor=static_cast<double>(multiplier);
int precision=unitGetPrecisionFromIndex(doc->docUnitIndex);
QString tmp;
XDat->setText(tmp.setNum(qRound(xp*doc->unitRatio * multiplier) / divisor, 'f', precision) + suffix);
YDat->setText(tmp.setNum(qRound(yp*doc->unitRatio * multiplier) / divisor, 'f', precision) + suffix);
mainWindowXPosDataLabel->setText(tmp.setNum(qRound(xp*doc->unitRatio * multiplier) / divisor, 'f', precision) + suffix);
mainWindowYPosDataLabel->setText(tmp.setNum(qRound(yp*doc->unitRatio * multiplier) / divisor, 'f', precision) + suffix);
}
 
void ScribusApp::SetKeyEntry(QString actName, QString cleanMenuText, QString keyseq, int rowNumber)
2721,7 → 2721,7
QString pagesize = dia->ComboBox1->currentText();
retVal = doFileNew(pageWidth, pageHeight, topMargin, leftMargin, rightMargin, bottomMargin, columnDistance, numberCols, autoframes, facingPages, dia->ComboBox3->currentItem(),
dia->ErsteSeite->isChecked(), orientation, dia->PgNr->value(), pagesize);
FMess->setText( tr("Ready"));
mainWindowStatusLabel->setText( tr("Ready"));
}
else
retVal = false;
3201,10 → 3201,10
dia->tabColorManagement->setValues();
if (dia->tabColorManagement->changed)
{
FMess->setText( tr("Adjusting Colors"));
FProg->reset();
mainWindowStatusLabel->setText( tr("Adjusting Colors"));
mainWindowProgressBar->reset();
int cc = doc->PageColors.count() + view->CountElements();
FProg->setTotalSteps(cc);
mainWindowProgressBar->setTotalSteps(cc);
#ifdef HAVE_CMS
doc->HasCMS = doc->CMSSettings.CMSinUse;
doc->SoftProofing = doc->CMSSettings.SoftProofOn;
3246,13 → 3246,13
doc->PDF_Options.ImageProf = doc->CMSSettings.DefaultInputProfile;
doc->PDF_Options.PrintProf = doc->CMSSettings.DefaultPrinterProfile;
doc->PDF_Options.Intent = doc->CMSSettings.DefaultIntentMonitor;
RecalcColors(FProg);
view->RecalcPictures(&InputProfiles, FProg);
RecalcColors(mainWindowProgressBar);
view->RecalcPictures(&InputProfiles, mainWindowProgressBar);
#endif
FProg->setProgress(cc);
mainWindowProgressBar->setProgress(cc);
qApp->setOverrideCursor(QCursor(arrowCursor), true);
FMess->setText("");
FProg->reset();
mainWindowStatusLabel->setText("");
mainWindowProgressBar->reset();
}
}
uint a = 0;
4298,7 → 4298,7
MergeDoc *dia = new MergeDoc(this, false, doc->pageCount, doc->currentPage->PageNr + 1);
if (dia->exec())
{
FMess->setText( tr("Importing Pages..."));
mainWindowStatusLabel->setText( tr("Importing Pages..."));
qApp->setOverrideCursor(QCursor(waitCursor), true);
std::vector<int> pageNs;
parsePagesString(dia->getPageNumbers(), &pageNs, dia->getPageCounter());
4355,7 → 4355,7
break;
case QMessageBox::Cancel:
doIt = false;
FMess->setText("");
mainWindowStatusLabel->setText("");
break;
}
qApp->setOverrideCursor(QCursor(waitCursor), true);
4365,8 → 4365,8
{
if (nrToImport > 0)
{
FProg->reset();
FProg->setTotalSteps(nrToImport);
mainWindowProgressBar->reset();
mainWindowProgressBar->setTotalSteps(nrToImport);
int counter = startPage;
for (int i = 0; i < nrToImport; ++i)
{
4373,15 → 4373,15
view->GotoPa(counter);
loadPage(dia->getFromDoc(), pageNs[i] - 1, false);
counter++;
FProg->setProgress(i + 1);
mainWindowProgressBar->setProgress(i + 1);
}
view->GotoPa(startPage);
FProg->reset();
FMess->setText( tr("Import done"));
mainWindowProgressBar->reset();
mainWindowStatusLabel->setText( tr("Import done"));
}
else
{
FMess->setText( tr("Found nothing to import"));
mainWindowStatusLabel->setText( tr("Found nothing to import"));
doIt = false;
}
}
4506,8 → 4506,8
doc->ActiveLayer = 0;
doc->OpenNodes.clear();
doc->loading = true;
FMess->setText( tr("Loading..."));
FProg->reset();
mainWindowStatusLabel->setText( tr("Loading..."));
mainWindowProgressBar->reset();
ScribusWin* w = new ScribusWin(wsp, doc);
view = new ScribusView(w, doc, &Prefs);
view->setScale(1.0*Prefs.DisScale);
4533,8 → 4533,8
delete doc;
delete w;
ScApp->ScriptRunning = false;
FMess->setText("");
FProg->reset();
mainWindowStatusLabel->setText("");
mainWindowProgressBar->reset();
ActWin = NULL;
if (windows.count() != 0)
newActWin(ActWinOld);
4541,8 → 4541,8
return false;
}
ScApp->ScriptRunning = false;
FMess->setText("");
FProg->reset();
mainWindowStatusLabel->setText("");
mainWindowProgressBar->reset();
#ifdef HAVE_CMS
CMSuse = cmsu;
#endif
4813,7 → 4813,7
doc->RePos = false;
doc->setUnModified();
updateRecent(FName);
FMess->setText( tr("Ready"));
mainWindowStatusLabel->setText( tr("Ready"));
ret = true;
for (uint p = 0; p < doc->Pages.count(); ++p)
{
5058,7 → 5058,7
doc->PDF_Options.Datei = ""; // #1482 reset the pdf file name
}
}
FMess->setText( tr("Ready"));
mainWindowStatusLabel->setText( tr("Ready"));
return ret;
}
 
5068,13 → 5068,13
fileWatcher->forceScan();
fileWatcher->stop();
ReorgFonts();
FMess->setText( tr("Saving..."));
FProg->reset();
mainWindowStatusLabel->setText( tr("Saving..."));
mainWindowProgressBar->reset();
QFileInfo fi(fn);
QDir::setCurrent(fi.dirPath(true));
ScriXmlDoc *ss = new ScriXmlDoc();
qApp->processEvents();
ret = ss->WriteDoc(fn, doc, FProg);
ret = ss->WriteDoc(fn, doc, mainWindowProgressBar);
delete ss;
if (ret)
{
5087,8 → 5087,8
updateRecent(fn);
doc->hasName = true;
}
FMess->setText("");
FProg->reset();
mainWindowStatusLabel->setText("");
mainWindowProgressBar->reset();
fileWatcher->start();
return ret;
}
5218,7 → 5218,7
ColorMenC->clear();
propertiesPalette->Cpal->SetColors(Prefs.DColors);
propertiesPalette->Cpal->ChooseGrad(0);
FMess->setText( tr("Ready"));
mainWindowStatusLabel->setText( tr("Ready"));
PrinterUsed = false;
}
view->close();
5285,7 → 5285,7
disconnect(docCheckerPalette, SIGNAL(ignoreAllErrors()), this, SLOT(slotReallyPrint()));
}
PrintOptions options;
FMess->setText( tr("Printing..."));
mainWindowStatusLabel->setText( tr("Printing..."));
if (PrinterUsed)
{
options.printer = PDef.Pname;
5358,7 → 5358,7
qApp->setOverrideCursor(QCursor(arrowCursor), true);
}
delete printer;
FMess->setText( tr("Ready"));
mainWindowStatusLabel->setText( tr("Ready"));
}
 
/*!
8684,7 → 8684,7
}
fileWatcher->forceScan();
fileWatcher->stop();
ret = (*demo)(this, fn, nam, Components, pageNs, thumbs, FProg);
ret = (*demo)(this, fn, nam, Components, pageNs, thumbs, mainWindowProgressBar);
dlclose(PDFDriver);
fileWatcher->start();
return ret;
10555,7 → 10555,7
void ScribusApp::emergencySave()
{
std::cout << "Calling Emergency Save" << std::endl;
QWidgetList windows = ScApp->wsp->windowList();
QWidgetList windows = wsp->windowList();
if (!windows.isEmpty())
{
for ( int i = 0; i < static_cast<int>(windows.count()); ++i )
10946,10 → 10946,10
if (undoManager!=NULL)
undoManager->languageChange();
 
XMess->setText( tr("X-Pos:"));
YMess->setText( tr("Y-Pos:"));
XDat->setText(" ");
YDat->setText(" ");
FMess->setText( tr("Ready"));
mainWindowXPosLabel->setText( tr("X-Pos:"));
mainWindowYPosLabel->setText( tr("Y-Pos:"));
mainWindowXPosDataLabel->setText(" ");
mainWindowYPosDataLabel->setText(" ");
mainWindowStatusLabel->setText( tr("Ready"));
}
}
/branches/Version13x/Scribus/scribus/plugins/pixmapexport/export.cpp
71,7 → 71,7
ex->quality = dia->QualityBox->value();
ex->exportDir = dia->OutputDirectory->text();
ex->bitmapType = dia->bitmapType;
plug->FProg->reset();
plug->mainWindowProgressBar->reset();
if (dia->OnePageRadio->isChecked())
res = ex->exportActual();
else
82,16 → 82,16
plug->parsePagesString(dia->RangeVal->text(), &pageNs, plug->doc->pageCount);
res = ex->exportInterval(pageNs);
}
plug->FProg->reset();
plug->mainWindowProgressBar->reset();
QApplication::restoreOverrideCursor();
if (!res)
{
QMessageBox::warning(plug, QObject::tr("Save as Image"), QObject::tr("Error writing the output file(s)."));
plug->FMess->setText(QObject::tr("Error writing the output file(s)."));
plug->mainWindowStatusLabel->setText(QObject::tr("Error writing the output file(s)."));
}
else
{
plug->FMess->setText(QObject::tr("Export successful."));
plug->mainWindowStatusLabel->setText(QObject::tr("Export successful."));
}
} // if accepted
// clean the trash
167,10 → 167,10
bool ExportBitmap::exportInterval(std::vector<int> &pageNs)
{
bool res;
carrier->FProg->setTotalSteps(pageNs.size());
carrier->mainWindowProgressBar->setTotalSteps(pageNs.size());
for (uint a = 0; a < pageNs.size(); ++a)
{
carrier->FProg->setProgress(a);
carrier->mainWindowProgressBar->setProgress(a);
res = exportPage(pageNs[a]-1, FALSE);
if (!res)
return FALSE;
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/guiapp.cpp
9,7 → 9,7
char *aText;
if (!PyArg_ParseTuple(args, "es", "utf-8", &aText))
return NULL;
Carrier->FMess->setText(QString::fromUtf8(aText));
Carrier->mainWindowStatusLabel->setText(QString::fromUtf8(aText));
Py_INCREF(Py_None);
return Py_None;
}
16,7 → 16,7
 
PyObject *scribus_progressreset(PyObject */*self*/)
{
Carrier->FProg->reset();
Carrier->mainWindowProgressBar->reset();
qApp->processEvents();
Py_INCREF(Py_None);
return Py_None;
27,8 → 27,8
int steps;
if (!PyArg_ParseTuple(args, "i", &steps))
return NULL;
Carrier->FProg->setTotalSteps(steps);
Carrier->FProg->setProgress(0);
Carrier->mainWindowProgressBar->setTotalSteps(steps);
Carrier->mainWindowProgressBar->setProgress(0);
qApp->processEvents();
Py_INCREF(Py_None);
return Py_None;
39,12 → 39,12
int position;
if (!PyArg_ParseTuple(args, "i", &position))
return NULL;
if (position > Carrier->FProg->totalSteps())
if (position > Carrier->mainWindowProgressBar->totalSteps())
{
PyErr_SetString(PyExc_ValueError, QString("Tried to set progress > maximum progress"));
return NULL;
}
Carrier->FProg->setProgress(position);
Carrier->mainWindowProgressBar->setProgress(position);
qApp->processEvents();
Py_INCREF(Py_None);
return Py_None;
/branches/Version13x/Scribus/scribus/plugins/short-words/shortwords.cpp
80,7 → 80,7
if (dlg->exec() == QDialog::Accepted) {
parse = new Parse();
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
ScApp->FMess->setText(QObject::tr("Short Words processing. Wait please...", "short words plugin"));
ScApp->mainWindowStatusLabel->setText(QObject::tr("Short Words processing. Wait please...", "short words plugin"));
switch (dlg->actionSelected) {
case 0:
parse->parseSelection();
98,8 → 98,8
// redraw document
ScApp->view->DrawNew();
QApplication::restoreOverrideCursor();
ScApp->FMess->setText(QObject::tr("Short Words processing. Done.", "short words plugin"));
ScApp->FProg->reset();
ScApp->mainWindowStatusLabel->setText(QObject::tr("Short Words processing. Done.", "short words plugin"));
ScApp->mainWindowProgressBar->reset();
// set page where user calls vlna
ScApp->view->GotoPage(originalPage);
} // action
/branches/Version13x/Scribus/scribus/plugins/short-words/parse.cpp
60,7 → 60,7
return; // no changes
 
// get text from frame
for (uint i=0; i<aFrame->MaxChars; i++)
for (uint i=0; i<aFrame->MaxChars; ++i)
content += aFrame->itemText.at(i)->ch;
changes = content.contains(UNBREAKABLE_SPACE);
for (QStringList::Iterator it = shorts.begin(); it != shorts.end(); ++it)
86,7 → 86,7
}
}
// retrun text into frame
for (uint i=0; i<aFrame->MaxChars; i++)
for (uint i=0; i<aFrame->MaxChars; ++i)
aFrame->itemText.at(i)->ch = content.at(i);
if (content.contains(UNBREAKABLE_SPACE) > changes)
++modify;
97,13 → 97,13
void Parse::parseSelection()
{
uint cnt = ScApp->view->SelItem.count();
ScApp->FProg->setTotalSteps(cnt);
for (uint i=0; i < cnt; i++)
ScApp->mainWindowProgressBar->setTotalSteps(cnt);
for (uint i=0; i < cnt; ++i)
{
ScApp->FProg->setProgress(i);
ScApp->mainWindowProgressBar->setProgress(i);
parseItem(ScApp->view->SelItem.at(i));
} // for items
ScApp->FProg->setProgress(cnt);
ScApp->mainWindowProgressBar->setProgress(cnt);
}
 
 
119,9 → 119,9
{
PageItem* b = ScApp->doc->Items.at(a);
if (b->OwnPage == page)
cnt++;
++cnt;
}
ScApp->FProg->setTotalSteps(cnt);
ScApp->mainWindowProgressBar->setTotalSteps(cnt);
ScApp->view->GotoPage(page);
uint i = 0;
for (uint a = 0; a < ScApp->doc->Items.count(); ++a)
129,16 → 129,15
PageItem* b = ScApp->doc->Items.at(a);
if (b->OwnPage == page)
{
i++;
ScApp->FProg->setProgress(i);
ScApp->mainWindowProgressBar->setProgress(++i);
parseItem(b);
}
}
ScApp->FProg->setProgress(cnt);
ScApp->mainWindowProgressBar->setProgress(cnt);
}
 
void Parse::parseAll()
{
for (uint i=0; i < ScApp->doc->Pages.count(); i++)
for (uint i=0; i < ScApp->doc->Pages.count(); ++i)
parsePage(i);
}
/branches/Version13x/Scribus/scribus/scribus.h
183,12 → 183,12
ScribusDoc *doc;
/** the splash screen */
SplashScreen *splashScreen;
QLabel* FMess;
QProgressBar* FProg;
QLabel* XMess;
QLabel* XDat;
QLabel* YMess;
QLabel* YDat;
QLabel* mainWindowStatusLabel;
QProgressBar* mainWindowProgressBar;
QLabel* mainWindowXPosLabel;
QLabel* mainWindowXPosDataLabel;
QLabel* mainWindowYPosLabel;
QLabel* mainWindowYPosDataLabel;
Mpalette *propertiesPalette;
NodePalette *nodePalette;
Tree *outlinePalette;