Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 11879 → Rev 11880

/trunk/Scribus/scribus/annota.h
27,6 → 27,7
class QLineEdit;
class QPushButton;
class QSpinBox;
class QCheckBox;
 
#include "scribusapi.h"
 
50,6 → 51,7
QLabel* TextLabel5;
QLineEdit* Destfile;
QPushButton* ChFile;
QCheckBox* useAbsolute;
Navigator* Pg;
QSpinBox* SpinBox1;
QSpinBox* SpinBox2;
/trunk/Scribus/scribus/pdflib_core.cpp
5481,6 → 5481,8
double y2 = y-ite->height();
QString bm(""), bmUtf16("");
QString cc;
QFileInfo fiBase(Spool.fileName());
QString baseDir = fiBase.absolutePath();
if (!((ite->itemText.length() == 1) && (ite->itemText.text(0, 1) == QChar(13))))
{
// #6823 EncStringUTF16() perform the string encoding by its own
5526,11 → 5528,16
}
if (ite->annotation().ActionType() == 7)
{
PutDoc("/A << /Type /Action /S /GoToR\n/F "+ EncString("("+ite->annotation().Extern()+")",ObjCounter-1)+"\n");
PutDoc("/A << /Type /Action /S /GoToR\n/F "+ EncString("("+Path2Relative(ite->annotation().Extern(), baseDir)+")",ObjCounter-1)+"\n");
PutDoc("/D ["+QString::number(ite->annotation().Ziel())+" /XYZ "+ite->annotation().Action()+"]\n>>\n");
}
if (ite->annotation().ActionType() == 8)
PutDoc("/A << /Type /Action /S /URI\n/URI "+ EncString("("+ite->annotation().Extern()+")",ObjCounter-1)+"\n>>\n");
if (ite->annotation().ActionType() == 9)
{
PutDoc("/A << /Type /Action /S /GoToR\n/F "+ EncString("("+ite->annotation().Extern()+")",ObjCounter-1)+"\n");
PutDoc("/D ["+QString::number(ite->annotation().Ziel())+" /XYZ "+ite->annotation().Action()+"]\n>>\n");
}
break;
case 2:
case 3:
5710,9 → 5717,14
{
if (ite->annotation().ActionType() == 7)
{
PutDoc("/A << /Type /Action /S /GoToR\n/F "+ EncString("("+ite->annotation().Extern()+")",ObjCounter-1)+ "\n");
PutDoc("/A << /Type /Action /S /GoToR\n/F "+ EncString("("+Path2Relative(ite->annotation().Extern(), baseDir)+")",ObjCounter-1)+ "\n");
PutDoc("/D ["+QString::number(ite->annotation().Ziel())+" /XYZ "+ite->annotation().Action()+"]\n>>\n");
}
if (ite->annotation().ActionType() == 9)
{
PutDoc("/A << /Type /Action /S /GoToR\n/F "+ EncString("("+ite->annotation().Extern()+")",ObjCounter-1)+"\n");
PutDoc("/D ["+QString::number(ite->annotation().Ziel())+" /XYZ "+ite->annotation().Action()+"]\n>>\n");
}
if (ite->annotation().ActionType() == 5)
PutDoc("/A << /Type /Action /S /ImportData\n/F "+ EncString("("+ite->annotation().Action()+")",ObjCounter-1)+" >>\n");
if (ite->annotation().ActionType() == 4)
/trunk/Scribus/scribus/annot.cpp
69,7 → 69,7
MaxSeite = Seite;
QStringList tl;
dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
if ((item->annotation().ActionType() == 2) || (item->annotation().ActionType() == 7))
if ((item->annotation().ActionType() == 2) || (item->annotation().ActionType() == 7) || (item->annotation().ActionType() == 9))
{
QString tm = item->annotation().Action();
tl = tm.split(" ", QString::SkipEmptyParts);
535,7 → 535,7
Layout20->addWidget( TextLabel70 );
 
ActionCombo = new QComboBox(tab_2);
QString tmp_actcom[] = {tr("None", "action"), tr("JavaScript"), tr("Go To"),
QString tmp_actcom[] = { tr("None", "action"), tr("JavaScript"), tr("Go To"),
tr("Submit Form"), tr("Reset Form"), tr("Import Data")};
size_t array_act = sizeof(tmp_actcom) / sizeof(*tmp_actcom);
/* PFJ - 28/02/04 - Altered from uint to int and var name */
571,7 → 571,7
AcText1->setText( tr( "Event:" ) );
Layout7->addWidget( AcText1 );
SelAction = new QComboBox(Frame3);
QString tmp_selact[]={tr("Mouse Up"), tr("Mouse Down"), tr("Mouse Enter"),
QString tmp_selact[]={ tr("Mouse Up"), tr("Mouse Down"), tr("Mouse Enter"),
tr("Mouse Exit"), tr("On Focus"), tr("On Blur")};
size_t array_sel = sizeof(tmp_selact) / sizeof(*tmp_selact);
/* PFJ - 28/02/04 - Altered from uint to int and var name */
623,36 → 623,42
ChFile = new QPushButton(GroupBox11);
ChFile->setText( tr("Change..."));
GroupBox11Layout->addWidget( ChFile, 0, 2 );
useAbsolute = new QCheckBox( tr("Export absolute Filename"), GroupBox11);
GroupBox11Layout->addWidget( useAbsolute, 1, 0, 1, 3 );
if (item->annotation().ActionType() == 7)
useAbsolute->setChecked(false);
else if (item->annotation().ActionType() == 9)
useAbsolute->setChecked(true);
TextLabel31 = new QLabel( GroupBox11 );
TextLabel31->setText( tr( "Page:" ) );
GroupBox11Layout->addWidget( TextLabel31, 1, 0 );
GroupBox11Layout->addWidget( TextLabel31, 2, 0 );
SpinBox11 = new QSpinBox( GroupBox11 );
SpinBox11->setMinimum(1);
SpinBox11->setMaximum(item->annotation().ActionType() == 7 ? 1000 : Seite);
SpinBox11->setMaximum(((item->annotation().ActionType() == 7) || (item->annotation().ActionType() == 9)) ? 1000 : Seite);
SpinBox11->setValue(qMin(item->annotation().Ziel()+1, Seite));
GroupBox11Layout->addWidget( SpinBox11, 1, 1 );
if (item->annotation().ActionType() == 7)
GroupBox11Layout->addWidget( SpinBox11, 2, 1 );
if ((item->annotation().ActionType() == 7) || (item->annotation().ActionType() == 9))
Pg1 = new Navigator( GroupBox11, 100, item->annotation().Ziel()+1, view, item->annotation().Extern());
else
Pg1 = new Navigator( GroupBox11, 100, qMin(item->annotation().Ziel(), Seite-1), view);
Pg1->setMinimumSize(QSize(Pg1->pmx.width(), Pg1->pmx.height()));
GroupBox11Layout->addWidget(Pg1, 1, 2, 3, 1);
GroupBox11Layout->addWidget(Pg1, 2, 2, 3, 1);
TextLabel41 = new QLabel( GroupBox11 );
TextLabel41->setText( tr( "X-Pos:" ) );
GroupBox11Layout->addWidget( TextLabel41, 2, 0 );
GroupBox11Layout->addWidget( TextLabel41, 3, 0 );
SpinBox21 = new QSpinBox( GroupBox11 );
SpinBox21->setSuffix( tr( " pt" ) );
SpinBox21->setMaximum(Breite);
SpinBox21->setValue(tl[0].toInt());
GroupBox11Layout->addWidget( SpinBox21, 2, 1 );
GroupBox11Layout->addWidget( SpinBox21, 3, 1 );
TextLabel51 = new QLabel( GroupBox11 );
TextLabel51->setText( tr( "Y-Pos:" ) );
GroupBox11Layout->addWidget( TextLabel51, 3, 0 );
GroupBox11Layout->addWidget( TextLabel51, 4, 0 );
SpinBox31 = new QSpinBox( GroupBox11 );
SpinBox31->setMaximum(Hoehe);
SpinBox31->setSuffix( tr( " pt" ) );
SpinBox31->setValue(Hoehe-tl[1].toInt());
GroupBox11Layout->addWidget( SpinBox31, 3, 1 );
GroupBox11Layout->addWidget( SpinBox31, 4, 1 );
Fram2->addWidget(GroupBox11);
 
Frame3b = new QFrame( tab_2 );
693,14 → 699,8
Frame3cLayout->addItem( spacerSua);
Fram2->addWidget( Frame3c );
TabWidget2->addTab( tab_2, tr( "Action" ) );
if (item->annotation().ActionType() != 7)
if ((item->annotation().ActionType() == 7) || (item->annotation().ActionType() == 9))
{
Destfile->setEnabled(false);
ChFile->setEnabled(false);
LExtern->setChecked(false);
}
else
{
LExtern->setChecked(true);
if (!Destfile->text().isEmpty())
{
714,6 → 714,12
LExtern->setChecked(false);
}
}
else
{
Destfile->setEnabled(false);
ChFile->setEnabled(false);
LExtern->setChecked(false);
}
 
tab4 = new QWidget( TabWidget2 );
Layout = new QVBoxLayout( tab4 );
1739,7 → 1745,7
void Annot::SetPg(int v)
{
disconnect(SpinBox11, SIGNAL(valueChanged(int)), this, SLOT(SetPg(int)));
if (item->annotation().ActionType() == 7)
if ((item->annotation().ActionType() == 7) || (item->annotation().ActionType() == 9))
{
if (!Pg1->SetSeite(v, 100, Destfile->text()))
{
1960,7 → 1966,10
if ((LExtern->isChecked()) && (!Destfile->text().isEmpty()))
{
item->annotation().setExtern(Destfile->text());
item->annotation().setActionType(7);
if (useAbsolute->isChecked())
item->annotation().setActionType(9);
else
item->annotation().setActionType(7);
}
else
{
2010,7 → 2019,7
disconnect(ActionCombo, SIGNAL(activated(int)), this, SLOT(SetActTyp(int)));
disconnect(TxFormat, SIGNAL(activated(int)), this, SLOT(SetFoScript(int)));
int tmpac = item->annotation().ActionType();
if (tmpac == 7)
if ((tmpac == 7) || (tmpac == 9))
tmpac = 2;
int sela = it + 2;
TabWidget2->setTabEnabled(TabWidget2->indexOf(tab4), false);
2046,7 → 2055,7
for (uint prop = 0; prop < array_act; ++prop)
ActionCombo->addItem(tmp_actcom[prop]);
ActionCombo->setCurrentIndex(qMin(tmpac,5));
setter = item->annotation().ActionType() != 7 ? true : false;
setter = ((item->annotation().ActionType() != 7) && (item->annotation().ActionType() != 9)) ? true : false;
Destfile->setEnabled(setter);
ChFile->setEnabled(setter);
SetActTyp(tmpac);
2119,7 → 2128,10
}
else
{
item->annotation().setActionType(7);
if (useAbsolute->isChecked())
item->annotation().setActionType(9);
else
item->annotation().setActionType(7);
enable = true;
// Destfile->setEnabled(true);
// ChFile->setEnabled(true);
/trunk/Scribus/scribus/annota.cpp
27,6 → 27,7
#include <QSpinBox>
#include <QPixmap>
#include <QStringList>
#include <QCheckBox>
 
#include "scfonts.h"
#include "annota.h"
52,7 → 53,7
view = vie;
MaxSeite = Seite;
QStringList tl;
if ((item->annotation().ActionType() == 2) || (item->annotation().ActionType() == 7))
if ((item->annotation().ActionType() == 2) || (item->annotation().ActionType() == 7) || (item->annotation().ActionType() == 9))
{
QString tm = item->annotation().Action();
tl = tm.split(" ", QString::SkipEmptyParts);
88,6 → 89,8
ComboBox1->setCurrentIndex(item->annotation().Type()-10);
if ((item->annotation().ActionType() == 7) || (item->annotation().ActionType() == 8))
ComboBox1->setCurrentIndex(item->annotation().ActionType() - 5);
if (item->annotation().ActionType() == 9)
ComboBox1->setCurrentIndex(2);
Fram = new QStackedWidget(this);
AnnotLayout->addWidget( Fram );
 
110,20 → 113,27
ChFile = new QPushButton(GroupBox1);
ChFile->setText( tr("C&hange..."));
GroupBox1Layout->addWidget( ChFile, 0, 2 );
if ((item->annotation().ActionType() != 7) && (item->annotation().ActionType() != 8))
useAbsolute = new QCheckBox( tr("Export absolute Filename"), GroupBox1);
GroupBox1Layout->addWidget( useAbsolute, 1, 0, 1, 3 );
if (item->annotation().ActionType() == 7)
useAbsolute->setChecked(false);
else if (item->annotation().ActionType() == 9)
useAbsolute->setChecked(true);
if ((item->annotation().ActionType() != 7) && (item->annotation().ActionType() != 8) && (item->annotation().ActionType() != 9))
{
Destfile->hide();
ChFile->hide();
useAbsolute->hide();
}
 
SpinBox1 = new QSpinBox( GroupBox1);
SpinBox1->setMinimum(1);
SpinBox1->setMaximum(item->annotation().ActionType() == 7 ? 1000 : Seite);
SpinBox1->setMaximum(((item->annotation().ActionType() == 7) || (item->annotation().ActionType() == 9)) ? 1000 : Seite);
TextLabel3 = new QLabel( tr("&Page:"), GroupBox1);
TextLabel3->setBuddy(SpinBox1);
GroupBox1Layout->addWidget( TextLabel3, 1, 0 );
GroupBox1Layout->addWidget( SpinBox1, 1, 1 );
if ((!Destfile->text().isEmpty()) && (item->annotation().ActionType() == 7))
GroupBox1Layout->addWidget( TextLabel3, 2, 0 );
GroupBox1Layout->addWidget( SpinBox1, 2, 1 );
if ((!Destfile->text().isEmpty()) && ((item->annotation().ActionType() == 7) || (item->annotation().ActionType() == 9)))
Pg = new Navigator( GroupBox1, 100, item->annotation().Ziel()+1, view, item->annotation().Extern());
else
{
137,7 → 147,7
}
SpinBox1->setValue(item->annotation().Ziel()+1);
Pg->setMinimumSize(QSize(Pg->pmx.width(), Pg->pmx.height()));
GroupBox1Layout->addWidget(Pg, 1, 2, 3, 1);
GroupBox1Layout->addWidget(Pg, 2, 2, 3, 1);
 
SpinBox2 = new QSpinBox( GroupBox1);
SpinBox2->setSuffix( tr( " pt" ) );
145,8 → 155,8
SpinBox2->setValue(tl[0].toInt());
TextLabel4 = new QLabel( tr("&X-Pos"), GroupBox1 );
TextLabel4->setBuddy(SpinBox2);
GroupBox1Layout->addWidget( TextLabel4, 2, 0 );
GroupBox1Layout->addWidget( SpinBox2, 2, 1 );
GroupBox1Layout->addWidget( TextLabel4, 3, 0 );
GroupBox1Layout->addWidget( SpinBox2, 3, 1 );
SpinBox3 = new QSpinBox( GroupBox1 );
SpinBox3->setMaximum(Hoehe);
SpinBox3->setSuffix( tr( " pt" ) );
153,8 → 163,8
SpinBox3->setValue(Hoehe-tl[1].toInt());
TextLabel5 = new QLabel( tr("&Y-Pos:"), GroupBox1 );
TextLabel5->setBuddy(SpinBox3);
GroupBox1Layout->addWidget( TextLabel5, 3, 0 );
GroupBox1Layout->addWidget( SpinBox3, 3, 1 );
GroupBox1Layout->addWidget( TextLabel5, 4, 0 );
GroupBox1Layout->addWidget( SpinBox3, 4, 1 );
Fram->addWidget(GroupBox1);
 
Layout1_2 = new QHBoxLayout;
243,7 → 253,10
if (!Destfile->text().isEmpty())
{
item->annotation().setExtern(Destfile->text());
item->annotation().setActionType(7);
if (useAbsolute->isChecked())
item->annotation().setActionType(9);
else
item->annotation().setActionType(7);
}
item->annotation().setType(11);
break;
277,6 → 290,7
Destfile->setText("");
Destfile->hide();
ChFile->hide();
useAbsolute->hide();
item->annotation().setActionType(2);
SetPg(qMin(SpinBox1->value(), MaxSeite));
break;
284,6 → 298,7
Fram->setCurrentIndex(1);
Destfile->show();
ChFile->show();
useAbsolute->show();
Destfile->setReadOnly(true);
if ((Destfile->text().isEmpty()) || (item->annotation().ActionType() == 8))
{
296,10 → 311,16
Destfile->setText("");
Destfile->hide();
ChFile->hide();
useAbsolute->hide();
ComboBox1->setCurrentIndex(1);
}
else
item->annotation().setActionType(7);
{
if (useAbsolute->isChecked())
item->annotation().setActionType(9);
else
item->annotation().setActionType(7);
}
SetPg(qMin(SpinBox1->value(), MaxSeite));
break;
case 3:
307,6 → 328,7
Destfile->show();
Destfile->setReadOnly(false);
ChFile->hide();
useAbsolute->hide();
Pg->hide();
TextLabel3->hide();
TextLabel4->hide();
318,10 → 340,11
break;
case 11:
Fram->setCurrentIndex(1);
if (item->annotation().ActionType() == 7)
if ((item->annotation().ActionType() == 7) || (item->annotation().ActionType() == 9))
{
Destfile->show();
ChFile->show();
useAbsolute->show();
Destfile->setReadOnly(true);
}
if (item->annotation().ActionType() == 8)
329,6 → 352,7
Destfile->show();
Destfile->setReadOnly(false);
ChFile->hide();
useAbsolute->hide();
Pg->hide();
TextLabel3->hide();
TextLabel4->hide();
341,7 → 365,7
SetPg(qMin(SpinBox1->value(), MaxSeite));
break;
default:
Fram->setCurrentIndex(2);
Fram->setCurrentIndex(0);
break;
}
connect(ComboBox1, SIGNAL(activated(int)), this, SLOT(SetZiel(int)));
/trunk/Scribus/scribus/annot.h
71,6 → 71,7
QCheckBox* LExtern;
QLineEdit* Destfile;
QPushButton* ChFile;
QCheckBox* useAbsolute;
Navigator* Pg1;
QSpinBox* SpinBox11;
QSpinBox* SpinBox21;
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
2282,10 → 2282,7
currItem->annotation().setActionType(obj->attribute("ANACTYP", "0").toInt());
currItem->annotation().setExtern(obj->attribute("ANEXTERN",""));
if ((!currItem->annotation().Extern().isEmpty()) && (currItem->annotation().ActionType() != 8))
{
QFileInfo efp(currItem->annotation().Extern());
currItem->annotation().setExtern(efp.absoluteFilePath());
}
currItem->annotation().setExtern(Relative2Path(obj->attribute("ANEXTERN","") , baseDir));
currItem->annotation().setZiel(obj->attribute("ANZIEL", "0").toInt());
currItem->annotation().setToolTip(obj->attribute("ANTOOLTIP",""));
currItem->annotation().setRollOver(obj->attribute("ANROLL",""));