Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 228 → Rev 227

/trunk/Scribus/ChangeLogCVS
1,8 → 1,4
Changes since Version 1.1.5
11.04.2004 Added ToolTips for the Preferences.
When dragging Linked Textframes between Pages with the Mouse the linkage is now keeped.
Updated the Scripter Commands for Linked Textframes too.
 
10.03.2004 Enabled dragging of Objects between Pages.
When you convert a Textframe to outlines the important properties are copied too, Bug #337.
Fixed Bug #338 and #333 too.
/trunk/Scribus/scribus/page.h
151,7 → 151,6
int Myp;
bool Mpressed;
bool mCG;
bool BlockLeave;
double oldW;
QPtrList<PageItem> SelItem;
QValueList<int> SelNode;
/trunk/Scribus/scribus/libabout/about.cpp
54,7 → 54,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg(11).arg(tr("March")).arg(2004);
QString bu = tr("%1. %2 %3 ").arg(10).arg(tr("March")).arg(2004);
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/page.cpp
164,7 → 164,6
delete ss;
setActiveWindow();
raise();
ScApp->newActWin(doku->WinHan);
SeleItemPos(e->pos());
}
}
345,55 → 344,15
}
if ((re == 1) || (doku->leaveDrag))
{
uint ac = Items.count();
QPtrList<PageItem> pasted;
emit LoadElem(QString(text), qRound(e->pos().x()/doku->Scale), qRound(e->pos().y()/doku->Scale), false, false, doku);
for (uint as = ac; as < doku->ActPage->Items.count(); ++as)
{
pasted.append(Items.at(as));
}
doku->DraggedElem->OwnPage->SelItem.clear();
for (uint dre=0; dre<doku->DragElements.count(); ++dre)
{
doku->DraggedElem->OwnPage->SelItem.append(doku->DraggedElem->OwnPage->Items.at(doku->DragElements[dre]));
}
PageItem* bb;
int fin;
for (uint dre=0; dre<doku->DragElements.count(); ++dre)
{
bb = pasted.at(dre);
b = doku->DraggedElem->OwnPage->SelItem.at(dre);
if ((b->PType == 4) && ((b->NextBox != 0) || (b->BackBox != 0)))
{
if (b->BackBox != 0)
{
bb->BackBox = b->BackBox;
fin = doku->DraggedElem->OwnPage->SelItem.find(b->BackBox);
if (fin != -1)
bb->BackBox = pasted.at(fin);
bb->BackBox->NextBox = bb;
}
if (b->NextBox != 0)
{
bb->NextBox = b->NextBox;
fin = doku->DraggedElem->OwnPage->SelItem.find(b->NextBox);
if (fin != -1)
bb->NextBox = pasted.at(fin);
bb->NextBox->BackBox = bb;
}
}
}
for (uint dre=0; dre<doku->DragElements.count(); ++dre)
{
b = doku->DraggedElem->OwnPage->SelItem.at(dre);
b->NextBox = 0;
b->BackBox = 0;
}
pasted.clear();
doku->DraggedElem->OwnPage->DeleteItem();
}
}
if ((!img) && ((re == 0)))
if ((!img) && ((re == 0) || (re == 1)))
emit LoadElem(QString(text), qRound(e->pos().x()/doku->Scale), qRound(e->pos().y()/doku->Scale), false, false, doku);
doku->DraggedElem = 0;
doku->DragElements.clear();
404,9 → 363,6
}
void Page::leaveEvent(QEvent *)
{
 
if (BlockLeave)
return;
if (!Mpressed)
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
else
2966,21 → 2922,26
int cy = Anz->contentsY() - Anz->childY(doku->ActPage->parentWidget());
int cw = Anz->visibleWidth();
int ch = Anz->visibleHeight();
if ((m->y() < cy+10) || ((ch - (m->y() - cy)) - 10 < 0) || (m->x() < cx + 10) || ((cw - (m->x() - cx)) - 10 < 0))
if (m->y() < cy+10)
{
if (m->y() < cy+10)
Anz->scrollBy(0, m->y() - cy - 10);
else if ((ch - (m->y() - cy)) - 10 < 0)
Anz->scrollBy(0, m->y() - cy - ch +10);
else if (m->x() < cx + 10)
Anz->scrollBy(m->x() - cx - 10, 0);
else if ((cw - (m->x() - cx)) - 10 < 0)
Anz->scrollBy(m->x() - cx - cw + 10, 0);
BlockLeave = true;
Anz->scrollBy(0, m->y() - cy - 10);
update();
}
else
BlockLeave = false;
if ((ch - (m->y() - cy)) - 10 < 0)
{
Anz->scrollBy(0, m->y() - cy - ch +10);
update();
}
if (m->x() < cx + 10)
{
Anz->scrollBy(m->x() - cx - 10, 0);
update();
}
if ((cw - (m->x() - cx)) - 10 < 0)
{
Anz->scrollBy(m->x() - cx - cw + 10, 0);
update();
}
}
if (Mpressed && (doku->AppMode == 21))
{
3012,7 → 2973,7
newY = static_cast<int>(m->y()/sc);
if ((Mpressed) && (m->state() == RightButton) && (!doku->DragP) && (doku->AppMode == 1) && (!b->Locked))
{
if ((abs(Dxp - newX) > 5) || (abs(Dyp - newY) > 5))
if ((abs(Dxp - newX) > 3) || (abs(Dyp - newY) > 3))
{
doku->DragP = true;
doku->leaveDrag = false;
6823,7 → 6784,7
if ((b->PType == 4) && (b->isBookmark))
emit ChBMText(b);
if (b->PType == 2)
AdjustPreview(b, !doku->DragP);
AdjustPreview(b);
if (b->Select)
b->Select = false;
}
/trunk/Scribus/scribus/libprefs/prefs.cpp
561,7 → 561,7
TextLabel1_5_2 = new QLabel( GroupBox4_2, "TextLabel1_5_2" );
TextLabel1_5_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
TextLabel1_5_2->sizePolicy().hasHeightForWidth() ) );
TextLabel1_5_2->setText( tr( "Displacement:" ) );
TextLabel1_5_2->setText( tr( "Disp.:" ) );
Layout12->addWidget( TextLabel1_5_2, 0, 0 );
VTiefW = new QSpinBox( GroupBox4_2, "VTiefW" );
VTiefW->setSuffix( tr( " %" ) );
597,7 → 597,7
TextLabel1_5 = new QLabel( GroupBox4, "TextLabel1_5" );
TextLabel1_5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
TextLabel1_5->sizePolicy().hasHeightForWidth() ) );
TextLabel1_5->setText( tr( "Displacement:" ) );
TextLabel1_5->setText( tr( "Disp.:" ) );
Layout13->addWidget( TextLabel1_5, 0, 0 );
VHochW = new QSpinBox( GroupBox4, "VHochW" );
VHochW->setSuffix( tr( " %" ) );
883,7 → 883,7
TextLabelT25 = new QLabel( ToolFrame2, "TextLabel1_3_3" );
TextLabelT25->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
TextLabelT25->sizePolicy().hasHeightForWidth() ) );
TextLabelT25->setText( tr( "Line Style:" ) );
TextLabelT25->setText( tr( "Linestyle:" ) );
Layout15b->addWidget(TextLabelT25, 4, 0);
TextLabelT26 = new QLabel( ToolFrame2, "TextLabel2_3_4" );
TextLabelT26->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1450,7 → 1450,7
groupGSLayout->setAlignment( Qt::AlignTop );
GSlayout = new QHBoxLayout( 0, 0, 6, "GSlayout");
GSText = new QLabel( groupGS, "GSText" );
GSText->setText( tr( "Name of executable:" ) );
GSText->setText( tr( "Name of executeable:" ) );
GSlayout->addWidget( GSText );
GSName = new QLineEdit( groupGS, "GSName" );
GSName->setText(Vor->gs_exe);
1473,7 → 1473,7
groupGimpLayout = new QHBoxLayout( groupGimp->layout() );
groupGimpLayout->setAlignment( Qt::AlignTop );
GimpText = new QLabel( groupGimp, "GimpText" );
GimpText->setText( tr( "Name of executable:" ) );
GimpText->setText( tr( "Name of executeable:" ) );
groupGimpLayout->addWidget( GimpText );
GimpName = new QLineEdit( groupGimp, "GimpName" );
GimpName->setText(Vor->gimp_exe);
1525,115 → 1525,6
Layout3->addItem( spacer_3 );
PrefsLayout->addLayout( Layout3 );
setDS();
 
