Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 247 → Rev 248

/trunk/Scribus/ChangeLogCVS
1,4 → 1,7
Changes since Version 1.1.6
09.04.2004 Made various adjustments to Dialog Buttons.
Improved Panning.
 
08.04.2004 Fixed Crash when exporting Texts on a Path to PDF.
You can scroll now with the Mouse when no Object is selected and you press CTRL and move the Mouse.
 
/trunk/Scribus/scribus.lsm
1,14 → 1,14
Begin3
Title: Scribus
Version: 0.4
Entered-date:
Description:
Keywords:
Author: Franz Schmid <Franz.Schmid@altmuehlnet.de>
Maintained-by: Franz Schmid <Franz.Schmid@altmuehlnet.de>
Primary-site:
Home-page: http://web2.altmuehlnet.de/fschmid
Original-site:
Platforms: Linux and other Unices
Copying-policy: GNU Public License
Begin4
Title: Scribus
Version: 1.1.6
Entered-date: 2003-10-01
Description: Scribus is a Desktop Publishing Program for Linux published under the GNU GPL.
Keywords: desktop publishing, PDF, text processing, graphics, postscript, SVG, EPS
Author: franz.schmid@altmuehlnet.de Franz Schmid
Maintained-by: franz.schmid@altmuehlnet.de Franz Schmid
Primary-site: http://www.scribus.net
Alternate-site: http://web2.altmuehlnet.de/fschmid
Original-site: http://web2.altmuehlnet.de/fschmid
Platforms: Linux and other Unices, MacOSX, Requires: Python >= 2.2, Qt >= 3.0.5+, libart_lgpl >= 2.3.11, freetype2 >=2.1.3
Copying-policy: GNU Public License
End
/trunk/Scribus/scribus/bookpalette.cpp
52,3 → 52,9
emit Schliessen();
ce->accept();
}
 
void BookPalette::reject()
{
emit Schliessen();
QDialog::reject();
}
/trunk/Scribus/scribus/pdfopts.cpp
795,7 → 795,7
 
// signals and slots connections
connect( FileC, SIGNAL( clicked() ), this, SLOT( ChangeFile() ) );
connect( OK, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( OK, SIGNAL( clicked() ), this, SLOT( DoExport() ) );
connect( Cancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect(EmbedFonts, SIGNAL(clicked()), this, SLOT(EmbedAll()));
connect(AvailFlist, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SelAFont(QListBoxItem*)));
832,6 → 832,15
// no need to delete child widgets, Qt does it all for us
}
 
void PDF_Opts::DoExport()
{
QString fn = Datei->text();
if (overwrite(this, fn))
accept();
else
return;
}
 
void PDF_Opts::ToggleEncr()
{
bool setter = Encry->isChecked() ? true : false;
1173,9 → 1182,5
fn = dia.selectedFile();
else
return;
if (!fn.isEmpty())
{
if (overwrite(this, fn))
Datei->setText(fn);
}
Datei->setText(fn);
}
/trunk/Scribus/scribus/mpalette.h
38,7 → 38,7
 
class NameWidget : public QLineEdit
{
Q_OBJECT
Q_OBJECT
 
public:
NameWidget(QWidget* parent);
48,172 → 48,172
void Leaved();
 
protected:
virtual void focusOutEvent(QFocusEvent *);
virtual void focusOutEvent(QFocusEvent *);
};
 
class Mpalette : public QDialog
class Mpalette : public QDialog
{
Q_OBJECT
 
public:
Mpalette(QWidget* parent, preV *Prefs);
~Mpalette() {};
void closeEvent(QCloseEvent *ce);
Mpalette(QWidget* parent, preV *Prefs);
~Mpalette() {};
void closeEvent(QCloseEvent *ce);
void ToggleFlow();
void updateCList();
void updateCmsList();
void ShowCMS();
void fillLangCombo(QMap<QString,QString> Sprachen);
QButtonGroup* buttonGroup5;
QToolButton* SShape;
QToolButton* SText;
QToolButton* SImage;
QToolButton* SLine;
QToolButton* SGeom;
QToolButton* SColor;
QWidgetStack* TabStack;
QWidgetStack* TabStack2;
QWidgetStack* TabStack3;
QWidget* page;
QWidget* page_2;
QWidget* page_2a;
QWidget* page_2b;
QWidget* page_3;
QWidget* page_4;
QWidget* page_5;
QWidget* page_5a;
QWidget* page_5b;
Cpalette *Cpal;
QGroupBox* NameGroup;
QButtonGroup* buttonGroup5;
QToolButton* SShape;
QToolButton* SText;
QToolButton* SImage;
QToolButton* SLine;
QToolButton* SGeom;
QToolButton* SColor;
QWidgetStack* TabStack;
QWidgetStack* TabStack2;
QWidgetStack* TabStack3;
QWidget* page;
QWidget* page_2;
QWidget* page_2a;
QWidget* page_2b;
QWidget* page_3;
QWidget* page_4;
QWidget* page_5;
QWidget* page_5a;
QWidget* page_5b;
Cpalette *Cpal;
QGroupBox* NameGroup;
NameWidget* NameEdit;
QGroupBox* GeoGroup;
QLabel* Text1;
QLabel* Text2;
QLabel* Text1a;
QLabel* Text2a;
MSpinBox* Width;
MSpinBox* Xpos;
MSpinBox* Ypos;
MSpinBox* Height;
QGroupBox* LayerGroup;
QToolButton* Zup;
QToolButton* ZDown;
QToolButton* ZTop;
QToolButton* ZBottom;
QButtonGroup* RotationGroup;
QRadioButton* TopLeft;
QFrame* Line1;
QRadioButton* TopRight;
QFrame* Line2;
QRadioButton* Center;
QFrame* Line4;
QRadioButton* BottomLeft;
QFrame* Line5;
QRadioButton* BottomRight;
QLabel* Text3;
MSpinBox* Rot;
QLabel* Text3r;
QToolButton* FlipH;
QToolButton* FlipV;
QToolButton* Locked;
QToolButton* NoPrint;
QToolButton* NoResize;
QButtonGroup* ShapeGroup;
QLabel* SRect;
Autoforms* SCustom;
QLabel* Text4;
MSpinBox* RoundRect;
QCheckBox* Textflow;
QCheckBox* Textflow2;
QToolButton* EditShape;
QGroupBox* Distance;
QGroupBox* Distance2;
QLabel* TextLabel3;
QLabel* TextLabel2;
MSpinBox* Dist;
MSpinBox* LineW;
QLabel* Text14;
QLabel* Text14a;
QLabel* Text14b;
QLabel* Text15;
QLabel* Text16;
QGroupBox* GeoGroup;
QLabel* Text1;
QLabel* Text2;
QLabel* Text1a;
QLabel* Text2a;
MSpinBox* Width;
MSpinBox* Xpos;
MSpinBox* Ypos;
MSpinBox* Height;
QGroupBox* LayerGroup;
QToolButton* Zup;
QToolButton* ZDown;
QToolButton* ZTop;
QToolButton* ZBottom;
QButtonGroup* RotationGroup;
QRadioButton* TopLeft;
QFrame* Line1;
QRadioButton* TopRight;
QFrame* Line2;
QRadioButton* Center;
QFrame* Line4;
QRadioButton* BottomLeft;
QFrame* Line5;
QRadioButton* BottomRight;
QLabel* Text3;
MSpinBox* Rot;
QLabel* Text3r;
QToolButton* FlipH;
QToolButton* FlipV;
QToolButton* Locked;
QToolButton* NoPrint;
QToolButton* NoResize;
QButtonGroup* ShapeGroup;
QLabel* SRect;
Autoforms* SCustom;
QLabel* Text4;
MSpinBox* RoundRect;
QCheckBox* Textflow;
QCheckBox* Textflow2;
QToolButton* EditShape;
QGroupBox* Distance;
QGroupBox* Distance2;
QLabel* TextLabel3;
QLabel* TextLabel2;
MSpinBox* Dist;
MSpinBox* LineW;
QLabel* Text14;
QLabel* Text14a;
QLabel* Text14b;
QLabel* Text15;
QLabel* Text16;
QSpinBox* DCol;
MSpinBox* DGap;
MSpinBox* DTop;
MSpinBox* DBottom;
MSpinBox* DLeft;
QPushButton* TabsButton;
QLabel* Text17;
MSpinBox* DRight;
QCheckBox* NormText2;
MSpinBox* DGap;
MSpinBox* DTop;
MSpinBox* DBottom;
MSpinBox* DLeft;
QPushButton* TabsButton;
QLabel* Text17;
MSpinBox* DRight;
QCheckBox* NormText2;
FontCombo* Fonts;
MSpinBox* Size;
QToolButton* Revert;
StyleSelect* SeStyle;
AlignSelect* GroupAlign;
QGroupBox* GroupBox3;
MSpinBox* LineSp;
MSpinBox* Extra;
QLabel* Text5;
QLabel* Text6;
QGroupBox* GroupBox3a;
Spalette *Spal;
QLabel* Text20;
QRadioButton* FreeScale;
QLabel* Text13;
MSpinBox* LYpos;
QLabel* Text12;
QLabel* Text11;
QLabel* Text11a;
MSpinBox* LXpos;
LinkButton* Kette;
LinkButton* Kette2;
MSpinBox* ScaleY;
MSpinBox* ScaleX;
QFrame* Line5_2;
QRadioButton* FrameScale;
QFrame* Frame4;
QCheckBox* Aspect;
QLabel* TextCms1;
QLabel* TextCms2;
QComboBox* InputP;
QComboBox* MonitorI;
QLabel* LineModeT;
QComboBox* LineMode;
QLabel* Text9;
MSpinBox* LSize;
QLabel* TextLabel1;
QComboBox* LJoinStyle;
QLabel* Text10;
QComboBox* LEndStyle;
QLabel* Text8;
LineCombo* LStyle;
MSpinBox* Size;
QToolButton* Revert;
StyleSelect* SeStyle;
AlignSelect* GroupAlign;
QGroupBox* GroupBox3;
MSpinBox* LineSp;
MSpinBox* Extra;
QLabel* Text5;
QLabel* Text6;
QGroupBox* GroupBox3a;
Spalette *Spal;
QLabel* Text20;
QRadioButton* FreeScale;
QLabel* Text13;
MSpinBox* LYpos;
QLabel* Text12;
QLabel* Text11;
QLabel* Text11a;
MSpinBox* LXpos;
LinkButton* Kette;
LinkButton* Kette2;
MSpinBox* ScaleY;
MSpinBox* ScaleX;
QFrame* Line5_2;
QRadioButton* FrameScale;
QFrame* Frame4;
QCheckBox* Aspect;
QLabel* TextCms1;
QLabel* TextCms2;
QComboBox* InputP;
QComboBox* MonitorI;
QLabel* LineModeT;
QComboBox* LineMode;
QLabel* Text9;
MSpinBox* LSize;
QLabel* TextLabel1;
QComboBox* LJoinStyle;
QLabel* Text10;
QComboBox* LEndStyle;
QLabel* Text8;
LineCombo* LStyle;
QListBox* StyledLine;
QLabel* ScaleTxt;
QSpinBox* ChScale;
QLabel* StrokeIcon;
QComboBox* TxStroke;
QLabel* ScaleTxt;
QSpinBox* ChScale;
QLabel* StrokeIcon;
QComboBox* TxStroke;
QLabel* ShadeTxt2;
QLabel* ShadeTxt1;
ShadeButton *PM1;
QLabel* FillIcon;
QComboBox* TxFill;
QLabel* FillIcon;
QComboBox* TxFill;
ShadeButton *PM2;
QLabel* StilT;
QLabel* SprachT;
QComboBox* LangCombo;
QGroupBox* GroupBoxCM;
QGroupBox* TLines;
QCheckBox* TopLine;
QCheckBox* LeftLine;
QCheckBox* RightLine;
QCheckBox* BottomLine;
PageItem *CurItem;
bool HaveDoc;
bool HaveItem;
ScribusDoc *doc;
double Umrech;
bool LMode;
QLabel* StilT;
QLabel* SprachT;
QComboBox* LangCombo;
QGroupBox* GroupBoxCM;
QGroupBox* TLines;
QCheckBox* TopLine;
QCheckBox* LeftLine;
QCheckBox* RightLine;
QCheckBox* BottomLine;
PageItem *CurItem;
bool HaveDoc;
bool HaveItem;
ScribusDoc *doc;
double Umrech;
bool LMode;
double RoVal;
 
public slots:
222,8 → 222,8
void NewSel(int nr);
void SetCurItem(PageItem *i);
void UnitChange();
void setXY(double x, double y);
void setBH(double x, double y);
void setXY(double x, double y);
void setBH(double x, double y);
void setR(double r);
void setRR(double r);
void setCols(int r, double g);
246,7 → 246,7
void setActShade();
void setActFarben(QString p, QString b, int shp, int shb);
void ManageTabs();
 
private slots:
 
void SelTab(int t);
297,7 → 297,10
void NewName();
void NewLanguage();
void HandleTLines();
 
protected slots:
virtual void reject();
 
signals:
void Schliessen();
void DocChanged();
310,44 → 313,44
void UpdtGui(int);
 
protected:
QVBoxLayout* MpalLayout;
QGridLayout* buttonGroup5Layout;
QVBoxLayout* pageLayout;
QVBoxLayout* pageLayout_2;
QVBoxLayout* pageLayout_2a;
QVBoxLayout* pageLayout_2b;
QVBoxLayout* pageLayout_3;
QVBoxLayout* pageLayout_4;
QVBoxLayout* pageLayout_5;
QVBoxLayout* pageLayout_5a;
QVBoxLayout* pageLayout_5b;
QVBoxLayout* TLineLayout;
QHBoxLayout* layout60;
QGridLayout* Layout44;
QHBoxLayout* Layout13;
QGridLayout* Layout12;
QHBoxLayout* layout47;
QVBoxLayout* layout46;
QGridLayout* layout41;
QHBoxLayout* Layout1;
QGridLayout* layout43;
QVBoxLayout* Layout24;
QHBoxLayout* Layout18;
QHBoxLayout* Layout13_2;
QGridLayout* Layout12_2;
QHBoxLayout* NameGroupLayout;
QGridLayout* GeoGroupLayout;
QGridLayout* LayerGroupLayout;
QHBoxLayout* RotationGroupLayout;
QHBoxLayout* ShapeGroupLayout;
QGridLayout* DistanceLayout;
QGridLayout* DistanceLayout2;
QGridLayout* GroupBox3Layout;
QGridLayout* GroupBox3aLayout;
QVBoxLayout* GroupBoxCMLayout;
QHBoxLayout* layout22;
QHBoxLayout* layout23;
QHBoxLayout* layout24;
QVBoxLayout* MpalLayout;
QGridLayout* buttonGroup5Layout;
QVBoxLayout* pageLayout;
QVBoxLayout* pageLayout_2;
QVBoxLayout* pageLayout_2a;
QVBoxLayout* pageLayout_2b;
QVBoxLayout* pageLayout_3;
QVBoxLayout* pageLayout_4;
QVBoxLayout* pageLayout_5;
QVBoxLayout* pageLayout_5a;
QVBoxLayout* pageLayout_5b;
QVBoxLayout* TLineLayout;
QHBoxLayout* layout60;
QGridLayout* Layout44;
QHBoxLayout* Layout13;
QGridLayout* Layout12;
QHBoxLayout* layout47;
QVBoxLayout* layout46;
QGridLayout* layout41;
QHBoxLayout* Layout1;
QGridLayout* layout43;
QVBoxLayout* Layout24;
QHBoxLayout* Layout18;
QHBoxLayout* Layout13_2;
QGridLayout* Layout12_2;
QHBoxLayout* NameGroupLayout;
QGridLayout* GeoGroupLayout;
QGridLayout* LayerGroupLayout;
QHBoxLayout* RotationGroupLayout;
QHBoxLayout* ShapeGroupLayout;
QGridLayout* DistanceLayout;
QGridLayout* DistanceLayout2;
QGridLayout* GroupBox3Layout;
QGridLayout* GroupBox3aLayout;
QVBoxLayout* GroupBoxCMLayout;
QHBoxLayout* layout22;
QHBoxLayout* layout23;
QHBoxLayout* layout24;
};
 
