Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 279 → Rev 280

/trunk/Scribus/ChangeLogCVS
1,7 → 1,16
Changes since Version 1.1.6
 
09.05.2004
* bug #604: Grouped items can be grouped again
* bug #620: Differing tab settings can cause wrapping text on top of other text
* bug #622: Merge of charselect* and svgexport* POs
* bug #624: Scribus is inserting incorrect paths into file names when saving
* feature #609: same style for saturation and intensity of a color
* feature #629: Improve the Tabmanager and the EditStyle Dialogs with a Ruler for setting Tabs and Indents.
 
08.05.2004
* bug #608: Change buttons for "center" and "right" alignment...
* bug #613: Autotools fix for Debian
* bug #618: Minor rearranging of right click menu items
* feature #231: Add in ability to import Colour Sets into current document
* feature #614: Polish translation update
/trunk/Scribus/Scribus.pro
103,6 → 103,7
scribus/story.cpp \
scribus/styleselect.cpp \
scribus/tabmanager.cpp \
scribus/tabruler.cpp \
scribus/translationdummy.cpp \
scribus/tree.cpp \
scribus/util.cpp \
/trunk/Scribus/scribus/edit1format.h
19,6 → 19,7
#include "styleselect.h"
#include "scribusdoc.h"
#include "shadebutton.h"
class Tabruler;
 
class EditStyle : public QDialog
{
30,15 → 31,12
~EditStyle() {};
 
QLabel* TextLabel1;
QLabel* TextLabel1_2;
QLabel* TextLabel2;
QLabel* TextLabel3;
QLabel* TextLabel1_2_2;
QLabel* TextLabel1_2_3;
QLineEdit* Name;
MSpinBox* LineSpVal;
MSpinBox* LeftInd;
MSpinBox* FirstLin;
Tabruler* TabList;
MSpinBox* AboveV;
MSpinBox* BelowV;
QLabel* EffeLabel;
52,7 → 50,6
FontCombo* FontC;
MSpinBox* SizeC;
QLabel* TextF2;
QPushButton* TabsButton;
QLabel* StrokeIcon;
QComboBox* TxStroke;
ShadeButton *PM1;
75,7 → 72,6
private slots:
void Verlassen();
void FontChange();
void ManageTabs();
void ManageDrops();
void ColorChange();
 
82,7 → 78,7
protected:
QHBoxLayout* Layout17;
QGridLayout* EditStyleLayout;
QGridLayout* GroupBox10Layout;
QVBoxLayout* GroupBox10Layout;
QGridLayout* AbstandVLayout;
QGridLayout* GroupFontLayout;
};
/trunk/Scribus/scribus/mpalette.cpp
3217,7 → 3217,17
{
if ((HaveDoc) && (HaveItem))
{
TabManager *dia = new TabManager(this, doc->Einheit, CurItem->TabValues);
double lineCorr;
if (CurItem->Pcolor2 != "None")
lineCorr = CurItem->Pwidth;
else
lineCorr = 0;
double ColWidth;
if (CurItem->Cols > 1)
ColWidth = (CurItem->Width - (CurItem->ColGap * (CurItem->Cols - 1)) - CurItem->Extra - CurItem->RExtra - lineCorr) / CurItem->Cols;
else
ColWidth = CurItem->Width;
TabManager *dia = new TabManager(this, doc->Einheit, CurItem->TabValues, ColWidth);
if (dia->exec())
{
CurItem->TabValues = dia->tmpTab;
/trunk/Scribus/scribus/edit1format.cpp
1,6 → 1,6
#include "edit1format.h"
#include "edit1format.moc"
#include "tabmanager.h"
#include "tabruler.h"
extern QPixmap loadIcon(QString nam);
extern double UmReFaktor;
#include <qmessagebox.h>
48,7 → 48,7
break;
}
}
GroupFontLayout->addMultiCellWidget( FontC, 0, 0, 1, 2 );
GroupFontLayout->addMultiCellWidget( FontC, 0, 0, 1, 4 );
TextF2 = new QLabel( GroupFont, "TextF2" );
TextF2->setMinimumSize( QSize( 50, 22 ) );
TextF2->setText( tr( "Size:" ) );
62,34 → 62,50
GroupFontLayout->addWidget( SizeC, 1, 1 );
EffeLabel = new QLabel( GroupFont, "EffeLabel" );
EffeLabel->setText( tr("Effect:"));
GroupFontLayout->addWidget( EffeLabel, 2, 0 );
GroupFontLayout->addWidget( EffeLabel, 1, 2 );
EffeS = new StyleSelect(GroupFont);
EffeS->setStyle(vor->FontEffect);
GroupFontLayout->addWidget( EffeS, 2, 1, Qt::AlignLeft );
GroupFontLayout->addMultiCellWidget( EffeS, 1, 1, 3, 4, Qt::AlignLeft );
AligLabel = new QLabel( GroupFont, "AligLabel" );
AligLabel->setText( tr("Alignment:"));
GroupFontLayout->addWidget( AligLabel, 3, 0 );
GroupFontLayout->addWidget( AligLabel, 2, 0 );
AligS = new AlignSelect(GroupFont);
AligS->setStyle(vor->Ausri);
GroupFontLayout->addWidget( AligS, 3, 1, Qt::AlignLeft );
GroupFontLayout->addWidget( AligS, 2, 1, Qt::AlignLeft );
 
DropCaps = new QCheckBox( GroupFont, "DropCaps" );
DropCaps->setText( tr( "Drop Caps" ) );
DropCaps->setChecked(vor->Drop);
GroupFontLayout->addWidget( DropCaps, 2, 2 );
CapLabel = new QLabel( GroupFont, "CapLabel" );
CapLabel->setText( tr("Lines:"));
GroupFontLayout->addWidget( CapLabel, 2, 3, Qt::AlignRight );
DropLines = new QSpinBox( GroupFont, "DropLines" );
DropLines->setMinValue( 2 );
DropLines->setMaxValue( 20 );
DropLines->setValue(vor->DropLin);
GroupFontLayout->addWidget( DropLines, 2, 4 );
bool enable = vor->Drop ? true : false;
DropLines->setEnabled(enable);
CapLabel->setEnabled(enable);
 
FillIcon = new QLabel( GroupFont, "FillIcon" );
FillIcon->setText( tr("Fill Color:"));
GroupFontLayout->addWidget( FillIcon, 4, 0 );
GroupFontLayout->addWidget( FillIcon, 3, 0 );
TxFill = new QComboBox( true, GroupFont, "TxFill" );
TxFill->setEditable(false);
GroupFontLayout->addWidget( TxFill, 4, 1 );
GroupFontLayout->addWidget( TxFill, 3, 1 );
PM2 = new ShadeButton(GroupFont);
GroupFontLayout->addWidget( PM2, 4, 2, Qt::AlignLeft );
GroupFontLayout->addWidget( PM2, 3, 2, Qt::AlignLeft );
 
StrokeIcon = new QLabel( GroupFont, "StrokeIcon" );
StrokeIcon->setText( tr("Stroke Color:"));
GroupFontLayout->addWidget( StrokeIcon, 5, 0 );
GroupFontLayout->addWidget( StrokeIcon, 4, 0 );
TxStroke = new QComboBox( true, GroupFont, "TxStroke" );
TxStroke->setEditable(false);
GroupFontLayout->addWidget( TxStroke, 5, 1 );
GroupFontLayout->addWidget( TxStroke, 4, 1 );
PM1 = new ShadeButton(GroupFont);
GroupFontLayout->addWidget( PM1, 5, 2, Qt::AlignLeft );
GroupFontLayout->addWidget( PM1, 4, 2, Qt::AlignLeft );
 
TxFill->clear();
TxStroke->clear();
110,60 → 126,8
PM2->setValue(vor->FShade);
PM1->setValue(vor->SShade);
 
DropCaps = new QCheckBox( GroupFont, "DropCaps" );
DropCaps->setText( tr( "Drop Caps" ) );
DropCaps->setChecked(vor->Drop);
GroupFontLayout->addMultiCellWidget( DropCaps, 6, 6, 0, 2 );
CapLabel = new QLabel( GroupFont, "CapLabel" );
CapLabel->setText( tr("Lines:"));
GroupFontLayout->addWidget( CapLabel, 7, 0 );
DropLines = new QSpinBox( GroupFont, "DropLines" );
DropLines->setMinValue( 2 );
DropLines->setMaxValue( 20 );
DropLines->setValue(vor->DropLin);
GroupFontLayout->addWidget( DropLines, 7, 1 );
bool enable = vor->Drop ? true : false;
DropLines->setEnabled(enable);
CapLabel->setEnabled(enable);
 
EditStyleLayout->addMultiCellWidget( GroupFont, 2, 3, 0, 0 );
 
GroupBox10 = new QGroupBox( this, "GroupBox10" );
GroupBox10->setTitle( tr( "Indentation" ) );
GroupBox10->setColumnLayout(0, Qt::Vertical );
GroupBox10->layout()->setSpacing( 0 );
GroupBox10->layout()->setMargin( 0 );
GroupBox10Layout = new QGridLayout( GroupBox10->layout() );
GroupBox10Layout->setAlignment( Qt::AlignTop );
GroupBox10Layout->setSpacing( 5 );
GroupBox10Layout->setMargin( 10 );
TextLabel1_2 = new QLabel( GroupBox10, "TextLabel1_2" );
TextLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
TextLabel1_2->sizePolicy().hasHeightForWidth() ) );
TextLabel1_2->setMinimumSize( QSize( 90, 22 ) );
TextLabel1_2->setText( tr( "Left Indent:" ) );
GroupBox10Layout->addWidget( TextLabel1_2, 1, 0 );
TextLabel2 = new QLabel( GroupBox10, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setMinimumSize( QSize( 90, 22 ) );
TextLabel2->setText( tr( "First Line:" ) );
GroupBox10Layout->addWidget( TextLabel2, 0, 0 );
 
LeftInd = new MSpinBox( GroupBox10, 1 );
LeftInd->setMaxValue( 300 );
LeftInd->setMinValue( -300 );
GroupBox10Layout->addWidget( LeftInd, 1, 1 );
 
FirstLin = new MSpinBox( GroupBox10, 1);
FirstLin->setMaxValue( 300 );
FirstLin->setMinValue( -300 );
GroupBox10Layout->addWidget( FirstLin, 0, 1 );
TabsButton = new QPushButton( GroupBox10, "Tabul" );
TabsButton->setText( tr( "Tabulators..." ) );
GroupBox10Layout->addMultiCellWidget( TabsButton, 2, 2, 0, 1 );
EditStyleLayout->addWidget( GroupBox10, 3, 1 );
 
EditStyleLayout->addWidget( GroupFont, 2, 0 );
AbstandV = new QGroupBox( this, "AbstandV" );
AbstandV->setTitle( tr( "Vertical Spaces" ) );
AbstandV->setColumnLayout(0, Qt::Vertical );
218,6 → 182,24
AbstandVLayout->addWidget( TextLabel1_2_3, 2, 0 );
EditStyleLayout->addWidget( AbstandV, 2, 1 );
 
GroupBox10 = new QGroupBox( this, "GroupBox10" );
GroupBox10->setTitle( tr( "Tabulators and Indentation" ) );
GroupBox10->setColumnLayout(0, Qt::Vertical );
GroupBox10->layout()->setSpacing( 0 );
GroupBox10->layout()->setMargin( 0 );
GroupBox10Layout = new QVBoxLayout(GroupBox10->layout());
GroupBox10Layout->setAlignment( Qt::AlignTop );
GroupBox10Layout->setSpacing( 5 );
GroupBox10Layout->setMargin( 10 );
TabList = new Tabruler(GroupBox10, true, DocsEin, vor->TabValues, -1);
TabList->setIndentSpin(vor->Indent);
TabList->setFirstSpin(vor->First);
TabList->setIndent();
TabList->setFirst();
GroupBox10Layout->addWidget( TabList );
 
EditStyleLayout->addMultiCellWidget( GroupBox10, 3, 3, 0, 1 );
 
Layout17 = new QHBoxLayout;
Layout17->setSpacing( 6 );
Layout17->setMargin( 0 );
249,19 → 231,13
QToolTip::add( AboveV, tr( "Spacing above the paragraph" ) );
QToolTip::add( BelowV, tr( "Spacing below the paragraph" ) );
QToolTip::add( LineSpVal, tr( "Line Spacing" ) );
QToolTip::add( FirstLin, tr( "Indentation for first line of the paragraph" ) );
QToolTip::add( LeftInd, tr( "Indentation from the left for the whole paragraph" ) );
QToolTip::add( TabsButton, tr( "Edit tab settings of text frame..." ) );
 
// signals and slots connections
connect( Cancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( OkButton, SIGNAL( clicked() ), this, SLOT( Verlassen() ) );
connect( TabsButton, SIGNAL( clicked() ), this, SLOT( ManageTabs() ) );
connect( DropCaps, SIGNAL( clicked() ), this, SLOT( ManageDrops() ) );
connect(SizeC, SIGNAL(valueChanged(int)), this, SLOT(FontChange()));
connect(EffeS, SIGNAL(State(int)), this, SLOT(ColorChange()));
LeftInd->setDecimals(10);
FirstLin->setDecimals(10);
AboveV->setDecimals(10);
BelowV->setDecimals(10);
/* PFJ - 29.02.04 - Altered switch so only case 2 is tested */
269,19 → 245,13
ein = measure[dEin];
if (dEin == 2)
{
LeftInd->setDecimals(10000);
FirstLin->setDecimals(10000);
AboveV->setDecimals(10000);
BelowV->setDecimals(10000);
}
LeftInd->setSuffix(ein);
FirstLin->setSuffix(ein);
AboveV->setSuffix(ein);
BelowV->setSuffix(ein);
BelowV->setValue(vor->Anach * UmReFaktor);
AboveV->setValue(vor->Avor * UmReFaktor);
FirstLin->setValue(vor->First * UmReFaktor);
LeftInd->setValue(vor->Indent * UmReFaktor);
ColorChange();
}
 
300,14 → 270,6
CapLabel->setEnabled(enabled);
}
 