//cab
QToolTip::add( GUICombo, tr( "Choose the default window decoration and looks.\nScribus inherits any available KDE or Qt themes" ) );
QToolTip::add( GFsize, tr( "Default font size for the menus and windows" ) );
QToolTip::add( UnitCombo, tr( "Default unit of measurement for document editing" ) );
QToolTip::add( SpinBox3, tr( "Number of lines Scribus will scroll for each move of the mouse wheel" ) );
QToolTip::add( SpinBox3_2, tr( "Radius of the area where Scribus will allow you to grab an objects handles" ) );
QToolTip::add( Recen, tr( "Number of recently edited documents to show in the File menu" ) );
QToolTip::add( Shorty, tr( "Change the keyboard shortcuts to your preference" ) );
QToolTip::add( Docs, tr( "Default documents directory" ) );
QToolTip::add( ProPfad, tr( "Default ICC profiles directory" ) );
QToolTip::add( ScriptPfad, tr( "Default Scripter scripts directory" ) );
 
QToolTip::add( GZComboF, tr( "Default page size, either a standard size or a custom size" ) );
QToolTip::add( GZComboO, tr( "Default orientation of document pages" ) );
QToolTip::add( Breite, tr( "Width of document pages, editable if you have chosen a custom page size" ) );
QToolTip::add( Hoehe, tr( "Height of document pages, editable if you have chosen a custom page size" ) );
QToolTip::add( Doppelseiten, tr( "Enable single or spread based layout" ) );
QToolTip::add( Linkszuerst, tr( "Make the first page the left page of a document" ) );
QToolTip::add( TopR, tr( "Distance between the top margin guide and the edge of the page" ) );
QToolTip::add( BottomR, tr( "Distance between the bottom margin guide and the edge of the page" ) );
QToolTip::add( LeftR, tr( "Distance between the left margin guide and the edge of the page.\nIf Facing Pages is selected, this margin space can be used to achieve the correct margins for binding" ) );
QToolTip::add( RightR, tr( "Distance between the left margin guide and the edge of the page.\nIf Facing Pages is selected, this margin space can be used to achieve the correct margins for binding" ) );
QToolTip::add( ASon, tr( "When enabled, Scribus saves a backup copy of your file with the .bak extension\neach time the time period elapses" ) );
QToolTip::add( ASTime, tr( "Time period between saving automatically" ) );
 
