Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1639 → Rev 1641

/branches/Version13x/Scribus/scribus/prefs.cpp
0,0 → 1,1278
#include "prefs.h"
#include "prefs.moc"
#include "keymanager.h"
#include "scribusdoc.h"
#include "scribusstructs.h"
#include <qfont.h>
#include <qcolordialog.h>
#include <qcombobox.h>
#include <qcolor.h>
#include <qstringlist.h>
#include <qstylefactory.h>
#include <qpointarray.h>
#include <qpainter.h>
#include <qrect.h>
#include <qstring.h>
#include <qwmatrix.h>
#include <cmath>
#include "units.h"
#include "langmgr.h"
#include "tabtypography.h"
#include "tabguides.h"
#include "hysettings.h"
#include "cmsprefs.h"
#include "keymanager.h"
#include "tabtools.h"
#include "undomanager.h"
#include "tabcheckdoc.h"
#include "tabpdfoptions.h"
#include "fontprefs.h"
#include "units.h"
#include "pluginmanager.h"
#include "pagesize.h"
#include "docitemattrprefs.h"
 
 
using namespace std;
 
extern QPixmap loadIcon(QString nam);
extern bool CMSavail;
extern ProfilesL InputProfiles;
extern ScribusApp *ScApp;
 
/*!
\fn Preferences::Preferences( QWidget* parent, ApplicationPrefs *prefsData)
\author Franz Schmid
\date
\brief Constructor for Preferences dialog box
\param parent QWidget pointer to parent window
\param prefsData ApplicationPrefs * struct
\retval Preferences dialog
*/
Preferences::Preferences( QWidget* parent, ApplicationPrefs *prefsData) : PrefsDialogBase( parent )
{
int decimals;
ap = (ScribusApp*)parent;
Umrech = 1.0;
docUnitIndex = prefsData->docUnitIndex;
decimals = unitGetPrecisionFromIndex(docUnitIndex);
 
DisScale = prefsData->DisScale;
setCaption( tr( "Preferences" ) );
 
tab = new QWidget( prefsWidgets, "tab" );
tabLayout = new QGridLayout( tab );
tabLayout->setSpacing( 6 );
tabLayout->setMargin( 10 );
tabLayout->setAlignment( Qt::AlignTop );
 
// GUI Group
ButtonGroup1 = new QButtonGroup( tr( "GUI" ), tab, "ButtonGroup1" );
ButtonGroup1->setColumnLayout(0, Qt::Vertical );
ButtonGroup1->layout()->setSpacing( 0 );
ButtonGroup1->layout()->setMargin( 0 );
ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() );
ButtonGroup1Layout->setAlignment( Qt::AlignTop );
ButtonGroup1Layout->setSpacing( 6 );
ButtonGroup1Layout->setMargin( 10 );
 
langMgr.init();
QStringList languageList;
langMgr.fillInstalledStringList(&languageList, true);
languageList.sort();
guiLangCombo = new QComboBox( false, ButtonGroup1, "guiLangCombo");
guiLangCombo->insertStringList( languageList );
guiLangCombo->setCurrentText(langMgr.getLangFromAbbrev(prefsData->guiLanguage));
selectedGUILang=prefsData->guiLanguage;
guiLangLabel = new QLabel(guiLangCombo, tr("&Language:"), ButtonGroup1, "guiLangLabel");
ButtonGroup1Layout->addWidget( guiLangLabel, 0, 0 );
ButtonGroup1Layout->addWidget( guiLangCombo, 0, 1, Qt::AlignLeft );
 
GUICombo = new QComboBox( true, ButtonGroup1, "GUICombo" );
QStringList STtest;
STtest = QStyleFactory::keys();
for (uint stt = 0; stt < STtest.count(); ++stt)
GUICombo->insertItem(STtest[stt]);
GUICombo->setEditable(false);
GUICombo->setCurrentText(prefsData->GUI);
TextGstil = new QLabel(GUICombo, tr("&Theme:"), ButtonGroup1, "dd");
ButtonGroup1Layout->addWidget( TextGstil, 1, 0 );
ButtonGroup1Layout->addWidget( GUICombo, 1, 1, Qt::AlignLeft );
 
GFsize = new QSpinBox(ButtonGroup1, "gfs" );
GFsize->setSuffix( tr( " pt" ) );
GFsize->setMaxValue( 22 );
GFsize->setMinValue( 8 );
GFsize->setValue( prefsData->AppFontSize );
TextGstil2 = new QLabel(GFsize, tr("&Font Size:"), ButtonGroup1, "dd");
ButtonGroup1Layout->addWidget( TextGstil2, 2, 0 );
ButtonGroup1Layout->addWidget( GFsize, 2, 1, Qt::AlignLeft );
SpinBox3 = new QSpinBox( ButtonGroup1, "SpinBox3" );
SpinBox3->setMaxValue( 1000 );
SpinBox3->setMinValue( 0 );
SpinBox3->setLineStep( 10 );
SpinBox3->setValue( prefsData->Wheelval );
TextLabel1_2 = new QLabel( SpinBox3, tr( "&Wheel Jump:" ), ButtonGroup1, "TextLabel1_2" );
ButtonGroup1Layout->addWidget( TextLabel1_2, 3, 0 );
ButtonGroup1Layout->addWidget( SpinBox3, 3, 1, Qt::AlignLeft );
Recen = new QSpinBox( ButtonGroup1, "Recen" );
Recen->setMaxValue( 30 );
Recen->setMinValue( 1 );
Recen->setValue( prefsData->RecentDCount );
TextLabel4c = new QLabel( Recen, tr( "&Recent Documents:" ), ButtonGroup1, "TextLabel4c" );
ButtonGroup1Layout->addWidget( TextLabel4c, 4, 0);
ButtonGroup1Layout->addWidget( Recen, 4, 1, Qt::AlignLeft );
tabLayout->addWidget( ButtonGroup1, 0, 0 );
 
GroupBox200 = new QGroupBox( tr( "Paths" ), tab, "GroupBox200" );
GroupBox200->setColumnLayout(0, Qt::Horizontal );
GroupBox200->layout()->setSpacing( 0 );
GroupBox200->layout()->setMargin( 0 );
GroupBox200Layout = new QGridLayout( GroupBox200->layout() );
GroupBox200Layout->setAlignment( Qt::AlignTop );
GroupBox200Layout->setSpacing( 0 );
GroupBox200Layout->setMargin( 5 );
 
Docs = new QLineEdit( GroupBox200, "Datei" );
Docs->setMinimumSize( QSize( 268, 22 ) );
Docs->setText(prefsData->DocDir);
PfadText = new QLabel( Docs, tr("&Documents:"), GroupBox200, "Pfadtext" );
FileC = new QToolButton( GroupBox200, "FileC" );
FileC->setMinimumSize( QSize( 88, 24 ) );
FileC->setText( tr( "&Change..." ) );
GroupBox200Layout->addWidget( PfadText, 0, 0 );
GroupBox200Layout->addWidget( Docs, 0, 1 );
GroupBox200Layout->addWidget( FileC, 0, 2 );
 
ProPfad = new QLineEdit( GroupBox200, "Datei1" );
ProPfad->setMinimumSize( QSize( 268, 22 ) );
ProPfad->setText(prefsData->ProfileDir);
PfadText2 = new QLabel( ProPfad, tr("&ICC Profiles:"), GroupBox200, "Pfadtext1" );
FileC2 = new QToolButton( GroupBox200, "FileC1" );
FileC2->setMinimumSize( QSize( 88, 24 ) );
FileC2->setText( tr( "C&hange..." ) );
GroupBox200Layout->addWidget( PfadText2, 1, 0 );
GroupBox200Layout->addWidget( ProPfad, 1, 1 );
GroupBox200Layout->addWidget( FileC2, 1, 2 );
 
ScriptPfad = new QLineEdit( GroupBox200, "Datei1" );
ScriptPfad->setMinimumSize( QSize( 268, 22 ) );
ScriptPfad->setText(prefsData->ScriptDir);
PfadText3 = new QLabel( ScriptPfad, tr("&Scripts:"), GroupBox200, "Pfadtext1" );
FileC3 = new QToolButton( GroupBox200, "FileC3" );
FileC3->setMinimumSize( QSize( 88, 24 ) );
FileC3->setText( tr( "Ch&ange..." ) );
GroupBox200Layout->addWidget( PfadText3, 2, 0 );
GroupBox200Layout->addWidget( ScriptPfad, 2, 1 );
GroupBox200Layout->addWidget( FileC3, 2, 2 );
 
TemplateDir = new QLineEdit( GroupBox200, "Datei1" );
TemplateDir->setMinimumSize( QSize( 268, 22 ) );
TemplateDir->setText(prefsData->TemplateDir);
PfadText4 = new QLabel( TemplateDir, tr("T&emplates:"), GroupBox200, "Pfadtext1" );
FileC4 = new QToolButton( GroupBox200, "FileC4" );
FileC4->setMinimumSize( QSize( 88, 24 ) );
FileC4->setText( tr( "Cha&nge..." ) );
GroupBox200Layout->addWidget( PfadText4, 3, 0 );
GroupBox200Layout->addWidget( TemplateDir, 3, 1 );
GroupBox200Layout->addWidget( FileC4, 3, 2 );
tabLayout->addWidget( GroupBox200, 1, 0 );
addItem( tr("General"), loadIcon("AppIcon.png"), tab);
 
tab_7 = new QWidget( prefsWidgets, "tab_7" );
tabLayout_7 = new QHBoxLayout( tab_7, 11, 6, "tabLayout_7");
Layout21 = new QVBoxLayout( 0, 0, 6, "Layout21");
GroupSize = new QButtonGroup( tr( "Page Size" ), tab_7, "GroupSize" );
GroupSize->setColumnLayout(0, Qt::Vertical );
GroupSize->layout()->setSpacing( 6 );
GroupSize->layout()->setMargin( 10 );
GroupSizeLayout = new QVBoxLayout( GroupSize->layout() );
GroupSizeLayout->setAlignment( Qt::AlignTop );
Layout6 = new QGridLayout( 0, 1, 1, 0, 6, "Layout6");
 
GZComboF = new QComboBox( true, GroupSize, "GZComboF" );
/*
const QString ar_size[] =
{"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "B0", "B1", "B2", "B3",
"B4", "B5", "B6", "B7", "B8", "B9", "B10", "C5E", "Comm10E", "DLE", tr("Executive"),
tr("Folio"), tr("Ledger"), tr("Legal"), tr("Letter"), tr("Tabloid")
};
size_t ar_s = sizeof(ar_size) / sizeof(*ar_size);
for (uint s = 0; s < ar_s; ++s)
GZComboF->insertItem(ar_size[s]);
*/
 
PageSize *ps=new PageSize(prefsData->pageSize);
GZComboF->insertStringList(ps->getTrPageSizeList());
GZComboF->insertItem( tr( "Custom" ) );
GZComboF->setEditable(false);
 
QStringList pageSizes=ps->getPageSizeList();
int sizeIndex=pageSizes.findIndex(ps->getPageText());
if (sizeIndex!=-1)
GZComboF->setCurrentItem(sizeIndex);
else
GZComboF->setCurrentItem(GZComboF->count()-1);
GZText1 = new QLabel( GZComboF, tr( "&Size:" ), GroupSize, "GZText1" );
Layout6->addWidget( GZText1, 0, 0 );
Layout6->addWidget( GZComboF, 0, 1 );
 
GZComboO = new QComboBox( true, GroupSize, "GZComboO" );
GZComboO->insertItem( tr( "Portrait" ) );
GZComboO->insertItem( tr( "Landscape" ) );
GZComboO->setEditable(false);
GZComboO->setCurrentItem(prefsData->pageOrientation);
GZText2 = new QLabel( GZComboO, tr( "Orie&ntation:" ), GroupSize, "GZText2" );
Layout6->addWidget( GZText2, 1, 0 );
Layout6->addWidget( GZComboO, 1, 1 );
UnitCombo = new QComboBox( true, GroupSize, "UnitCombo" );
UnitCombo->insertStringList(unitGetTextUnitList());
UnitCombo->setEditable(false);
UnitCombo->setCurrentItem(prefsData->docUnitIndex);
unitComboText = new QLabel( UnitCombo, tr( "Units:" ), GroupSize, "unitComboText" );
Layout6->addWidget( unitComboText, 2, 0 );
Layout6->addWidget( UnitCombo, 2, 1 );
 
GroupSizeLayout->addLayout( Layout6 );
 
Layout5_2 = new QHBoxLayout( 0, 0, 6, "Layout5_2");
 
pageWidth = new MSpinBox( 1, 10000, GroupSize, decimals );
pageWidth->setEnabled( false );
pageWidth->setMinimumSize( QSize( 70, 20 ) );
pageWidth->setValue(prefsData->PageWidth * Umrech);
GZText3 = new QLabel( pageWidth, tr( "&Width:" ), GroupSize, "GZText3" );
Layout5_2->addWidget( GZText3 );
Layout5_2->addWidget( pageWidth );
 
pageHeight = new MSpinBox( 1, 10000, GroupSize, decimals );
pageHeight->setEnabled( false );
pageHeight->setMinimumSize( QSize( 70, 20 ) );
pageHeight->setValue(prefsData->PageHeight * Umrech);
GZText4 = new QLabel( pageHeight, tr( "&Height:" ), GroupSize, "GZText4" );
Layout5_2->addWidget( GZText4 );
Layout5_2->addWidget( pageHeight );
 
GroupSizeLayout->addLayout( Layout5_2 );
 
Layout8 = new QHBoxLayout( 0, 0, 6, "Layout8");
 
facingPages = new QCheckBox( tr( "&Facing Pages" ), GroupSize, "facingPages" );
facingPages->setChecked(prefsData->FacingPages);
Layout8->addWidget( facingPages );
 
Linkszuerst = new QCheckBox( tr( "Left &Page First" ), GroupSize, "Linkszuerst" );
Linkszuerst->setChecked(prefsData->LeftPageFirst);
if (!facingPages->isChecked())
Linkszuerst->setEnabled(false);
Layout8->addWidget( Linkszuerst );
GroupSizeLayout->addLayout( Layout8 );
Layout21->addWidget( GroupSize );
 