void EditStyle::ManageTabs()
{
TabManager *dia = new TabManager(this, DocsEin, werte->TabValues);
if (dia->exec())
werte->TabValues = dia->tmpTab;
delete dia;
}
 
void EditStyle::FontChange()
{
double val = SizeC->value();
350,8 → 312,8
werte->FontEffect = EffeS->getStyle();
werte->Ausri = AligS->getStyle();
werte->LineSpa = LineSpVal->value();
werte->Indent = LeftInd->value() / UmReFaktor;
werte->First = FirstLin->value() / UmReFaktor;
werte->Indent = TabList->getIndent();
werte->First = TabList->getFirst();
werte->Avor = AboveV->value() / UmReFaktor;
werte->Anach = BelowV->value() / UmReFaktor;
werte->Vname = Name->text();
364,5 → 326,6
werte->SColor = TxStroke->currentText();
werte->SShade = PM1->getValue();
werte->BaseAdj = BaseGrid->isChecked();
werte->TabValues = TabList->getTabVals();
accept();
}
/trunk/Scribus/scribus/tabmanager.h
16,50 → 16,27
 
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QComboBox;
class QLabel;
class QListBox;
class QListBoxItem;
class QPushButton;
class MSpinBox;
class Tabruler;
 
class TabManager : public QDialog
{
Q_OBJECT
Q_OBJECT
 
public:
TabManager( QWidget* parent, int dEin, QValueList<double> inTab);
~TabManager() {};
void UnitChange(int dEin);
void UpdateTabL();
TabManager( QWidget* parent, int dEin, QValueList<double> inTab, double wid);
~TabManager() {};
Tabruler* TabList;
QPushButton* OKButton;
QPushButton* CancelButton;
QValueList<double> tmpTab;
 
QListBox* TabList;
QLabel* Text1;
QLabel* Text2;
QComboBox* Align;
MSpinBox* Position;
QPushButton* OKButton;
QPushButton* CancelButton;
QPushButton* DelButton;
QPushButton* AddButton;
QValueList<double> tmpTab;
int selTab;
int Einheit;
 
public slots:
void DelTab();
void AddTab();
void ChangeType();
void selIte(QListBoxItem *c);
void PValChange();
void exitOK();
 
protected:
QVBoxLayout* TabManagerLayout;
QHBoxLayout* layout9;
QVBoxLayout* layout8;
QGridLayout* layout7;
QGridLayout* layout10;
QVBoxLayout* TabManagerLayout;
QHBoxLayout* layout10;
};
 