#endif
/trunk/Scribus/scribus/lineformats.cpp
55,7 → 55,7
Layout15->addWidget( SaveB );
 
ExitB = new QPushButton( this, "ExitB" );
ExitB->setText( tr( "Close" ) );
ExitB->setText( tr( "OK" ) );
Layout15->addWidget( ExitB );
 
CancelB = new QPushButton( this, "CancelB" );
/trunk/Scribus/scribus/mpalette.cpp
897,7 → 897,6
PM1->setEnabled(false);
}
 
 
void Mpalette::closeEvent(QCloseEvent *ce)
{
emit Schliessen();
904,6 → 903,12
ce->accept();
}
 
void Mpalette::reject()
{
emit Schliessen();
QDialog::reject();
}
 
void Mpalette::SelTab(int t)
{
if (ScApp->ScriptRunning)
949,7 → 954,7
Width->setMinValue( 1 * UmReFaktor);
Height->setMaxValue( (QMAX(doc->PageB, doc->PageH) + QMAX(doc->PageB, doc->PageH) * 0.1) * UmReFaktor );
Height->setMinValue( 1 * UmReFaktor);
Rot->setMaxValue( 359 );
Rot->setMaxValue( 360 );
Rot->setMinValue( 0 );
RoundRect->setMaxValue( 300 );
RoundRect->setMinValue( -300);
/trunk/Scribus/scribus/seiten.h
167,6 → 167,9
QVBoxLayout* Layout2;
QVBoxLayout* Layout3;
QVBoxLayout* Layout4;
 
protected slots:
virtual void reject();
};
 
#endif // SEITENPAL_H
/trunk/Scribus/scribus/scrap.cpp
24,7 → 24,7
BibView::BibView(QWidget* parent, preV *prefs) : QIconView(parent)
{
Objekte.clear();
Prefs = prefs;
Prefs = prefs;
}
 
QDragObject *BibView::dragObject()
38,9 → 38,9
void BibView::AddObj(QString name, QString daten, QPixmap Bild)
{
struct Elem DrElem;
DrElem.Data = daten;
DrElem.Preview = Bild;
Objekte.insert(name, DrElem);
DrElem.Data = daten;
DrElem.Preview = Bild;
Objekte.insert(name, DrElem);
}
 
void BibView::SaveContents(QString name)
50,12 → 50,12
docu.setContent(st);
QDomElement ele=docu.documentElement();
for (QMap<QString,Elem>::Iterator itf = Objekte.begin(); itf != Objekte.end(); ++itf)
{
{
QDomElement dc=docu.createElement("OBJEKT");
dc.setAttribute("NAME",itf.key());
dc.setAttribute("DATA",itf.data().Data);
ele.appendChild(dc);
}
}
QFile f(name);
if(!f.open(IO_WriteOnly))
return ;
85,21 → 85,21
Objekte.clear();
QDomNode DOC=elem.firstChild();
while(!DOC.isNull())
{
{
QDomElement dc=DOC.toElement();
if (dc.tagName()=="OBJEKT")
{
{
ScPreview *pre = new ScPreview(Prefs);
AddObj(GetAttr(&dc, "NAME"), GetAttr(&dc, "DATA"), pre->createPreview(GetAttr(&dc, "DATA")));
delete pre;
}
}
DOC=DOC.nextSibling();
}
}
QMap<QString,Elem>::Iterator itf;
for (itf = Objekte.begin(); itf != Objekte.end(); ++itf)
{
(void) new QIconViewItem(this, itf.key(), itf.data().Preview);
}
{
(void) new QIconViewItem(this, itf.key(), itf.data().Preview);
}
}
 
void BibView::RebuildView()
107,72 → 107,70
clear();
QMap<QString,Elem>::Iterator itf;
for (itf = Objekte.begin(); itf != Objekte.end(); ++itf)
{
{
ScPreview *pre = new ScPreview(Prefs);
itf.data().Preview = pre->createPreview(itf.data().Data);
(void) new QIconViewItem(this, itf.key(), itf.data().Preview);
(void) new QIconViewItem(this, itf.key(), itf.data().Preview);
delete pre;
}
}
}
 