GroupRand = new QGroupBox( tr( "Margin Guides" ), tab_7, "GroupRand" );
GroupRand->setColumnLayout(0, Qt::Vertical );
GroupRand->layout()->setSpacing( 5 );
GroupRand->layout()->setMargin( 10 );
GroupRandLayout = new QGridLayout( GroupRand->layout() );
GroupRandLayout->setAlignment( Qt::AlignTop );
 
TopR = new MSpinBox( 0, 1000, GroupRand, decimals );
TopR->setMinimumSize( QSize( 70, 20 ) );
TopR->setValue(prefsData->RandOben * Umrech);
RandT = prefsData->RandOben;
GroupRandLayout->addWidget( TopR, 0, 1 );
BottomR = new MSpinBox( 0, 1000, GroupRand, decimals );
BottomR->setMinimumSize( QSize( 70, 20 ) );
BottomR->setValue(prefsData->RandUnten * Umrech);
RandB = prefsData->RandUnten;
GroupRandLayout->addWidget( BottomR, 1, 1 );
RightR = new MSpinBox( 0, 1000, GroupRand, decimals );
RightR->setMinimumSize( QSize( 70, 20 ) );
RightR->setValue(prefsData->RandRechts * Umrech);
RandR = prefsData->RandRechts;
GroupRandLayout->addWidget( RightR, 1, 3 );
LeftR = new MSpinBox( 0, 1000, GroupRand, decimals );
LeftR->setMinimumSize( QSize( 70, 20 ) );
LeftR->setValue(prefsData->RandLinks * Umrech);
RandL = prefsData->RandLinks;
GroupRandLayout->addWidget( LeftR, 0, 3 );
 
GRText2 = new QLabel( BottomR, tr( "&Bottom:" ), GroupRand, "GRText2" );
GroupRandLayout->addWidget( GRText2, 1, 0 );
GRText1 = new QLabel( TopR, tr( "&Top:" ), GroupRand, "GRText1" );
GroupRandLayout->addWidget( GRText1, 0, 0 );
GRText4 = new QLabel( RightR, tr( "&Right:" ), GroupRand, "GRText4" );
GroupRandLayout->addWidget( GRText4, 1, 2 );
GRText3 = new QLabel( LeftR, tr( "&Left:" ), GroupRand, "GRText3" );
GroupRandLayout->addWidget( GRText3, 0, 2 );
 
Layout21->addWidget( GroupRand );
QBoxLayout *asurLayout = new QHBoxLayout( 0, 0, 6, "asurLayout");
 
GroupAS = new QGroupBox( tr( "Autosave" ), tab_7, "GroupAS" );
GroupAS->setColumnLayout(0, Qt::Vertical );
GroupAS->layout()->setSpacing( 5 );
GroupAS->layout()->setMargin( 10 );
GroupASLayout = new QGridLayout( GroupAS->layout() );
GroupASLayout->setAlignment( Qt::AlignTop );
ASon = new QCheckBox( tr( "&Enabled" ), GroupAS, "Enable Autosave" );
ASon->setChecked(prefsData->AutoSave);
GroupASLayout->addMultiCellWidget( ASon, 0, 0, 0, 1 );
ASTime = new QSpinBox( GroupAS, "Time" );
ASTime->setMaxValue( 60 );
ASTime->setMinValue( 1 );
ASTime->setSuffix( " " + tr("min") );
ASTime->setValue(prefsData->AutoSaveTime / 1000 / 60);
ASText = new QLabel( ASTime, tr( "&Interval:" ), GroupAS, "ASText" );
GroupASLayout->addWidget( ASText, 1, 0 );
GroupASLayout->addWidget( ASTime, 1, 1 );
asurLayout->addWidget(GroupAS);
 
urGroup = new QGroupBox(tr("Undo/Redo"), tab_7, "urGroup");
urGroup->setColumnLayout(0, Qt::Vertical);
urGroup->layout()->setSpacing(5);
urGroup->layout()->setMargin(10);
QGridLayout *urGroupLayout = new QGridLayout(urGroup->layout());
urGroupLayout->setAlignment(Qt::AlignTop);
urSpinBox = new QSpinBox(urGroup, "urSpinBox");
urSpinBox->setMinValue(0);
urSpinBox->setMaxValue(1000);
int urSBValue = UndoManager::instance()->getHistoryLength();
if (urSBValue == -1)
urSpinBox->setEnabled(false);
else
urSpinBox->setValue(urSBValue);
urLabel = new QLabel(urSpinBox, tr("Action history length"), urGroup, "urLabel");
urGroupLayout->addWidget(urLabel, 0, 0);
urGroupLayout->addWidget(urSpinBox, 0, 1);
asurLayout->addWidget(urGroup);
Layout21->addLayout(asurLayout);
 
tabLayout_7->addLayout( Layout21 );
addItem( tr("Document"), loadIcon("page.png"), tab_7);
 
tabGuides = new TabGuides(prefsWidgets, &prefsData->guidesSettings, &prefsData->typographicSetttings, Umrech, "");
addItem( tr("Guides"), loadIcon("guides.png"), tabGuides);
tabTypo = new TabTypograpy( prefsWidgets, &prefsData->typographicSetttings);
addItem( tr("Typography"), loadIcon("font.png"), tabTypo);
tabTools = new TabTools( prefsWidgets, &prefsData->toolSettings, Umrech, "", 0);
addItem( tr("Tools"), loadIcon("tools.png"), tabTools);
 
tabHyphenator = new HySettings(prefsWidgets, &ap->LangTransl);
tabHyphenator->verbose->setChecked(!prefsData->Automatic);
tabHyphenator->input->setChecked(prefsData->AutoCheck);
tabHyphenator->language->setCurrentText(ap->LangTransl[prefsData->Language]);
tabHyphenator->wordLen->setValue(prefsData->MinWordLen);
tabHyphenator->maxCount->setValue(prefsData->HyCount);
addItem( tr("Hyphenator"), loadIcon("hyphenate.png"), tabHyphenator);
 
tabFonts = new FontPrefs( prefsWidgets, ap->Prefs.AvailFonts, false, prefsData, ap->PrefsPfad, 0);
addItem( tr("Fonts"), loadIcon("font.png"), tabFonts);
 
tabDocChecker = new TabCheckDoc( prefsWidgets, prefsData->checkerProfiles, prefsData->curCheckProfile);
addItem( tr("Doc-Checker"), loadIcon("checkdoc.png"), tabDocChecker);
 
if (CMSavail)
{
tabColorManagement = new CMSPrefs(prefsWidgets, &prefsData->DCMSset, &InputProfiles, &ap->PrinterProfiles, &ap->MonitorProfiles);
addItem( tr("Color Management"), loadIcon("blend.png"), tabColorManagement);
}
QMap<QString,QFont> DocFonts;
DocFonts.clear();
tabPDF = new TabPDFOptions( prefsWidgets,
&prefsData->PDF_Options,
ap->Prefs.AvailFonts,
&ap->PDFXProfiles,
DocFonts,
prefsData->PDF_Options.PresentVals,
Umrech,
unitGetSuffixFromIndex(prefsData->docUnitIndex),
prefsData->PageHeight,
prefsData->PageWidth,
0 );
addItem( tr("PDF Export"), loadIcon("acroread.png"), tabPDF);
tabDefaultItemAttributes = new DocumentItemAttributes( prefsWidgets);
tabDefaultItemAttributes->setup(&prefsData->defaultItemAttributes);
addItem( tr("Document Item Attributes"), loadIcon("docattributes.png"), tabDefaultItemAttributes);
 
tabKeys = new KeyManager(prefsWidgets, prefsData->KeyActions);
addItem( tr("Keyboard Shortcuts"), loadIcon("key_bindings.png"), tabKeys);
 
tab_5 = new QWidget( prefsWidgets, "tab_5" );
tabLayout_5 = new QGridLayout( tab_5 );
tabLayout_5->setSpacing( 6 );
tabLayout_5->setMargin( 11 );
saving = new QGroupBox( tr( "Other Options" ), tab_5, "Saving" );
saving->setColumnLayout(0, Qt::Vertical );
saving->layout()->setSpacing( 0 );
saving->layout()->setMargin( 0 );
savingLayout = new QHBoxLayout( saving->layout() );
savingLayout->setAlignment( Qt::AlignTop );
savingLayout->setSpacing( 6 );
savingLayout->setMargin( 25 );
SaveAtQuit = new QCheckBox( tr( "Sa&ve Contents on Changes" ), saving, "SaveAtQuit" );
SaveAtQuit->setChecked(prefsData->SaveAtQ);
savingLayout->addWidget( SaveAtQuit );
tabLayout_5->addWidget( saving, 1, 0 );
preview = new QGroupBox( tr( "Preview" ), tab_5, "Preview" );
preview->setColumnLayout(0, Qt::Vertical );
preview->layout()->setSpacing( 0 );
preview->layout()->setMargin( 0 );
previewLayout = new QHBoxLayout( preview->layout() );
previewLayout->setAlignment( Qt::AlignTop );
previewLayout->setSpacing( 10 );
previewLayout->setMargin( 24 );
PreviewSize = new QComboBox( true, preview, "PreviewSize" );
PreviewSize->insertItem( tr( "Small" ) );
PreviewSize->insertItem( tr( "Medium" ) );
PreviewSize->insertItem( tr( "Large" ) );
PreviewSize->setEditable(false);
int sci = prefsData->PSize == 40 ? 0 : prefsData->PSize == 60 ? 1 : 2;
PreviewSize->setCurrentItem(sci);
textLabelP = new QLabel( PreviewSize, tr( "&Size:" ), preview, "TextLabel1_3" );
previewLayout->addWidget( textLabelP );
previewLayout->addWidget( PreviewSize );
tabLayout_5->addWidget( preview, 0, 0 );
addItem( tr("Scrapbook"), loadIcon("scrap.png"), tab_5);
 