#endif // TABMANAGER_H
/trunk/Scribus/scribus/tabruler.cpp
0,0 → 1,636
/****************************************************************************
** Form implementation generated from reading ui file 'tabruler.ui'
**
** Created: Son Mai 9 12:45:43 2004
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
 
#include "tabruler.h"
#include "tabruler.moc"
#include <qvariant.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include "mspinbox.h"
#include <qtoolbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qpainter.h>
#include <qcursor.h>
#include <qcolor.h>
extern QPixmap loadIcon(QString nam);
extern double UmReFaktor;
 
RulerT::RulerT(QWidget *pa, int ein, QValueList<double> Tabs, bool ind, double wid) : QWidget(pa)
{
setEraseColor(QColor(255,255,255));
Einheit = ein;
TabValues = Tabs;
haveInd = ind;
Offset = 0;
First = 0;
Indent = 0;
Mpressed = false;
RulerCode = 0;
setMouseTracking(true);
if (wid < 0)
{
setMinimumSize(QSize(400,25));
setMaximumSize(QSize(4000,25));
Width = 4000;
resize(400, 25);
}
else
{
Width = wid;
setMinimumSize(QSize(QMIN(static_cast<int>(Width), 400),25));
setMaximumSize(QSize(QMIN(static_cast<int>(Width), 400),25));
resize(QMIN(static_cast<int>(wid), 400), 25);
}
}
 
void RulerT::paintEvent(QPaintEvent *)
{
double xl, iter, iter2;
switch (Einheit)
{
case 0:
iter = 10.0;
iter2 = iter * 10.0;
break;
case 1:
iter = (10.0 / 25.4) * 72.0;
iter2 = iter * 10.0;
break;
case 2:
iter = 18.0;
iter2 = 72.0;
break;
case 3:
iter = 12.0;
iter2 = 120.0;
break;
}
QPainter p;
p.begin(this);
p.drawLine(0, 24, width(), 24);
p.translate(-Offset, 0);
p.setBrush(black);
p.setFont(font());
p.setPen(QPen(black, 1, SolidLine, FlatCap, MiterJoin));
for (xl = 0; xl < width()+Offset; xl += iter)
{
if (xl < Offset)
continue;
p.drawLine(qRound(xl), 18, qRound(xl), 24);
}
for (xl = 0; xl < width()+(iter2/2)+Offset; xl += iter2)
{
if (xl < Offset)
continue;
p.drawLine(qRound(xl), 11, qRound(xl), 24);
switch (Einheit)
{
case 2:
{
QString tx = "";
int num1 = static_cast<int>(xl / iter2);
if (num1 != 0)
tx = QString::number(num1);
double frac = (xl / iter2) - num1;
if ((frac > 0.24) && (frac < 0.26))
tx += QChar(0xBC);
if ((frac > 0.49) && (frac < 0.51))
tx += QChar(0xBD);
if ((frac > 0.74) && (frac < 0.76))
tx += QChar(0xBE);
p.drawText(qRound(xl+2), 17, tx);
break;
}
case 3:
p.drawText(qRound(xl+2), 17, QString::number(xl / iter));
break;
default:
p.drawText(qRound(xl+2), 17, QString::number(xl / iter * 10));
break;
}
}
if (TabValues.count() != 0)
{
for (int yg = 0; yg < static_cast<int>(TabValues.count()-1); yg += 2)
{
if (yg == ActTab)
p.setPen(QPen(red, 2, SolidLine, FlatCap, MiterJoin));
else
p.setPen(QPen(black, 2, SolidLine, FlatCap, MiterJoin));
switch (static_cast<int>(TabValues[yg]))
{
case 0:
p.drawLine(qRound(TabValues[yg+1]), 15, qRound(TabValues[yg+1]), 23);
p.drawLine(qRound(TabValues[yg+1]), 23, qRound(TabValues[yg+1]+8), 23);
break;
case 1:
p.drawLine(qRound(TabValues[yg+1]), 15, qRound(TabValues[yg+1]), 23);
p.drawLine(qRound(TabValues[yg+1]), 23, qRound(TabValues[yg+1]-8), 23);
break;
case 2:
case 3:
p.drawLine(qRound(TabValues[yg+1]), 15, qRound(TabValues[yg+1]), 23);
p.drawLine(qRound(TabValues[yg+1]-4), 23, qRound(TabValues[yg+1]+4), 23);
p.drawLine(qRound(TabValues[yg+1]+3), 20, qRound(TabValues[yg+1]+2), 20);
break;
case 4:
p.drawLine(qRound(TabValues[yg+1]), 15, qRound(TabValues[yg+1]), 23);
p.drawLine(qRound(TabValues[yg+1]-4), 23, qRound(TabValues[yg+1]+4), 23);
break;
default:
break;
}
}
}
if (haveInd)
{
p.setPen(QPen(blue, 1, SolidLine, FlatCap, MiterJoin));
p.setBrush(blue);
QPointArray cr;
cr.setPoints(3, qRound(First+Indent), 12, qRound(First+Indent-4), 0, qRound(First+Indent+4), 0);
p.drawPolygon(cr);
QPointArray cr2;
cr2.setPoints(3, qRound(Indent), 12, qRound(Indent+4), 24, qRound(Indent-4), 24);
p.drawPolygon(cr2);
}
p.end();
}
 
void RulerT::mousePressEvent(QMouseEvent *m)
{
QRect fpo;
Mpressed = true;
RulerCode = 0;
if (haveInd)
{
fpo = QRect(static_cast<int>(First+Indent-Offset)-4, 0, 8, 12);
if (fpo.contains(m->pos()))
{
RulerCode = 1;
MouseX = m->x();
return;
}
fpo = QRect(static_cast<int>(Indent-Offset)-4, 12, 8, 12);
if (fpo.contains(m->pos()))
{
RulerCode = 2;
MouseX = m->x();
return;
}
}
if (TabValues.count() != 0)
{
for (int yg = 0; yg < static_cast<int>(TabValues.count()-1); yg += 2)
{
fpo = QRect(static_cast<int>(TabValues[yg+1]-Offset)-3, 15, 8, 8);
if (fpo.contains(m->pos()))
{
RulerCode = 3;
ActTab = yg;
MouseX = m->x();
emit TypeChanged(static_cast<int>(TabValues[ActTab]));
emit TabMoved(TabValues[ActTab+1]);
repaint();
return;
}
}
}
if ((RulerCode == 0) && (m->button() == LeftButton))
{
TabValues.prepend(static_cast<double>(m->x() + Offset));
TabValues.prepend(0);
ActTab = 0;
RulerCode = 3;
UpdateTabList();
repaint();
emit NewTab();
emit TypeChanged(static_cast<int>(TabValues[ActTab]));
emit TabMoved(TabValues[ActTab+1]);
qApp->setOverrideCursor(QCursor(SizeHorCursor), true);
}
MouseX = m->x();
}
 
void RulerT::mouseReleaseEvent(QMouseEvent *m)
{
Mpressed = false;
if ((m->y() < height()) && (m->y() > 0))
{
if (RulerCode == 3)
{
if (m->button() == RightButton)
{
TabValues[ActTab] += 1.0;
if (TabValues[ActTab] > 4.0)
TabValues[ActTab] = 0.0;
emit TypeChanged(static_cast<int>(TabValues[ActTab]));
repaint();
}
}
}
else
{
if (RulerCode == 3)
{
QValueList<double>::Iterator it;
it = TabValues.at(ActTab);
it = TabValues.remove(it);
TabValues.remove(it);
ActTab = 0;
if (TabValues.count() != 0)
{
emit TypeChanged(static_cast<int>(TabValues[ActTab]));
emit TabMoved(TabValues[ActTab+1]);
}
else
emit NoTabs();
repaint();
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
}
}
RulerCode = 0;
}
 
void RulerT::mouseMoveEvent(QMouseEvent *m)
{
double oldInd;
QRect fpo;
if ((Mpressed) && (m->y() < height()) && (m->y() > 0) && (m->x() > 0) && (m->x() < width()))
{
qApp->setOverrideCursor(QCursor(SizeHorCursor), true);
switch (RulerCode)
{
case 1:
First -= MouseX - m->x();
if (First+Indent+Offset < Offset)
First += MouseX - m->x();
if (First+Indent > Width)
First = Width-Indent;
emit FirstMoved(First);
repaint();
break;
case 2:
oldInd = Indent+First;
Indent -= MouseX - m->x();
if (Indent < 0)
Indent = 0;
if (Indent > Width-1)
Indent = Width-1;
First = oldInd - Indent;
emit IndentMoved(Indent);
emit FirstMoved(First);
repaint();
break;
case 3:
TabValues[ActTab+1] -= MouseX - m->x();
if (TabValues[ActTab+1] < 0)
TabValues[ActTab+1] = 0;
if (TabValues[ActTab+1] > Width-1)
TabValues[ActTab+1] = Width-1;
UpdateTabList();
emit TabMoved(TabValues[ActTab+1]);
repaint();
break;
default:
break;
}
MouseX = m->x();
return;
}
if ((!Mpressed) && (m->y() < height()) && (m->y() > 0) && (m->x() > 0) && (m->x() < width()))
{
qApp->setOverrideCursor(QCursor(loadIcon("tab.png"), 3), true);
if (haveInd)
{
fpo = QRect(static_cast<int>(First+Indent-Offset)-4, 0, 8, 12);
if (fpo.contains(m->pos()))
{
qApp->setOverrideCursor(QCursor(SizeHorCursor), true);
return;
}
fpo = QRect(static_cast<int>(Indent-Offset)-4, 12, 8, 12);
if (fpo.contains(m->pos()))
{
qApp->setOverrideCursor(QCursor(SizeHorCursor), true);
return;
}
}
if (TabValues.count() != 0)
{
for (int yg = 0; yg < static_cast<int>(TabValues.count()-1); yg += 2)
{
fpo = QRect(static_cast<int>(TabValues[yg+1]-Offset)-3, 15, 8, 8);
if (fpo.contains(m->pos()))
{
qApp->setOverrideCursor(QCursor(SizeHorCursor), true);
return;
}
}
}
}
}
 
void RulerT::leaveEvent(QEvent*)
{
if ((Mpressed) && (RulerCode == 3))
{
qApp->setOverrideCursor(QCursor(loadIcon("DelPoint.png"), 4, 3), true);
return;
}
else
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
}
 
void RulerT::UpdateTabList()
{
QValueList<double>::Iterator it;
double CurX = TabValues[ActTab+1];
int gg = static_cast<int>(TabValues.count()-1);
int g = gg;
double type = TabValues[ActTab];
it = TabValues.at(ActTab);
it = TabValues.remove(it);
TabValues.remove(it);
for (int yg = static_cast<int>(TabValues.count()-1); yg > 0; yg -= 2)
{
if (CurX < TabValues[yg])
g = yg;
}
ActTab = g-1;
if (gg == g)
{
TabValues.append(type);
TabValues.append(CurX);
ActTab = static_cast<int>(TabValues.count()-2);
}
else
{
it = TabValues.at(ActTab);
it = TabValues.insert(it, CurX);
TabValues.insert(it, type);
}
}
 
void RulerT::increaseOffset()
{
Offset += 5;
if (Offset + width() > static_cast<int>(Width))
Offset -= 5;
repaint();
}
 
void RulerT::decreaseOffset()
{
Offset -= 5;
if (Offset < 0)
Offset = 0;
repaint();
}
 
void RulerT::changeTab(int t)
{
TabValues[ActTab] = static_cast<double>(t);
repaint();
}
 
void RulerT::moveTab(double t)
{
TabValues[ActTab+1] = t;
UpdateTabList();
repaint();
}
 
void RulerT::moveFirst(double t)
{
First = t;
if (First+Indent+Offset < Offset)
{
First = 0-Indent;
emit FirstMoved(First);
}
if (First+Indent > Width)
{
First = Width-Indent;
emit FirstMoved(First);
}
repaint();
}
 
void RulerT::moveIndent(double t)
{
double oldInd = Indent+First;
Indent = t;
if (Indent > Width-1)
{
Indent = Width-1;
emit IndentMoved(Indent);
}
First = oldInd - Indent;
emit FirstMoved(First);
repaint();
}
 
Tabruler::Tabruler( QWidget* parent, bool haveFirst, int dEin, QValueList<double> Tabs, double wid ) : QWidget( parent )
{
double ww;
if (wid < 0)
ww = 4000;
else
ww = wid;
setName( "tabruler" );
tabrulerLayout = new QVBoxLayout( this, 0, 6, "tabrulerLayout");
layout2 = new QHBoxLayout( 0, 0, 6, "layout2");
TypeCombo = new QComboBox( true, this, "TypeCombo" );
TypeCombo->setEditable(false);
TypeCombo->clear();
TypeCombo->insertItem( tr( "Left" ) );
TypeCombo->insertItem( tr( "Right" ) );
TypeCombo->insertItem( tr( "Full Stop" ) );
TypeCombo->insertItem( tr( "Comma" ) );
TypeCombo->insertItem( tr( "Center" ) );
layout2->addWidget( TypeCombo );
RulerScrollL = new QToolButton( LeftArrow, this, "RulerScrollL" );
RulerScrollL->setAutoRepeat( true );
layout2->addWidget( RulerScrollL );
Ruler = new RulerT( this, dEin, Tabs, haveFirst, wid );
Ruler->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, Ruler->sizePolicy().hasHeightForWidth() ) );
layout2->addWidget( Ruler );
RulerScrollR = new QToolButton( RightArrow, this, "RulserScrollR" );
RulerScrollR->setAutoRepeat( true );
layout2->addWidget( RulerScrollR );
tabrulerLayout->addLayout( layout2 );
layout1 = new QHBoxLayout( 0, 0, 6, "layout1");
Label1 = new QLabel( this, "Label1" );
Label1->setText( tr( "Position:" ) );
layout1->addWidget( Label1 );
TabSpin = new MSpinBox( this, 1 );
TabSpin->setMaxValue( ww );
TabSpin->setMinValue( 0 );
TabSpin->setValue(0);
layout1->addWidget( TabSpin );
if (haveFirst)
{
Label2 = new QLabel( this, "Label2" );
Label2->setText( tr( "First Line:" ) );
layout1->addWidget( Label2 );
FirstSpin = new MSpinBox( this, 1);
FirstSpin->setMaxValue( ww );
FirstSpin->setMinValue( -30000 );
FirstSpin->setValue(0);
layout1->addWidget( FirstSpin );
Label3 = new QLabel( this, "Label3" );
Label3->setText( tr( "Indent:" ) );
layout1->addWidget( Label3 );
IndentSpin = new MSpinBox( this, 1 );
IndentSpin->setMaxValue( ww );
IndentSpin->setMinValue( 0 );
IndentSpin->setValue(0);
layout1->addWidget( IndentSpin );
}
ClearButton = new QPushButton( this, "ClearButton" );
ClearButton->setText( tr( "Delete All" ) );
layout1->addWidget( ClearButton );
if (!haveFirst)
{
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout1->addItem( spacer );
}
tabrulerLayout->addLayout( layout1 );
if (Tabs.count() == 0)
{
TypeCombo->setEnabled(false);
TabSpin->setEnabled(false);
ClearButton->setEnabled(false);
}
resize( minimumSizeHint() );
connect(RulerScrollL, SIGNAL(clicked()), Ruler, SLOT(decreaseOffset()));
connect(RulerScrollR, SIGNAL(clicked()), Ruler, SLOT(increaseOffset()));
connect(Ruler, SIGNAL(TypeChanged(int)) , this, SLOT(setTabType(int)));
connect(TypeCombo, SIGNAL(activated(int)), this, SLOT(setType()));
connect(Ruler, SIGNAL(TabMoved(double)) , this, SLOT(setTabSpin(double)));
connect(Ruler, SIGNAL(NewTab()), this, SLOT(tabAdded()));
connect(Ruler, SIGNAL(NoTabs()), this, SLOT(lastTabRemoved()));
connect(TabSpin, SIGNAL(valueChanged(int)), this, SLOT(setTab()));
connect(ClearButton, SIGNAL(clicked()), this, SLOT(clearAll()));
if (haveFirst)
{
connect(Ruler, SIGNAL(FirstMoved(double)) , this, SLOT(setFirstSpin(double)));
connect(Ruler, SIGNAL(IndentMoved(double)) , this, SLOT(setIndentSpin(double)));
connect(FirstSpin, SIGNAL(valueChanged(int)), this, SLOT(setFirst()));
connect(IndentSpin, SIGNAL(valueChanged(int)), this, SLOT(setIndent()));
QToolTip::add( FirstSpin, tr( "Indentation for first line of the paragraph" ) );
QToolTip::add( IndentSpin, tr( "Indentation from the left for the whole paragraph" ) );
}
QToolTip::add( ClearButton, tr( "Delete all Tabulators" ) );
QString ein, measure[] = { tr(" pt"), tr(" mm"), tr(" in"), tr(" p")};
ein = measure[dEin];
if (dEin == 2)
{
if (haveFirst)
{
FirstSpin->setDecimals(10000);
IndentSpin->setDecimals(10000);
}
TabSpin->setDecimals(10000);
}
if (haveFirst)
{
FirstSpin->setSuffix(ein);
IndentSpin->setSuffix(ein);
}
TabSpin->setSuffix(ein);
haveF = haveFirst;
}
 
void Tabruler::clearAll()
{
Ruler->TabValues.clear();
Ruler->repaint();
lastTabRemoved();
}
 
void Tabruler::tabAdded()
{
TypeCombo->setEnabled(true);
TabSpin->setEnabled(true);
ClearButton->setEnabled(true);
}
 
void Tabruler::lastTabRemoved()
{
TypeCombo->setEnabled(false);
TabSpin->setEnabled(false);
ClearButton->setEnabled(false);
}
 
void Tabruler::setTabType(int t)
{
TypeCombo->setCurrentItem(t);
}
 
void Tabruler::setType()
{
disconnect(TypeCombo, SIGNAL(activated(int)), this, SLOT(setType()));
Ruler->changeTab(TypeCombo->currentItem());
connect(TypeCombo, SIGNAL(activated(int)), this, SLOT(setType()));
}
 
void Tabruler::setTabSpin(double t)
{
disconnect(TabSpin, SIGNAL(valueChanged(int)), this, SLOT(setTab()));
TabSpin->setValue(t * UmReFaktor);
connect(TabSpin, SIGNAL(valueChanged(int)), this, SLOT(setTab()));
}
 
void Tabruler::setTab()
{
Ruler->moveTab(TabSpin->value() / UmReFaktor);
}
 
void Tabruler::setFirstSpin(double t)
{
disconnect(FirstSpin, SIGNAL(valueChanged(int)), this, SLOT(setFirst()));
FirstSpin->setValue(t * UmReFaktor);
connect(FirstSpin, SIGNAL(valueChanged(int)), this, SLOT(setFirst()));
}
 
void Tabruler::setFirst()
{
Ruler->moveFirst(FirstSpin->value() / UmReFaktor);
}
 
void Tabruler::setIndentSpin(double t)
{
disconnect(IndentSpin, SIGNAL(valueChanged(int)), this, SLOT(setIndent()));
IndentSpin->setValue(t * UmReFaktor);
connect(IndentSpin, SIGNAL(valueChanged(int)), this, SLOT(setIndent()));
}
 
void Tabruler::setIndent()
{
Ruler->moveIndent(IndentSpin->value() / UmReFaktor);
}
 
QValueList<double> Tabruler::getTabVals()
{
return Ruler->TabValues;
}
 
double Tabruler::getFirst()
{
return FirstSpin->value() / UmReFaktor;
}
 
double Tabruler::getIndent()
{
return IndentSpin->value() / UmReFaktor;
}
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: Scribus/scribus/pageitem.cpp
===================================================================
--- Scribus/scribus/pageitem.cpp (revision 279)
+++ Scribus/scribus/pageitem.cpp (revision 280)
@@ -267,7 +267,7 @@
uint a, nrc, nrc2, zae, startLin;
int desc, asce, absa, aSpa, chs, CurrCol;
uint BuPos, LastSP, MaxText;
- double oldCurY, LastXp, EndX, OFs, OFs2, wide, rota, wid, lineCorr, ColWidth, kernVal;
+ double oldCurY, LastXp, EndX, OFs, OFs2, wide, rota, wid, lineCorr, ColWidth, kernVal, RTabX;
double sc = Doc->Scale;
QString chx, chx2, chx3;
struct Pti *hl;
@@ -868,6 +868,7 @@
RTab = false;
else
{
+ RTabX = CurX+wide;
if (hl->cab < 5)
tTabValues = TabValues;
else
@@ -974,9 +975,14 @@
cen = 2;
for (uint rtx = StartRT; rtx < LiList.count(); ++rtx)
{
- LiList.at(rtx)->xco = QMAX(LiList.at(rtx)->xco-(wide+kernVal) / cen, 0.0);
- Ptext.at(StartRT2+rtx2)->xp = QMAX(Ptext.at(StartRT2+rtx2)->xp-(wide+kernVal) / cen, 0.0);
- rtx2++;
+ LiList.at(rtx)->xco = QMAX(LiList.at(rtx)->xco-(wide+kernVal) / cen, 0.0);
+ Ptext.at(StartRT2+rtx2)->xp = QMAX(Ptext.at(StartRT2+rtx2)->xp-(wide+kernVal) / cen, 0.0);
+ if (Ptext.at(StartRT2+rtx2)->xp < RTabX)
+ {
+ RTab = false;
+ TabCode = 0;
+ }
+ rtx2++;
}
}
BuPos++;
Index: Scribus/scribus/cpalette.cpp
===================================================================
--- Scribus/scribus/cpalette.cpp (revision 279)
+++ Scribus/scribus/cpalette.cpp (revision 280)
@@ -30,15 +30,15 @@
Shade3 = 100;
UseTransFeature = false;
Form1Layout = new QVBoxLayout( this, 0, 0, "Form1Layout");
- Layout1 = new QHBoxLayout;
+ Layout1 = new QGridLayout;
Layout1->setSpacing( 4 );
- Layout1->setMargin( 0 );
+ Layout1->setMargin( 1 );
Inhalt = new QToolButton(this, "t1");
Inhalt->setPixmap(loadIcon("Stiftalt.xpm"));
Inhalt->setToggleButton(true);
Inhalt->setAutoRaise(true);
Inhalt->setBackgroundMode(PaletteBackground);
- Layout1->addWidget(Inhalt);
+ Layout1->addWidget(Inhalt, 0, 0);
Innen = new QToolButton(this, "t2");
Innen->setPixmap(loadIcon("fill.png"));
Innen->setToggleButton(true);
@@ -45,19 +45,42 @@
Innen->setAutoRaise(true);
Innen->setBackgroundMode(PaletteBackground);
Innen->setOn(true);
- Layout1->addWidget(Innen);
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer );
+ Layout1->addWidget(Innen, 0, 1);
Mode = 2;
ShadeTxt = new QLabel( this, "ShadeTxt" );
ShadeTxt->setText( tr( "Shade:" ) );
- Layout1->addWidget( ShadeTxt );
- PM1 = new ShadeButton(this);
+ Layout1->addWidget( ShadeTxt, 0, 2 );
+ PM1 = new QSpinBox( this, "shspin" );
+ PM1->setMinValue(0);
+ PM1->setMaxValue(100);
+ PM1->setLineStep(10);
+ PM1->setSuffix( tr(" %"));
PM1->setValue(100);
- Layout1->addWidget(PM1);
+ Layout1->addWidget(PM1, 0, 3);
+ TransGroup = new QButtonGroup( this, "GradGroup" );
+ TransGroup->setFrameShape( QButtonGroup::NoFrame );
+ TransGroup->setFrameShadow( QButtonGroup::Plain );
+ TransGroup->setTitle("");
+ TransGroup->setColumnLayout(0, Qt::Vertical );
+ TransGroup->layout()->setSpacing( 4 );
+ TransGroup->layout()->setMargin( 0 );
+ TransGroupLayout = new QHBoxLayout( TransGroup->layout() );
+ TransGroupLayout->setAlignment( Qt::AlignTop );
+ TransTxt = new QLabel( TransGroup, "Transtxt" );
+ TransTxt->setText( tr( "Opacity:" ) );
+ TransGroupLayout->addWidget( TransTxt );
+ TransSpin = new QSpinBox( TransGroup, "traspin" );
+ TransSpin->setMinValue(0);
+ TransSpin->setMaxValue(100);
+ TransSpin->setLineStep(10);
+ TransSpin->setSuffix( tr(" %"));
+ TransSpin->setValue(100);
+ TransGroupLayout->addWidget( TransSpin );
+ Layout1->addMultiCellWidget( TransGroup, 1, 1, 2, 3 );
Form1Layout->addLayout(Layout1);
GradLayout = new QVBoxLayout( 0, 0, 6, "GradLayout");
+
QFont fo = QFont(font());
fo.setPointSize(fo.pointSize()-1);
GradCombo = new QComboBox( true, this, "GradCombo" );
@@ -88,27 +111,6 @@
GrColor2->setText("#2");
GradGroupLayout->addWidget( GrColor2 );
GradLayout->addWidget( GradGroup );
-
- TransGroup = new QButtonGroup( this, "GradGroup" );
- TransGroup->setFrameShape( QButtonGroup::NoFrame );
- TransGroup->setFrameShadow( QButtonGroup::Plain );
- TransGroup->setTitle("");
- TransGroup->setColumnLayout(0, Qt::Vertical );
- TransGroup->layout()->setSpacing( 5 );
- TransGroup->layout()->setMargin( 0 );
- TransGroupLayout = new QHBoxLayout( TransGroup->layout() );
- TransGroupLayout->setAlignment( Qt::AlignTop );
- TransTxt = new QLabel( TransGroup, "Transtxt" );
- TransTxt->setText( tr( "Opacity:" ) );
- TransGroupLayout->addWidget( TransTxt );
- TransSpin = new QSpinBox( TransGroup, "traspin" );
- TransSpin->setMinValue(0);
- TransSpin->setMaxValue(100);
- TransSpin->setLineStep(10);
- TransSpin->setSuffix( tr(" %"));
- TransSpin->setValue(100);
- TransGroupLayout->addWidget( TransSpin );
- GradLayout->addWidget( TransGroup );
Form1Layout->addLayout(GradLayout);
ListBox1 = new QListBox(this, "ListBox1");
@@ -127,7 +129,7 @@
connect(Inhalt, SIGNAL(clicked()), this, SLOT(InhaltButton()));
connect(Innen, SIGNAL(clicked()), this, SLOT(InnenButton()));
connect(ListBox1, SIGNAL(clicked(QListBoxItem*)), this, SLOT(selFarbe(QListBoxItem*)));
- connect(PM1, SIGNAL(clicked()), this, SLOT(setActShade()));
+ connect(PM1, SIGNAL(valueChanged(int)), this, SLOT(setActShade()));
connect(GradCombo, SIGNAL(activated(int)), this, SLOT(slotGrad(int)));
connect(GrColor1, SIGNAL(clicked()), this, SLOT(slotColor()));
connect(GrColor2, SIGNAL(clicked()), this, SLOT(slotColor()));
@@ -195,29 +197,29 @@
void Cpalette::selFarbe(QListBoxItem *c)
{
- if (c == NULL) { return; }
- sFarbe = c->text();
- switch (Mode)
- {
- case 1:
- emit NewPen(sFarbe);
- break;
- case 2:
- if (GradCombo->currentItem() == 0)
- {
- Color3 = sFarbe;
- emit NewBrush(sFarbe);
- }
- else
- {
- if (GrColor1->isChecked())
- Color = sFarbe;
- else
- Color2 = sFarbe;
- emit NewGradient(GradCombo->currentItem(), Color, Shade, Color2, Shade2);
- }
- break;
- }
+ if (c == NULL) { return; }
+ sFarbe = c->text();
+ switch (Mode)
+ {
+ case 1:
+ emit NewPen(sFarbe);
+ break;
+ case 2:
+ if (GradCombo->currentItem() == 0)
+ {
+ Color3 = sFarbe;
+ emit NewBrush(sFarbe);
+ }
+ else
+ {
+ if (GrColor1->isChecked())
+ Color = sFarbe;
+ else
+ Color2 = sFarbe;
+ emit NewGradient(GradCombo->currentItem(), Color, Shade, Color2, Shade2);
+ }
+ break;
+ }
}
void Cpalette::updateBoxS(QString Farbe)
@@ -242,16 +244,16 @@
{
switch (Mode)
{
- case 1:
- PM1->setValue(shp);
- updateBoxS(p);
- break;
- case 2:
- PM1->setValue(shb);
- updateBoxS(b);
- Color3 = b;
- Shade3 = shb;
- break;
+ case 1:
+ PM1->setValue(shp);
+ updateBoxS(p);
+ break;
+ case 2:
+ PM1->setValue(shb);
+ updateBoxS(b);
+ Color3 = b;
+ Shade3 = shb;
+ break;
}
}
@@ -283,26 +285,26 @@
GradientMode = test;
switch (nr)
{
- case 0:
- updateCList();
- updateGeometry();
- repaint();
- PM1->setValue(Shade3);
- updateBoxS(Color3);
- break;
- default:
- updateCList();
- if (GrColor1->isChecked())
- {
- PM1->setValue(Shade);
- updateBoxS(Color);
- }
- if (GrColor2->isChecked())
- {
- PM1->setValue(Shade2);
- updateBoxS(Color2);
- }
- break;
+ case 0:
+ updateCList();
+ updateGeometry();
+ repaint();
+ PM1->setValue(Shade3);
+ updateBoxS(Color3);
+ break;
+ default:
+ updateCList();
+ if (GrColor1->isChecked())
+ {
+ PM1->setValue(Shade);
+ updateBoxS(Color);
+ }
+ if (GrColor2->isChecked())
+ {
+ PM1->setValue(Shade2);
+ updateBoxS(Color2);
+ }
+ break;
}
setFocus();
}
@@ -311,10 +313,6 @@
{
disconnect(TransSpin, SIGNAL(valueChanged(int)), this, SLOT(slotTrans(int)));
TransSpin->setValue(qRound(100 - (Mode == 1 ? val2 * 100 : val * 100)));
-/* if (Mode == 1)
- TransSpin->setValue(qRound(100 - val2 * 100));
- else
- TransSpin->setValue(qRound(100 - val * 100));*/
connect(TransSpin, SIGNAL(valueChanged(int)), this, SLOT(slotTrans(int)));
}
@@ -333,7 +331,7 @@
if (b)
TransGroup->show();
else
- {
+ {
if (!TransGroup->isHidden())
{
h += TransGroup->height();
@@ -363,26 +361,26 @@
void Cpalette::setActShade()
{
- int b = PM1->getValue();
+ int b = PM1->value();
switch (Mode)
{
- case 1:
- emit NewPenShade(b);
- break;
- case 2:
- if (GradCombo->currentItem() == 0)
- {
- emit NewBrushShade(b);
- Shade3 = b;
- }
- else
- {
- if (GrColor1->isChecked())
- Shade = b;
- else
- Shade2 = b;
- emit NewGradient(GradCombo->currentItem(), Color, Shade, Color2, Shade2);
- }
- break;
+ case 1:
+ emit NewPenShade(b);
+ break;
+ case 2:
+ if (GradCombo->currentItem() == 0)
+ {
+ emit NewBrushShade(b);
+ Shade3 = b;
+ }
+ else
+ {
+ if (GrColor1->isChecked())
+ Shade = b;
+ else
+ Shade2 = b;
+ emit NewGradient(GradCombo->currentItem(), Color, Shade, Color2, Shade2);
+ }
+ break;
}
}
/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("08").arg("May").arg("2004");
QString bu = tr("%1. %2 %3 ").arg("09").arg("May").arg("2004");
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/Makefile.am
1,7 → 1,7
bin_PROGRAMS = scribus
 
scribus_SOURCES = art_kmisc.c art_render_misc.c art_render_pattern.c art_rgb.c art_rgb_affine_private.c art_rgb_svp.c art_rgba_affine.c gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlibrgb.c insertTable.cpp pageselector.cpp shadebutton.cpp alignselect.cpp styleselect.cpp search.cpp tabmanager.cpp fparser.cpp autoform.cpp story.cpp vgradient.cpp scpainter.cpp fontcombo.cpp scpreview.cpp lineformats.cpp multiline.cpp splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
SOURCES = art_kmisc.c art_render_misc.c art_render_pattern.c art_rgb.c art_rgb_affine_private.c art_rgb_svp.c art_rgba_affine.c gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlibrgb.c insertTable.cpp pageselector.cpp shadebutton.cpp alignselect.cpp styleselect.cpp search.cpp tabmanager.cpp fparser.cpp autoform.cpp story.cpp vgradient.cpp scpainter.cpp libpdf/pdflib.cpp libpostscript/pslib.cpp plugins/libchar/charselect.cpp libprefs/prefs.cpp libabout/about.cpp fontcombo.cpp scpreview.cpp lineformats.cpp multiline.cpp splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
scribus_SOURCES = art_kmisc.c art_render_misc.c art_render_pattern.c art_rgb.c art_rgb_affine_private.c art_rgb_svp.c art_rgba_affine.c gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlibrgb.c tabruler.cpp insertTable.cpp pageselector.cpp shadebutton.cpp alignselect.cpp styleselect.cpp search.cpp tabmanager.cpp fparser.cpp autoform.cpp story.cpp vgradient.cpp scpainter.cpp fontcombo.cpp scpreview.cpp lineformats.cpp multiline.cpp splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
SOURCES = art_kmisc.c art_render_misc.c art_render_pattern.c art_rgb.c art_rgb_affine_private.c art_rgb_svp.c art_rgba_affine.c gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlibrgb.c tabruler.cpp insertTable.cpp pageselector.cpp shadebutton.cpp alignselect.cpp styleselect.cpp search.cpp tabmanager.cpp fparser.cpp autoform.cpp story.cpp vgradient.cpp scpainter.cpp libpdf/pdflib.cpp libpostscript/pslib.cpp plugins/libchar/charselect.cpp libprefs/prefs.cpp libabout/about.cpp fontcombo.cpp scpreview.cpp lineformats.cpp multiline.cpp splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
INTERFACES =
TRANSLATIONS =
 
158,7 → 158,7
-rm -f $(prefix)/include/scribus/pageselector.h
 
scribus_LDADD = $(LIBJPEG) $(LIBART_LIBS) $(LIBFREETYPE_LIBS) $(LIBCUPS) $(LIBLCMS) $(LIBDL) $(LIBDL2) $(LIBTIFF) -lm $(LIB_QT) -lXext -lX11 $(LIBSOCKET)
AM_LDFLAGS = -export-dynamic -s
AM_LDFLAGS = -export-dynamic -s
# set the include path for X, qt and KDE
INCLUDES= $(LIBART_CFLAGS) $(LIBFREETYPE_CFLAGS) $(all_includes)
 
/trunk/Scribus/scribus/mspinbox.h
26,12 → 26,11
 
class MSpinBox : public QSpinBox
{
Q_OBJECT
public:
MSpinBox(QWidget *pa, int s);
~MSpinBox() {};
void setMaxValue(double val);
void setMinValue(double val);
void setValue(double val);
double value();
double minValue();
double maxValue();
42,6 → 41,11
QLineEdit *ed;
void setDecimals( int deci );
 
public slots:
void setMaxValue(double val);
void setMinValue(double val);
void setValue(double val);
 
protected:
bool eventFilter( QObject* ob, QEvent* ev );
};
/trunk/Scribus/scribus/scribus.cpp
2659,14 → 2659,25
if (doc->ActPage->SelItem.count() > 1)
{
ObjMenu->setItemEnabled(DistM, 1);
ObjMenu->setItemEnabled(Gr, 1);
ObjMenu->setItemEnabled(PfadTP, 0);
bool hPoly = true;
bool isGroup = true;
int firstElem = -1;
if (b->Groups.count() != 0)
firstElem = b->Groups.top();
for (uint bx=0; bx<doc->ActPage->SelItem.count(); ++bx)
{
if (doc->ActPage->SelItem.at(bx)->PType != 6)
hPoly = false;
if (doc->ActPage->SelItem.at(bx)->Groups.count() != 0)
{
if (doc->ActPage->SelItem.at(bx)->Groups.top() != firstElem)
isGroup = false;
}
else
isGroup = false;
}
ObjMenu->setItemEnabled(Gr, !isGroup);
ObjMenu->setItemEnabled(PfadV, hPoly);
if (doc->ActPage->SelItem.count() == 2)
{
2928,6 → 2939,7
if (!fileName.isEmpty())
{
QFileInfo fi(fileName);
QString FName = fi.absFilePath();
QDir::setCurrent(fi.dirPath(true));
doc=new ScribusDoc();
doc->AllFonts = &Prefs.AvailFonts;
3020,7 → 3032,6
#endif
HaveDoc++;
connect(w, SIGNAL(Schliessen()), this, SLOT(DoFileClose()));
// connect(w, SIGNAL(SaveAndClose()), this, SLOT(DoSaveClose()));
if (!doc->HasCMS)
{
doc->CMSSettings.DefaultInputProfile = Prefs.DCMSset.DefaultInputProfile;
3091,7 → 3102,7
}
Mpal->Cpal->SetColors(doc->PageColors);
Mpal->Cpal->ChooseGrad(0);
doc->DocName = fileName;
doc->DocName = FName;
doc->MasterP = false;
HaveNewDoc();
Mpal->updateCList();
3164,7 → 3175,7
ActWin->First = BookPal->BView->First;
ActWin->Last = BookPal->BView->Last;
doc->RePos = false;
UpdateRecent(fileName);
UpdateRecent(FName);
FMess->setText( tr("Ready"));
ret = true;
if ((wsp->windowList().isEmpty()) || (wsp->windowList().count() == 1))
7006,6 → 7017,7
slotDocCh();
doc->UnDoValid = false;
CanUndo();
ObjMenu->setItemEnabled(Gr, false);
ObjMenu->setItemEnabled(UnGr, true);
}
 
8226,7 → 8238,7
if (doc->ActPage->SelItem.count() != 0)
{
PageItem *b = doc->ActPage->SelItem.at(0);
TabManager *dia = new TabManager(this, doc->Einheit, b->TabValues);
TabManager *dia = new TabManager(this, doc->Einheit, b->TabValues, b->Width);
if (dia->exec())
{
b->TabValues = dia->tmpTab;
/trunk/Scribus/scribus/mspinbox.cpp
16,6 → 16,7
***************************************************************************/
 
#include "mspinbox.h"
#include "mspinbox.moc"
#include <qapplication.h>
#include "fparser.h"
 
/trunk/Scribus/scribus/cpalette.h
37,16 → 37,17
*@author Franz Schmid
*/
 
class Cpalette : public QWidget {
Q_OBJECT
class Cpalette : public QWidget
{
Q_OBJECT
public:
Cpalette(QWidget* parent);
~Cpalette() {};
 
QListBox *ListBox1;
QToolButton *Inhalt;
QToolButton *Innen;
ShadeButton *PM1;
QSpinBox *PM1;
QComboBox* GradCombo;
QButtonGroup* GradGroup;
QRadioButton* GrColor1;
67,7 → 68,7
int Shade3;
bool UseTransFeature;
bool GradientMode;
 
public slots:
void InhaltButton();
void InnenButton();
94,13 → 95,13
void NewTrans(double);
void NewTransS(double);
void QueryItem();
 
protected:
QVBoxLayout* Form1Layout;
QHBoxLayout* Layout1;
QVBoxLayout* GradLayout;
QHBoxLayout* GradGroupLayout;
QHBoxLayout* TransGroupLayout;
QVBoxLayout* Form1Layout;
QGridLayout* Layout1;
QVBoxLayout* GradLayout;
QHBoxLayout* GradGroupLayout;
QHBoxLayout* TransGroupLayout;
};
 
#endif
/trunk/Scribus/scribus/po/svgexport.sk.po
File deleted
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: Scribus/scribus/po/charselect.sk.po
===================================================================
--- Scribus/scribus/po/charselect.sk.po (revision 279)
+++ Scribus/scribus/po/charselect.sk.po (nonexistent)
@@ -1,23 +0,0 @@
-# This is a Qt message file in .po format. Each msgid starts with
-# a scope. This scope should *NOT* be translated - eg. "Foo::Bar"
-# would be translated to "Pub", not "Foo::Pub".
-msgid ""
-msgstr ""
-"Project-Id-Version: Scribus 0.7.6\n"
-"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 2002-09-03 18:04+0100\n"
-"Last-Translator: Zdenko Podobný <zdpo@mailbox.sk>\n"
-"Content-Type: text/plain; charset=ISO-8859-2\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
-"X-Generator: KBabel 0.9.6\n"
-
-msgid "Insert Special"
-msgstr "Vlo¾i» znak"
-
-msgid "Select Character"
-msgstr "Vybra» znak"
-
-msgid "Insert"
-msgstr "Vlo¾i»"
-
/Scribus/scribus/po/charselect.sk.po
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: Scribus/scribus/po/charselect.no_NO.po
===================================================================
--- Scribus/scribus/po/charselect.no_NO.po (revision 279)
+++ Scribus/scribus/po/charselect.no_NO.po (nonexistent)
@@ -1,31 +0,0 @@
-# This is a Qt message file in .po format. Each msgid starts with
-# a scope. This scope should *NOT* be translated - eg. translating
-# from French to English, "Foo::Bar" would be translated to "Pub",
-# not "Foo::Pub".
-msgid ""
-msgstr ""
-"Project-Id-Version: Scribus 0.9.10\n"
-"POT-Creation-Date: 2003-05-19 02:36:10 CET\n"
-"PO-Revision-Date: 2003-05-19 02:36:10 CET\n"
-"Last-Translator: Johannes Wilm <j@indymedia.no>\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-msgid "Insert Special"
-msgstr "Innsett Spesielt"
-
-#: charselect.cpp:93
-msgid "ZAuswahl::Clear"
-msgstr "Slett"
-
-#: charselect.cpp:99
-msgid "ZAuswahl::Close"
-msgstr "Lukk"
-
-#: charselect.cpp:87
-msgid "ZAuswahl::Insert"
-msgstr "Innsett"
-
-#: charselect.cpp:33
-msgid "ZAuswahl::Select Character"
-msgstr "Marker Skrifttegn"
-
/Scribus/scribus/po/charselect.no_NO.po
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: Scribus/scribus/po/scribus.no_NO.po
===================================================================
--- Scribus/scribus/po/scribus.no_NO.po (revision 279)
+++ Scribus/scribus/po/scribus.no_NO.po (revision 280)
@@ -3115,7 +3115,7 @@
msgid "Combine Polygons"
msgstr "Kombiner polygoner"
-msgid "Split Polygon"
+msgid "Split Polygons"
msgstr "Del opp polygoner"
msgid "Convert to Polygons"
@@ -5119,4 +5119,19 @@
#~ msgid "Preferences::Width:"
#~ msgstr "Bredde:"
+#: charselect.cpp:93
+msgid "ZAuswahl::Clear"
+msgstr "Slett"
+#: charselect.cpp:99
+msgid "ZAuswahl::Close"
+msgstr "Lukk"
+
+#: charselect.cpp:87
+msgid "ZAuswahl::Insert"
+msgstr "Innsett"
+
+#: charselect.cpp:33
+msgid "ZAuswahl::Select Character"
+msgstr "Marker Skrifttegn"
+
/trunk/Scribus/scribus/tabmanager.cpp
10,210 → 10,45
#include "tabmanager.h"
#include "tabmanager.moc"
#include <qvariant.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "mspinbox.h"
#include "tabruler.h"
extern QPixmap loadIcon(QString nam);
extern double UmReFaktor;
 
TabManager::TabManager( QWidget* parent, int dEin, QValueList<double> inTab) : QDialog( parent, "TabManager", true, 0 )
TabManager::TabManager( QWidget* parent, int dEin, QValueList<double> inTab, double wid) : QDialog( parent, "TabManager", true, 0 )
{
setCaption( tr( "Manage Tabulators" ) );
setIcon(loadIcon("AppIcon.png"));
tmpTab = inTab;
selTab = -1;
TabManagerLayout = new QVBoxLayout( this, 5, 5, "TabManagerLayout");
layout9 = new QHBoxLayout( 0, 0, 5, "layout9");
 
TabList = new QListBox( this, "TabList" );
layout9->addWidget( TabList );
layout8 = new QVBoxLayout( 0, 0, 5, "layout8");
layout7 = new QGridLayout( 0, 1, 1, 0, 5, "layout7");
 
Text1 = new QLabel( this, "Text1" );
Text1->setText( tr( "Position:" ) );
layout7->addWidget( Text1, 0, 0 );
 
Text2 = new QLabel( this, "Text2" );
Text2->setText( tr( "Alignment:" ) );
layout7->addWidget( Text2, 1, 0 );
 
Align = new QComboBox( true, this, "Align" );
Align->clear();
QString tmp_ali[] = { tr("Left"), tr("Right"), tr("Full Stop"), tr("Comma"), tr("Center")};
size_t ar_ali = sizeof(tmp_ali) / sizeof(*tmp_ali);
for (uint a = 0; a < ar_ali; ++a)
Align->insertItem(tmp_ali[a]);
Align->setEditable(false);
Align->setEnabled(false);
layout7->addWidget( Align, 1, 1 );
 
Position = new MSpinBox( this, 1 );
Position->setSuffix( tr( " pt" ) );
Position->setMaxValue( 30000 );
Position->setMinValue( 0 );
Position->setValue(0);
Position->setEnabled(false);
 
layout7->addWidget( Position, 0, 1 );
layout8->addLayout( layout7 );
QSpacerItem* spacer = new QSpacerItem( 20, 41, QSizePolicy::Minimum, QSizePolicy::Expanding );
layout8->addItem( spacer );
layout9->addLayout( layout8 );
TabManagerLayout->addLayout( layout9 );
 
layout10 = new QGridLayout( 0, 1, 1, 0, 5, "layout10");
TabList = new Tabruler(this, false, dEin, inTab, wid);
TabManagerLayout->addWidget( TabList );
layout10 = new QHBoxLayout;
layout10->setSpacing( 6 );
layout10->setMargin( 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout10->addItem( spacer );
OKButton = new QPushButton( this, "OKButton" );
OKButton->setText( tr( "OK" ) );
OKButton->setDefault( TRUE );
layout10->addWidget( OKButton, 1, 0 );
 
CancelButton = new QPushButton( this, "CancelButton" );
OKButton->setDefault( true );
layout10->addWidget( OKButton );
QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout10->addItem( spacer_2 );
CancelButton = new QPushButton( this, "CancelB" );
CancelButton->setText( tr( "Cancel" ) );
layout10->addWidget( CancelButton, 1, 1 );
 
DelButton = new QPushButton( this, "DelButton" );
DelButton->setText( tr( "Remove" ) );
DelButton->setEnabled(false);
layout10->addWidget( DelButton, 0, 1 );
 
AddButton = new QPushButton( this, "AddButton" );
AddButton->setText( tr( "Add" ) );
layout10->addWidget( AddButton, 0, 0 );
layout10->addWidget( CancelButton );
QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout10->addItem( spacer_3 );
TabManagerLayout->addLayout( layout10 );
resize( QSize(321, 229).expandedTo(minimumSizeHint()) );
UnitChange(dEin);
connect( OKButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
resize( minimumSizeHint() );
connect( OKButton, SIGNAL( clicked() ), this, SLOT( exitOK() ) );
connect( CancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect(TabList, SIGNAL(highlighted(QListBoxItem*)), this, SLOT(selIte(QListBoxItem*)));
connect(Position, SIGNAL(valueChanged(int)), this, SLOT(PValChange()));
connect(DelButton, SIGNAL(clicked()), this, SLOT(DelTab()));
connect(AddButton, SIGNAL(clicked()), this, SLOT(AddTab()));
connect(Align, SIGNAL(activated(int)), this, SLOT(ChangeType()));
UpdateTabL();
}
 
void TabManager::DelTab()
void TabManager::exitOK()
{
QValueList<double>::Iterator it;
it = tmpTab.at(selTab);
it = tmpTab.remove(it);
tmpTab.remove(it);
selTab = tmpTab.isEmpty() ? -1 : static_cast<int>(tmpTab.count() - 2);
if (selTab == -1)
DelButton->setEnabled(false);
UpdateTabL();
tmpTab = TabList->getTabVals();
accept();
}
 
void TabManager::AddTab()
{
tmpTab.prepend(0);
tmpTab.prepend(0);
selTab = 0;
DelButton->setEnabled(true);
UpdateTabL();
Position->setFocus();
Position->selectAll();
}
 
void TabManager::ChangeType()
{
tmpTab[selTab] = static_cast<double>(Align->currentItem());
}
 
void TabManager::selIte(QListBoxItem *c)
{
disconnect(Position, SIGNAL(valueChanged(int)), this, SLOT(PValChange()));
disconnect(Align, SIGNAL(activated(int)), this, SLOT(ChangeType()));
selTab = c->listBox()->currentItem() * 2;
DelButton->setEnabled(true);
Position->setEnabled(true);
Align->setEnabled(true);
Position->setValue(tmpTab[selTab+1] * UmReFaktor);
Align->setCurrentItem(static_cast<int>(tmpTab[selTab]));
connect(Position, SIGNAL(valueChanged(int)), this, SLOT(PValChange()));
connect(Align, SIGNAL(activated(int)), this, SLOT(ChangeType()));
}
 
void TabManager::PValChange()
{
double CurX = Position->value() / UmReFaktor;
int gg = static_cast<int>(tmpTab.count()-1);
int g = gg;
double type = tmpTab[selTab];
QValueList<double>::Iterator it;
it = tmpTab.at(selTab);
it = tmpTab.remove(it);
tmpTab.remove(it);
for (int yg = static_cast<int>(tmpTab.count()-1); yg > 0; yg -= 2)
{
if (CurX < tmpTab[yg])
g = yg;
}
selTab = g-1;
if (gg == g)
{
tmpTab.append(type);
tmpTab.append(CurX);
selTab = static_cast<int>(tmpTab.count()-2);
}
else
{
it = tmpTab.at(selTab);
it = tmpTab.insert(it, CurX);
tmpTab.insert(it, type);
}
UpdateTabL();
}
 
void TabManager::UnitChange(int dEin)
{
Position->setDecimals(10);
QString tmp[] = { tr(" pt"), tr(" mm"), tr(" in"), tr(" p")};
Einheit = dEin;
QString ein = tmp[dEin];
if (dEin == 2)
Position->setDecimals(10000);
Position->setSuffix(ein);
if (!tmpTab.isEmpty() || (selTab != -1))
Position->setValue(tmpTab[selTab+1] * UmReFaktor);
else
Position->setValue(0);
}
 
void TabManager::UpdateTabL()
{
disconnect(TabList, SIGNAL(highlighted(QListBoxItem*)), this, SLOT(selIte(QListBoxItem*)));
disconnect(Position, SIGNAL(valueChanged(int)), this, SLOT(PValChange()));
disconnect(Align, SIGNAL(activated(int)), this, SLOT(ChangeType()));
TabList->clear();
QString tp[] = { tr(" pt"), tr(" mm"), tr(" in"), tr(" p")};
QString ein = tp[Einheit], tmp;
for (uint a = 0; a < tmpTab.count(); a += 2)
TabList->insertItem(tmp.setNum(qRound(tmpTab[a+1]*UmReFaktor*Position->Decimals)/static_cast<double>(Position->Decimals))+ein);
if (tmpTab.isEmpty())
selTab = -1;
if (selTab != -1)
{
Position->setEnabled(true);
Align->setEnabled(true);
Position->setValue(tmpTab[selTab+1] * UmReFaktor);
Align->setCurrentItem(static_cast<int>(tmpTab[selTab]));
TabList->setCurrentItem(selTab / 2);
}
else
{
Position->setValue(0);
Align->setCurrentItem(0);
Position->setEnabled(false);
Align->setEnabled(false);
}
connect(TabList, SIGNAL(highlighted(QListBoxItem*)), this, SLOT(selIte(QListBoxItem*)));
connect(Position, SIGNAL(valueChanged(int)), this, SLOT(PValChange()));
connect(Align, SIGNAL(activated(int)), this, SLOT(ChangeType()));
}
/trunk/Scribus/scribus/tabruler.h
0,0 → 1,113
/****************************************************************************
** Form interface generated from reading ui file 'tabruler.ui'
**
** Created: Son Mai 9 12:45:32 2004
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
 
#ifndef TABRULER_H
#define TABRULER_H
 
#include <qvariant.h>
#include <qwidget.h>
 
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QComboBox;
class QLabel;
class QPushButton;
class MSpinBox;
class QToolButton;
 
class RulerT : public QWidget
{
Q_OBJECT
 
public:
RulerT(QWidget* parent, int ein, QValueList<double> Tabs, bool ind, double wid);
~RulerT() {};
void UpdateTabList();
bool Mpressed;
QValueList<double> TabValues;
bool haveInd;
int Einheit;
int Offset;
int ActTab;
double Indent;
double First;
double Width;
int RulerCode;
int MouseX;
 
public slots:
void decreaseOffset();
void increaseOffset();
void changeTab(int t);
void moveTab(double t);
void moveFirst(double t);
void moveIndent(double t);
 
signals:
void TabMoved(double);
void TypeChanged(int);
void IndentMoved(double);
void FirstMoved(double);
void NoTabs();
void NewTab();
 
protected:
virtual void paintEvent(QPaintEvent *);
virtual void mousePressEvent(QMouseEvent *m);
virtual void mouseReleaseEvent(QMouseEvent *);
virtual void mouseMoveEvent(QMouseEvent *m);
virtual void leaveEvent(QEvent*);
};
 
class Tabruler : public QWidget
{
Q_OBJECT
 
public:
Tabruler( QWidget* parent, bool haveFirst, int ein, QValueList<double> Tabs, double wid );
~Tabruler() {};
QValueList<double> getTabVals();
bool haveF;
double getFirst();
double getIndent();
 
QComboBox* TypeCombo;
QToolButton* RulerScrollL;
RulerT* Ruler;
QToolButton* RulerScrollR;
QLabel* Label1;
MSpinBox* TabSpin;
QLabel* Label2;
MSpinBox* FirstSpin;
QLabel* Label3;
MSpinBox* IndentSpin;
QPushButton* ClearButton;
 
public slots:
void clearAll();
void tabAdded();
void lastTabRemoved();
void setTabType(int t);
void setType();
void setTabSpin(double t);
void setTab();
void setFirstSpin(double t);
void setFirst();
void setIndentSpin(double t);
void setIndent();
 
protected:
QVBoxLayout* tabrulerLayout;
QHBoxLayout* layout2;
QHBoxLayout* layout1;
 
};
 
#endif // TABRULER_H
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: Scribus/scribus/qm/svgexport.sk.qm
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Scribus/scribus/qm/svgexport.sk.qm
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: Scribus/scribus/qm/charselect.sk.qm
===================================================================
--- Scribus/scribus/qm/charselect.sk.qm (revision 279)
+++ Scribus/scribus/qm/charselect.sk.qm (nonexistent)
@@ -1 +0,0 @@
-<¸dÊÍ!¿`¡½ÝB$œ”C÷ ,ri³Vybrae znakSelect Character$ Vlo~ieInsertœ”Vlo~ie znakInsert Special÷ ,
\ No newline at end of file
/Scribus/scribus/qm/charselect.sk.qm
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: Scribus/scribus/qm/charselect.no.qm
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Scribus/scribus/qm/charselect.no.qm
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: Scribus/scribus/qm/scribus.no.qm
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: Scribus/scribus/qm/Makefile.am
===================================================================
--- Scribus/scribus/qm/Makefile.am (revision 279)
+++ Scribus/scribus/qm/Makefile.am (revision 280)
@@ -1,7 +1,7 @@
####### kdevelop will overwrite this part!!! (begin)##########
-EXTRA_DIST = scribus.eu.qm scribus.si.qm scribus.fi.qm scribus.cy.qm scribus.id.qm scribus.nl.qm scribus.ru.qm scribus.cs.qm scribus.bg.qm scribus.ca.qm scribus.da.qm scribus.de.qm scribus.en_GB.qm scribus.es.qm scribus.fr.qm scribus.gl.qm scribus.hu.qm scribus.it.qm scribus.lt_LT.qm scribus.pl.qm scribus.sk.qm scribus.tr.qm scribus.uk.qm charselect.sk.qm charselect.no.qm scribus.no.qm svgexport.sk.qm scribus.br.qm
+EXTRA_DIST = scribus.eu.qm scribus.si.qm scribus.fi.qm scribus.cy.qm scribus.id.qm scribus.nl.qm scribus.ru.qm scribus.cs.qm scribus.bg.qm scribus.ca.qm scribus.da.qm scribus.de.qm scribus.en_GB.qm scribus.es.qm scribus.fr.qm scribus.gl.qm scribus.hu.qm scribus.it.qm scribus.lt_LT.qm scribus.pl.qm scribus.sk.qm scribus.tr.qm scribus.uk.qm scribus.no.qm scribus.br.qm
install-data-local:
$(mkinstalldirs) $(prefix)/lib/scribus/
@@ -52,12 +52,6 @@
$(INSTALL_DATA) $(srcdir)/scribus.si.qm $(prefix)/lib/scribus/scribus.si.qm
$(mkinstalldirs) $(prefix)/lib/scribus/
$(INSTALL_DATA) $(srcdir)/scribus.lt_LT.qm $(prefix)/lib/scribus/scribus.lt.qm
- $(mkinstalldirs) $(prefix)/lib/scribus/plugins/
- $(INSTALL_DATA) $(srcdir)/charselect.sk.qm $(prefix)/lib/scribus/plugins/charselect.sk.qm
- $(mkinstalldirs) $(prefix)/lib/scribus/plugins/
- $(INSTALL_DATA) $(srcdir)/charselect.no.qm $(prefix)/lib/scribus/plugins/charselect.no.qm
- $(mkinstalldirs) $(prefix)/lib/scribus/plugins/
- $(INSTALL_DATA) $(srcdir)/svgexport.sk.qm $(prefix)/lib/scribus/plugins/svgexport.sk.qm
uninstall-local:
-rm -f $(prefix)/lib/scribus/scribus.bg.qm
@@ -84,8 +78,5 @@
-rm -f $(prefix)/lib/scribus/scribus.cy.qm
-rm -f $(prefix)/lib/scribus/scribus.si.qm
-rm -f $(prefix)/lib/scribus/scribus.lt.qm
- -rm -f $(prefix)/lib/scribus/plugins/charselect.sk.qm
- -rm -f $(prefix)/lib/scribus/plugins/charselect.no.qm
- -rm -f $(prefix)/lib/scribus/plugins/svgexport.sk.qm
####### kdevelop will overwrite this part!!! (end)############