QToolTip::add( SpinBox1, tr( "Distance between the minor grid lines" ) );
QToolTip::add( SpinBox2, tr( "Distance between the major grid lines" ) );
QToolTip::add( SpinBox2g, tr( "Distance within which an object will snap to your placed guides" ) );
QToolTip::add( minColor, tr( "Color of the minor grid lines" ) );
QToolTip::add( MaxColor, tr( "Color of the major grid lines" ) );
QToolTip::add( GuideColor, tr( "Color of the guide lines you insert" ) );
QToolTip::add( RadioButton6, tr( "Place the grid behind your page objects" ) );
QToolTip::add( RadioButton7, tr( "Place the grid in front of your page objects" ) );
 
QToolTip::add( VHochW, tr( "Displacement above the baseline of the font on a line" ) );
QToolTip::add( VHochWSc, tr( "Relative size of the superscript compared to the normal font" ) );
QToolTip::add( VTiefW, tr( "Displacement below the baseline of the normal font on a line" ) );
QToolTip::add( VTiefWSc, tr( "Relative size of the subscript compared to the normal font" ) );
QToolTip::add( SmallCaps, tr( "Relative size of the small caps font compared to the normal font" ) );
QToolTip::add( AutoLineV, tr( "Percentage increase over the font size for the line spacing" ) );
 
QToolTip::add( TextButton, tr( "Text Frame Properties" ) );
QToolTip::add( BildButton, tr( "Picture Frame Properties" ) );
QToolTip::add( RectButton, tr( "Shape Drawing Properties" ) );
QToolTip::add( OvalButton, tr( "Shape Drawing Properties" ) );
QToolTip::add( ZoomButton, tr( "Magnification Level Defaults" ) );
QToolTip::add( LineButton, tr( "Line Drawing Properties" ) );
QToolTip::add( PolyButton, tr( "Polygon Drawing Properties" ) );
 