tabView = new QWidget( prefsWidgets, "tabView" );
tabViewLayout = new QVBoxLayout( tabView, 10, 5, "tabViewLayout");
tabViewLayout->setAlignment( Qt::AlignTop );
pageBackground = new QButtonGroup( tabView, "pageBackground" );
pageBackground->setTitle( tr( "Page Display" ) );
pageBackground->setColumnLayout(0, Qt::Vertical );
pageBackground->layout()->setSpacing( 5 );
pageBackground->layout()->setMargin( 10 );
pageBackgroundLayout = new QVBoxLayout( pageBackground->layout() );
pageBackgroundLayout->setAlignment( Qt::AlignTop );
layout10 = new QHBoxLayout( 0, 0, 5, "layout10");
textLabel9 = new QLabel( pageBackground, "textLabel9" );
textLabel9->setText( tr( "Color:" ) );
layout10->addWidget( textLabel9 );
backColor = new QPushButton( pageBackground, "backColor" );
backColor->setMinimumSize( QSize( 60, 20 ) );
backColor->setMaximumSize( QSize( 60, 20 ) );
backColor->setFlat( false );
backColor->setAutoDefault( false );
QPixmap pm5 = QPixmap(54, 14);
pm5.fill(prefsData->DpapColor);
colorPaper = prefsData->DpapColor;
backColor->setPixmap(pm5);
backColor->setText( QString::null );
layout10->addWidget( backColor );
QSpacerItem* spacer3 = new QSpacerItem( 61, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout10->addItem( spacer3 );
pageBackgroundLayout->addLayout( layout10 );
checkUnprintable = new QCheckBox( pageBackground, "checkUnprintable" );
checkUnprintable->setText( tr( "Display &Unprintable Area in Margin Color" ) );
checkUnprintable->setAccel( QKeySequence( tr( "Alt+U" ) ) );
checkUnprintable->setChecked( prefsData->marginColored );
pageBackgroundLayout->addWidget( checkUnprintable );
checkPictures = new QCheckBox( pageBackground, "checkPictures" );
checkPictures->setText( tr( "Show Pictures" ) );
checkPictures->setChecked(prefsData->guidesSettings.showPic);
pageBackgroundLayout->addWidget( checkPictures );
checkLink = new QCheckBox( pageBackground, "checkLink" );
checkLink->setText( tr( "Show Text Chains" ) );
checkLink->setChecked(prefsData->guidesSettings.linkShown);
pageBackgroundLayout->addWidget( checkLink );
checkFrame = new QCheckBox( pageBackground, "checkFrame" );
checkFrame->setText( tr( "Show Frames" ) );
checkFrame->setChecked(prefsData->guidesSettings.framesShown);
pageBackgroundLayout->addWidget( checkFrame );
tabViewLayout->addWidget( pageBackground );
 
groupScratch = new QGroupBox( tabView, "GroupBox7" );
groupScratch->setTitle( tr( "Scratch Space" ) );
groupScratch->setColumnLayout(0, Qt::Vertical );
groupScratch->layout()->setSpacing( 0 );
groupScratch->layout()->setMargin( 0 );
groupScratchLayout = new QHBoxLayout( groupScratch->layout() );
groupScratchLayout->setAlignment( Qt::AlignTop );
groupScratchLayout->setSpacing( 0 );
groupScratchLayout->setMargin( 10 );
Layout4s = new QGridLayout;
Layout4s->setSpacing( 6 );
Layout4s->setMargin( 0 );
topScratch = new MSpinBox( groupScratch, 4 );
topScratch->setDecimals( decimals );
topScratch->setMaxValue(1000);
topScratch->setValue(prefsData->ScratchTop * Umrech);
Layout4s->addWidget( topScratch, 0, 1 );
TextLabel5s = new QLabel(topScratch, tr( "&Top:" ), groupScratch, "TextLabel5" );
Layout4s->addWidget( TextLabel5s, 0, 0 );
leftScratch = new MSpinBox( groupScratch, 4 );
leftScratch->setDecimals( decimals );
leftScratch->setMaxValue(1000);
leftScratch->setValue(prefsData->ScratchLeft * Umrech);
Layout4s->addWidget( leftScratch, 0, 3 );
Linkss = new QLabel(leftScratch, tr( "&Left:" ), groupScratch, "Links" );
Layout4s->addWidget( Linkss, 0, 2 );
bottomScratch = new MSpinBox( groupScratch, 4 );
bottomScratch->setDecimals( decimals );
bottomScratch->setMaxValue(1000);
bottomScratch->setValue(prefsData->ScratchBottom * Umrech);
Layout4s->addWidget( bottomScratch, 1, 1 );
TextLabel7s = new QLabel(bottomScratch, tr( "&Bottom:" ), groupScratch, "TextLabel7" );
Layout4s->addWidget( TextLabel7s, 1, 0 );
rightScratch = new MSpinBox( groupScratch, 4 );
rightScratch->setDecimals( decimals );
rightScratch->setMaxValue(1000);
rightScratch->setValue(prefsData->ScratchRight * Umrech);
Layout4s->addWidget( rightScratch, 1, 3 );
Rechtss = new QLabel(rightScratch, tr( "&Right:" ), groupScratch, "Rechts" );
Layout4s->addWidget( Rechtss, 1, 2 );
groupScratchLayout->addLayout( Layout4s );
tabViewLayout->addWidget( groupScratch );
 
CaliGroup = new QGroupBox( tr( "&Adjust Display Size" ), tabView, "CaliGroup" );
CaliGroup->setColumnLayout(0, Qt::Vertical );
CaliGroup->layout()->setSpacing( 6 );
CaliGroup->layout()->setMargin( 11 );
CaliGroupLayout = new QVBoxLayout( CaliGroup->layout() );
CaliGroupLayout->setAlignment( Qt::AlignTop );
CaliText = new QLabel( tr( "To adjust the display drag the ruler below with the Slider." ), CaliGroup, "CaliText" );
CaliGroupLayout->addWidget( CaliText );
CaliRuler = new QLabel( CaliGroup, "CaliRuler" );
CaliRuler->setMinimumSize( QSize( 20, 20 ) );
drawRuler();
CaliRuler->setFrameShape( QLabel::Box );
CaliRuler->setFrameShadow( QLabel::Sunken );
CaliRuler->setScaledContents( false );
CaliGroupLayout->addWidget( CaliRuler );
layout15ca = new QHBoxLayout( 0, 0, 6, "layout15");
CaliSlider = new QSlider( CaliGroup, "CaliSlider" );
CaliSlider->setMinValue( -100 );
CaliSlider->setMaxValue( 100 );
CaliSlider->setValue(static_cast<int>(100 * DisScale)-100);
CaliSlider->setOrientation( QSlider::Horizontal );
CaliSlider->setTickmarks( QSlider::Right );
CaliSlider->setTickInterval( 10 );
CaliText->setBuddy(CaliGroup);
layout15ca->addWidget( CaliSlider );
CaliAnz = new QLabel( CaliGroup, "CaliAnz" );
CaliAnz->setText(QString::number(DisScale*100, 'f', 2)+" %");
layout15ca->addWidget( CaliAnz );
CaliGroupLayout->addLayout( layout15ca );
tabViewLayout->addWidget( CaliGroup );
addItem( tr("Display"), loadIcon("screen.png"), tabView);
 
ExtTool = new QWidget( prefsWidgets, "ExtTool" );
ExtToolLayout = new QVBoxLayout( ExtTool, 11, 6, "ExtToolLayout");
ExtToolLayout->setAlignment( Qt::AlignTop );
groupGS = new QGroupBox( tr( "Postscript Interpreter" ), ExtTool, "groupGS" );
groupGS->setColumnLayout(0, Qt::Vertical );
groupGS->layout()->setSpacing( 6 );
groupGS->layout()->setMargin( 10 );
groupGSLayout = new QVBoxLayout( groupGS->layout() );
groupGSLayout->setAlignment( Qt::AlignTop );
GSlayout = new QHBoxLayout( 0, 0, 6, "GSlayout");
GSName = new QLineEdit( groupGS, "GSName" );
GSName->setText(prefsData->gs_exe);
GSText = new QLabel( GSName, tr( "&Name of Executable:" ), groupGS, "GSText" );
GSlayout->addWidget( GSText );
GSlayout->addWidget( GSName );
groupGSLayout->addLayout( GSlayout );
GSantiText = new QCheckBox( tr( "Antialias &Text" ), groupGS, "GSantiText" );
GSantiText->setChecked(prefsData->gs_AntiAliasText);
groupGSLayout->addWidget( GSantiText );
GSantiGraph = new QCheckBox( tr( "Antialias &Graphics" ), groupGS, "GSantiGraph" );
GSantiGraph->setChecked(prefsData->gs_AntiAliasGraphics);
groupGSLayout->addWidget( GSantiGraph );
ExtToolLayout->addWidget( groupGS );
groupGimp = new QGroupBox( tr( "Image Processing Tool" ), ExtTool, "groupGimp" );
groupGimp->setColumnLayout(0, Qt::Vertical );
groupGimp->layout()->setSpacing( 6 );
groupGimp->layout()->setMargin( 10 );
groupGimpLayout = new QHBoxLayout( groupGimp->layout() );
groupGimpLayout->setAlignment( Qt::AlignTop );
GimpName = new QLineEdit( groupGimp, "GimpName" );
GimpName->setText(prefsData->gimp_exe);
GimpText = new QLabel( GimpName, tr( "Name of &Executable:" ), groupGimp, "GimpText" );
groupGimpLayout->addWidget( GimpText );
groupGimpLayout->addWidget( GimpName );
ExtToolLayout->addWidget( groupGimp );
QSpacerItem* spacer_gs = new QSpacerItem( 0, 1, QSizePolicy::Minimum, QSizePolicy::Expanding );
ExtToolLayout->addItem( spacer_gs );
addItem( tr("External Tools."), loadIcon("misc.png"), ExtTool);
 
Misc = new QWidget( prefsWidgets, "Misc" );
MiscLayout = new QVBoxLayout( Misc, 10, 5, "MiscLayout");
MiscLayout->setAlignment( Qt::AlignTop );
groupPrint = new QGroupBox( tr( "Printing" ), Misc, "groupPrint" );
groupPrint->setColumnLayout(0, Qt::Vertical );
groupPrint->layout()->setSpacing( 10 );
groupPrint->layout()->setMargin( 10 );
groupPrintLayout = new QVBoxLayout( groupPrint->layout() );
groupPrintLayout->setAlignment( Qt::AlignTop );
ClipMarg = new QCheckBox( tr( "Clip to Page &Margins" ), groupPrint, "ClipMarg" );
ClipMarg->setChecked(prefsData->ClipMargin);
groupPrintLayout->addWidget( ClipMarg );
DoGCR = new QCheckBox( tr( "Apply &Under Color Removal" ), groupPrint, "ClipMarg" );
DoGCR->setChecked(prefsData->GCRMode);
groupPrintLayout->addWidget( DoGCR );
MiscLayout->addWidget( groupPrint );
AskForSubs = new QCheckBox( tr( "Always ask before Fonts are replaced when loading a Document" ), Misc, "askforSubs" );
AskForSubs->setChecked(prefsData->askBeforeSubstituite);
MiscLayout->addWidget( AskForSubs );
QSpacerItem* spacer_3m = new QSpacerItem( 0, 1, QSizePolicy::Minimum, QSizePolicy::Expanding );
MiscLayout->addItem( spacer_3m );
addItem( tr("Misc."), loadIcon("misc.png"), Misc);
 
// plugin manager. pv.
pluginManagerWidget = new QWidget(prefsWidgets, "pluginManagerWidget");
pluginMainLayout = new QVBoxLayout( pluginManagerWidget, 10, 5, "pluginMainLayout");
pluginMainLayout->setAlignment( Qt::AlignTop );
plugGroupBox = new QGroupBox(tr("Plugin Manager"), pluginManagerWidget, "plugGroupBox");
plugGroupBox->setColumnLayout(0, Qt::Vertical);
plugGroupBox->layout()->setSpacing(6);
plugGroupBox->layout()->setMargin(11);
plugGroupBoxLayout = new QGridLayout( plugGroupBox->layout() );
plugGroupBoxLayout->setAlignment(Qt::AlignTop);
plugLayout1 = new QVBoxLayout( 0, 0, 6, "plugLayout1");
pluginsList = new QListView(plugGroupBox, "pluginsList");
pluginsList->setAllColumnsShowFocus(true);
pluginsList->setShowSortIndicator(true);
pluginsList->addColumn(tr("Plugin"));
pluginsList->setColumnWidthMode(0, QListView::Maximum);
pluginsList->addColumn(tr("How to run"));
pluginsList->setColumnWidthMode(1, QListView::Maximum);
pluginsList->addColumn(tr("Type"));
pluginsList->setColumnWidthMode(2, QListView::Maximum);
pluginsList->addColumn(tr("Load it?"));
pluginsList->setColumnWidthMode(3, QListView::Maximum);
pluginsList->addColumn(tr("Plugin ID"));
pluginsList->setColumnWidthMode(4, QListView::Maximum);
pluginsList->addColumn(tr("File"));
pluginsList->setColumnWidthMode(5, QListView::Maximum);
for (QMap<int,PluginManager::PluginData>::Iterator it = ap->pluginManager->pluginMap.begin(); it != ap->pluginManager->pluginMap.end(); ++it)
{
QListViewItem *plugItem = new QListViewItem(pluginsList);
plugItem->setText(0, (*it).name.replace('&', "").replace("...", "")); // name
plugItem->setText(1, QString("%1 %2").arg((*it).actMenu).arg((*it).actMenuAfterName)); // menu path
plugItem->setText(2, ap->pluginManager->getPluginType((*it).type)); // type
// load at start?
plugItem->setPixmap(3, (*it).loadPlugin ? loadIcon("ok.png") : loadIcon("DateiClos16.png"));
plugItem->setText(3, (*it).loadPlugin ? tr("Yes") : tr("No"));
plugItem->setText(4, QString("%1").arg(it.key())); // id for developers
plugItem->setText(5, (*it).pluginFile); // file for developers
}
plugLayout1->addWidget(pluginsList);
pluginWarning = new QLabel(plugGroupBox);
pluginWarning->setText("<qt>" + tr("You need to restart the application to promote the changes.") + "</qt>");
plugLayout1->addWidget(pluginWarning);
plugGroupBoxLayout->addLayout(plugLayout1, 0, 0);
pluginMainLayout->addWidget(plugGroupBox);
addItem(tr("Plugins"), loadIcon("plugins.png"), pluginManagerWidget);
 
setDS();
//tab order
QWidget::setTabOrder( GFsize, SpinBox3 );
QWidget::setTabOrder( SpinBox3, UnitCombo );
QWidget::setTabOrder( UnitCombo, Recen );
QWidget::setTabOrder( Recen, Docs );
QWidget::setTabOrder( Docs, FileC );
QWidget::setTabOrder( FileC, ProPfad );
QWidget::setTabOrder( ProPfad, FileC2 );
QWidget::setTabOrder( FileC2, ScriptPfad );
QWidget::setTabOrder( ScriptPfad, FileC3 );
QWidget::setTabOrder( FileC3, TemplateDir );
QWidget::setTabOrder( TemplateDir, FileC4 );
 
 
QWidget::setTabOrder( TopR, BottomR );
QWidget::setTabOrder( BottomR, LeftR );
QWidget::setTabOrder( LeftR, RightR );
 
QWidget::setTabOrder( PreviewSize, SaveAtQuit );
 
QToolTip::add( checkLink, tr("Turns the of linked frames on or off"));
QToolTip::add( checkFrame, tr("Turns the display of frames on or off"));
QToolTip::add( checkPictures, tr("Turns the display of pictures on or off"));
QToolTip::add( guiLangCombo, tr( "Select your default language for Scribus to run with.\nLeave this blank to choose based on environment variables.\nYou can still override this by passing a command line option when starting Scribus" ) );
QToolTip::add( GUICombo, tr( "Choose the default window decoration and looks.\nScribus inherits any available KDE or Qt themes" ) );
QToolTip::add( GFsize, tr( "Default font size for the menus and windows" ) );
QToolTip::add( UnitCombo, tr( "Default unit of measurement for document editing" ) );
QToolTip::add( SpinBox3, tr( "Number of lines Scribus will scroll for each move of the mouse wheel" ) );
QToolTip::add( Recen, tr( "Number of recently edited documents to show in the File menu" ) );
QToolTip::add( Docs, tr( "Default documents directory" ) );
QToolTip::add( ProPfad, tr( "Default ICC profiles directory" ) );
QToolTip::add( ScriptPfad, tr( "Default Scripter scripts directory" ) );
QToolTip::add( TemplateDir, tr( "Additional Directory for Document Templates" ) );
 
QToolTip::add( GZComboF, tr( "Default page size, either a standard size or a custom size" ) );
QToolTip::add( GZComboO, tr( "Default orientation of document pages" ) );
QToolTip::add( pageWidth, tr( "Width of document pages, editable if you have chosen a custom page size" ) );
QToolTip::add( pageHeight, tr( "Height of document pages, editable if you have chosen a custom page size" ) );
QToolTip::add( facingPages, tr( "Enable single or spread based layout" ) );
QToolTip::add( Linkszuerst, tr( "Make the first page the left page of a document" ) );
QToolTip::add( TopR, tr( "Distance between the top margin guide and the edge of the page" ) );
QToolTip::add( BottomR, tr( "Distance between the bottom margin guide and the edge of the page" ) );
QToolTip::add( LeftR, tr( "Distance between the left margin guide and the edge of the page.\nIf Facing Pages is selected, this margin space can be used to achieve the correct margins for binding" ) );
QToolTip::add( RightR, tr( "Distance between the right margin guide and the edge of the page.\nIf Facing Pages is selected, this margin space can be used to achieve the correct margins for binding" ) );
QToolTip::add( ASon, tr( "When enabled, Scribus saves a backup copy of your file with the .bak extension\neach time the time period elapses" ) );
QToolTip::add( ASTime, tr( "Time period between saving automatically" ) );
 
QToolTip::add( urSpinBox, tr("Set the length of the action history in steps.\nIf set to 0 infinite amount of actions will be stored."));
 
QToolTip::add( PreviewSize, tr( "Choose the size of the preview in the scrapbook palette" ) );
QToolTip::add( SaveAtQuit, tr( "Save the scrapbook contents everytime after a change" ) );
 
QToolTip::add( backColor, tr( "Color for paper" ) );
QToolTip::add( checkUnprintable, tr( "Mask the area outside the margins in the margin color" ) );
QToolTip::add( CaliSlider, tr( "Set the default zoom level" ) );
 
QToolTip::add( GSName, tr( "Filesystem location for the Ghostscript interpreter" ) );
QToolTip::add( GSantiText, tr( "Antialias text for EPS and PDF onscreen rendering" ) );
QToolTip::add( GSantiGraph, tr( "Antialias graphics for EPS and PDF onscreen rendering" ) );
QToolTip::add( GimpName, tr( "Filesystem location for graphics editor" ) );
 
QToolTip::add( ClipMarg, tr( "Do not show objects outside the margins on the printed page or exported file" ) );
QToolTip::add( DoGCR, tr( "A way of switching off some of the gray shades which are composed\n"
"of cyan, yellow and magenta and using black instead.\n"
"UCR most affects parts of images which are neutral and/or dark tones\n"
"which are close to the gray. Use of this may improve printing some images\n"
"and some experimentation and testing is need on a case by case basis.\n"
"UCR reduces the possibility of over saturation with CMY inks." ) );
 
// signals and slots connections
connect( guiLangCombo, SIGNAL( activated( const QString & ) ), this, SLOT( setSelectedGUILang( const QString & ) ) );
connect(backColor, SIGNAL(clicked()), this, SLOT(changePaperColor()));
connect(UnitCombo, SIGNAL(activated(int)), this, SLOT(unitChange()));
connect(pageWidth, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
connect(pageHeight, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
connect(TopR, SIGNAL(valueChanged(int)), this, SLOT(setTop(int)));
connect(BottomR, SIGNAL(valueChanged(int)), this, SLOT(setBottom(int)));
connect(LeftR, SIGNAL(valueChanged(int)), this, SLOT(setLeft(int)));
connect(RightR, SIGNAL(valueChanged(int)), this, SLOT(setRight(int)));
connect(GZComboO, SIGNAL(activated(int)), this, SLOT(setOrien(int)));
connect(GZComboF, SIGNAL(activated(const QString &)), this, SLOT(setSize(const QString &)));
connect(facingPages, SIGNAL(clicked()), this, SLOT(setDS()));
connect(FileC, SIGNAL(clicked()), this, SLOT(changeDocs()));
connect(FileC2, SIGNAL(clicked()), this, SLOT(changeProfs()));
connect(FileC3, SIGNAL(clicked()), this, SLOT(changeScripts()));
connect(FileC4, SIGNAL(clicked()), this, SLOT(changeTemplates()));
connect(CaliSlider, SIGNAL(valueChanged(int)), this, SLOT(setDisScale()));
connect(buttonOk, SIGNAL(clicked()), this, SLOT(setActionHistoryLength()));
connect(pluginsList, SIGNAL(clicked(QListViewItem *, const QPoint &, int)),
this, SLOT(changePluginLoad(QListViewItem *, const QPoint &, int)));
if (CMSavail)
connect(tabColorManagement, SIGNAL(cmsOn(bool )), this, SLOT(switchCMS(bool )));
 
setSize(prefsData->pageSize);
setOrien(prefsData->pageOrientation);
 
pageWidth->setValue(prefsData->PageWidth * Umrech);
pageHeight->setValue(prefsData->PageHeight * Umrech);
 
unitChange();
 
prefsWidgets->raiseWidget(0);
resize( minimumSizeHint() );
arrangeIcons();
clearWState( WState_Polished );
}
 
/*!
\fn Preferences::~Preferences
\author Franz Schmid
\date
\brief Destructor for Preferences dialog box
\param None
\retval None
*/
Preferences::~Preferences()
{
// no need to delete child widgets, Qt does it all for us
}
 
 
/*!
\fn void Preferences::ChangeDocs()
\author Franz Schmid
\date
\brief Runs QFileDialog to get Preferences (General) Path to Documents directory
\param None
\retval None
*/
void Preferences::changeDocs()
{
QString s = QFileDialog::getExistingDirectory(Docs->text(), this, "d", tr("Choose a Directory"), true);
if (s != "")
Docs->setText(s);
}
 
/*!
\fn void Preferences::ChangeProfs()
\author Franz Schmid
\date
\brief Runs QFileDialog to get Preferences (General) Path to Colour Profiles directory
\param None
\retval None
*/
void Preferences::changeProfs()
{
QString s = QFileDialog::getExistingDirectory(ProPfad->text(), this, "d", tr("Choose a Directory"), true);
if (s != "")
ProPfad->setText(s);
}
 
/*!
\fn void Preferences::ChangeScripts()
\author Franz Schmid
\date
\brief Runs QFileDialog to get Preferences (General) Path to Scripts directory
\param None
\retval None
*/
void Preferences::changeScripts()
{
QString s = QFileDialog::getExistingDirectory(ScriptPfad->text(), this, "d", tr("Choose a Directory"), true);
if (s != "")
ScriptPfad->setText(s);
}
 
/*!
\fn void Preferences::ChangeTemplates()
\author Riku Leino
\date
\brief Runs QFileDialog to get Preferences (General) Path to Templates directory
\param None
\retval None
*/
void Preferences::changeTemplates()
{
QString s = QFileDialog::getExistingDirectory(TemplateDir->text(), this, "d", tr("Choose a Directory"), true);
if (s != "")
TemplateDir->setText(s);
}
 
/*!
\fn void Preferences::setDS()
\author Franz Schmid
\date
\brief Preferences (Document / Page Size), switches default between Facing Pages and swaps text labels for margin guides
\param None
\retval None
*/
void Preferences::setDS()
{
bool m = facingPages->isChecked() ? true : false;
GRText3->setText(m == true ? tr( "&Inside:" ) : tr( "&Left:" ));
GRText4->setText(m == true ? tr( "O&utside:" ) : tr( "&Right:" ));
Linkszuerst->setEnabled(m);
if (m == false)
Linkszuerst->setChecked(false);
}
 
/*!
\fn void Preferences::setPageWidth(int v)
\author Franz Schmid
\date
\brief Preferences (Document / Page Size), sets Page width values
\param v Width value
\retval None
*/
void Preferences::setPageWidth(int)
{
Pagebr = pageWidth->value() / Umrech;
RightR->setMaxValue(pageWidth->value() - LeftR->value());
LeftR->setMaxValue(pageWidth->value() - RightR->value());
TopR->setMaxValue(pageHeight->value() - BottomR->value());
BottomR->setMaxValue(pageHeight->value() - TopR->value());
}
 
/*!
\fn void Preferences::setPageHeight(int v)
\author Franz Schmid
\date
\brief Preferences (Document / Page Size), sets Page height values
\param v Height value
\retval None
*/
void Preferences::setPageHeight(int)
{
Pageho = pageHeight->value() / Umrech;
RightR->setMaxValue(pageWidth->value() - LeftR->value());
LeftR->setMaxValue(pageWidth->value() - RightR->value());
TopR->setMaxValue(pageHeight->value() - BottomR->value());
BottomR->setMaxValue(pageHeight->value() - TopR->value());
}
 
/*!
\fn void Preferences::setTop(int v)
\author Franz Schmid
\date
\brief Preferences (Document / Page Size), sets Page top values
\param v Top value
\retval None
*/
void Preferences::setTop(int)
{
RandT = TopR->value() / Umrech;
BottomR->setMaxValue(pageHeight->value() - TopR->value());
}
 
/*!
\fn void Preferences::setBottom(int v)
\author Franz Schmid
\date
\brief Preferences (Document / Page Size), sets Page bottom values
\param v Bottom value
\retval None
*/
void Preferences::setBottom(int)
{
RandB = BottomR->value() / Umrech;
TopR->setMaxValue(pageHeight->value() - BottomR->value());
}
 
/*!
\fn void Preferences::setLeft(int v)
\author Franz Schmid
\date
\brief Preferences (Document / Page Size), sets Page left values
\param v Top value
\retval None
*/
void Preferences::setLeft(int)
{
RandL = LeftR->value() / Umrech;
RightR->setMaxValue(pageWidth->value() - LeftR->value());
}
 
/*!
\fn void Preferences::setRight(int v)
\author Franz Schmid
\date
\brief Preferences (Document / Page Size), sets Page right values
\param v Right value
\retval None
*/
void Preferences::setRight(int)
{
RandR = RightR->value() / Umrech;
LeftR->setMaxValue(pageWidth->value() - RightR->value());
}
 
/*!
\fn void Preferences::setSize(QString gr)
\author Franz Schmid
\date
\brief Preferences (Document / Page Size), sets Page size values. Connects signals for setting page dimensions.
\param gr Standard page size value (eg A4)
\retval None
*/
void Preferences::setSize(const QString & gr)
{
Pagebr = pageWidth->value() / Umrech;
Pageho = pageHeight->value() / Umrech;
pageWidth->setEnabled(false);
pageHeight->setEnabled(false);
PageSize *ps2=new PageSize(gr);
 
prefsPageSizeName=ps2->getPageName();
if (gr==tr("Custom"))
{
pageWidth->setEnabled(true);
pageHeight->setEnabled(true);
}
else
{
Pagebr = ps2->getPageWidth();
Pageho = ps2->getPageHeight();
}
disconnect(pageWidth, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
disconnect(pageHeight, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
pageWidth->setValue(Pagebr * Umrech);
pageHeight->setValue(Pageho * Umrech);
RightR->setMaxValue(pageWidth->value() - LeftR->value());
LeftR->setMaxValue(pageWidth->value() - RightR->value());
TopR->setMaxValue(pageHeight->value() - BottomR->value());
BottomR->setMaxValue(pageHeight->value() - TopR->value());
connect(pageWidth, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
connect(pageHeight, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
}
 
/*!
\fn void Preferences::setOrien(int ori)
\author Franz Schmid
\date
\brief Preferences (Document / Page Size), sets Page orientation value and page dimensions
\param ori Orientation value
\retval None
*/
void Preferences::setOrien(int ori)
{
double br;
setSize(GZComboF->currentText());
disconnect(pageWidth, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
disconnect(pageHeight, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
if (ori == 0)
{
//if (GZComboF->currentItem() == 30)
if (GZComboF->currentText() == tr("Custom"))
{
br = pageWidth->value();
pageWidth->setValue(pageHeight->value());
pageHeight->setValue(br);
}
}
else
{
br = pageWidth->value();
pageWidth->setValue(pageHeight->value());
pageHeight->setValue(br);
}
connect(pageWidth, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
connect(pageHeight, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
}
 
/*!
\fn void Preferences::changePaperColor()
\author Franz Schmid
\date
\brief Preferences ([dox?], [dox?]), Sets Paper color [dox?]
\param None
\retval None
*/
void Preferences::changePaperColor()
{
QColor neu = QColor();
neu = QColorDialog::getColor(colorPaper, this);
if (neu.isValid())
{
QPixmap pm = QPixmap(54, 14);
pm.fill(neu);
colorPaper = neu;
backColor->setPixmap(pm);
}
}
 
/*!
\fn void Preferences::UnitChange()
\author Franz Schmid
\date
\brief Preferences (General, Units). Sets scaling factors and units descriptions when default units are changed. Updates preference values
\param None
\retval None
*/
void Preferences::unitChange()
{
disconnect(pageWidth, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
disconnect(pageHeight, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
disconnect(TopR, SIGNAL(valueChanged(int)), this, SLOT(setTop(int)));
disconnect(BottomR, SIGNAL(valueChanged(int)), this, SLOT(setBottom(int)));
disconnect(LeftR, SIGNAL(valueChanged(int)), this, SLOT(setLeft(int)));
disconnect(RightR, SIGNAL(valueChanged(int)), this, SLOT(setRight(int)));
int decimals;
double AltUmrech = Umrech;
double oldMin, oldMax, oldB, oldBM, oldH, oldHM, val;
pageWidth->getValues(&oldB, &oldBM, &decimals, &val);
oldB /= AltUmrech;
oldBM /= AltUmrech;
pageHeight->getValues(&oldH, &oldHM, &decimals, &val);
oldH /= AltUmrech;
oldHM /= AltUmrech;
QString einh;
docUnitIndex = UnitCombo->currentItem();
Umrech = unitGetRatioFromIndex(docUnitIndex);
decimals = unitGetDecimalsFromIndex(docUnitIndex);
einh = unitGetSuffixFromIndex(docUnitIndex);
 
pageWidth->setSuffix(einh);
pageHeight->setSuffix(einh);
TopR->setSuffix(einh);
BottomR->setSuffix(einh);
LeftR->setSuffix(einh);
RightR->setSuffix(einh);
tabGuides->minorSpace->setSuffix(einh);
tabGuides->majorSpace->setSuffix(einh);
tabGuides->snapDistance->setSuffix(einh);
tabGuides->baseGrid->setSuffix(einh);
tabGuides->baseOffset->setSuffix(einh);
tabTools->gapText->setSuffix(einh);
topScratch->setSuffix(einh);
bottomScratch->setSuffix(einh);
leftScratch->setSuffix(einh);
rightScratch->setSuffix(einh);
tabPDF->BleedBottom->setSuffix(einh);
tabPDF->BleedTop->setSuffix(einh);
tabPDF->BleedRight->setSuffix(einh);
tabPDF->BleedLeft->setSuffix(einh);
pageWidth->setValues(oldB * Umrech, oldBM * Umrech, decimals, Pagebr * Umrech);
pageHeight->setValues(oldH * Umrech, oldHM * Umrech, decimals, Pageho * Umrech);
TopR->setValues(0, pageHeight->value() - RandB * Umrech, decimals, RandT * Umrech);
BottomR->setValues(0, pageHeight->value() - RandT * Umrech, decimals, RandB * Umrech);
LeftR->setValues(0, pageWidth->value() - RandR * Umrech, decimals, RandL * Umrech);
RightR->setValues(0, pageWidth->value() - RandL * Umrech, decimals, RandR * Umrech);
int decimalsOld;
double invUnitConversion = 1.0 / AltUmrech * Umrech;
tabGuides->minorSpace->getValues(&oldMin, &oldMax, &decimalsOld, &val);
tabGuides->minorSpace->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
tabGuides->majorSpace->getValues(&oldMin, &oldMax, &decimalsOld, &val);
tabGuides->majorSpace->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
tabGuides->snapDistance->getValues(&oldMin, &oldMax, &decimalsOld, &val);
tabGuides->snapDistance->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
tabGuides->baseGrid->getValues(&oldMin, &oldMax, &decimalsOld, &val);
tabGuides->baseGrid->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
tabGuides->baseOffset->getValues(&oldMin, &oldMax, &decimalsOld, &val);
tabGuides->baseOffset->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
tabTools->gapText->getValues(&oldMin, &oldMax, &decimalsOld, &val);
tabTools->gapText->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
topScratch->getValues(&oldMin, &oldMax, &decimalsOld, &val);
topScratch->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
bottomScratch->getValues(&oldMin, &oldMax, &decimalsOld, &val);
bottomScratch->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
leftScratch->getValues(&oldMin, &oldMax, &decimalsOld, &val);
leftScratch->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
rightScratch->getValues(&oldMin, &oldMax, &decimalsOld, &val);
rightScratch->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
tabPDF->BleedBottom->getValues(&oldMin, &oldMax, &decimalsOld, &val);
tabPDF->BleedBottom->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
tabPDF->BleedTop->getValues(&oldMin, &oldMax, &decimalsOld, &val);
tabPDF->BleedTop->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
tabPDF->BleedRight->getValues(&oldMin, &oldMax, &decimalsOld, &val);
tabPDF->BleedRight->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
tabPDF->BleedLeft->getValues(&oldMin, &oldMax, &decimalsOld, &val);
tabPDF->BleedLeft->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
tabPDF->unitConv = Umrech;
drawRuler();
connect(pageWidth, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
connect(pageHeight, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
connect(TopR, SIGNAL(valueChanged(int)), this, SLOT(setTop(int)));
connect(BottomR, SIGNAL(valueChanged(int)), this, SLOT(setBottom(int)));
connect(LeftR, SIGNAL(valueChanged(int)), this, SLOT(setLeft(int)));
connect(RightR, SIGNAL(valueChanged(int)), this, SLOT(setRight(int)));
}
 
/*!
\fn void Preferences::SetDisScale()
\author Franz Schmid
\date
\brief Preferences (Display, Display Size). Sets Scale for ruler scale
\param None
\retval None
*/
void Preferences::setDisScale()
{
DisScale = QMAX((100.0 + CaliSlider->value()) / 100.0, 0.01);
drawRuler();
CaliAnz->setText(QString::number(DisScale*100, 'f', 2)+" %");
}
 
/*!
\fn void Preferences::DrawRuler()
\author Franz Schmid
\date
\brief Preferences (Display, Display Size). Draws ruler depending on scaling factor
\param None
\retval None
*/
void Preferences::drawRuler()
{
double xl, iter, iter2, maxi;
switch (docUnitIndex)
{
case 0:
iter = 10.0;
iter2 = iter * 10.0;
maxi = 200.0;
break;
case 1:
iter = (10.0 / 25.4) * 72.0;
iter2 = iter * 10.0;
maxi = iter2;
break;
case 2:
iter = 18.0;
iter2 = 72.0;
maxi = 2 * iter2;
break;
case 3:
iter = 12.0;
iter2 = 120.0;
maxi = 240.0;
break;
default:
iter = 10.0;
iter2 = iter * 10.0;
maxi = 200.0;
break;
}
 
QPixmap pm(static_cast<int>(maxi*DisScale+30), 21);
pm.fill();
QPainter p;
p.begin(&pm);
p.drawLine(0, 19, width(), 19);
p.setBrush(black);
p.setPen(black);
p.scale(DisScale, 1.0);
for (xl = 0; xl < maxi; xl += iter)
p.drawLine(static_cast<int>(xl), 13, static_cast<int>(xl), 19);
for (xl = 0; xl < maxi+10; xl += iter2)
{
p.drawLine(static_cast<int>(xl), 6, static_cast<int>(xl), 19);
p.save();
p.scale(1.0 / DisScale, 1.0);
switch (docUnitIndex)
{
case 2:
p.drawText(static_cast<int>((xl+qRound(2/DisScale)) * DisScale), 12,
QString::number(xl / iter2));
break;
case 3:
p.drawText(static_cast<int>((xl+qRound(2/DisScale)) * DisScale), 12,
QString::number(xl / iter));
break;
default:
p.drawText(static_cast<int>((xl+qRound(2/DisScale)) * DisScale), 12,
QString::number(xl / iter * 10));
break;
}
p.restore();
}
p.end();
CaliRuler->setPixmap(pm);
}
/*
QString Preferences::getSelectedGUILang( )
{
return langMgr.getAbbrevFromLang(guiLangCombo->currentText());
}
*/
void Preferences::setSelectedGUILang( const QString &newLang )
{
selectedGUILang=langMgr.getAbbrevFromLang(newLang);
}
 
void Preferences::setActionHistoryLength()
{
UndoManager::instance()->setHistoryLength(urSpinBox->value());
}
 
void Preferences::switchCMS(bool enable)
{
tabPDF->enableCMS(enable);
}
 
/*! Set selected item(=plugin) un/loadable (petr vanek) */
void Preferences::changePluginLoad(QListViewItem *item, const QPoint &, int column)
{
if (column != 3)
return;
if (item->text(3) == tr("Yes"))
{
item->setPixmap(3, loadIcon("DateiClos16.png"));
item->setText(3, tr("No"));
ap->pluginManager->pluginMap[item->text(4).toInt()].loadPlugin = false;
}
else
{
item->setPixmap(3, loadIcon("ok.png"));
item->setText(3, tr("Yes"));
ap->pluginManager->pluginMap[item->text(4).toInt()].loadPlugin = true;
}
}
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/Makefile.am
===================================================================
--- Scribus/scribus/Makefile.am (revision 1639)
+++ Scribus/scribus/Makefile.am (revision 1641)
@@ -1,14 +1,14 @@
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 extimageprops.cpp scrpalettebase.cpp pagesize.cpp pluginmanager.cpp fontreplacedialog.cpp tabpdfoptions.cpp tabcheckdoc.cpp checkDocument.cpp units.cpp scraction.cpp menumanager.cpp scmenu.cpp charselect.cpp filewatcher.cpp tabtools.cpp tabguides.cpp tabtypography.cpp arrowchooser.cpp polygonwidget.cpp prefsdialogbase.cpp fileloader.cpp gradienteditor.cpp gtgettext.cpp gtdialogs.cpp gtstyle.cpp gtframestyle.cpp gtparagraphstyle.cpp gtfont.cpp gtwriter.cpp gtaction.cpp gtmeasure.cpp undomanager.cpp undostate.cpp undoobject.cpp undogui.cpp prefsfile.cpp prefscontext.cpp prefsreader.cpp prefstable.cpp ioapi.c unzip.c fileunzip.cpp measurements.cpp langmgr.cpp 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 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 extimageprops.cpp scrpalettebase.cpp pagesize.cpp pluginmanager.cpp fontreplacedialog.cpp tabpdfoptions.cpp tabcheckdoc.cpp checkDocument.cpp units.cpp scraction.cpp menumanager.cpp scmenu.cpp charselect.cpp filewatcher.cpp tabtools.cpp tabguides.cpp tabtypography.cpp arrowchooser.cpp polygonwidget.cpp prefsdialogbase.cpp fileloader.cpp gradienteditor.cpp gtgettext.cpp gtdialogs.cpp gtstyle.cpp gtframestyle.cpp gtparagraphstyle.cpp gtfont.cpp gtwriter.cpp gtaction.cpp gtmeasure.cpp undomanager.cpp undostate.cpp undoobject.cpp undogui.cpp ioapi.c unzip.c fileunzip.cpp measurements.cpp langmgr.cpp 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
+scribus_SOURCES = about.cpp 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 scrpalettebase.cpp docitemattrprefs.ui pagesize.cpp pluginmanager.cpp prefs.cpp fontreplacedialog.cpp tabpdfoptions.cpp tabcheckdoc.cpp checkDocument.cpp units.cpp scraction.cpp menumanager.cpp scmenu.cpp charselect.cpp filewatcher.cpp tabtools.cpp tabguides.cpp tabtypography.cpp arrowchooser.cpp polygonwidget.cpp prefsdialogbase.cpp fileloader.cpp gradienteditor.cpp gtgettext.cpp gtdialogs.cpp gtstyle.cpp gtframestyle.cpp gtparagraphstyle.cpp gtfont.cpp gtwriter.cpp gtaction.cpp gtmeasure.cpp undomanager.cpp undostate.cpp undoobject.cpp undogui.cpp prefsfile.cpp prefscontext.cpp prefsreader.cpp prefstable.cpp ioapi.c unzip.c fileunzip.cpp measurements.cpp langmgr.cpp 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 extimageprops.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 pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
+SOURCES = about.cpp 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 scrpalettebase.cpp docitemattrprefs.ui pagesize.cpp pluginmanager.cpp fontreplacedialog.cpp tabpdfoptions.cpp tabcheckdoc.cpp checkDocument.cpp units.cpp scraction.cpp menumanager.cpp scmenu.cpp charselect.cpp filewatcher.cpp tabtools.cpp tabguides.cpp tabtypography.cpp arrowchooser.cpp polygonwidget.cpp prefsdialogbase.cpp prefs.cpp fileloader.cpp gradienteditor.cpp gtgettext.cpp gtdialogs.cpp gtstyle.cpp gtframestyle.cpp gtparagraphstyle.cpp gtfont.cpp gtwriter.cpp gtaction.cpp gtmeasure.cpp undomanager.cpp undostate.cpp undoobject.cpp undogui.cpp ioapi.c unzip.c fileunzip.cpp measurements.cpp langmgr.cpp 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 prefs.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 extimageprops.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 =
-SUBDIRS = dicts doc icons keysets libabout libpdf libpostscript libprefs manpages plugins po profiles qm templates
+SUBDIRS = dicts doc icons keysets libpdf libpostscript manpages plugins po profiles qm templates
-EXTRA_DIST = main.cpp scribus.cpp scribus.h scribusdoc.cpp scribusdoc.h scribusview.cpp scribusview.h newfile.h newfile.cpp pageitem.cpp pageitem.h hruler.cpp hruler.h vruler.cpp vruler.h colorm.cpp colorm.h query.cpp query.h dcolor.cpp dcolor.h cpalette.cpp cpalette.h mdup.cpp mdup.h docinfo.cpp docinfo.h reformdoc.cpp reformdoc.h serializer.cpp serializer.h align.cpp align.h fmitem.cpp fmitem.h fontprefs.cpp fontprefs.h missing.cpp missing.h tree.cpp tree.h pdfopts.cpp pdfopts.h inspage.cpp inspage.h delpages.cpp delpages.h movepage.cpp movepage.h mspinbox.cpp mspinbox.h helpbrowser.cpp helpbrowser.h icons5.h linkbutton.cpp linkbutton.h icons6.h linecombo.cpp linecombo.h scribusXml.cpp scribusXml.h cmykfw.cpp cmykfw.h cmykcolor.cpp cmykcolor.h util.cpp colorchart.cpp colorchart.h druck.cpp druck.h editformats.cpp editformats.h edit1format.cpp edit1format.h spalette.cpp spalette.h frameedit.cpp frameedit.h scfonts.cpp scfonts.h scrap.cpp scrap.h scfonts_ttf.cpp scfonts_ttf.h muster.cpp muster.h applytemplate.cpp applytemplate.h newtemp.cpp newtemp.h picstatus.cpp picstatus.h picsearch.cpp picsearch.h customfdialog.cpp customfdialog.h cmsprefs.cpp cmsprefs.h bookmwin.cpp bookmwin.h annot.cpp annot.h navigator.cpp navigator.h keymanager.cpp keymanager.h werktoolb.cpp werktoolb.h mpalette.h mpalette.cpp polyprops.cpp polyprops.h layers.cpp layers.h page.cpp page.h editor.cpp editor.h selfield.cpp selfield.h javadocs.cpp javadocs.h buttonicon.cpp buttonicon.h annota.cpp annota.h fpoint.cpp fpoint.h fpointarray.cpp fpointarray.h seiten.cpp seiten.h hysettings.cpp hysettings.h hnjalloc.c hnjalloc.h hyask.cpp hyask.h hyphen.c hyphen.h hyphenator.cpp hyphenator.h scribuswin.cpp scribuswin.h guidemanager.cpp guidemanager.h cupsoptions.cpp cupsoptions.h md5.c md5.h rc4.c rc4.h mergedoc.cpp mergedoc.h bookpalette.cpp bookpalette.h splash.h fontcombo.h scpainter.cpp scpainter.h vgradient.cpp vgradient.h story.cpp story.h autoform.cpp autoform.h fparser.cpp fparser.h tabmanager.cpp tabmanager.h search.cpp search.h styleselect.cpp styleselect.h alignselect.cpp alignselect.h shadebutton.cpp shadebutton.h pageselector.cpp color.h gtaction.cpp gtaction.h gtwriter.cpp gtwriter.h gtfont.cpp gtfont.h gtdialogs.cpp gtdialogs.h gtstyle.cpp gtstyle.h gtframestyle.cpp gtframestyle.h gtparagraphstyle.cpp gtparagraphstyle.h gtmeasure.cpp gtmeasure.h undomanager.cpp undomanager.h undostate.cpp undostate.h undoobject.cpp undoobject.h undogui.cpp undogui.h prefsfile.cpp prefsfile.h prefscontext.cpp prefscontext.h prefsreader.cpp prefsreader.h prefstable.cpp prefstable.h ioapi.c ioapi.h unzip.c unzip.h fileunzip.cpp fileunzip.h langmgr.h langmgr.cpp polygonwidget.cpp polygonwidget.h fileloader.cpp fileloader.h prefsdialogbase.cpp prefsdialogbase.h gradienteditor.cpp gradienteditor.h pageselector.h insertTable.cpp insertTable.h tabtools.cpp tabtools.h tabguides.cpp tabguides.h tabtypography.cpp tabtypography.h tabcheckdoc.cpp tabcheckdoc.h tabpdfoptions.cpp tabpdfoptions.h arrowchooser.cpp arrowchooser.h charselect.cpp charselect.h fontreplacedialog.cpp fontreplacedialog.h filewatcher.cpp filewatcher.h checkDocument.cpp checkDocument.h art_kmisc.c art_kmisc.h art_render_misc.c art_render_misc.h art_render_pattern.c art_render_pattern.h art_rgb.c art_rgb.h art_rgb_affine_private.c art_rgb_affine_private.h art_rgb_svp.c art_rgb_svp.h art_rgba_affine.c art_rgba_affine.h gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-private.h gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlib.h gdk-pixbuf-xlibrgb.c gdk-pixbuf-xlibrgb.h LoremIpsum.txt rgbscribus.txt rgbscribusgreys.txt rgbscribusgnome.txt rgbsvg.txt units.h units.cpp scribusstructs.h scraction.cpp scraction.h menumanager.cpp menumanager.h scmenu.cpp scmenu.h scrpalettebase.cpp scrpalettebase.h pluginmanager.cpp pluginmanager.h extimageprops.cpp extimageprops.h pagesize.cpp pagesize.h
+EXTRA_DIST = about.cpp about.h main.cpp scribus.cpp scribus.h scribusdoc.cpp scribusdoc.h scribusview.cpp scribusview.h newfile.h newfile.cpp pageitem.cpp pageitem.h hruler.cpp hruler.h vruler.cpp vruler.h colorm.cpp colorm.h query.cpp query.h dcolor.cpp dcolor.h cpalette.cpp cpalette.h mdup.cpp mdup.h docinfo.cpp docinfo.h reformdoc.cpp reformdoc.h serializer.cpp serializer.h align.cpp align.h fmitem.cpp fmitem.h fontprefs.cpp fontprefs.h missing.cpp missing.h tree.cpp tree.h pdfopts.cpp pdfopts.h inspage.cpp inspage.h delpages.cpp delpages.h movepage.cpp movepage.h mspinbox.cpp mspinbox.h helpbrowser.cpp helpbrowser.h icons5.h linkbutton.cpp linkbutton.h icons6.h linecombo.cpp linecombo.h scribusXml.cpp scribusXml.h cmykfw.cpp cmykfw.h cmykcolor.cpp cmykcolor.h util.cpp colorchart.cpp colorchart.h druck.cpp druck.h editformats.cpp editformats.h edit1format.cpp edit1format.h spalette.cpp spalette.h frameedit.cpp frameedit.h scfonts.cpp scfonts.h scrap.cpp scrap.h scfonts_ttf.cpp scfonts_ttf.h muster.cpp muster.h applytemplate.cpp applytemplate.h newtemp.cpp newtemp.h picstatus.cpp picstatus.h picsearch.cpp picsearch.h customfdialog.cpp customfdialog.h cmsprefs.cpp cmsprefs.h bookmwin.cpp bookmwin.h annot.cpp annot.h navigator.cpp navigator.h keymanager.cpp keymanager.h werktoolb.cpp werktoolb.h mpalette.h mpalette.cpp polyprops.cpp polyprops.h layers.cpp layers.h page.cpp page.h editor.cpp editor.h selfield.cpp selfield.h javadocs.cpp javadocs.h buttonicon.cpp buttonicon.h annota.cpp annota.h fpoint.cpp fpoint.h fpointarray.cpp fpointarray.h seiten.cpp seiten.h hysettings.cpp hysettings.h hnjalloc.c hnjalloc.h hyask.cpp hyask.h hyphen.c hyphen.h hyphenator.cpp hyphenator.h scribuswin.cpp scribuswin.h guidemanager.cpp guidemanager.h cupsoptions.cpp cupsoptions.h md5.c md5.h rc4.c rc4.h mergedoc.cpp mergedoc.h bookpalette.cpp bookpalette.h splash.h fontcombo.h scpainter.cpp scpainter.h vgradient.cpp vgradient.h story.cpp story.h autoform.cpp autoform.h fparser.cpp fparser.h tabmanager.cpp tabmanager.h search.cpp search.h styleselect.cpp styleselect.h alignselect.cpp alignselect.h shadebutton.cpp shadebutton.h pageselector.cpp color.h gtaction.cpp gtaction.h gtwriter.cpp gtwriter.h gtfont.cpp gtfont.h gtdialogs.cpp gtdialogs.h gtstyle.cpp gtstyle.h gtframestyle.cpp gtframestyle.h gtparagraphstyle.cpp gtparagraphstyle.h gtmeasure.cpp gtmeasure.h undomanager.cpp undomanager.h undostate.cpp undostate.h undoobject.cpp undoobject.h undogui.cpp undogui.h prefsfile.cpp prefsfile.h prefscontext.cpp prefscontext.h prefsreader.cpp prefsreader.h prefstable.cpp prefstable.h prefs.cpp prefs.h ioapi.c ioapi.h unzip.c unzip.h fileunzip.cpp fileunzip.h langmgr.h langmgr.cpp polygonwidget.cpp polygonwidget.h fileloader.cpp fileloader.h prefsdialogbase.cpp prefsdialogbase.h gradienteditor.cpp gradienteditor.h pageselector.h insertTable.cpp insertTable.h tabtools.cpp tabtools.h tabguides.cpp tabguides.h tabtypography.cpp tabtypography.h tabcheckdoc.cpp tabcheckdoc.h tabpdfoptions.cpp tabpdfoptions.h arrowchooser.cpp arrowchooser.h charselect.cpp charselect.h fontreplacedialog.cpp fontreplacedialog.h filewatcher.cpp filewatcher.h checkDocument.cpp checkDocument.h art_kmisc.c art_kmisc.h art_render_misc.c art_render_misc.h art_render_pattern.c art_render_pattern.h art_rgb.c art_rgb.h art_rgb_affine_private.c art_rgb_affine_private.h art_rgb_svp.c art_rgb_svp.h art_rgba_affine.c art_rgba_affine.h gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-private.h gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlib.h gdk-pixbuf-xlibrgb.c gdk-pixbuf-xlibrgb.h LoremIpsum.txt rgbscribus.txt rgbscribusgreys.txt rgbscribusgnome.txt rgbsvg.txt units.h units.cpp scribusstructs.h scraction.cpp scraction.h menumanager.cpp menumanager.h scmenu.cpp scmenu.h scrpalettebase.cpp scrpalettebase.h docitemattrui.ui pluginmanager.cpp pluginmanager.h extimageprops.cpp extimageprops.h pagesize.cpp pagesize.h
install-data-local:
$(mkinstalldirs) $(prefix)/share/scribus/samples/
@@ -22,6 +22,7 @@
$(mkinstalldirs) $(libdir)/scribus/
$(INSTALL_DATA) $(srcdir)/rgbscribus.txt $(libdir)/scribus/rgbscribus.txt
$(mkinstalldirs) $(prefix)/include/scribus/
+ $(INSTALL_DATA) $(srcdir)/about.h $(prefix)/include/scribus/about.h
$(INSTALL_DATA) $(srcdir)/scribus.h $(prefix)/include/scribus/scribus.h
$(INSTALL_DATA) $(srcdir)/styleselect.h $(prefix)/include/scribus/styleselect.h
$(INSTALL_DATA) $(srcdir)/alignselect.h $(prefix)/include/scribus/alignselect.h
/branches/Version13x/Scribus/scribus/about.cpp
0,0 → 1,294
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "about.h"
#include "about.moc"
#include <qpixmap.h>
#include <qtextstream.h>
#include <qtooltip.h>
 
#ifdef _MSC_VER
#if (_MSC_VER >= 1200)
#include "win-config.h"
#endif
#else
#include "config.h"
#endif
 
extern QPixmap loadIcon(QString nam);
 
/*!
\fn About::About( QWidget* parent )
\author Franz Schmid
\date
\brief Constructor for About dialog box
\param parent QWidget pointer to parent window
\retval About dialog
*/
About::About( QWidget* parent ) : QDialog( parent, "About", true, 0 )
{
setCaption( tr("About Scribus %1").arg(VERSION) );
setIcon(loadIcon("AppIcon.png"));
aboutLayout = new QVBoxLayout( this );
aboutLayout->setSpacing( 6 );
aboutLayout->setMargin( 10 );
tabWidget2 = new QTabWidget( this, "TabWidget2" );
tabWidget2->setMinimumSize( QSize( 438, 258 ) );
tab = new QWidget( tabWidget2, "tab" );
tabLayout1 = new QVBoxLayout( tab );
tabLayout1->setSpacing( 6 );
tabLayout1->setMargin( 15 );
pixmapLabel1 = new QLabel( tab, "PixmapLabel1" );
pixmapLabel1->setPixmap(loadIcon("scribus_logo.jpg"));
pixmapLabel1->setAlignment(Qt::AlignCenter);
tabLayout1->addWidget( pixmapLabel1 );
buildID = new QLabel( tab, "BB" );
buildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg("6").arg("March").arg("2005");
#ifdef HAVE_CMS
bu += "C";
#else
bu += "*";
#endif
bu += "-";
#ifdef HAVE_CUPS
bu += "C";
#else
bu += "*";
#endif
bu += "-";
#ifdef HAVE_TIFF
bu += "T";
#else
bu += "*";
#endif
bu += "-";
#ifdef HAVE_FONTCONFIG
bu += "F";
#else
bu += "*";
#endif
 
buildID->setText( tr("Scribus Version %1\n%2 %3").arg(VERSION).arg( tr("Build-ID:")).arg(bu));
tabLayout1->addWidget( buildID );
tabWidget2->insertTab( tab, tr( "&About" ) );
tab_2 = new QWidget( tabWidget2, "tab_2" );
tabLayout = new QHBoxLayout( tab_2 );
tabLayout->setSpacing( 6 );
tabLayout->setMargin( 10 );
textView1 = new QTextView( tab_2, "TextView1" );
textView1->setText(QString::fromUtf8("<table><tr><td><b>" + tr("Development Team:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Franz Schmid</td><td>Franz.Schmid@altmuehlnet.de</td></tr>" +
"<tr><td>Peter Linnell</td><td>scribusdocs@atlantictechsolutions.com</td></tr>" +
"<tr><td>Paul F. Johnson</td><td>paul@all-the-johnsons.co.uk</td></tr>" +
"<tr><td>Craig Bradney</td><td>cbradney@zip.com.au</td></tr>" +
"<tr><td>Petr Vaněk</td><td>petr@yarpen.cz</td></tr>" +
"<tr><td>Riku Leino</td><td>tsoots@gmail.com</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Contributions from:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Niyam Bhushan</td><td></td></tr>" +
"<tr><td>Martin Costabel</td><td></td></tr>" +
"<tr><td>Steve Callcott</td><td>stotte@ntlworld.com</td></tr>" +
"<tr><td>Frank Everdij</td><td>f.everdij@citg.tudelft.nl</td></tr>" +
"<tr><td>S. Hakim Hamdani</td><td>hakimoto@eroteme.org</td></tr>" +
"<tr><td>Maciej Hański</td><td>m.hanski@gmx.at</td></tr>" +
"<tr><td>Oleksandr Moskalenko</td><td>malex@tagancha.org</td></tr>" +
"<tr><td>Marti Maria</td><td></td></tr>" +
"<tr><td>Alexandre Prokoudine</td><td>techwriter@land.ru</td></tr>"
"<tr><td>Alessandro Rimoldi</td><td>http://ideale.ch/contact</td></tr>" +
"<tr><td>Craig Ringer</td><td></td></tr>" +
"<tr><td>Alastair Robinson</td><td>blackfive@fakenhamweb.co.uk</td></tr>" +
"<tr><td>Johannes Rüschel</td><td>jo.rueschel@gmx.de</td></tr>" +
"<tr><td>Jean-Jacques Sarton</td><td>jj.sarton@t-online.de</td></tr>" +
"<tr><td>Christian Töpp</td><td>mr-ct@gmx.de</td></tr>" +
"<tr><td></td><td> </td></tr>" +
#ifdef _MSC_VER
#if (_MSC_VER >= 1200)
"<tr><td><b>" + tr("Windows port:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Paul F. Johnson</td><td>paul@all-the-johnsons.co.uk</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
#endif
#endif
"<tr><td><b>" + tr("Official Documentation:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Peter Linnell</td><td>scribusdocs@atlantictechsolutions.com</td></tr>" +
"<tr><td>Craig Bradney</td><td>cbradney@zip.com.au</td></tr>" +
"<tr><td>Frédéric Dubuy</td><td>effediwhy@gmail.com</td></tr>" +
"<tr><td>Johannes Rüschel</td><td>jo.rueschel@gmx.de</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Other Documentation:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Yves Ceccone</td><td>yves@yeccoe.org</td></tr>" +
"<tr><td>Holger Reibold</td><td>http://www.bomots.de/scribus/</td></tr>" +
"<tr><td>Thomas Zastrow</td><td>webmaster@thomas-zastrow.de</td></tr></table>"));
textView1->setTextFormat( QTextView::RichText );
tabLayout->addWidget( textView1 );
tabWidget2->insertTab( tab_2, tr( "A&uthors" ) );
tab_3 = new QWidget( tabWidget2, "tab_3" );
tabLayout_2 = new QHBoxLayout( tab_3 );
tabLayout_2->setSpacing( 6 );
tabLayout_2->setMargin( 10 );
textView2 = new QTextView( tab_3, "TextView1_2" );
textView2->setText(QString::fromUtf8( "<table><tr><td><b><i>" + tr("Official Translations and Translators:").utf8() + "</i></b></td><td></td></tr>" +
"<tr><td><b>" + tr("Afrikaans:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Kobus Wolvaardt</td><td>kobuswolf@diewereld.co.za</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Catalan:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Xavier Sala Pujolar</td><td>utrescu@xaviersala.net</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Czech:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Petr Vaněk</td><td>petr@yarpen.cz</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Danish:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Morten Langlo</td><td>mlanglo@mail.dk</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Dutch:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Wilbert Berendsen</td><td>wbsoft@xs4all.nl</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("English (British):").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Craig Bradney</td><td>cbradney@zip.com.au</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Esperanto:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Pier Luigi Cinquantini</td><td>plcinquantini@katamail.com</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Finnish:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Riku Leino</td><td>tsoots@gmail.com</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("French:").utf8() + "</b></td><td> </td>" +
"<tr><td>Nicolas Boos</td><td>nicolas.boos@wanadoo.fr</td></tr>" +
"<tr><td>Louis Desjardins</td><td>louis_desjardins@mardigrafe.com</td></tr>" +
"<tr><td>Frédéric Dubuy</td><td>effediwhy@gmail.com</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("German:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Johannes Rüschel</td><td>jo.rueschel@gmx.de</td></tr>" +
"<tr><td>Franz Schmid</td><td>Franz.Schmid@altmuehlnet.de</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Italian:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Pier Luigi Cinquantini</td><td>plcinquantini@katamail.com</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Korean:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Kitae Kim</td><td>neeum@yahoo.com</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Norwegian:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Klaus Ade Johnstad</td><td>klaus@inout.no</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Polish:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Maciej Hański</td><td>m.hanski@gmx.at</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Portugese (Brazilian):").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Ludi Maciel</td><td>iludi@uol.com.br</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Russian:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Alexandre Prokoudine</td><td>techwriter@land.ru</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Serbian:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Bojan Božovi&#263;</td><td>bole89@infosky.net</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Slovak:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Zdenko Podobn&yacute;</td><td>zdpo@mailbox.sk</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Slovenian:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Boštjan Špetič</td><td>igzebedze@kiberpipa.org</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Spanish:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Josep Febrer</td><td>josep@linuxmail.org</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Swedish:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Göran Bondeson</td><td>goran@bondeson.net</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Ukrainian:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Oleksandr Moskalenko</td><td>malex@tagancha.org</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Welsh:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Kevin Donnelly</td><td>kevin@dotmon.com</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"</table>" +
 
"<table><tr><td><b><i>" + tr("Previous Translation Contributors:").utf8() + "</i></b></td><td></td></tr>" +
"<tr><td><b>" + tr("Basque:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Pablo Saratxaga</td><td>pablo@mandrakesoft.com</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Brazilian:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Celio Santos</td><td>celio@electronic.srv.br</td></tr>" +
"<tr><td>Cezar de Souza Marson Nido</td><td>cesar@electronic.srv.br</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Bulgarian:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Vasko Tomanov</td><td>vasko@web.bg</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("English (British):").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Paul F. Johnson</td><td>paul@all-the-johnsons.co.uk</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("French:").utf8() + "</b></td><td> </td>" +
"<tr><td>Michel Briand</td><td>michelbriand@free.fr</td></tr>" +
"<tr><td>Yves Ceccone</td><td>yves@yeccoe.org</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Galician:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Xose Calvo</td><td>xosecalvo@galizaweb.net</td></tr>" +
"<tr><td>Manuel Anxo Rei</td><td>manxopar@avogaciagalega.org</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Hungarian:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Giovanni Biczó</td><td>gbiczo@freestart.hu</td></tr>" +
"<tr><td>Bence Nagy</td><td>scribus@tipogral.hu</td></tr>" +
"<tr><td>Zoltán Böszörményi</td><td>zboszor@freemail.hu</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Lithuanian:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Aivaras Kirejevas</td><td>kiras@mail.lt</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Norwegian:").utf8() + "</b></td><td></td></tr>" +
"<tr><td>Axel Bojer</td><td>axelb@skolelinux.no</td></tr>" +
"<tr><td>Johannes Wilm</td><td>j@indymedia.no</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Turkish:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Erkan Kaplan</td><td>Selamsana@uni.de</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Ukrainian:").utf8() + "</b></td><td> </td></tr>" +
"<tr><td>Sergiy Kudryk</td><td>kudryk@yahoo.com</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"</table>"));
textView2->setTextFormat( QTextView::RichText );
tabLayout_2->addWidget( textView2 );
tabWidget2->insertTab( tab_3, tr( "&Translations" ) );
 
// online tab (03/04/2004 petr vanek)
tab_4 = new QWidget( tabWidget2, "tab_4" );
textView4 = new QTextView( tab_4, "TextView4" );
textView4->setText(QString::fromUtf8(
"<table><tr><td><b>" + tr("Homepage").utf8() + "</b></td><td></td></tr>" +
"<tr><td colspan=\"2\"><p><a href=\"http://www.scribus.net\">http://www.scribus.net</a></p></td></tr>" +
"<tr><td><b>" + tr("Online Reference").utf8() + "</b></td><td></td></tr>" +
"<tr><td colspan=\"2\"><p><a href=\"http://docs.scribus.net\">http://docs.scribus.net</a></p></td></tr>" +
"<tr><td><b>" + tr("Bugs and Feature Requests").utf8() + "</b></td><td></td></tr>" +
"<tr><td colspan=\"2\"><p><a href=\"http://bugs.scribus.net\">http://bugs.scribus.net</a></p></td></tr>" +
"<tr><td><b>" + tr("Mailing List").utf8() + "</b></td><td></td></tr>" +
"<tr><td colspan=\"2\"><p><a href=\"http://nashi.altmuehlnet.de/mailman/listinfo/scribus\">http://nashi.altmuehlnet.de/mailman/listinfo/scribus</a></p></td></tr>" +
"</table>"
));
textView4->setTextFormat( QTextView::RichText );
tabLayout_4 = new QHBoxLayout( tab_4 );
tabLayout_4->setSpacing( 6 );
tabLayout_4->setMargin( 10 );
tabLayout_4->addWidget( textView4 );
tabWidget2->insertTab( tab_4, tr( "&Online" ) );
aboutLayout->addWidget( tabWidget2 );
layout2 = new QHBoxLayout;
layout2->setSpacing( 6 );
layout2->setMargin( 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout2->addItem( spacer );
okButton = new QPushButton( tr( "&Close" ), this, "PushButton1" );
okButton->setDefault( true );
layout2->addWidget( okButton );
aboutLayout->addLayout( layout2 );
setMaximumSize(sizeHint());
 
//tooltips
QToolTip::add( buildID, tr( "This panel shows the version, build date and\n compiled in library support in Scribus\nThe C-C-T-F equates to C=littlecms C=CUPS T=TIFF support F=Fontconfig support.\nMissing library support is indicated by a *" ) );
// signals and slots connections
connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
}
 
 
 
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/reformdoc.cpp
===================================================================
--- Scribus/scribus/reformdoc.cpp (revision 1639)
+++ Scribus/scribus/reformdoc.cpp (revision 1641)
@@ -16,6 +16,7 @@
#include "fontprefs.h"
#include "units.h"
#include "pagesize.h"
+#include "docitemattrprefs.h"
extern QPixmap loadIcon(QString nam);
extern double UmReFaktor;
@@ -316,12 +317,16 @@
addItem( tr("Fonts"), loadIcon("font.png"), tabFonts);
tabDocChecker = new TabCheckDoc( prefsWidgets, doc->checkerProfiles, doc->curCheckProfile);
- addItem( tr("Doc-Checker"), loadIcon("checkdoc.png"), tabDocChecker);
+ addItem( tr("Document Checker"), loadIcon("checkdoc.png"), tabDocChecker);
tabPDF = new TabPDFOptions( prefsWidgets, &doc->PDF_Options, ap->Prefs.AvailFonts,
&ap->PDFXProfiles, doc->UsedFonts, doc->PDF_Options.PresentVals,
UmReFaktor, ein, doc->PageH, doc->PageB, 0 );
addItem( tr("PDF Export"), loadIcon("acroread.png"), tabPDF);
+
+ tabDocItemAttributes = new DocumentItemAttributes( prefsWidgets);
+ tabDocItemAttributes->setup(&doc->docItemAttributes);
+ addItem( tr("Document Item Attributes"), loadIcon("docattributes.png"), tabDocItemAttributes);
int cmsTab = 0;
if (CMSavail)
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
239,6 → 239,9
PDF_Options.Permissions = prefsData->PDF_Options.Permissions;
PDF_Options.UseLPI = prefsData->PDF_Options.UseLPI;
PDF_Options.LPISettings = prefsData->PDF_Options.LPISettings;
docItemAttributes = prefsData->defaultItemAttributes;
RePos = false;
BookMarks.clear();
OldBM = false;
/branches/Version13x/Scribus/scribus/about.h
0,0 → 1,42
#ifndef ABOUT_H
#define ABOUT_H
 
#include <qdialog.h>
#include <qlabel.h>
#include <qtabwidget.h>
#include <qwidget.h>
#include <qtextview.h>
#include <qpushbutton.h>
#include <qlayout.h>
 
class About : public QDialog
{
Q_OBJECT
 
public:
About( QWidget* parent );
~About() {};
QLabel* pixmapLabel1;
QLabel* buildID;
QPushButton* okButton;
QTabWidget* tabWidget2;
QWidget* tab;
QWidget* tab_2;
QWidget* tab_3;
QWidget* tab_4;
QTextView* textView1;
QTextView* textView2;
QTextView* textView4;
 
protected:
QVBoxLayout* aboutLayout;
QHBoxLayout* tabLayout;
QVBoxLayout* tabLayout1;
QHBoxLayout* tabLayout_2;
QHBoxLayout* tabLayout_4;
QHBoxLayout* layout2;
 
};
 
#endif // ABOUT_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/prefs.h
===================================================================
--- Scribus/scribus/prefs.h (nonexistent)
+++ Scribus/scribus/prefs.h (revision 1641)
@@ -0,0 +1,252 @@
+#ifndef PREFS_H
+#define PREFS_H
+
+#include <qdialog.h>
+#include <qbuttongroup.h>
+#include <qcombobox.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qspinbox.h>
+#include <qwidget.h>
+#include <qlayout.h>
+#include <qtoolbutton.h>
+#include <qframe.h>
+#include <qcheckbox.h>
+#include <qwidgetstack.h>
+#include <qpixmap.h>
+#include <qslider.h>
+#include <qlineedit.h>
+#include <qfiledialog.h>
+
+class QListView;
+
+#include "scribusstructs.h"
+
+#include "mspinbox.h"
+#include "scribus.h"
+#include "prefsdialogbase.h"
+class TabTypograpy;
+class HySettings;
+class CMSPrefs;
+class KeyManager;
+class TabGuides;
+class TabTools;
+class TabCheckDoc;
+class TabPDFOptions;
+class FontPrefs;
+class DocumentItemAttributes;
+
+#include "langmgr.h"
+
+class Preferences : public PrefsDialogBase
+{
+ Q_OBJECT
+
+public:
+ Preferences( QWidget* parent, ApplicationPrefs *prefsData);
+ ~Preferences();
+
+ QString prefsPageSizeName;
+ //const QString getSelectedGUILang( void );
+ QString selectedGUILang;
+ void drawRuler();
+
+ QWidget* tab;
+ QLabel* TextLabel1_2;
+ QSpinBox* SpinBox3;
+ QSpinBox* Recen;
+ QButtonGroup* ButtonGroup1;
+ QLabel* guiLangLabel;
+ QLabel* TextGstil;
+ QLabel* TextGstil2;
+ QSpinBox* GFsize;
+ QComboBox* guiLangCombo;
+ QComboBox* GUICombo;
+ QComboBox* UnitCombo;
+ QLabel* unitComboText;
+ QGroupBox* GroupBox200;
+ QLabel* PfadText;
+ QLineEdit* Docs;
+ QToolButton* FileC;
+ QLabel* PfadText2;
+ QLineEdit* ProPfad;
+ QToolButton* FileC2;
+ QLabel* PfadText3;
+ QLineEdit* ScriptPfad;
+ QToolButton* FileC3;
+ QLabel* PfadText4;
+ QLineEdit* TemplateDir;
+ QToolButton* FileC4;
+
+ TabGuides* tabGuides;
+
+ QLabel* TextLabel4c;
+
+ TabTypograpy* tabTypo;
+
+ QWidget* tabView;
+ QButtonGroup* pageBackground;
+ QLabel* textLabel9;
+ QCheckBox* checkLink;
+ QCheckBox* checkFrame;
+ QCheckBox* checkPictures;
+ QPushButton* backColor;
+ QCheckBox* checkUnprintable;
+ QGroupBox* groupScratch;
+ MSpinBox* topScratch;
+ MSpinBox* bottomScratch;
+ MSpinBox* leftScratch;
+ MSpinBox* rightScratch;
+ QLabel* TextLabel7s;
+ QLabel* TextLabel5s;
+ QLabel* Linkss;
+ QLabel* Rechtss;
+
+ TabTools* tabTools;
+
+ HySettings* tabHyphenator;
+ FontPrefs* tabFonts;
+ TabCheckDoc* tabDocChecker;
+ CMSPrefs* tabColorManagement;
+ TabPDFOptions* tabPDF;
+ DocumentItemAttributes* tabDefaultItemAttributes;
+ KeyManager* tabKeys;
+
+ QLabel* textLabelP;
+ QWidget* tab_5;
+ QGroupBox* saving;
+ QCheckBox* SaveAtQuit;
+ QGroupBox* preview;
+ QComboBox* PreviewSize;
+ QWidget* tab_7;
+ QButtonGroup* GroupSize;
+ QLabel* GZText2;
+ QComboBox* GZComboF;
+ QComboBox* GZComboO;
+ QLabel* GZText1;
+ QLabel* GZText3;
+ QLabel* GZText4;
+ MSpinBox* pageWidth;
+ MSpinBox* pageHeight;
+ QCheckBox* facingPages;
+ QCheckBox* Linkszuerst;
+ QGroupBox* GroupRand;
+ QLabel* GRText3;
+ MSpinBox* TopR;
+ MSpinBox* BottomR;
+ MSpinBox* RightR;
+ MSpinBox* LeftR;
+ QLabel* GRText2;
+ QLabel* GRText1;
+ QLabel* GRText4;
+ QGroupBox* GroupAS;
+ QCheckBox* ASon;
+ QLabel* ASText;
+ QSpinBox* ASTime;
+ QGroupBox* urGroup;
+ QLabel* urLabel;
+ QSpinBox* urSpinBox;
+ QGroupBox* CaliGroup;
+ QLabel* CaliText;
+ QLabel* CaliRuler;
+ QSlider* CaliSlider;
+ QLabel* CaliAnz;
+ QWidget* ExtTool;
+ QGroupBox* groupGS;
+ QLabel* GSText;
+ QLineEdit* GSName;
+ QCheckBox* GSantiText;
+ QCheckBox* GSantiGraph;
+ QGroupBox* groupGimp;
+ QLabel* GimpText;
+ QLineEdit* GimpName;
+ QWidget* Misc;
+ QGroupBox* groupPrint;
+ QCheckBox* ClipMarg;
+ QCheckBox* DoGCR;
+ QCheckBox* AskForSubs;
+ // plugin manager
+ QWidget* pluginManagerWidget;
+ QGroupBox* plugGroupBox;
+ QListView* pluginsList;
+ QLabel* pluginWarning;
+
+ double Umrech;
+ double PFactor;
+ double Pagebr;
+ double Pageho;
+ double RandT;
+ double RandB;
+ double RandL;
+ double RandR;
+ int docUnitIndex;
+ double DisScale;
+ ScribusApp *ap;
+ QColor colorPaper;
+
+
+public slots:
+ virtual void changePaperColor();
+ void changeDocs();
+ void changeProfs();
+ void changeScripts();
+ void changeTemplates();
+ void setDS();
+ void setPageWidth(int v);
+ void setPageHeight(int v);
+ void setTop(int v);
+ void setBottom(int v);
+ void setLeft(int v);
+ void setRight(int v);
+ void setSize(const QString &);
+ void setOrien(int ori);
+ void unitChange();
+ void setDisScale();
+ void switchCMS(bool enable);
+
+protected:
+ QGridLayout* tabLayout;
+ QGridLayout* ButtonGroup1Layout;
+ QGridLayout* GroupBox200Layout;
+ QGridLayout* tabLayout_5;
+ QHBoxLayout* savingLayout;
+ QHBoxLayout* previewLayout;
+ QHBoxLayout* Layout3;
+ QHBoxLayout* tabLayout_7;
+ QVBoxLayout* Layout21;
+ QVBoxLayout* GroupSizeLayout;
+ QGridLayout* Layout6;
+ QHBoxLayout* Layout5_2;
+ QHBoxLayout* Layout8;
+ QGridLayout* GroupRandLayout;
+ QGridLayout* GroupASLayout;
+ QVBoxLayout* CaliGroupLayout;
+ QHBoxLayout* layout15ca;
+ QVBoxLayout* ExtToolLayout;
+ QVBoxLayout* groupGSLayout;
+ QHBoxLayout* GSlayout;
+ QHBoxLayout* groupGimpLayout;
+ QVBoxLayout* MiscLayout;
+ QVBoxLayout* groupPrintLayout;
+ QVBoxLayout* tabViewLayout;
+ QVBoxLayout* pageBackgroundLayout;
+ QHBoxLayout* layout10;
+ QHBoxLayout* groupScratchLayout;
+ QGridLayout* Layout4s;
+ // plugin manager
+ QVBoxLayout* plugLayout1;
+ QVBoxLayout* pluginMainLayout;
+ QGridLayout* plugGroupBoxLayout;
+
+private slots:
+ void setSelectedGUILang( const QString &newLang );
+ void setActionHistoryLength();
+ void changePluginLoad(QListViewItem *, const QPoint &, int);
+
+private:
+ LanguageManager langMgr;
+};
+
+#endif // PREFS_H
/Scribus/scribus/prefs.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/docitemattrprefs.ui.h
===================================================================
--- Scribus/scribus/docitemattrprefs.ui.h (nonexistent)
+++ Scribus/scribus/docitemattrprefs.ui.h (revision 1641)
@@ -0,0 +1,74 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you want to add, delete, or rename functions or slots, use
+** Qt Designer to update this file, preserving your code.
+**
+** You should not define a constructor or destructor in this file.
+** Instead, write your code in functions called init() and destroy().
+** These will automatically be called by the form's constructor and
+** destructor.
+*****************************************************************************/
+
+void DocumentItemAttributes::init()
+{
+ //blah
+}
+
+void DocumentItemAttributes::destroy()
+{
+ //blah2
+}
+
+
+void DocumentItemAttributes::setup(QMap<int, ObjectAttribute> *docItemAttrs)
+{
+ localAttributes=*docItemAttrs;
+ attributesTable->setNumRows(docItemAttrs->count());
+ for(QMap<int, ObjectAttribute>::Iterator it = docItemAttrs->begin(); it!= docItemAttrs->end(); ++it)
+ {
+ uint i=0;
+ QTableItem *item = new QTableItem(attributesTable, QTableItem::WhenCurrent, it.data().name);
+ attributesTable->setItem(it.key(), i++, item);
+ QTableItem *item1 = new QTableItem(attributesTable, QTableItem::WhenCurrent, it.data().type);
+ attributesTable->setItem(it.key(), i++, item1);
+ QTableItem *item2 = new QTableItem(attributesTable, QTableItem::WhenCurrent, it.data().value);
+ attributesTable->setItem(it.key(), i++, item2);
+ QTableItem *item3 = new QTableItem(attributesTable, QTableItem::WhenCurrent, it.data().parameter);
+ attributesTable->setItem(it.key(), i++, item3);
+
+
+ attributesTable->verticalHeader()->setLabel(it.key(), QString("%1").arg(it.key()));
+ }
+}
+
+
+QMap<int, ObjectAttribute> DocumentItemAttributes::getNewAttributes()
+{
+ return localAttributes;
+}
+
+
+void DocumentItemAttributes::tableItemChanged( int row, int col )
+{
+ if (localAttributes.contains(row))
+ {
+ switch (col)
+ {
+ case 0:
+ localAttributes[row].name=attributesTable->text(row, col);
+ break;
+ case 1:
+ localAttributes[row].type=attributesTable->text(row, col);
+ break;
+ case 2:
+ localAttributes[row].value=attributesTable->text(row, col);
+ break;
+ case 3:
+ localAttributes[row].parameter=attributesTable->text(row, col);
+ break;
+ default:
+ break;
+ }
+ }
+}
/Scribus/scribus/docitemattrprefs.ui.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/scribusstructs.h
===================================================================
--- Scribus/scribus/scribusstructs.h (revision 1639)
+++ Scribus/scribus/scribusstructs.h (revision 1641)
@@ -41,6 +41,13 @@
QString ch;
};
+struct ObjectAttribute {
+ QString name;
+ QString type;
+ QString value;
+ QString parameter;
+};
+
struct CopyPasteBuffer
{
PageItem::ItemType PType;
@@ -446,6 +453,7 @@
windowPrefs mainWinSettings;
PDFOptions PDF_Options;
+ QMap<int, ObjectAttribute> defaultItemAttributes;
bool SepalT;
bool SepalN;
int PSize;
@@ -561,4 +569,6 @@
EditGradientVectors
};
+
+
#endif
/branches/Version13x/Scribus/scribus/reformdoc.h
28,6 → 28,7
class TabCheckDoc;
class TabPDFOptions;
class FontPrefs;
class DocumentItemAttributes;
 
class ReformDoc : public PrefsDialogBase
{
91,7 → 92,7
QLabel* textLabel1m;
QSpinBox* autoSaveTime;
QComboBox* unitCombo;
 
DocumentItemAttributes* tabDocItemAttributes;
ScribusApp *ap;
ScribusDoc* docc;
int einheit;
/branches/Version13x/Scribus/scribus/scribusdoc.h
262,6 → 262,8
QTimer *CurTimer;
QMap<int, errorCodes> docItemErrors;
QMap<int, errorCodes> masterItemErrors;
//Attributes to be applied to frames
QMap<int, ObjectAttribute> docItemAttributes;
};
 
#endif
/branches/Version13x/Scribus/scribus/scribus.cpp
52,7 → 52,7
#include "align.h"
#include "fmitem.h"
#include "fontprefs.h"
#include "libprefs/prefs.h"
#include "prefs.h"
#include "prefstable.h"
#include "pdfopts.h"
#include "inspage.h"
60,7 → 60,7
#include "movepage.h"
#include "helpbrowser.h"
#include "scribusXml.h"
#include "libabout/about.h"
#include "about.h"
#include "libpostscript/pslib.h"
#include "druck.h"
#include "editformats.h"
92,6 → 92,7
#include "checkDocument.h"
#include "tabcheckdoc.h"
#include "tabpdfoptions.h"
#include "docitemattrprefs.h"
#ifdef _MSC_VER
#if (_MSC_VER >= 1200)
#include "win-config.h"
600,6 → 601,23
Prefs.PDF_Options.Permissions = -4;
Prefs.PDF_Options.UseLPI = false;
Prefs.PDF_Options.LPISettings.clear();
//Attribute setup
ObjectAttribute objattr;
objattr.name="Name";
objattr.type="String";
objattr.value="";
objattr.parameter="";
Prefs.defaultItemAttributes.clear();
Prefs.defaultItemAttributes.insert(0,objattr);
objattr.name="Author";
Prefs.defaultItemAttributes.insert(1,objattr);
objattr.name="Title";
Prefs.defaultItemAttributes.insert(2,objattr);
objattr.name="Table of Contents Entry";
objattr.value="My Toc Entry";
objattr.parameter="1";
Prefs.defaultItemAttributes.insert(3,objattr);
}
 
 
2921,6 → 2939,25
doc->PDF_Options.PrintProf = doc->CMSSettings.DefaultPrinterProfile;
doc->PDF_Options.Intent = doc->CMSSettings.DefaultIntentMonitor;
doc->PDF_Options.Intent2 = doc->CMSSettings.DefaultIntentMonitor2;
/*CB TODO
for(QMap<int, ObjectAttribute>::Iterator it = Prefs.defaultItemAttributes->begin(); it!= Prefs.defaultItemAttributes->end(); ++it)
{
uint i=0;
QTableItem *item = new QTableItem(attributesTable, QTableItem::Never, it.data().name);
attributesTable->setItem(it.key(), i++, item);
QTableItem *item1 = new QTableItem(attributesTable, QTableItem::Never, it.data().type);
attributesTable->setItem(it.key(), i++, item1);
QTableItem *item2 = new QTableItem(attributesTable, QTableItem::Never, it.data().value);
attributesTable->setItem(it.key(), i++, item2);
QTableItem *item3 = new QTableItem(attributesTable, QTableItem::Never, it.data().parameter);
attributesTable->setItem(it.key(), i++, item3);
 
attributesTable->verticalHeader()->setLabel(it.key(), QString("%1").arg(it.key()));
}
*/
struct LPIData lpo;
lpo.Frequency = 75;
lpo.SpotFunc = 2;
5704,34 → 5741,9
 
void ScribusApp::slotHelpAbout()
{
void *mo;
const char *error;
typedef About* (*sdem)(QWidget *d);
sdem demo;
QString pfad = LIBDIR;
#if defined(__hpux)
pfad += "libs/libabout.sl";
#else
pfad += "libs/libabout.so";
#endif
mo = dlopen(pfad, RTLD_LAZY);
if (!mo)
{
std::cout << "Cannot find Plug-in" << endl;
return;
}
dlerror();
demo = (sdem)dlsym(mo, "Run");
if ((error = dlerror()) != NULL)
{
std::cout << "Cannot find Symbol" << endl;
dlclose(mo);
return;
}
About* dia = (*demo)(this);
About* dia = new About(this);
dia->exec();
delete dia;
dlclose(mo);
}
 
void ScribusApp::slotHelpAboutQt()
7698,33 → 7710,8
 
void ScribusApp::slotPrefsOrg()
{
void *mo;
const char *error;
bool zChange = false;
typedef Preferences* (*sdem)(QWidget *d, ApplicationPrefs *Vor);
sdem demo;
QString pfad = LIBDIR;
#if defined(__hpux)
pfad += "libs/libpreferences.sl";
#else
pfad += "libs/libpreferences.so";
#endif
mo = dlopen(pfad, RTLD_LAZY);
if (!mo)
{
std::cout << "Cannot find Plug-in" << endl;
return;
}
dlerror();
demo = (sdem)dlsym(mo, "Run");
if ((error = dlerror()) != NULL)
{
std::cout << "Cannot find Symbol" << endl;
dlclose(mo);
return;
}
 
Preferences *dia = (*demo)(this, &Prefs);
Preferences *dia = new Preferences(this, &Prefs);
if (dia->exec())
{
Prefs.AppFontSize = dia->GFsize->value();
7995,6 → 7982,9
#endif
}
}
Prefs.defaultItemAttributes = dia->tabDefaultItemAttributes->getNewAttributes();
GetCMSProfiles();
Prefs.KeyActions = dia->tabKeys->getNewKeyMap();
SetShortCut();
8010,7 → 8000,6
}
}
delete dia;
dlclose(mo);
}
 
void ScribusApp::SavePrefs()
/branches/Version13x/Scribus/scribus/docitemattrprefs.ui
0,0 → 1,151
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>DocumentItemAttributes</class>
<widget class="QWidget">
<property name="name">
<cstring>DocumentItemAttributes</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>481</width>
<height>174</height>
</rect>
</property>
<property name="caption">
<string>Document Item Attributes</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<widget class="QGroupBox">
<property name="name">
<cstring>attributesGroupBox</cstring>
</property>
<property name="title">
<string>Document Item Attributes</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>attrGroupLayout</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QTable">
<column>
<property name="text">
<string>Name</string>
</property>
</column>
<column>
<property name="text">
<string>Type</string>
</property>
</column>
<column>
<property name="text">
<string>Default Value</string>
</property>
</column>
<column>
<property name="text">
<string>Default Parameter</string>
</property>
</column>
<row>
<property name="text">
<string>0</string>
</property>
</row>
<property name="name">
<cstring>attributesTable</cstring>
</property>
<property name="numRows">
<number>1</number>
</property>
<property name="numCols">
<number>4</number>
</property>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>attrGrpMainLayout</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer>
<property name="name">
<cstring>buttonSpacer</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>290</width>
<height>21</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>clearButton</cstring>
</property>
<property name="text">
<string>C&amp;lear</string>
</property>
<property name="accel">
<string>Alt+L</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
</vbox>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>attributesTable</sender>
<signal>valueChanged(int,int)</signal>
<receiver>DocumentItemAttributes</receiver>
<slot>tableItemChanged(int,int)</slot>
</connection>
</connections>
<includes>
<include location="local" impldecl="in declaration">scribusstructs.h</include>
<include location="global" impldecl="in implementation">qtable.h</include>
<include location="global" impldecl="in implementation">qheader.h</include>
<include location="local" impldecl="in implementation">docitemattrprefs.ui.h</include>
</includes>
<variables>
<variable access="public">QMap&lt;int, ObjectAttribute&gt; localAttributes;</variable>
</variables>
<slots>
<slot access="protected">tableItemChanged( int row, int col )</slot>
</slots>
<functions>
<function access="private">init()</function>
<function access="private" specifier="non virtual">destroy()</function>
<function>setup( QMap&lt;int, ObjectAttribute&gt; * docItemAttrs )</function>
<function returnType="QMap&lt;int,ObjectAttribute&gt;">getNewAttributes()</function>
</functions>
<layoutdefaults spacing="6" margin="11"/>
</UI>
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