/* This is the main Dialog-Class for the Scrapbook */
Biblio::Biblio( QWidget* parent, preV *prefs)
: QDialog( parent, "Sclib", false, 0 )
: QDialog( parent, "Sclib", false, 0 )
{
resize( 230, 190 );
setCaption( tr( "Scrapbook" ) );
setIcon(loadIcon("AppIcon.png"));
ScFilename = "";
Prefs = prefs;
Changed = false;
BiblioLayout = new QVBoxLayout( this );
BiblioLayout->setSpacing( 0 );
BiblioLayout->setMargin( 0 );
fmenu = new QPopupMenu();
fmenu->insertItem(loadIcon("DateiNeu16.png"), tr("New"), this, SLOT(NewLib()), CTRL+Key_N);
fSave = fmenu->insertItem(loadIcon("DateiSave16.png"), tr("Save"), this, SLOT(Save()), CTRL+Key_S);
fmenu->insertItem( tr("Save as..."), this, SLOT(SaveAs()));
fmenu->insertItem(loadIcon("DateiOpen16.png"), tr("Load..."), this, SLOT(Load()), CTRL+Key_O);
fmenu->insertItem(loadIcon("DateiClos16.png"), tr("Close"), this, SLOT(CloseWin()));
vmenu = new QPopupMenu();
vS = vmenu->insertItem( tr( "Small" ) );
vM = vmenu->insertItem( tr( "Medium" ) );
vB = vmenu->insertItem( tr( "Big" ) );
switch (prefs->PSize)
{
case 40:
vmenu->setItemChecked(vS, true);
break;
case 60:
vmenu->setItemChecked(vM, true);
break;
case 80:
vmenu->setItemChecked(vB, true);
break;
}
menuBar = new QMenuBar(this);
menuBar->insertItem( tr("File"), fmenu);
menuBar->insertItem( tr("Preview"), vmenu);
BiblioLayout->setMenuBar( menuBar );
resize( 230, 190 );
setCaption( tr( "Scrapbook" ) );
setIcon(loadIcon("AppIcon.png"));
ScFilename = "";
Prefs = prefs;
Changed = false;
BiblioLayout = new QVBoxLayout( this );
BiblioLayout->setSpacing( 0 );
BiblioLayout->setMargin( 0 );
fmenu = new QPopupMenu();
fmenu->insertItem(loadIcon("DateiNeu16.png"), tr("New"), this, SLOT(NewLib()), CTRL+Key_N);
fSave = fmenu->insertItem(loadIcon("DateiSave16.png"), tr("Save"), this, SLOT(Save()), CTRL+Key_S);
fmenu->insertItem( tr("Save as..."), this, SLOT(SaveAs()));
fmenu->insertItem(loadIcon("DateiOpen16.png"), tr("Load..."), this, SLOT(Load()), CTRL+Key_O);
fmenu->insertItem(loadIcon("DateiClos16.png"), tr("Close"), this, SLOT(CloseWin()));
vmenu = new QPopupMenu();
vS = vmenu->insertItem( tr( "Small" ) );
vM = vmenu->insertItem( tr( "Medium" ) );
vB = vmenu->insertItem( tr( "Big" ) );
switch (prefs->PSize)
{
case 40:
vmenu->setItemChecked(vS, true);
break;
case 60:
vmenu->setItemChecked(vM, true);
break;
case 80:
vmenu->setItemChecked(vB, true);
break;
}
menuBar = new QMenuBar(this);
menuBar->insertItem( tr("File"), fmenu);
menuBar->insertItem( tr("Preview"), vmenu);
BiblioLayout->setMenuBar( menuBar );
 
Frame3 = new QFrame( this, "Frame3" );
Frame3->setFrameShape( QFrame::Box );
Frame3->setFrameShadow( QFrame::Sunken );
Frame3Layout = new QVBoxLayout( Frame3 );
Frame3Layout->setSpacing( 6 );
Frame3Layout->setMargin( 11 );
Frame3 = new QFrame( this, "Frame3" );
Frame3->setFrameShape( QFrame::Box );
Frame3->setFrameShadow( QFrame::Sunken );
Frame3Layout = new QVBoxLayout( Frame3 );
Frame3Layout->setSpacing( 6 );
Frame3Layout->setMargin( 11 );
 
BibWin = new BibView(Frame3, prefs);
BibWin->setAutoArrange(true);
BibWin->setSorting(true);
BibWin->setResizeMode(QIconView::Adjust);
Frame3Layout->addWidget( BibWin );
BiblioLayout->addWidget( Frame3 );
connect(BibWin, SIGNAL(dropped(QDropEvent *, const QValueList<QIconDragItem> &)),
this, SLOT(DropOn(QDropEvent *)));
connect(BibWin, SIGNAL(rightButtonClicked(QIconViewItem*, const QPoint &)),
this, SLOT(HandleMouse(QIconViewItem*)));
connect(vmenu, SIGNAL(activated(int)), this, SLOT(SetPreview(int)));
BibWin = new BibView(Frame3, prefs);
BibWin->setAutoArrange(true);
BibWin->setSorting(true);
BibWin->setResizeMode(QIconView::Adjust);
Frame3Layout->addWidget( BibWin );
BiblioLayout->addWidget( Frame3 );
connect(BibWin, SIGNAL(dropped(QDropEvent *, const QValueList<QIconDragItem> &)), this, SLOT(DropOn(QDropEvent *)));
connect(BibWin, SIGNAL(rightButtonClicked(QIconViewItem*, const QPoint &)), this, SLOT(HandleMouse(QIconViewItem*)));
connect(vmenu, SIGNAL(activated(int)), this, SLOT(SetPreview(int)));
}
 
void Biblio::closeEvent(QCloseEvent *ce)
186,26 → 184,32
emit Schliessen();
}
 
void Biblio::reject()
{
emit Schliessen();
QDialog::reject();
}
 
void Biblio::Save()
{
if ((!ScFilename.isEmpty()) && (BibWin->Objekte.count() != 0))
{
{
BibWin->SaveContents(ScFilename);
Changed = false;
}
}
}
 
void Biblio::SaveAs()
{
QString fn = QFileDialog::getSaveFileName(0, tr("Scrapbooks (*.scs);;All Files (*)"), this);
if (!fn.isEmpty())
{
BibWin->SaveContents(fn);
ScFilename = fn;
setCaption(fn);
fmenu->setItemEnabled(fSave, 1);
QString fn = QFileDialog::getSaveFileName(0, tr("Scrapbooks (*.scs);;All Files (*)"), this);
if (!fn.isEmpty())
{
BibWin->SaveContents(fn);
ScFilename = fn;
setCaption(fn);
fmenu->setItemEnabled(fSave, 1);
Changed = false;
}
}
}
 
void Biblio::Load()
213,12 → 217,12
Save();
QString fileName = QFileDialog::getOpenFileName(0, tr("Scrapbooks (*.scs);;All Files (*)"),this);
if (!fileName.isEmpty())
{
{
BibWin->ReadContents(fileName);
ScFilename = fileName;
setCaption(fileName);
Changed = false;
}
}
}
 
void Biblio::SetPreview(int id)
225,17 → 229,17
{
int a = vmenu->indexOf(id);
switch (a)
{
case 0:
Prefs->PSize = 40;
break;
case 1:
Prefs->PSize = 60;
break;
case 2:
Prefs->PSize = 80;
break;
}
{
case 0:
Prefs->PSize = 40;
break;
case 1:
Prefs->PSize = 60;
break;
case 2:
Prefs->PSize = 80;
break;
}
AdjustMenu();
BibWin->RebuildView();
}
245,18 → 249,18
vmenu->setItemChecked(vS, false);
vmenu->setItemChecked(vM, false);
vmenu->setItemChecked(vB, false);
switch (Prefs->PSize)
{
case 40:
vmenu->setItemChecked(vS, true);
break;
case 60:
vmenu->setItemChecked(vM, true);
break;
case 80:
vmenu->setItemChecked(vB, true);
break;
}
switch (Prefs->PSize)
{
case 40:
vmenu->setItemChecked(vS, true);
break;
case 60:
vmenu->setItemChecked(vM, true);
break;
case 80:
vmenu->setItemChecked(vB, true);
break;
}
}
 
void Biblio::HandleMouse(QIconViewItem *ite)
263,15 → 267,15
{
int mret, del;
if (ite != 0)
{
{
QPopupMenu *pmenu = new QPopupMenu();
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
del = pmenu->insertItem( tr("Delete"));
mret = pmenu->exec(QCursor::pos());
if (mret == del)
DeleteObj(ite->text(), ite);
delete pmenu;
}
DeleteObj(ite->text(), ite);
delete pmenu;
}
}
 
void Biblio::NewLib()
280,8 → 284,8
BibWin->Objekte.clear();
BibWin->clear();
ScFilename = "";
setCaption( tr("Scrapbook"));
fmenu->setItemEnabled(fSave, 0);
setCaption( tr("Scrapbook"));
fmenu->setItemEnabled(fSave, 0);
}
 
void Biblio::DeleteObj(QString name, QIconViewItem *ite)
300,60 → 304,60
bool img;
tmp = "";
if (QTextDrag::decode(e, text))
{
{
QUrl ur(text);
QFileInfo fi = QFileInfo(ur.path());
QString ext = fi.extension(false).lower();
img = ((ext=="eps")||(ext=="ps")||(ext=="png")||(ext=="gif")||(ext=="jpg")||(ext=="xpm"));
if ((fi.exists()) && (!img))
{
if (loadText(ur.path(), &text))
{
if (loadText(ur.path(), &text))
if (text.startsWith("<SCRIBUSELEM>"))
{
if (text.startsWith("<SCRIBUSELEM>"))
{
tmp = text;
}
}
}
}
}
else
{
if (text.startsWith("<SCRIBUSELEM>"))
{
if (text.startsWith("<SCRIBUSELEM>"))
{
tmp = text;
}
}
}
}
ObjFromMenu(text);
if (Prefs->SaveAtQ)
Save();
}
}
}
 
void Biblio::ObjFromMenu(QString text)
{
QString nam, tmp;
nam = tr("Object") + tmp.setNum(BibWin->Objekte.count());
Query *dia = new Query(this, "tt", 1, 0, tr("Name:"), tr("New Entry"));
dia->Answer->setText(nam);
dia->Answer->selectAll();
if (dia->exec())
{
nam = dia->Answer->text();
while (BibWin->Objekte.contains(nam))
{
if (!dia->exec())
{
delete dia;
return;
}
nam = dia->Answer->text();
}
}
else
{
delete dia;
return;
}
delete dia;
nam = tr("Object") + tmp.setNum(BibWin->Objekte.count());
Query *dia = new Query(this, "tt", 1, 0, tr("Name:"), tr("New Entry"));
dia->Answer->setText(nam);
dia->Answer->selectAll();
if (dia->exec())
{
nam = dia->Answer->text();
while (BibWin->Objekte.contains(nam))
{
if (!dia->exec())
{
delete dia;
return;
}
nam = dia->Answer->text();
}
}
else
{
delete dia;
return;
}
delete dia;
tmp = text;
QString ff = "";
if (tmp.startsWith("<SCRIBUSELEMUTF8"))
362,8 → 366,8
ff = tmp;
ScPreview *pre = new ScPreview(Prefs);
QPixmap pm = pre->createPreview(ff);
BibWin->AddObj(nam, ff, pm);
(void) new QIconViewItem(BibWin, nam, pm);
BibWin->AddObj(nam, ff, pm);
(void) new QIconViewItem(BibWin, nam, pm);
Changed = true;
delete pre;
}
/trunk/Scribus/scribus/seiten.cpp
35,7 → 35,7
 
/* IconItems Code */
SeItem::SeItem(QTable* parent, QString text, QPixmap Pix, bool ss)
: QTableItem(parent, QTableItem::Never, text, Pix)
: QTableItem(parent, QTableItem::Never, text, Pix)
{
Side = ss;
setWordWrap(true);
53,7 → 53,7
p->drawPixmap(0, (cr.height()-py)/2, pixmap());
if (sv->Namen)
p->drawText(px, 0, cr.width()-px, cr.height(), Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak,
text());
text());
}
else
{
60,7 → 60,7
p->drawPixmap(cr.width()-px-2, (cr.height()-py)/2, pixmap());
if (sv->Namen)
p->drawText(0, 0, cr.width()-px-2, cr.height(), Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak,
text());
text());
}
}
 
101,7 → 101,7
{
CurItem = i;
Mpos = e->pos();
Mpressed = true;
Mpressed = true;
}
}
 