QToolTip::add( FontComb, tr( "Font for new text frames" ) );
QToolTip::add( SizeCombo, tr( "Size of font for new text frames" ) );
QToolTip::add( ForegroundT, tr( "Color of font" ) );
QToolTip::add( TextColVal, tr( "Number of columns in a text frame" ) );
QToolTip::add( TextGapVal, tr( "Gap between text frame columns" ) );
QToolTip::add( TextLabel1_4, tr( "Sample of your font" ) );
 
 
QToolTip::add( FreeScale, tr( "Picture frames allow pictures to scale to any size" ) );
QToolTip::add( XScale, tr( "Horizontal scaling of images" ) );
QToolTip::add( YScale, tr( "Vertical scaling of images" ) );
QToolTip::add( Kette, tr( "Keep horizontal and vertical scaling the same" ) );
QToolTip::add( FrameScale, tr( "Pictures in picture frames are scaled to the size of the frame" ) );
QToolTip::add( Aspect, tr( "Automatically scaled pictures keep their original proportions" ) );
QToolTip::add( BackgroundP, tr( "Fill color of picture frames" ) );
QToolTip::add( ShadeP, tr( "Saturation of color of fill" ) );
 
QToolTip::add( Foreground, tr( "Line color of shapes" ) );
QToolTip::add( Shade2, tr( "Saturation of color of lines" ) );
QToolTip::add( Background, tr( "Fill color of shapes" ) );
QToolTip::add( Shade, tr( "Saturation of color of fill" ) );
QToolTip::add( Linestyle, tr( "Line style of shapes" ) );
QToolTip::add( LineW, tr( "Line width of shapes" ) );
 
QToolTip::add( MinMag, tr( "Minimum magnification allowed" ) );
QToolTip::add( MaxMag, tr( "Maximum magnification allowed" ) );
QToolTip::add( StepMag, tr( "Change in magnification for each zoom operation" ) );
 
QToolTip::add( Foreground2, tr( "Color of lines" ) );
QToolTip::add( Shade22, tr( "Saturation of color" ) );
QToolTip::add( Linestyle2, tr( "Style of lines" ) );
QToolTip::add( LineW2, tr( "Width of lines" ) );
 
QToolTip::add( T6_Ecken, tr( "Number of corners for polygons" ) );
QToolTip::add( T6_Faktor2, tr( "Degrees of rotation for polygons" ) );
QToolTip::add( T6_Slider2, tr( "Degrees of rotation for polygons" ) );
QToolTip::add( T6_Konvex, tr( "Polygons will be convex rather than concave" ) );
QToolTip::add( T6_Preview, tr( "Sample Polygon" ) );
QToolTip::add( T6_Faktor, tr( "Change the angles at which lines of the polygon join" ) );
QToolTip::add( T6_Slider1, tr( "Change the angles at which lines of the polygon join" ) );
 
QToolTip::add( PreviewSize, tr( "Choose the size of the preview in the scrapbook palette" ) );
QToolTip::add( SaveAtQuit, tr( "Keep the scrapbook contents after closing Scribus" ) );
 
QToolTip::add( SidebySide, tr( "When using facing pages, show the two pages side by side" ) );
QToolTip::add( PapColor, tr( "Color for paper" ) );
QToolTip::add( RandColor, tr( "Color for the margin lines" ) );
QToolTip::add( RandFarb, tr( "Mask the area outside the margins in the margin color" ) );
QToolTip::add( UsePDFTrans, tr( "Enable transparency features within PDF 1.4 export" ) );
QToolTip::add( CaliSlider, tr( "Set the default zoom level" ) );
 
QToolTip::add( GSName, tr( "Filesystem location for the Ghostscript interpreter" ) );
QToolTip::add( GSantiText, tr( "Antialias text for EPS and PDF onscreen rendering" ) );
QToolTip::add( GSantiGraph, tr( "Antialias graphics for EPS and PDF onscreen rendering" ) );
QToolTip::add( GimpName, tr( "Filesystem location for editing graphics" ) );
 
QToolTip::add( ClipMarg, tr( "Do not show objects outside the margins on the printed page or exported file" ) );
 
// signals and slots connections
connect( minColor, SIGNAL( clicked() ), this, SLOT( changeMicolor() ) );
connect( MaxColor, SIGNAL( clicked() ), this, SLOT( changeMaColor() ) );
/trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
584,13 → 584,14
if (!Carrier->HaveDoc)
return Py_None;
 
PageItem *item1 = GetUniqueItem(QString(name1));
if (!item1)
int id1 = GetItem(QString(name1));
int id2 = GetItem(QString(name2));
if ((id1 == -1) || (id2 == -1))
return Py_None;
PageItem *item2 = GetUniqueItem(QString(name2));
if (!item2)
return Py_None;
 