218,10 → 218,10
else
{
if (b == 0)
emit NewPage((a == 1 ? a - 1 : a - 2), tmp);
emit NewPage((a == 1 ? a - 1 : a - 2), tmp);
if (b == 2)
emit NewPage(a-1, tmp);
}
emit NewPage(a-1, tmp);
}
ClearPix();
}
if (a == numRows()-1)
356,7 → 356,7
if ((((a % 2) == 1) && ((b == 0) || (b == 2))) || (a == numRows()-1))
{
QPixmap pm;
pm = QPixmap(columnWidth(b), rowHeight(a));
pm = QPixmap(columnWidth(b), rowHeight(a));
pm.fill(darkBlue);
setPixmap(a, b, pm);
}
368,7 → 368,7
if ((a % 2) == 0)
{
QPixmap pm;
pm = QPixmap(columnWidth(0), 9);
pm = QPixmap(columnWidth(0), 9);
pm.fill(darkBlue);
setPixmap(a, 0, pm);
}
477,67 → 477,67
 
 
SeitenPal::SeitenPal(QWidget* parent)
: QDialog( parent, "SP", false, 0)
// : QDialog( parent, "SP", false, Qt::WStyle_Customize | Qt::WStyle_Title | Qt::WStyle_Tool)
{
setCaption( tr( "Arrange Pages" ) );
setIcon(loadIcon("AppIcon.png"));
SeitenPalLayout = new QVBoxLayout( this );
SeitenPalLayout->setSpacing( 5 );
SeitenPalLayout->setMargin( 5 );
Splitter1 = new QSplitter( this, "Splitter1" );
Splitter1->setOrientation( QSplitter::Vertical );
QWidget* privateLayoutWidget = new QWidget( Splitter1, "Layout2" );
Layout2 = new QVBoxLayout( privateLayoutWidget, 0, 5, "Layout2");
TextLabel1 = new QLabel( privateLayoutWidget, "TextLabel1" );
TextLabel1->setText( tr( "Available Templates:" ) );
Layout2->addWidget( TextLabel1 );
TemplList = new SeList(privateLayoutWidget);
: QDialog( parent, "SP", false, 0)
// : QDialog( parent, "SP", false, Qt::WStyle_Customize | Qt::WStyle_Title | Qt::WStyle_Tool)
{
setCaption( tr( "Arrange Pages" ) );
setIcon(loadIcon("AppIcon.png"));
SeitenPalLayout = new QVBoxLayout( this );
SeitenPalLayout->setSpacing( 5 );
SeitenPalLayout->setMargin( 5 );
Splitter1 = new QSplitter( this, "Splitter1" );
Splitter1->setOrientation( QSplitter::Vertical );
QWidget* privateLayoutWidget = new QWidget( Splitter1, "Layout2" );
Layout2 = new QVBoxLayout( privateLayoutWidget, 0, 5, "Layout2");
TextLabel1 = new QLabel( privateLayoutWidget, "TextLabel1" );
TextLabel1->setText( tr( "Available Templates:" ) );
Layout2->addWidget( TextLabel1 );
TemplList = new SeList(privateLayoutWidget);
TemplList->setMinimumSize(QSize(130,70));
TemplList->Thumb = false;
Layout2->addWidget( TemplList );
QWidget* privateLayoutWidget_2 = new QWidget( Splitter1, "Layout3" );
Layout3 = new QVBoxLayout( privateLayoutWidget_2, 0, 5, "Layout3");
TextLabel2 = new QLabel( privateLayoutWidget_2, "TextLabel2" );
TextLabel2->setText( tr( "Document Pages:" ) );
Layout3->addWidget( TextLabel2 );
PageView = new SeView(privateLayoutWidget_2);
PageView->setLeftMargin(0);
PageView->verticalHeader()->hide();
PageView->setTopMargin(0);
PageView->horizontalHeader()->hide();
PageView->setSorting(false);
PageView->setSelectionMode(QTable::NoSelection);
PageView->setColumnMovingEnabled(false);
PageView->setRowMovingEnabled(false);
Layout2->addWidget( TemplList );
QWidget* privateLayoutWidget_2 = new QWidget( Splitter1, "Layout3" );
Layout3 = new QVBoxLayout( privateLayoutWidget_2, 0, 5, "Layout3");
TextLabel2 = new QLabel( privateLayoutWidget_2, "TextLabel2" );
TextLabel2->setText( tr( "Document Pages:" ) );
Layout3->addWidget( TextLabel2 );
PageView = new SeView(privateLayoutWidget_2);
PageView->setLeftMargin(0);
PageView->verticalHeader()->hide();
PageView->setTopMargin(0);
PageView->horizontalHeader()->hide();
PageView->setSorting(false);
PageView->setSelectionMode(QTable::NoSelection);
PageView->setColumnMovingEnabled(false);
PageView->setRowMovingEnabled(false);
PageView->setNumRows(1);
PageView->setNumCols(1);
PageView->setMinimumSize(QSize(130,120));
Layout3->addWidget( PageView );
SeitenPalLayout->addWidget( Splitter1 );
Layout3->addWidget( PageView );
SeitenPalLayout->addWidget( Splitter1 );
 
Layout1 = new QHBoxLayout;
Layout1->setSpacing( 6 );
Layout1->setMargin( 0 );
Layout1 = new QHBoxLayout;
Layout1->setSpacing( 6 );
Layout1->setMargin( 0 );
 
Layout4 = new QVBoxLayout;
Layout4->setSpacing( 6 );
Layout4->setMargin( 0 );
Layout4 = new QVBoxLayout;
Layout4->setSpacing( 6 );
Layout4->setMargin( 0 );
DS = new QCheckBox(this, "DS");
DS->setText( tr( "Facing Pages" ) );
Layout4->addWidget( DS );
DS->setText( tr( "Facing Pages" ) );
Layout4->addWidget( DS );
LP = new QCheckBox(this, "LP");
LP->setText( tr( "Left Page first" ) );
Layout4->addWidget( LP );
Layout1->addLayout( Layout4 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout1->addItem( spacer );
LP->setText( tr( "Left Page first" ) );
Layout4->addWidget( LP );
Layout1->addLayout( Layout4 );
 
Trash = new TrashBin( this );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout1->addItem( spacer );
 
Trash = new TrashBin( this );
Trash->setMinimumSize(QSize(22,22));
Layout1->addWidget( Trash );
SeitenPalLayout->addLayout( Layout1 );
Layout1->addWidget( Trash );
SeitenPalLayout->addLayout( Layout1 );
pix = loadIcon("document2.png");
Vie = 0;
Rebuild();
550,8 → 550,8
connect(Trash, SIGNAL(DelMaster(QString)), this, SLOT(DelMPage(QString)));
QToolTip::add( Trash, tr( "Drag Pages or Template Pages onto the Trashbin to delete them." ) );
QToolTip::add( PageView, tr( "Previews all the pages of your document." ));
QToolTip::add( TemplList,
tr( "Here are all your Templates, to create a new Page\ndrag a Template to the Pageview below." ) );
QToolTip::add( TemplList,
tr( "Here are all your Templates, to create a new Page\ndrag a Template to the Pageview below." ) );
}
 
 
561,24 → 561,30
ce->accept();
}
 
void SeitenPal::reject()
{
emit Schliessen();
QDialog::reject();
}
 
void SeitenPal::DelMPage(QString tmp)
{
if (tmp == tr("Normal"))
return;
return;
int Nr = Vie->MasterNames[tmp];
Page* Seite = Vie->MasterPages.at(Nr);
Vie->MasterPages.remove(Nr);
delete Seite->parentWidget();
Vie->MasterNames.clear();
for (uint aa=0; aa < Vie->MasterPages.count(); ++aa)
{
Seite = Vie->MasterPages.at(aa);
for (uint aa=0; aa < Vie->MasterPages.count(); ++aa)
{
Seite = Vie->MasterPages.at(aa);
Seite->PageNr = aa;
if (Vie->Doc->PageFP)
{
Seite->Margins.Left = Seite->LeftPg ? Vie->Doc->PageM.Right : Vie->Doc->PageM.Left;
Seite->Margins.Right= Seite->LeftPg? Vie->Doc->PageM.Left : Vie->Doc->PageM.Right;
}
}
else
{
Seite->Margins.Right = Vie->Doc->PageM.Right;
587,7 → 593,7
Seite->Margins.Top = Vie->Doc->PageM.Top;
Seite->Margins.Bottom = Vie->Doc->PageM.Bottom;
Vie->MasterNames[Seite->PageNam] = aa;
}
}
for (uint b=0; b<Vie->DocPages.count(); ++b)
{
if (Vie->DocPages.at(b)->MPageNam == tmp)
732,7 → 738,7
{
str = Vie->Pages.at(a)->MPageNam;
Side = cb == 1 ? false : true;
QTableItem *it = new SeItem( PageView, str, CreateIcon(a, pix), Side);
QTableItem *it = new SeItem( PageView, str, CreateIcon(a, pix), Side);
PageView->setItem(cc, cb, it);
PageView->setRowHeight(cc, pix.height());
PageView->setPixmap(cc, 2, PageView->pix);
745,7 → 751,7
{
cb = 1;
cc += 2;
}
}
}
}
else
757,7 → 763,7
for (uint a = 0; a < Vie->Pages.count(); ++a)
{
str = Vie->Pages.at(a)->MPageNam;
QTableItem *it = new SeItem( PageView, str, CreateIcon(a, pix), true);
QTableItem *it = new SeItem( PageView, str, CreateIcon(a, pix), true);
PageView->setItem(cc, 0, it);
PageView->setRowHeight(cc, pix.height());
PageView->adjustRow(cc);
/trunk/Scribus/scribus/druck.cpp
35,7 → 35,7
AdvOptions::AdvOptions(QWidget* parent, bool Hm, bool Vm, bool Ic) : QDialog( parent, "prin", true, 0 )
{
setCaption( tr( "Advanced Options" ) );
setIcon(loadIcon("AppIcon.png"));
setIcon(loadIcon("AppIcon.png"));
AdvOptionsLayout = new QVBoxLayout( this );
AdvOptionsLayout->setSpacing( 5 );
AdvOptionsLayout->setMargin( 10 );
81,35 → 81,35
}
 
Druck::Druck( QWidget* parent, QString PDatei, QString PDev, QString PCom)
: QDialog( parent, "Dr", true, 0)
: QDialog( parent, "Dr", true, 0)
{
PrinterOpts = "";
setCaption( tr( "Setup Printer" ) );
setIcon(loadIcon("AppIcon.png"));
DruckLayout = new QVBoxLayout( this );
DruckLayout->setSpacing( 6 );
DruckLayout->setMargin( 10 );
setCaption( tr( "Setup Printer" ) );
setIcon(loadIcon("AppIcon.png"));
DruckLayout = new QVBoxLayout( this );
DruckLayout->setSpacing( 6 );
DruckLayout->setMargin( 10 );
 
Drucker = new QGroupBox( this, "Drucker" );
Drucker->setTitle( tr( "Print destination" ) );
Drucker->setColumnLayout(0, Qt::Vertical );
Drucker->layout()->setSpacing( 0 );
Drucker->layout()->setMargin( 0 );
DruckerLayout = new QGridLayout( Drucker->layout() );
DruckerLayout->setAlignment( Qt::AlignTop );
DruckerLayout->setSpacing( 6 );
DruckerLayout->setMargin( 10 );
Drucker = new QGroupBox( this, "Drucker" );
Drucker->setTitle( tr( "Print destination" ) );
Drucker->setColumnLayout(0, Qt::Vertical );
Drucker->layout()->setSpacing( 0 );
Drucker->layout()->setMargin( 0 );
DruckerLayout = new QGridLayout( Drucker->layout() );
DruckerLayout->setAlignment( Qt::AlignTop );
DruckerLayout->setSpacing( 6 );
DruckerLayout->setMargin( 10 );
 
Layout1x = new QHBoxLayout;
Layout1x->setSpacing( 6 );
Layout1x->setMargin( 0 );
PrintDest = new QComboBox( true, Drucker, "PrintDest" );
PrintDest->setMinimumSize( QSize( 250, 22 ) );
PrintDest->setMaximumSize( QSize( 260, 22 ) );
PrintDest->setEditable(false);
QString Pcap;
QString tmp;
QStringList wt;
Layout1x = new QHBoxLayout;
Layout1x->setSpacing( 6 );
Layout1x->setMargin( 0 );
PrintDest = new QComboBox( true, Drucker, "PrintDest" );
PrintDest->setMinimumSize( QSize( 250, 22 ) );
PrintDest->setMaximumSize( QSize( 260, 22 ) );
PrintDest->setEditable(false);
QString Pcap;
QString tmp;
QStringList wt;
#ifdef HAVE_CUPS
cups_dest_t *dests;
int num_dests = cupsGetDests(&dests);
116,305 → 116,308
for (int pr = 0; pr < num_dests; ++pr)
{
tmp = QString(dests[pr].name);
PrintDest->insertItem(tmp);
if (tmp == PDev)
{
PrintDest->setCurrentItem(PrintDest->count()-1);
ToFile = false;
}
PrintDest->insertItem(tmp);
if (tmp == PDev)
{
PrintDest->setCurrentItem(PrintDest->count()-1);
ToFile = false;
}
}
cupsFreeDests(num_dests, dests);
#else
if (loadText("/etc/printcap", &Pcap))
{
QTextStream ts(&Pcap, IO_ReadOnly);
while(!ts.atEnd())
{
tmp = ts.readLine();
if (tmp.isEmpty())
continue;
if ((tmp[0] != '#') && (tmp[0] != ' ') && (tmp[0] != '\n') && (tmp[0] != '\t'))
{
tmp = tmp.stripWhiteSpace();
tmp = tmp.left(tmp.length() - (tmp.right(2) == ":\\" ? 2 : 1));
if (loadText("/etc/printcap", &Pcap))
{
QTextStream ts(&Pcap, IO_ReadOnly);
while(!ts.atEnd())
{
tmp = ts.readLine();
if (tmp.isEmpty())
continue;
if ((tmp[0] != '#') && (tmp[0] != ' ') && (tmp[0] != '\n') && (tmp[0] != '\t'))
{
tmp = tmp.stripWhiteSpace();
tmp = tmp.left(tmp.length() - (tmp.right(2) == ":\\" ? 2 : 1));
wt = QStringList::split("|", tmp);
PrintDest->insertItem(wt[0]);
if (wt[0] == PDev)
{
PrintDest->setCurrentItem(PrintDest->count()-1);
ToFile = false;
}
}
}
}
PrintDest->insertItem(wt[0]);
if (wt[0] == PDev)
{
PrintDest->setCurrentItem(PrintDest->count()-1);
ToFile = false;
}
}
}
}
#endif
PrintDest->insertItem( tr("File"));
if (PDev == "")
{
Geraet = PrintDest->text(0);
ToFile = false;
}
else
Geraet = PDev;
Layout1x->addWidget( PrintDest );
PrintDest->insertItem( tr("File"));
if (PDev == "")
{
Geraet = PrintDest->text(0);
ToFile = false;
}
else
Geraet = PDev;
Layout1x->addWidget( PrintDest );
 
#ifdef HAVE_CUPS
OptButton = new QPushButton(Drucker, "Optionen" );
OptButton->setText( tr( "Options..." ) );
Layout1x->addWidget( OptButton );
OptButton = new QPushButton(Drucker, "Optionen" );
OptButton->setText( tr( "Options..." ) );
Layout1x->addWidget( OptButton );
#endif
QSpacerItem* spacerDR = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout1x->addItem( spacerDR );
DruckerLayout->addLayout( Layout1x, 0, 0);
Layout1 = new QHBoxLayout;
Layout1->setSpacing( 6 );
Layout1->setMargin( 0 );
DateiT = new QLabel( Drucker, "DateiT" );
DateiT->setEnabled( false );
DateiT->setText( tr( "File:" ) );
Layout1->addWidget( DateiT );
LineEdit1 = new QLineEdit( Drucker, "LineEdit1" );
LineEdit1->setMinimumSize( QSize( 240, 22 ) );
LineEdit1->setEnabled(false);
LineEdit1->setText(PDatei);
Layout1->addWidget( LineEdit1 );
ToolButton1 = new QToolButton( Drucker, "ToolButton1" );
ToolButton1->setMinimumSize( QSize( 80, 22 ) );
ToolButton1->setText( tr( "Change..." ) );
ToolButton1->setEnabled(false);
Layout1->addWidget( ToolButton1 );
DruckerLayout->addLayout( Layout1, 1, 0 );
QSpacerItem* spacerDR = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout1x->addItem( spacerDR );
DruckerLayout->addLayout( Layout1x, 0, 0);
Layout1 = new QHBoxLayout;
Layout1->setSpacing( 6 );
Layout1->setMargin( 0 );
DateiT = new QLabel( Drucker, "DateiT" );
DateiT->setEnabled( false );
DateiT->setText( tr( "File:" ) );
Layout1->addWidget( DateiT );
LineEdit1 = new QLineEdit( Drucker, "LineEdit1" );
LineEdit1->setMinimumSize( QSize( 240, 22 ) );
LineEdit1->setEnabled(false);
LineEdit1->setText(PDatei);
Layout1->addWidget( LineEdit1 );
ToolButton1 = new QToolButton( Drucker, "ToolButton1" );
ToolButton1->setMinimumSize( QSize( 80, 22 ) );
ToolButton1->setText( tr( "Change..." ) );
ToolButton1->setEnabled(false);
Layout1->addWidget( ToolButton1 );
DruckerLayout->addLayout( Layout1, 1, 0 );
 
OtherCom = new QCheckBox(Drucker, "Dc");
OtherCom->setChecked(false);
OtherCom->setText( tr("Alternative Printer Command"));
DruckerLayout->addWidget( OtherCom, 2, 0, Qt::AlignLeft);
LayoutCC = new QHBoxLayout;
LayoutCC->setSpacing( 6 );
LayoutCC->setMargin( 0 );
OthText = new QLabel( Drucker, "DateiTc" );
OthText->setEnabled( false );
OthText->setText( tr( "Command:" ) );
LayoutCC->addWidget( OthText );
Command = new QLineEdit( Drucker, "LineEdit12" );
Command->setMinimumSize( QSize( 240, 22 ) );
Command->setEnabled(false);
Command->setText(PCom);
LayoutCC->addWidget( Command );
DruckerLayout->addLayout( LayoutCC, 3, 0 );
DruckLayout->addWidget( Drucker );
OtherCom = new QCheckBox(Drucker, "Dc");
OtherCom->setChecked(false);
OtherCom->setText( tr("Alternative Printer Command"));
DruckerLayout->addWidget( OtherCom, 2, 0, Qt::AlignLeft);
LayoutCC = new QHBoxLayout;
LayoutCC->setSpacing( 6 );
LayoutCC->setMargin( 0 );
OthText = new QLabel( Drucker, "DateiTc" );
OthText->setEnabled( false );
OthText->setText( tr( "Command:" ) );
LayoutCC->addWidget( OthText );
Command = new QLineEdit( Drucker, "LineEdit12" );
Command->setMinimumSize( QSize( 240, 22 ) );
Command->setEnabled(false);
Command->setText(PCom);
LayoutCC->addWidget( Command );
DruckerLayout->addLayout( LayoutCC, 3, 0 );
DruckLayout->addWidget( Drucker );
 
 
Umfang = new QButtonGroup( this, "Umfang" );
Umfang->setTitle( tr( "Range:" ) );
Umfang->setColumnLayout(0, Qt::Vertical );
Umfang->layout()->setSpacing( 0 );
Umfang->layout()->setMargin( 0 );
UmfangLayout = new QHBoxLayout( Umfang->layout() );
UmfangLayout->setAlignment( Qt::AlignTop );
UmfangLayout->setSpacing( 6 );
UmfangLayout->setMargin( 5 );
Umfang = new QButtonGroup( this, "Umfang" );
Umfang->setTitle( tr( "Range:" ) );
Umfang->setColumnLayout(0, Qt::Vertical );
Umfang->layout()->setSpacing( 0 );
Umfang->layout()->setMargin( 0 );
UmfangLayout = new QHBoxLayout( Umfang->layout() );
UmfangLayout->setAlignment( Qt::AlignTop );
UmfangLayout->setSpacing( 6 );
UmfangLayout->setMargin( 5 );
 
ButtonGroup5 = new QButtonGroup( Umfang, "ButtonGroup5" );
ButtonGroup5->setFrameShape( QButtonGroup::NoFrame );
ButtonGroup5->setTitle( tr( "" ) );
ButtonGroup5->setColumnLayout(0, Qt::Vertical );
ButtonGroup5->layout()->setSpacing( 0 );
ButtonGroup5->layout()->setMargin( 0 );
ButtonGroup5Layout = new QGridLayout( ButtonGroup5->layout() );
ButtonGroup5Layout->setAlignment( Qt::AlignTop );
ButtonGroup5Layout->setSpacing( 6 );
ButtonGroup5Layout->setMargin( 5 );
ButtonGroup5 = new QButtonGroup( Umfang, "ButtonGroup5" );
ButtonGroup5->setFrameShape( QButtonGroup::NoFrame );
ButtonGroup5->setTitle( tr( "" ) );
ButtonGroup5->setColumnLayout(0, Qt::Vertical );
ButtonGroup5->layout()->setSpacing( 0 );
ButtonGroup5->layout()->setMargin( 0 );
ButtonGroup5Layout = new QGridLayout( ButtonGroup5->layout() );
ButtonGroup5Layout->setAlignment( Qt::AlignTop );
ButtonGroup5Layout->setSpacing( 6 );
ButtonGroup5Layout->setMargin( 5 );
 
TextLabel2_2 = new QLabel( ButtonGroup5, "TextLabel2_2" );
TextLabel2_2->setEnabled( false );
TextLabel2_2->setText( tr( "To page:" ) );
TextLabel2_2 = new QLabel( ButtonGroup5, "TextLabel2_2" );
TextLabel2_2->setEnabled( false );
TextLabel2_2->setText( tr( "To page:" ) );
 
ButtonGroup5Layout->addWidget( TextLabel2_2, 3, 0 );
ButtonGroup5Layout->addWidget( TextLabel2_2, 3, 0 );
 
To = new QSpinBox( ButtonGroup5, "To" );
To->setEnabled( false );
To->setMinimumSize( QSize( 70, 22 ) );
To->setMinValue(1);
To->setMaxValue(1000);
To->setValue(1);
ButtonGroup5Layout->addWidget( To, 3, 1 );
To = new QSpinBox( ButtonGroup5, "To" );
To->setEnabled( false );
To->setMinimumSize( QSize( 70, 22 ) );
To->setMinValue(1);
To->setMaxValue(1000);
To->setValue(1);
ButtonGroup5Layout->addWidget( To, 3, 1 );
 
From = new QSpinBox( ButtonGroup5, "From" );
From->setEnabled( false );
From->setMinimumSize( QSize( 70, 22 ) );
From->setMinValue(1);
From->setMaxValue(1000);
From->setValue(1);
From = new QSpinBox( ButtonGroup5, "From" );
From->setEnabled( false );
From->setMinimumSize( QSize( 70, 22 ) );
From->setMinValue(1);
From->setMaxValue(1000);
From->setValue(1);
 
ButtonGroup5Layout->addWidget( From, 2, 1 );
ButtonGroup5Layout->addWidget( From, 2, 1 );
 
TextLabel2 = new QLabel( ButtonGroup5, "TextLabel2" );
TextLabel2->setEnabled( false );
TextLabel2->setText( tr( "From page:" ) );
TextLabel2 = new QLabel( ButtonGroup5, "TextLabel2" );
TextLabel2->setEnabled( false );
TextLabel2->setText( tr( "From page:" ) );
 
ButtonGroup5Layout->addWidget( TextLabel2, 2, 0 );
ButtonGroup5Layout->addWidget( TextLabel2, 2, 0 );
 
RadioButton2 = new QRadioButton( ButtonGroup5, "RadioButton2" );
RadioButton2->setText( tr( "Print range" ) );
RadioButton2 = new QRadioButton( ButtonGroup5, "RadioButton2" );
RadioButton2->setText( tr( "Print range" ) );
 
ButtonGroup5Layout->addMultiCellWidget( RadioButton2, 1, 1, 0, 1 );
ButtonGroup5Layout->addMultiCellWidget( RadioButton2, 1, 1, 0, 1 );
 
RadioButton1 = new QRadioButton( ButtonGroup5, "RadioButton1" );
RadioButton1->setText( tr( "Print all" ) );
RadioButton1->setChecked( true );
RadioButton1 = new QRadioButton( ButtonGroup5, "RadioButton1" );
RadioButton1->setText( tr( "Print all" ) );
RadioButton1->setChecked( true );
 
ButtonGroup5Layout->addWidget( RadioButton1, 0, 0 );
UmfangLayout->addWidget( ButtonGroup5 );
ButtonGroup5Layout->addWidget( RadioButton1, 0, 0 );
UmfangLayout->addWidget( ButtonGroup5 );
 
ButtonGroup4 = new QButtonGroup( Umfang, "ButtonGroup4" );
ButtonGroup4->setFrameShape( QButtonGroup::NoFrame );
ButtonGroup4->setTitle( tr( "" ) );
ButtonGroup4->setColumnLayout(0, Qt::Vertical );
ButtonGroup4->layout()->setSpacing( 0 );
ButtonGroup4->layout()->setMargin( 0 );
ButtonGroup4Layout = new QGridLayout( ButtonGroup4->layout() );
ButtonGroup4Layout->setAlignment( Qt::AlignTop );
ButtonGroup4Layout->setSpacing( 6 );
ButtonGroup4Layout->setMargin( 5 );
ButtonGroup4 = new QButtonGroup( Umfang, "ButtonGroup4" );
ButtonGroup4->setFrameShape( QButtonGroup::NoFrame );
ButtonGroup4->setTitle( tr( "" ) );
ButtonGroup4->setColumnLayout(0, Qt::Vertical );
ButtonGroup4->layout()->setSpacing( 0 );
ButtonGroup4->layout()->setMargin( 0 );
ButtonGroup4Layout = new QGridLayout( ButtonGroup4->layout() );
ButtonGroup4Layout->setAlignment( Qt::AlignTop );
ButtonGroup4Layout->setSpacing( 6 );
ButtonGroup4Layout->setMargin( 5 );
 
FirstPlast = new QRadioButton( ButtonGroup4, "FirstPlast" );
FirstPlast->setText( tr( "Print last page first" ) );
FirstPlast = new QRadioButton( ButtonGroup4, "FirstPlast" );
FirstPlast->setText( tr( "Print last page first" ) );
 
ButtonGroup4Layout->addMultiCellWidget( FirstPlast, 1, 1, 0, 1 );
ButtonGroup4Layout->addMultiCellWidget( FirstPlast, 1, 1, 0, 1 );
 
FirstPfirst = new QRadioButton( ButtonGroup4, "FirstPfirst" );
FirstPfirst->setText( tr( "Print first page first" ) );
FirstPfirst->setChecked( true );
FirstPfirst = new QRadioButton( ButtonGroup4, "FirstPfirst" );
FirstPfirst->setText( tr( "Print first page first" ) );
FirstPfirst->setChecked( true );
 
ButtonGroup4Layout->addMultiCellWidget( FirstPfirst, 0, 0, 0, 1 );
ButtonGroup4Layout->addMultiCellWidget( FirstPfirst, 0, 0, 0, 1 );
 
TextLabel3 = new QLabel( ButtonGroup4, "TextLabel3" );
TextLabel3->setText( tr( "Number of copies:" ) );
TextLabel3 = new QLabel( ButtonGroup4, "TextLabel3" );
TextLabel3->setText( tr( "Number of copies:" ) );
 
ButtonGroup4Layout->addWidget( TextLabel3, 2, 0 );
ButtonGroup4Layout->addWidget( TextLabel3, 2, 0 );
 
Copies = new QSpinBox( ButtonGroup4, "Copies" );
Copies->setEnabled( true );
Copies->setMinimumSize( QSize( 70, 22 ) );
Copies->setMinValue( 1 );
Copies->setMaxValue(1000);
Copies->setValue(1);
Copies = new QSpinBox( ButtonGroup4, "Copies" );
Copies->setEnabled( true );
Copies->setMinimumSize( QSize( 70, 22 ) );
Copies->setMinValue( 1 );
Copies->setMaxValue(1000);
Copies->setValue(1);
 
ButtonGroup4Layout->addWidget( Copies, 2, 1 );
UmfangLayout->addWidget( ButtonGroup4 );
DruckLayout->addWidget( Umfang );
ButtonGroup4Layout->addWidget( Copies, 2, 1 );
UmfangLayout->addWidget( ButtonGroup4 );
DruckLayout->addWidget( Umfang );
 
Optionen = new QButtonGroup( this, "Optionen" );
Optionen->setTitle( tr( "Options" ) );
Optionen->setColumnLayout(0, Qt::Vertical );
Optionen->layout()->setSpacing( 0 );
Optionen->layout()->setMargin( 0 );
OptionenLayout = new QGridLayout( Optionen->layout() );
OptionenLayout->setAlignment( Qt::AlignTop );
OptionenLayout->setSpacing( 5 );
OptionenLayout->setMargin( 5 );
Optionen = new QButtonGroup( this, "Optionen" );
Optionen->setTitle( tr( "Options" ) );
Optionen->setColumnLayout(0, Qt::Vertical );
Optionen->layout()->setSpacing( 0 );
Optionen->layout()->setMargin( 0 );
OptionenLayout = new QGridLayout( Optionen->layout() );
OptionenLayout->setAlignment( Qt::AlignTop );
OptionenLayout->setSpacing( 5 );
OptionenLayout->setMargin( 5 );
 
ButtonGroup3 = new QButtonGroup( Optionen, "ButtonGroup3" );
ButtonGroup3->setGeometry( QRect( 11, 19, 138, 95 ) );
ButtonGroup3->setFrameShape( QButtonGroup::NoFrame );
ButtonGroup3->setTitle( tr( "" ) );
ButtonGroup3->setColumnLayout(0, Qt::Vertical );
ButtonGroup3->layout()->setSpacing( 0 );
ButtonGroup3->layout()->setMargin( 0 );
ButtonGroup3Layout = new QVBoxLayout( ButtonGroup3->layout() );
ButtonGroup3Layout->setAlignment( Qt::AlignTop );
ButtonGroup3Layout->setSpacing( 5 );
ButtonGroup3Layout->setMargin( 5 );
ButtonGroup3 = new QButtonGroup( Optionen, "ButtonGroup3" );
ButtonGroup3->setGeometry( QRect( 11, 19, 138, 95 ) );
ButtonGroup3->setFrameShape( QButtonGroup::NoFrame );
ButtonGroup3->setTitle( tr( "" ) );
ButtonGroup3->setColumnLayout(0, Qt::Vertical );
ButtonGroup3->layout()->setSpacing( 0 );
ButtonGroup3->layout()->setMargin( 0 );
ButtonGroup3Layout = new QVBoxLayout( ButtonGroup3->layout() );
ButtonGroup3Layout->setAlignment( Qt::AlignTop );
ButtonGroup3Layout->setSpacing( 5 );
ButtonGroup3Layout->setMargin( 5 );
 
NormalP = new QRadioButton( ButtonGroup3, "NormalP" );
NormalP->setText( tr( "Print Normal" ) );
NormalP->setChecked( true );
ButtonGroup3Layout->addWidget( NormalP );
NormalP = new QRadioButton( ButtonGroup3, "NormalP" );
NormalP->setText( tr( "Print Normal" ) );
NormalP->setChecked( true );
ButtonGroup3Layout->addWidget( NormalP );
 
PrintSep = new QRadioButton( ButtonGroup3, "PrintSep" );
PrintSep->setText( tr( "Print Separations" ) );
ButtonGroup3Layout->addWidget( PrintSep );
ToSeparation = false;
PrintSep = new QRadioButton( ButtonGroup3, "PrintSep" );
PrintSep->setText( tr( "Print Separations" ) );
ButtonGroup3Layout->addWidget( PrintSep );
ToSeparation = false;
 
SepArt = new QComboBox( true, ButtonGroup3, "SepArt" );
SepArt = new QComboBox( true, ButtonGroup3, "SepArt" );
/* PFJ - 29.02.04 - Altered to QString, size_t, for */
QString sep[] = {tr("All"), tr("Cyan"), tr("Magenta"), tr("Yellow"),
tr("Black")};
QString sep[] =
{
tr("All"), tr("Cyan"), tr("Magenta"), tr("Yellow"),
tr("Black")
};
size_t sepArray = sizeof(sep) / sizeof(*sep);
for (uint prop = 0; prop < sepArray; ++prop)
SepArt->insertItem(sep[prop]);
SepArt->setEnabled( false );
SepArt->setEditable( false );
ButtonGroup3Layout->addWidget( SepArt );
OptionenLayout->addWidget( ButtonGroup3, 0, 0, Qt::AlignLeft );
SepArt->setEnabled( false );
SepArt->setEditable( false );
ButtonGroup3Layout->addWidget( SepArt );
OptionenLayout->addWidget( ButtonGroup3, 0, 0, Qt::AlignLeft );
 
ButtonGroup3_2 = new QButtonGroup( Optionen, "ButtonGroup3_2" );
ButtonGroup3_2->setFrameShape( QButtonGroup::NoFrame );
ButtonGroup3_2->setTitle( "" );
ButtonGroup3_2->setColumnLayout(0, Qt::Vertical );
ButtonGroup3_2->layout()->setSpacing( 0 );
ButtonGroup3_2->layout()->setMargin( 0 );
ButtonGroup3_2Layout = new QVBoxLayout( ButtonGroup3_2->layout() );
ButtonGroup3_2Layout->setAlignment( Qt::AlignTop );
ButtonGroup3_2Layout->setSpacing( 5 );
ButtonGroup3_2Layout->setMargin( 5 );
ButtonGroup3_2 = new QButtonGroup( Optionen, "ButtonGroup3_2" );
ButtonGroup3_2->setFrameShape( QButtonGroup::NoFrame );
ButtonGroup3_2->setTitle( "" );
ButtonGroup3_2->setColumnLayout(0, Qt::Vertical );
ButtonGroup3_2->layout()->setSpacing( 0 );
ButtonGroup3_2->layout()->setMargin( 0 );
ButtonGroup3_2Layout = new QVBoxLayout( ButtonGroup3_2->layout() );
ButtonGroup3_2Layout->setAlignment( Qt::AlignTop );
ButtonGroup3_2Layout->setSpacing( 5 );
ButtonGroup3_2Layout->setMargin( 5 );
 
PrintGray = new QRadioButton( ButtonGroup3_2, "PrintGray" );
PrintGray->setText( tr( "Print in color if available" ) );
PrintGray->setChecked( true );
ButtonGroup3_2Layout->addWidget( PrintGray );
PrintGray = new QRadioButton( ButtonGroup3_2, "PrintGray" );
PrintGray->setText( tr( "Print in color if available" ) );
PrintGray->setChecked( true );
ButtonGroup3_2Layout->addWidget( PrintGray );
 
PrintGray2 = new QRadioButton( ButtonGroup3_2, "PrintGray2" );
PrintGray2->setText( tr( "Print in grayscale" ) );
ButtonGroup3_2Layout->addWidget( PrintGray2 );
MirrorH = false;
MirrorV = false,
ICCinUse = false;
AdvOptButton = new QPushButton(ButtonGroup3_2, "Adv");
AdvOptButton->setText( tr("Advanced Options..."));
ButtonGroup3_2Layout->addWidget( AdvOptButton );
OptionenLayout->addWidget( ButtonGroup3_2, 0, 1 );
DruckLayout->addWidget( Optionen );
PrintGray2 = new QRadioButton( ButtonGroup3_2, "PrintGray2" );
PrintGray2->setText( tr( "Print in grayscale" ) );
ButtonGroup3_2Layout->addWidget( PrintGray2 );
MirrorH = false;
MirrorV = false,
ICCinUse = false;
AdvOptButton = new QPushButton(ButtonGroup3_2, "Adv");
AdvOptButton->setText( tr("Advanced Options..."));
ButtonGroup3_2Layout->addWidget( AdvOptButton );
 
Layout2 = new QHBoxLayout;
Layout2->setSpacing( 24 );
Layout2->setMargin( 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout2->addItem( spacer );
OptionenLayout->addWidget( ButtonGroup3_2, 0, 1 );
DruckLayout->addWidget( Optionen );
 
OKButton = new QPushButton( this, "OKButton" );
OKButton->setText( tr( "OK" ) );
OKButton->setDefault( true );
Layout2->addWidget( OKButton );
OKButton_2 = new QPushButton( this, "OKButton_2" );
OKButton_2->setText( tr( "Cancel" ) );
OKButton_2->setDefault( false );
Layout2->addWidget( OKButton_2 );
Layout2 = new QHBoxLayout;
Layout2->setSpacing( 24 );
Layout2->setMargin( 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout2->addItem( spacer );
 
DruckLayout->addLayout( Layout2 );
if ((PDev== tr("File")) || (PrintDest->count() == 1))
{
PrintDest->setCurrentItem(PrintDest->count()-1);
DateiT->setEnabled(true);
LineEdit1->setEnabled(true);
ToolButton1->setEnabled(true);
ToFile = true;
}
setMaximumSize(sizeHint());
OKButton = new QPushButton( this, "OKButton" );
OKButton->setText( tr( "Print" ) );
OKButton->setDefault( true );
Layout2->addWidget( OKButton );
OKButton_2 = new QPushButton( this, "OKButton_2" );
OKButton_2->setText( tr( "Cancel" ) );
OKButton_2->setDefault( false );
Layout2->addWidget( OKButton_2 );
 
// signals and slots connections
connect( OKButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( OKButton_2, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( PrintDest, SIGNAL(activated(const QString&)), this, SLOT(SelPrinter(const QString&)));
connect( RadioButton1, SIGNAL(toggled(bool)), this, SLOT(SelRange(bool)));
connect( NormalP, SIGNAL(toggled(bool)), this, SLOT(SelMode(bool)));
connect( ToolButton1, SIGNAL(clicked()), this, SLOT(SelFile()));
connect( OtherCom, SIGNAL(clicked()), this, SLOT(SelComm()));
connect( AdvOptButton, SIGNAL( clicked() ), this, SLOT( SetAdvOptions() ) );
DruckLayout->addLayout( Layout2 );
if ((PDev== tr("File")) || (PrintDest->count() == 1))
{
PrintDest->setCurrentItem(PrintDest->count()-1);
DateiT->setEnabled(true);
LineEdit1->setEnabled(true);
ToolButton1->setEnabled(true);
ToFile = true;
}
setMaximumSize(sizeHint());
 
// signals and slots connections
connect( OKButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( OKButton_2, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( PrintDest, SIGNAL(activated(const QString&)), this, SLOT(SelPrinter(const QString&)));
connect( RadioButton1, SIGNAL(toggled(bool)), this, SLOT(SelRange(bool)));
connect( NormalP, SIGNAL(toggled(bool)), this, SLOT(SelMode(bool)));
connect( ToolButton1, SIGNAL(clicked()), this, SLOT(SelFile()));
connect( OtherCom, SIGNAL(clicked()), this, SLOT(SelComm()));
connect( AdvOptButton, SIGNAL( clicked() ), this, SLOT( SetAdvOptions() ) );
#ifdef HAVE_CUPS
connect( OptButton, SIGNAL( clicked() ), this, SLOT( SetOptions() ) );
connect( OptButton, SIGNAL( clicked() ), this, SLOT( SetOptions() ) );
#endif
}
 
423,12 → 426,13
AdvOptions* dia = new AdvOptions(this, MirrorH, MirrorV, ICCinUse);
if (dia->exec())
{
MirrorH = dia->MirrorH->isChecked();
MirrorV = dia->MirrorV->isChecked();
MirrorH = dia->MirrorH->isChecked();
MirrorV = dia->MirrorV->isChecked();
#ifdef HAVE_CMS
if (CMSuse)
ICCinUse = dia->UseICC->isChecked();
#endif
 
}
delete dia;
}
464,21 → 468,21
PrinterOpts += " -o "+it.data().KeyW+"=";
switch (dia->FlagsOpt.at(it.data().Cnum)->currentItem())
{
case 1:
PrinterOpts += "2";
break;
case 2:
PrinterOpts += "4";
break;
case 3:
PrinterOpts += "6";
break;
case 4:
PrinterOpts += "9";
break;
case 5:
PrinterOpts += "16";
break;
case 1:
PrinterOpts += "2";
break;
case 2:
PrinterOpts += "4";
break;
case 3:
PrinterOpts += "6";
break;
case 4:
PrinterOpts += "9";
break;
case 5:
PrinterOpts += "16";
break;
}
}
else
486,13 → 490,13
if (it.data().KeyW == "orientation")
PrinterOpts += " -o landscape";
else
PrinterOpts += " -o " +
it.data().KeyW+"="+dia->FlagsOpt.at(it.data().Cnum)->currentText();
PrinterOpts += " -o " +
it.data().KeyW+"="+dia->FlagsOpt.at(it.data().Cnum)->currentText();
}
}
}
}
}
}
}
delete dia;
}
506,14 → 510,15
PrintDest->setEnabled(!test);
if (OtherCom->isChecked())
{
DateiT->setEnabled(false);
LineEdit1->setEnabled(false);
ToolButton1->setEnabled(false);
ToFile = false;
DateiT->setEnabled(false);
LineEdit1->setEnabled(false);
ToolButton1->setEnabled(false);
ToFile = false;
#ifdef HAVE_CUPS
OptButton->setEnabled(false);
#endif
}
 
}
else
{
SelPrinter(PrintDest->currentText());
521,6 → 526,7
if (Geraet != tr("File"))
OptButton->setEnabled(true);
#endif
 
}
}
 
557,7 → 563,7
if (LineEdit1->text() != "")
dia.setSelection(LineEdit1->text());
if (dia.exec() == QDialog::Accepted)
LineEdit1->setText(dia.selectedFile());
LineEdit1->setText(dia.selectedFile());
}
 
void Druck::setMinMax(int min, int max)
/trunk/Scribus/scribus/bookpalette.h
27,9 → 27,9
 
class BookPalette : public QDialog
{
Q_OBJECT
Q_OBJECT
 
public:
public:
BookPalette(QWidget* parent);
~BookPalette() {};
void closeEvent(QCloseEvent *ce);
39,7 → 39,10
void Schliessen();
 
protected:
QVBoxLayout* PaletteLayout;
QVBoxLayout* PaletteLayout;
 
protected slots:
virtual void reject();
};
 
#endif
/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("April").arg("2004");
QString bu = tr("%1. %2 %3 ").arg("09").arg("April").arg("2004");
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/scribus.cpp
2303,7 → 2303,8
}
Mpal->Cpal->SetColors(doc->PageColors);
Mpal->Cpal->ChooseGrad(0);
ActWin->setCaption( QString::fromLocal8Bit(doc->DocName) );
// ActWin->setCaption( QString::fromLocal8Bit(doc->DocName) );
ActWin->setCaption(doc->DocName);
ShadeMenu->setItemChecked(ShadeMenu->idAt(11), true);
Mpal->SetDoc(doc);
Mpal->updateCList();
2631,7 → 2632,7
Tpal->slotUpdateElement(doc->ActPage->PageNr, doc->ActPage->SelItem.at(0)->ItemNr);
if (!doc->isModified())
doc->setModified();
ActWin->setCaption( tr(doc->DocName) + "*");
ActWin->setCaption( doc->DocName + "*");
if (!doc->TemplateMode)
{
fileMenu->setItemEnabled(fid4, 1);
/trunk/Scribus/scribus/libprefs/prefs.cpp
71,6 → 71,7
size_t a_tab = sizeof(ar_tab) / sizeof(*ar_tab);
for (uint s = 0; s < a_tab; ++s)
TabListe->insertItem(ar_tab[s]);
TabListe->setFocusPolicy(QWidget::NoFocus);
PrefsLayout2->addWidget(TabListe);
 
TabWidget3 = new QWidgetStack( this, "TabWidget3" );
1526,6 → 1527,7
buttonOK = new QPushButton( this, "buttonOK" );
buttonOK->setText( tr( "OK" ) );
buttonOK->setDefault( true );
buttonOK->setFocus();
Layout3->addWidget( buttonOK );
QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout3->addItem( spacer_2 );
/trunk/Scribus/scribus/javadocs.cpp
2,6 → 2,7
#include "javadocs.moc"
#include "query.h"
#include "editor.h"
#include <qmessagebox.h>
 
extern QPixmap loadIcon(QString nam);
 
96,17 → 97,26
 
void JavaDocs::slotDelete()
{
QString nam = Scripts->currentText();
Doc->JavaScripts.remove(nam);
Scripts->clear();
QMap<QString,QString>::Iterator it;
for (it = Doc->JavaScripts.begin(); it != Doc->JavaScripts.end(); ++it)
Scripts->insertItem(it.key());
if (Doc->JavaScripts.count() == 0)
int exit=QMessageBox::warning(this,
tr("Warning"),
tr("Do you really want do delete this Script?"),
tr("No"),
tr("Yes"),
0, 0, 0);
if (exit == 1)
{
EditScript->setEnabled(false);
DeleteScript->setEnabled(false);
QString nam = Scripts->currentText();
Doc->JavaScripts.remove(nam);
Scripts->clear();
QMap<QString,QString>::Iterator it;
for (it = Doc->JavaScripts.begin(); it != Doc->JavaScripts.end(); ++it)
Scripts->insertItem(it.key());
if (Doc->JavaScripts.count() == 0)
{
EditScript->setEnabled(false);
DeleteScript->setEnabled(false);
}
else
Scripts->setCurrentItem(0);
}
else
Scripts->setCurrentItem(0);
}
/trunk/Scribus/scribus/tree.h
13,27 → 13,27
#include <qptrlist.h>
#include <qvaluelist.h>
#include "scribusview.h"
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QListView;
class QListViewItem;
 
class Tree : public QDialog
{
Q_OBJECT
{
Q_OBJECT
 
public:
Tree( QWidget* parent, WFlags fl );
~Tree() {};
Tree( QWidget* parent, WFlags fl );
~Tree() {};
 
QListView* ListView1;
QPtrList<QListViewItem> Seiten;
struct Elem { QPtrList<QListViewItem> Elemente; };
QListView* ListView1;
QPtrList<QListViewItem> Seiten;
struct Elem { QPtrList<QListViewItem> Elemente; };
QPtrList<Elem> PageObj;
ScribusView *vie;
void closeEvent(QCloseEvent *ce);
void resizeEvent(QResizeEvent *r);
void closeEvent(QCloseEvent *ce);
void resizeEvent(QResizeEvent *r);
void rebuildPageD();
void reopenTree(QValueList<int> op);
QValueList<int> buildReopenVals();
46,13 → 46,16
void slotMoveElement(uint SNr, uint NrOld, uint NrNew);
void slotDelPage(uint Nr);
void slotAddPage(uint Nr);
void slotSelect(QListViewItem* ite);
void BuildTree(ScribusView *view);
void slotSelect(QListViewItem* ite);
void BuildTree(ScribusView *view);
 
signals:
void Schliessen();
void SelectElement(int, int);
void SelectSeite(int);
 
protected slots:
virtual void reject();
};
 
#endif // TREE_H
/trunk/Scribus/scribus/fontprefs.cpp
30,12 → 30,10
TabWidget = new QTabWidget( this, "TabWidget" );
TabWidget->setMinimumSize(fontMetrics().width( tr( "Available Fonts" )+ tr( "Font Substitutions" )+
tr( "Additional Paths" ))+80, 200);
 
tab1 = new QWidget( TabWidget, "tab1" );
tab1Layout = new QVBoxLayout( tab1, 11, 6, "tab1Layout");
Table1 = new QTable( tab1, "Table1" );
Table1->setNumRows( flist.count() );
Table1->setMaximumSize(32000, 300);
Table1->setNumCols( 6 );
Table1->setSorting(true);
SCFontsIterator it(flist);
120,7 → 118,6
Table3->setSelectionMode(QTable::SingleRow);
Table3->setLeftMargin(0);
Table3->verticalHeader()->hide();
Table3->setMaximumSize(32000, 300);
Table3->setNumCols( 2 );
Table3->setNumRows(Prefs->GFontSub.count());
Header2 = Table3->horizontalHeader();
141,6 → 138,7
}
Table3->setColumnStretchable(0, true);
Table3->setColumnStretchable(1, true);
Table3->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
tabLayout->addWidget( Table3 );
Layout2a = new QHBoxLayout( 0, 0, 6, "Layout2");
QSpacerItem* spacer1 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
158,6 → 156,7
tab3Layout = new QHBoxLayout( tab3, 11, 6, "tab3Layout");
PathList = new QListBox( tab3, "PathList" );
ReadPath();
PathList->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
tab3Layout->addWidget( PathList );
LayoutR = new QVBoxLayout( 0, 0, 6, "LayoutR");
ChangeB = new QPushButton( tab3, "ChangeB" );
/trunk/Scribus/scribus/page.cpp
3645,9 → 3645,9
qApp->setOverrideCursor(QCursor(loadIcon("HandC.xpm")), true);
int scroX = m->x() - qRound((Mxp * sc));
int scroY = m->y() - qRound((Myp * sc));
Anz->scrollBy(scroX, scroY);
Mxp = static_cast<int>(m->x()/sc);
Myp = static_cast<int>(m->y()/sc);
Anz->scrollBy(-scroX, -scroY);
Mxp = static_cast<int>((m->x()-scroX)/sc);
Myp = static_cast<int>((m->y()-scroY)/sc);
return;
}
if (Mpressed && (doku->AppMode == 21))
/trunk/Scribus/scribus/tree.cpp
250,6 → 250,12
ce->accept();
}
 