PageItem *item1 = Carrier->doc->ActPage->Items.at(id1);
PageItem *item2 = Carrier->doc->ActPage->Items.at(id2);
 
/* only empty textframe, only not linked and selfhate :) */
if ((item2->Ptext.count() == 0) && (item2->NextBox == 0)
&& (item2->BackBox == 0) && (item1 != item2))
598,8 → 599,27
// references to the others boxes
item1->NextBox = item2;
item2->BackBox = item1;
// linked hs to be younger && same page
if ((item2->ItemNr < item1->ItemNr)
&& (item2->OwnPage == item1->OwnPage))
{
 
Carrier->doc->ActPage->Items.insert(item1->ItemNr+1, item2);
item2 = Carrier->doc->ActPage->Items.take(item2->ItemNr);
// redistribute item's numbers
for (uint i = 0; i<Carrier->doc->ActPage->Items.count(); ++i)
{
Carrier->doc->ActPage->Items.at(i)->ItemNr = i;
// handles bookmarks (was SIGNAL(NewBMNr(int, int)))
if (Carrier->doc->ActPage->Items.at(i)->isBookmark)
Carrier->BookPal->BView->ChangeItem(
Carrier->doc->ActPage->Items.at(i)->BMnr,
i);
} // for i
 
} // if younger
 
item1->OwnPage->repaint();
item2->OwnPage->repaint();
// enable 'save icon' stuff
Carrier->slotDocCh();
 
619,9 → 639,10
if (!Carrier->HaveDoc)
return Py_None;
 
PageItem *item = GetUniqueItem(name);
if (!item)
int id = GetItem(QString(name));
if (id == -1)
return Py_None;
PageItem *item = Carrier->doc->ActPage->Items.at(id);
 
// only linked
if (item->BackBox != 0)
/trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp
74,42 → 74,21
{
for (uint c = 0; c < Carrier->view->Pages.at(b)->Items.count(); c++)
{
PageItem *ite = Carrier->view->Pages.at(b)->Items.at(c);
if (ite->PType == 4)
if (Carrier->view->Pages.at(b)->Items.at(c)->PType == 4)
{
for (uint d = 0; d < ite->Ptext.count(); d++)
for (uint d = 0; d < Carrier->view->Pages.at(b)->Items.at(c)->Ptext.count(); d++)
{
if (col == ite->Ptext.at(d)->ccolor)
ite->Ptext.at(d)->ccolor = rep;
if (col == ite->Ptext.at(d)->cstroke)
ite->Ptext.at(d)->cstroke = rep;
if (col == Carrier->view->Pages.at(b)->Items.at(c)->Ptext.at(d)->ccolor)
{
Carrier->view->Pages.at(b)->Items.at(c)->Ptext.at(d)->ccolor = rep;
}
}
}
if (col == ite->Pcolor)
ite->Pcolor = rep;
if (col == ite->Pcolor2)
ite->Pcolor2 = rep;
if (col == ite->GrColor)
ite->GrColor = rep;
if (col == ite->GrColor2)
ite->GrColor2 = rep;
Carrier->view->Pages.at(b)->AdjItemGradient(ite, ite->GrType, ite->GrColor2, ite->GrShade2, ite->GrColor, ite->GrShade);
if (col == Carrier->view->Pages.at(b)->Items.at(c)->Pcolor)
Carrier->view->Pages.at(b)->Items.at(c)->Pcolor = rep;
if (col == Carrier->view->Pages.at(b)->Items.at(c)->Pcolor2)
Carrier->view->Pages.at(b)->Items.at(c)->Pcolor2 = rep;
}
}
}
 
PageItem* GetUniqueItem(QString name)
{
if (name.length()==0)
return NULL;
for (uint i = 0; i<Carrier->view->Pages.count(); i++)
{
for (uint j = 0; j<Carrier->view->Pages.at(i)->Items.count(); j++)
{
if (name==Carrier->view->Pages.at(i)->Items.at(j)->AnName)
return Carrier->view->Pages.at(i)->Items.at(j);
} // for items
} // for pages
return NULL;
}
 
/trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.h
8,12 → 8,5
double ValueToPoint(double Val);
int GetItem(QString Name);
void ReplaceColor(QString col, QString rep);
/*!
* Returns PageItem itself by its unique name - page
* independent.
* 03/10/2004 petr vanek
*/
PageItem* GetUniqueItem(QString name);
 
#endif