void Tree::reject()
{
emit Schliessen();
QDialog::reject();
}
 
void Tree::resizeEvent(QResizeEvent *r)
{
ListView1->resize(r->size());
266,7 → 272,7
ListView1->clear();
vie = view;
QListViewItem * item = new QListViewItem( ListView1, 0 );
item->setText( 0, tr(view->Doc->DocName));
item->setText( 0, view->Doc->DocName);
tmpstr.setNum (view->Pages.count() );
pagenumwidth = tmpstr.length();
for (a = 0; a < view->Pages.count(); ++a)
/trunk/Scribus/scribus/editformats.cpp
55,7 → 55,7
Layout15->addWidget( SaveB );
 
ExitB = new QPushButton( this, "ExitB" );
ExitB->setText( tr( "Close" ) );
ExitB->setText( tr( "OK" ) );
Layout15->addWidget( ExitB );
 
CancelB = new QPushButton( this, "CancelB" );
/trunk/Scribus/scribus/cupsoptions.cpp
178,13 → 178,14
Layout2->addItem( spacer );
PushButton1 = new QPushButton( this, "PushButton1" );
PushButton1->setText( tr( "OK" ) );
PushButton1->setDefault( true );
Layout2->addWidget( PushButton1 );
QSpacerItem* spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout2->addItem( spacer2 );
PushButton2 = new QPushButton( this, "PushButton1_2" );
PushButton2->setText( tr( "Cancel" ) );
PushButton2->setDefault( true );
PushButton2->setFocus();
PushButton2->setDefault( false );
PushButton1->setFocus();
Layout2->addWidget( PushButton2 );
QSpacerItem* spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout2->addItem( spacer3 );
/trunk/Scribus/scribus/scrap.h
22,70 → 22,74
 
class BibView : public QIconView
{
Q_OBJECT
Q_OBJECT
 
public:
BibView( QWidget* parent, preV *prefs);
~BibView() {};
void AddObj(QString name, QString daten, QPixmap Bild);
void SaveContents(QString name);
void ReadContents(QString name);
void RebuildView();
struct Elem {
QString Data;
QPixmap Preview;
};
QMap<QString,Elem> Objekte;
preV *Prefs;
BibView( QWidget* parent, preV *prefs);
~BibView() {};
void AddObj(QString name, QString daten, QPixmap Bild);
void SaveContents(QString name);
void ReadContents(QString name);
void RebuildView();
struct Elem
{
QString Data;
QPixmap Preview;
};
QMap<QString,Elem> Objekte;
preV *Prefs;
 
protected:
virtual QDragObject *dragObject();
virtual QDragObject *dragObject();
};
 
class Biblio : public QDialog
{
Q_OBJECT
{
Q_OBJECT
 
public:
Biblio( QWidget* parent, preV *prefs);
~Biblio() {};
void closeEvent(QCloseEvent *ce);
void AdjustMenu();
Biblio( QWidget* parent, preV *prefs);
~Biblio() {};
void closeEvent(QCloseEvent *ce);
void AdjustMenu();
void ObjFromMenu(QString text);
 
QPopupMenu* pmenu;
QPopupMenu* fmenu;
QPopupMenu* vmenu;
QMenuBar* menuBar;
QFrame* Frame3;
BibView* BibWin;
preV *Prefs;
QString ScFilename;
int fSave;
int vS;
int vM;
int vB;
QPopupMenu* pmenu;
QPopupMenu* fmenu;
QPopupMenu* vmenu;
QMenuBar* menuBar;
QFrame* Frame3;
BibView* BibWin;
preV *Prefs;
QString ScFilename;
int fSave;
int vS;
int vM;
int vB;
bool Changed;
 
public slots:
void Save();
void Save();
 
private slots:
void HandleMouse(QIconViewItem *ite);
void DeleteObj(QString name, QIconViewItem *ite);
void DropOn(QDropEvent *e);
void SaveAs();
void Load();
void CloseWin();
void NewLib();
void SetPreview(int id);
void DropOn(QDropEvent *e);
void SaveAs();
void Load();
void CloseWin();
void NewLib();
void SetPreview(int id);
 
protected:
QVBoxLayout* BiblioLayout;
QVBoxLayout* Frame3Layout;
QVBoxLayout* BiblioLayout;
QVBoxLayout* Frame3Layout;
 
protected slots:
virtual void reject();
 
signals:
void Schliessen();
void Schliessen();
};
 
#endif // BIBLIO_H
/trunk/Scribus/scribus/pdfopts.h
147,6 → 147,7
int Einheit;
 
public slots:
void DoExport();
void ToggleEncr();
void BleedChanged();
void EnablePDFX(int a);