void PropertyWidget_Distance::languageChange() { retranslateUi(this); QSignalBlocker verticalAlignBlocker(verticalAlign); int oldAlignIndex = verticalAlign->currentIndex(); verticalAlign->clear(); verticalAlign->addItem( tr("Top")); verticalAlign->addItem( tr("Middle")); verticalAlign->addItem( tr("Bottom")); verticalAlign->setCurrentIndex(oldAlignIndex); QSignalBlocker columnGapLabelBlocker(columnGapLabel); int oldColGapLabel = columnGapLabel->currentIndex(); columnGapLabel->clear(); columnGapLabel->addItem( tr("Gap:")); columnGapLabel->addItem( tr("Width:")); columnGapLabel->setCurrentIndex(oldColGapLabel); QString ptSuffix = tr(" pt"); QString suffix = (m_doc) ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix; columnGap->setSuffix(suffix); leftDistance->setSuffix(suffix); topDistance->setSuffix(suffix); bottomDistance->setSuffix(suffix); rightDistance->setSuffix(suffix); }
void TransformDialog::changeRotation(double val) { QListWidgetItem* item = transformSelector->currentItem(); TransformItem *ite = (TransformItem*)item; ite->firstValue = val; item->setText( tr("Rotate Angle = %1%2").arg(ite->firstValue).arg(unitGetSuffixFromIndex(6))); }
void TransformDialog::newSkewing() { TransformItem *item = new TransformItem( tr("Skew"), transformSelector, 1004, 0.0, 0.0); transformSelector->setCurrentItem(item); setCurrentTransform(item); item->setText( tr("Skew H = %1%2 V = %3%4").arg(0.0).arg(unitGetSuffixFromIndex(6)).arg(0.0).arg(unitGetSuffixFromIndex(6))); buttonRemove->setEnabled(true); }
void TransformDialog::newRotation() { TransformItem *item = new TransformItem( tr("Rotate"), transformSelector, 1003, 0.0, 0.0); transformSelector->setCurrentItem(item); setCurrentTransform(item); item->setText( tr("Rotate Angle = %1%2").arg(0.0).arg(unitGetSuffixFromIndex(6))); buttonRemove->setEnabled(true); }
void TransformDialog::toggleLinkSkew() { if (linkSkew->isChecked()) verticalSkew->setValue(horizontalSkew->value()); QListWidgetItem* item = transformSelector->currentItem(); TransformItem *ite = (TransformItem*)item; item->setText( tr("Skew H = %1%2 V = %3%4").arg(ite->firstValue).arg(unitGetSuffixFromIndex(6)).arg(ite->secondValue).arg(unitGetSuffixFromIndex(6))); }
SMPStyleWidget::SMPStyleWidget() : QWidget() { setupUi(this); //Not used yet // optMarginCheckLeftProtruding->setVisible(false); lineSpacingLabel->setPixmap(loadIcon("linespacing2.png")); spaceAboveLabel->setPixmap( loadIcon("above.png") ); spaceBelowLabel->setPixmap( loadIcon("below.png") ); lineSpacingMode_->addItem( tr("Fixed Linespacing")); lineSpacingMode_->addItem( tr("Automatic Linespacing")); lineSpacingMode_->addItem( tr("Align to Baseline Grid")); connect(lineSpacingMode_, SIGNAL(highlighted(int)), this, SLOT(slotLineSpacingModeChanged(int))); lineSpacing_->setSuffix(unitGetSuffixFromIndex(0)); spaceAbove_->setSuffix(unitGetSuffixFromIndex(0)); spaceBelow_->setSuffix(unitGetSuffixFromIndex(0)); // optMarginCombo->addItem(tr("None"), ParagraphStyle::OM_None); // optMarginCombo->addItem(tr("Left Protruding"), ParagraphStyle::OM_LeftProtruding); // optMarginCombo->addItem(tr("Right Protruding"), ParagraphStyle::OM_RightProtruding); // optMarginCombo->addItem(tr("Left Hanging Punctuation"), ParagraphStyle::OM_LeftHangingPunct); // optMarginCombo->addItem(tr("Right Hanging Punctuation"), ParagraphStyle::OM_RightHangingPunct); // optMarginCombo->addItem(tr("Default"), ParagraphStyle::OM_Default); dropCapOffset_->setSuffix(unitGetSuffixFromIndex(0)); minSpaceSpin->setSuffix(unitGetSuffixFromIndex(SC_PERCENT)); minGlyphExtSpin->setSuffix(unitGetSuffixFromIndex(SC_PERCENT)); maxGlyphExtSpin->setSuffix(unitGetSuffixFromIndex(SC_PERCENT)); connect(optMarginDefaultButton, SIGNAL(clicked()), this, SLOT(slotDefaultOpticalMargins())); }
TransformDialog::TransformDialog(QWidget* parent, ScribusDoc *doc) : QDialog(parent) { setupUi(this); setModal(true); setWindowIcon(QIcon(loadIcon ( "AppIcon.png" ))); transformStack->setCurrentIndex(0); newTransformMenu = new QMenu(buttonAdd); newTransformMenu->addAction( tr("Scaling"), this, SLOT(newScaling())); newTransformMenu->addAction( tr("Translation"), this, SLOT(newTranslation())); newTransformMenu->addAction( tr("Rotation"), this, SLOT(newRotation())); newTransformMenu->addAction( tr("Skewing"), this, SLOT(newSkewing())); buttonAdd->setMenu(newTransformMenu); scaleLink->setChecked(true); buttonUp->setText( "" ); buttonUp->setIcon(loadIcon("16/go-up.png")); buttonDown->setText( "" ); buttonDown->setIcon(loadIcon("16/go-down.png")); buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); m_doc = doc; m_unitRatio = unitGetRatioFromIndex(m_doc->unitIndex()); m_suffix = unitGetSuffixFromIndex(m_doc->unitIndex()); translateHorizontal->setSuffix(m_suffix); translateVertical->setSuffix(m_suffix); rotationValue->setWrapping( true ); rotationValue->setValues( -180.0, 180.0, 1, 0); rotationValue->setSuffix(unitGetSuffixFromIndex(6)); horizontalSkew->setSuffix(unitGetSuffixFromIndex(6)); verticalSkew->setSuffix(unitGetSuffixFromIndex(6)); linkSkew->setChecked(true); numberOfCopies->setValue(0); basePoint->setCheckedId(m_doc->RotMode); connect(transformSelector, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(setCurrentTransform(QListWidgetItem*))); connect(horizontalScale, SIGNAL(valueChanged(double)), this, SLOT(changeHScale(double))); connect(verticalScale, SIGNAL(valueChanged(double)), this, SLOT(changeVScale(double))); connect(scaleLink, SIGNAL(clicked()), this, SLOT(toggleLink())); connect(translateHorizontal, SIGNAL(valueChanged(double)), this, SLOT(changeHTranslation(double))); connect(translateVertical, SIGNAL(valueChanged(double)), this, SLOT(changeVTranslation(double))); connect(rotationValue, SIGNAL(valueChanged(double)), this, SLOT(changeRotation(double))); connect(horizontalSkew, SIGNAL(valueChanged(double)), this, SLOT(changeHSkew(double))); connect(verticalSkew, SIGNAL(valueChanged(double)), this, SLOT(changeVSkew(double))); connect(linkSkew, SIGNAL(clicked()), this, SLOT(toggleLinkSkew())); connect(buttonUp, SIGNAL(clicked()), this, SLOT(moveTransformUp())); connect(buttonDown, SIGNAL(clicked()), this, SLOT(moveTransformDown())); connect(buttonRemove, SIGNAL(clicked()), this, SLOT(removeTransform())); }
void Tabruler::languageChange() { int oldTypeComboIndex = typeCombo->currentIndex(); bool typeComboBlocked = typeCombo->blockSignals(true); typeCombo->clear(); typeCombo->addItem( tr( "Left" ) ); typeCombo->addItem( tr( "Right" ) ); typeCombo->addItem( tr( "Period" ) ); typeCombo->addItem( tr( "Comma" ) ); typeCombo->addItem( tr( "Center" ) ); typeCombo->setCurrentIndex(oldTypeComboIndex); typeCombo->blockSignals(typeComboBlocked); positionLabel->setText( tr("&Position:")); int oldTabFillComboIndex = tabFillCombo->currentIndex(); bool tabFillComboBlocked = tabFillCombo->blockSignals(true); tabFillCombo->clear(); tabFillCombo->addItem( tr("None", "tab fill")); tabFillCombo->addItem( tr("Dot")); tabFillCombo->addItem( tr("Hyphen")); tabFillCombo->addItem( tr("Underscore")); tabFillCombo->addItem( tr("Custom")); tabFillCombo->setCurrentIndex(oldTabFillComboIndex); tabFillCombo->blockSignals(tabFillComboBlocked); tabFillComboT->setText( tr( "Fill Char:" )); clearButton->setText( tr( "Delete All" ) ); clearOneButton->setText( tr( "Delete Selected" ) ); tabFillCombo->setToolTip( tr( "Fill Character of Tab" ) ); typeCombo->setToolTip( tr( "Type/Orientation of Tab" ) ); tabData->setToolTip( tr( "Position of Tab" ) ); if (haveF) { firstLineData->setToolTip( tr( "Indentation for first line of the paragraph" ) ); leftIndentData->setToolTip( tr( "Indentation from the left for the whole paragraph" ) ); rightIndentData->setToolTip( tr( "Indentation from the right for the whole paragraph" ) ); firstLineLabel->setToolTip(firstLineData->toolTip()); leftIndentLabel->setToolTip(leftIndentData->toolTip()); rightIndentLabel->setToolTip(rightIndentData->toolTip()); } clearButton->setToolTip( tr( "Delete all Tabulators" ) ); clearOneButton->setToolTip( tr("Delete selected Tabulator")); QString unitSuffix = unitGetSuffixFromIndex(tabData->unitIndex()); if (haveF) { firstLineData->setSuffix(unitSuffix); leftIndentData->setSuffix(unitSuffix); rightIndentData->setSuffix(unitSuffix); } tabData->setSuffix(unitSuffix); }
void Prefs_Printer::restoreDefaults(struct ApplicationPrefs *prefsData) { int docUnitIndex = prefsData->docSetupPrefs.docUnitIndex; unitChange(docUnitIndex); double unitRatio = unitGetRatioFromIndex(docUnitIndex); QString unitSuffix = unitGetSuffixFromIndex(docUnitIndex); QString Pcap; QString printerName; QStringList printerNames = PrinterUtil::getPrinterNames(); int numPrinters = printerNames.count(); for( int i = 0; i < numPrinters; i++) { printerName = printerNames[i]; destinationComboBox->addItem(printerName); } destinationComboBox->addItem( tr("File")); PrefsContext* prefs = PrefsManager::instance()->prefsFile->getContext("print_options"); QString selectedDest = prefs->get("CurrentPrn", ""); int prnIndex = destinationComboBox->findText(selectedDest); if ((prnIndex > -1) && (prnIndex < destinationComboBox->count())) destinationComboBox->setCurrentIndex(prnIndex); useAltPrinterCmdCheckBox->setChecked(prefs->getBool("OtherCom", false)); selOtherComm(); altPrinterCmdLineEdit->setText(prefs->get("Command", "")); bool iccInUse = prefs->getBool("ICCinUse", false); bool psPrinter = PrinterUtil::isPostscriptPrinter(destinationComboBox->currentText()); applyICCProfilesCheckBox->setChecked( psPrinter ? iccInUse : false ); applyICCProfilesCheckBox->setEnabled( psPrinter ); outputComboBox->setCurrentIndex(prefs->getInt("Separations", 0)); postscriptPrintToColorComboBox->setCurrentIndex(prefs->getInt("PrintColor", 0)); postscriptLevelComboBox->setCurrentIndex(prefs->getInt("PSLevel", 3)-1); pageMirrorHorizontallyCheckBox->setChecked(prefs->getBool("MirrorH", false)); pageMirrorVerticallyCheckBox->setChecked(prefs->getBool("MirrorV", false)); setMediaSizeCheckBox->setChecked(prefs->getBool("doDev", false)); applyUnderColorRemovalCheckBox->setChecked(prefs->getBool("DoGCR", false)); clipToPrinterMarginsCheckBox->setChecked(prefs->getBool("Clip", false)); convertSpotsToProcessCheckBox->setChecked(!prefs->getBool("doSpot", true)); MarginStruct bleeds; bleeds.set(prefs->getDouble("BleedTop",0.0)*unitRatio, prefs->getDouble("BleedBottom",0.0)*unitRatio, prefs->getDouble("BleedRight",0.0)*unitRatio, prefs->getDouble("BleedLeft",0.0)*unitRatio); bleedsWidget->setup(bleeds, 0, 0, false, false); markOffsetSpinBox->setValue(prefs->getDouble("markOffset",0.0)*unitRatio); bleedMarksCheckBox->setChecked(prefs->getBool("cropMarks", false)); bleedMarksCheckBox->setChecked(prefs->getBool("bleedMarks", false)); registrationMarksCheckBox->setChecked(prefs->getBool("registrationMarks", false)); colorBarsCheckBox->setChecked(prefs->getBool("colorMarks", false)); includePDFAnnotationsCheckBox->setChecked(prefs->getBool("includePDFMarks", true)); }
void AlignDistributePalette::enableGuideButtons() { QString suffix=""; double unitRatio=1.0; int precision=1; if (currDoc!=NULL) { suffix=unitGetSuffixFromIndex(currDoc->unitIndex()); unitRatio=unitGetRatioFromIndex(currDoc->unitIndex()); precision=unitGetPrecisionFromIndex(currDoc->unitIndex()); } bool setterH=true, setterV=true; switch(guideDirection) { case -1: guideInfoText = guideInfoTextNone; if (currAlignTo==ScribusDoc::alignGuide) setterH=setterV=false; break; case 0: guideInfoText = tr("Y: %1%2").arg(guidePosition * unitRatio, 0, 'f', precision).arg(suffix); if (currAlignTo==ScribusDoc::alignGuide) { setterV=false; setterH=true; } break; case 1: guideInfoText = tr("X: %1%2").arg(guidePosition * unitRatio, 0, 'f', precision).arg(suffix); if (currAlignTo==ScribusDoc::alignGuide) { setterV=true; setterH=false; } break; } bool setterO=true; if (currAlignTo==ScribusDoc::alignGuide) setterO=false; alignLeftInToolButton->setEnabled(setterV); alignLeftOutToolButton->setEnabled(setterO); alignRightInToolButton->setEnabled(setterV); alignRightOutToolButton->setEnabled(setterO); alignCenterHorToolButton->setEnabled(setterV); alignTopInToolButton->setEnabled(setterH); alignTopOutToolButton->setEnabled(setterO); alignBottomInToolButton->setEnabled(setterH); alignBottomOutToolButton->setEnabled(setterO); alignCenterVerToolButton->setEnabled(setterH); alignGuideLineEdit->setText(guideInfoText); }
void TransformDialog::changeVSkew(double val) { QListWidgetItem* item = transformSelector->currentItem(); TransformItem *ite = (TransformItem*)item; ite->secondValue = val; if (linkSkew->isChecked()) { horizontalSkew->setValue(verticalSkew->value()); ite->firstValue = val; } item->setText( tr("Skew H = %1%2 V = %3%4").arg(ite->firstValue).arg(unitGetSuffixFromIndex(6)).arg(ite->secondValue).arg(unitGetSuffixFromIndex(6))); }
void ScrSpinBox::init(int unitIndex) { m_unitIndex=unitIndex; m_tabAdvance=true; setSuffix(unitGetSuffixFromIndex(m_unitIndex)); setDecimals(unitGetPrecisionFromIndex(m_unitIndex)); setSingleStep(1.0); lineEdit()->setValidator(0); disconnect(this, SIGNAL(valueChanged(const QString &)), this, SLOT(textChanged())); connect(this, SIGNAL(valueChanged(const QString &)), this, SLOT(textChanged())); installEventFilter(this); }
void SMCStyleWidget::languageChange() { QStringList languageList; LanguageManager::instance()->fillInstalledHyphStringList(&languageList); fillLangComboFromList(languageList); /***********************************/ /* Begin Tooltips */ /***********************************/ // These are for the character style page // as in character styles and in paragraph style's character style parentCombo->setToolTip( tr("Parent Style")); fontFace_->setToolTip( tr("Font Family")); fontSize_->setToolTip( tr("Font Size")); tracking_->setToolTip( tr("Tracking")); widthSpaceSpin->setToolTip( tr("Default width for space")); baselineOffset_->setToolTip( tr("Baseline Offset")); fontHScale_->setToolTip( tr("Horizontal Scaling")); fontVScale_->setToolTip( tr("Vertical Scaling")); language_->setToolTip( tr("Language")); fillColor_->setToolTip( tr("Fill Color")); fillShade_->setToolTip( tr("Fill Shade")); strokeColor_->setToolTip( tr("Stroke Color")); strokeShade_->setToolTip( tr("Stroke Shade")); fontSizeLabel_->setToolTip(fontSize_->toolTip()); trackingLabel_->setToolTip(tracking_->toolTip()); widthSpaceLabel->setToolTip(widthSpaceSpin->toolTip()); baselineOffsetLabel_->setToolTip(baselineOffset_->toolTip()); hscaleLabel_->setToolTip(fontHScale_->toolTip()); vscaleLabel_->setToolTip(fontVScale_->toolTip()); FillIcon->setToolTip(fillColor_->toolTip()); fillShadeLabel->setToolTip(fillShade_->toolTip()); StrokeIcon->setToolTip(strokeColor_->toolTip()); strokeShadeLabel->setToolTip(strokeShade_->toolTip()); /***********************************/ /* End Tooltips */ /***********************************/ parentLabel->setText( tr("Based On:")); languageLabel_->setText( tr("Language:")); // fontVScale_->setSuffix( tr(" %")); // fontHScale_->setSuffix( tr(" %")); // baselineOffset_->setSuffix( tr(" %")); // tracking_->setSuffix( tr(" %")); fontSize_->setSuffix(unitGetSuffixFromIndex(0)); }
void ScrSpinBox::setNewUnit(int unitIndex) { double oldUnitRatio=unitGetRatioFromIndex(m_unitIndex); double oldVal = value() / oldUnitRatio; double oldMax = maximum() / oldUnitRatio; double oldMin = minimum() / oldUnitRatio; setSuffix(unitGetSuffixFromIndex(unitIndex)); setDecimals(unitGetPrecisionFromIndex(unitIndex)); double newUnitRatio=unitGetRatioFromIndex(unitIndex); setMinimum(oldMin * newUnitRatio); setMaximum(oldMax * newUnitRatio); setSingleStep(1.0); m_unitIndex=unitIndex; setValue(oldVal * newUnitRatio); }
void TabGuides::restoreDefaults(struct GuidesPrefs *prefsData, struct TypoPrefs *prefsData2, int unitIndex) { QString unit = unitGetSuffixFromIndex(unitIndex); double unitRatio = unitGetRatioFromIndex(unitIndex); int decimals = unitGetPrecisionFromIndex(unitIndex); QPixmap pm3(54, 14); pm3.fill(prefsData->guideColor); colorGuides = prefsData->guideColor; guideColor->setIcon(pm3); QPixmap pm6(54, 14); pm6.fill(prefsData->marginColor); colorMargin = prefsData->marginColor; marginColor->setIcon(pm6); QPixmap pm1(54, 14); pm1.fill(prefsData->majorGridColor); colorMajorGrid = prefsData->majorGridColor; majorGridColor->setIcon(pm1); QPixmap pm(54, 14); pm.fill(prefsData->minorGridColor); colorMinorGrid = prefsData->minorGridColor; minorGridColor->setIcon(pm); QPixmap pm4(54, 14); pm4.fill(prefsData->baselineGridColor); colorBaselineGrid = prefsData->baselineGridColor; baselineColor->setIcon(pm4); minorSpace->setDecimals( decimals ); minorSpace->setValue(prefsData->minorGridSpacing * unitRatio); minorSpace->setSuffix( unit ); majorSpace->setDecimals( decimals ); majorSpace->setValue(prefsData->majorGridSpacing * unitRatio); majorSpace->setSuffix( unit ); snapDistance->setValue(qRound(prefsData->guideRad)); snapDistance->setSuffix( " " + tr( "px" ) ); grabDistance->setValue(prefsData->grabRadius); grabDistance->setSuffix( " " + tr( " px" ) ); baseGrid->setValue(prefsData->valueBaselineGrid); baseOffset->setValue(prefsData->offsetBaselineGrid); inBackground->setChecked( prefsData->guidePlacement ); inForeground->setChecked( !prefsData->guidePlacement ); baselineBox->setChecked(prefsData->baselineGridShown); checkGrid->setChecked(prefsData->gridShown); marginBox->setChecked(prefsData->marginsShown); guideBox->setChecked(prefsData->guidesShown); }
void PropertiesPalette_XYZ::languageChange() { setWindowTitle( tr("Properties")); nameGroup->setTitle( tr("Name")); geoGroup->setTitle( tr("Geometry")); xposLabel->setText( tr("&X-Pos:")); yposLabel->setText( tr("&Y-Pos:")); widthLabel->setText( tr("&Width:")); heightLabel->setText( tr("&Height:")); rotationLabel->setText( tr("&Rotation:")); basepointLabel->setText( tr("Basepoint:")); levelGroup->setTitle( tr("Level")); QString ptSuffix = tr(" pt"); QString ein = (m_haveDoc) ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix; xposSpin->setSuffix(ein); yposSpin->setSuffix(ein); widthSpin->setSuffix(ein); heightSpin->setSuffix(ein); nameEdit->setToolTip( tr("Name of selected object")); xposSpin->setToolTip( tr("Horizontal position of current basepoint")); yposSpin->setToolTip( tr("Vertical position of current basepoint")); widthSpin->setToolTip( tr("Width")); heightSpin->setToolTip( tr("Height")); rotationSpin->setToolTip( tr("Rotation of object at current basepoint")); basepointLabel->setToolTip( tr("Point from which measurements or rotation angles are referenced")); doGroup->setToolTip( tr("Group the selected objects")); doUnGroup->setToolTip( tr("Ungroup the selected group")); flipH->setToolTip( tr("Flip Horizontal")); flipV->setToolTip( tr("Flip Vertical")); levelUp->setToolTip( tr("Move one level up")); levelDown->setToolTip( tr("Move one level down")); levelTop->setToolTip( tr("Move to front")); levelBottom->setToolTip( tr("Move to back")); levelLabel->setToolTip( tr("Indicates the level the object is on, 0 means the object is at the bottom")); doLock->setToolTip( tr("Lock or unlock the object")); noResize->setToolTip( tr("Lock or unlock the size of the object")); noPrint->setToolTip( tr("Enable or disable exporting of the object")); keepFrameWHRatioButton->setToolTip( tr("Keep the aspect ratio")); }
void PropertyWidget_Distance::languageChange() { columnsLabel->setText( tr("Colu&mns:")); verticalAlignLabel->setText( tr("Vertical Alignment:")); int oldAliLabel = verticalAlign->currentIndex(); verticalAlign->clear(); verticalAlign->addItem( tr("Top")); verticalAlign->addItem( tr("Middle")); verticalAlign->addItem( tr("Bottom")); verticalAlign->setCurrentIndex(oldAliLabel); int oldcolgapLabel = columnGapLabel->currentIndex(); columnGapLabel->clear(); columnGapLabel->addItem( tr("Gap:")); columnGapLabel->addItem( tr("Width:")); columnGapLabel->setCurrentIndex(oldcolgapLabel); topLabel->setText( tr("To&p:")); bottomLabel->setText( tr("&Bottom:")); leftLabel->setText( tr("&Left:")); rightLabel->setText( tr("&Right:")); tabsButton->setText( tr("T&abulators...")); QString ptSuffix = tr(" pt"); QString suffix = (m_doc) ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix; columnGap->setSuffix(suffix); leftDistance->setSuffix(suffix); topDistance->setSuffix(suffix); bottomDistance->setSuffix(suffix); rightDistance->setSuffix(suffix); columns->setToolTip( tr("Number of columns in text frame")); columnGapLabel->setToolTip( tr("Switches between Gap or Column width")); columnGap->setToolTip( tr("Distance between columns")); topDistance->setToolTip( tr("Distance of text from top of frame")); bottomDistance->setToolTip( tr("Distance of text from bottom of frame")); leftDistance->setToolTip( tr("Distance of text from left of frame")); rightDistance->setToolTip( tr("Distance of text from right of frame")); tabsButton->setToolTip( tr("Edit tab settings of text frame...")); }
void PropertyWidget_PathText::languageChange() { QSignalBlocker pathTextTypeBlocker(pathTextType); int oldPathType = pathTextType->currentIndex(); pathTextType->clear(); pathTextType->addItem( tr("Default")); pathTextType->addItem( tr("Stair Step")); pathTextType->addItem( tr("Skew")); pathTextType->setCurrentIndex(oldPathType); flippedPathText->setText( tr("Flip Text")); showCurveCheckBox->setText( tr("Show Curve")); pathTextTypeLabel->setText( tr("Type:")); startOffsetLabel->setText( tr("Start Offset:")); distFromCurveLabel->setText( tr("Distance from Curve:")); QString ptSuffix = tr(" pt"); QString unitSuffix = m_doc ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix; startOffset->setSuffix(unitSuffix); distFromCurve->setSuffix(unitSuffix); }
void GuideManager::unitChange() { if (!m_Doc) return; // a little bit magic to get Verticals (unit) into group boxes horizontalGroupBox->setTitle(horizontalGroupBox->title().remove(" ("+suffix.trimmed()+")")); verticalGroupBox->setTitle(verticalGroupBox->title().remove(" ("+suffix.trimmed()+")")); docUnitIndex = m_Doc->unitIndex(); int docUnitDecimals = unitGetPrecisionFromIndex(docUnitIndex); suffix = unitGetSuffixFromIndex(docUnitIndex); horizontalAutoGapSpin->setNewUnit(docUnitIndex); verticalAutoGapSpin->setNewUnit(docUnitIndex); horizontalGroupBox->setTitle(horizontalGroupBox->title() + " ("+suffix.trimmed()+")"); verticalGroupBox->setTitle(verticalGroupBox->title() + " ("+suffix.trimmed()+")"); // models display horizontalModel->unitChange(docUnitIndex, docUnitDecimals); verticalModel->unitChange(docUnitIndex, docUnitDecimals); qobject_cast<GuidesHDelegate*>(horizontalView->itemDelegateForColumn(0))->setDoc(m_Doc); qobject_cast<GuidesVDelegate*>(verticalView->itemDelegateForColumn(0))->setDoc(m_Doc); }
void PropertiesPalette_Line::languageChange() { int oldLineStyle = lineType->currentIndex(); lineType->clear(); lineType->updateList(); lineType->addItem( tr("Custom")); lineType->setCurrentIndex(oldLineStyle); int oldLineMode=lineMode->currentIndex(); lineMode->clear(); lineMode->addItem( tr("Left Point")); lineMode->addItem( tr("End Points")); lineMode->setCurrentIndex(oldLineMode); lineModeLabel->setText( tr("&Basepoint:")); lineTypeLabel->setText( tr("T&ype of Line:")); startArrowLabel->setText( tr("Start Arrow:")); endArrowLabel->setText( tr("End Arrow:")); startArrowScaleLabel->setText( tr("Scaling:")); endArrowScaleLabel->setText( tr("Scaling:")); if (m_haveDoc) { int arrowItem = startArrow->currentIndex(); startArrow->rebuildList(&m_doc->arrowStyles()); startArrow->setCurrentIndex(arrowItem); arrowItem = endArrow->currentIndex(); endArrow->rebuildList(&m_doc->arrowStyles()); endArrow->setCurrentIndex(arrowItem); } lineWidthLabel->setText( tr("Line &Width:")); lineJoinLabel->setText( tr("Ed&ges:")); int oldLJoinStyle=lineJoinStyle->currentIndex(); lineJoinStyle->clear(); lineJoinStyle->addItem(loadIcon("16/stroke-join-miter.png"), tr("Miter Join")); lineJoinStyle->addItem(loadIcon("16/stroke-join-bevel.png"), tr("Bevel Join")); lineJoinStyle->addItem(loadIcon("16/stroke-join-round.png"), tr("Round Join")); lineJoinStyle->setCurrentIndex(oldLJoinStyle); int oldLEndStyle=lineEndStyle->currentIndex(); lineEndStyle->clear(); lineEndStyle->addItem(loadIcon("16/stroke-cap-butt.png"), tr("Flat Cap")); lineEndStyle->addItem(loadIcon("16/stroke-cap-square.png"), tr("Square Cap")); lineEndStyle->addItem(loadIcon("16/stroke-cap-round.png"), tr("Round Cap")); lineEndStyle->setCurrentIndex(oldLEndStyle); lineEndLabel->setText( tr("&Endings:")); tableLineGroup->setTitle( tr("Cell Lines")); topLine->setText( tr("Line at Top")); leftLine->setText( tr("Line at the Left")); rightLine->setText( tr("Line at the Right ")); bottomLine->setText( tr("Line at Bottom")); QString pctSuffix = tr(" %"); startArrowScale->setSuffix(pctSuffix); endArrowScale->setSuffix(pctSuffix); QString ptSuffix = tr(" pt"); QString suffix = (m_doc) ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix; lineWidth->setSuffix(suffix); lineWidth->setSpecialValueText( tr("Hairline")); if(lineStyles->count() > 0) lineStyles->item(0)->setText( tr("No Style") ); lineMode->setToolTip( tr("Change settings for left or end points")); lineType->setToolTip( tr("Pattern of line")); lineWidth->setToolTip( tr("Thickness of line")); lineJoinStyle->setToolTip( tr("Type of line joins")); lineEndStyle->setToolTip( tr("Type of line end")); lineStyles->setToolTip( tr("Line style of current object")); startArrow->setToolTip( tr("Arrow head style for start of line")); endArrow->setToolTip( tr("Arrow head style for end of line")); startArrowScale->setToolTip( tr("Arrow head scale for start of line")); endArrowScale->setToolTip( tr("Arrow head scale for end of line")); }
void MarginWidget::setMarginsToPrinterMargins() { UsePrinterMarginsDialog upm(parentWidget(), m_pageSize, unitGetRatioFromIndex(m_unitIndex), unitGetSuffixFromIndex(m_unitIndex)); if (upm.exec()) { double t,b,l,r; upm.getNewPrinterMargins(t,b,l,r); presetCombo->setCurrentIndex(PresetLayout::none); marginData.setTop(t); marginData.setBottom(b); marginData.setLeft(l); marginData.setRight(r); updateMarginSpinValues(); bottomR->setMaximum((qMax(0.0, pageHeight - t) * m_unitRatio)); topR->setMaximum((qMax(0.0, pageHeight - b) * m_unitRatio)); rightR->setMaximum((qMax(0.0, pageWidth - l) * m_unitRatio)); leftR->setMaximum((qMax(0.0, pageWidth - r) * m_unitRatio)); rightR->setEnabled(true); topR->setEnabled(true); bottomR->setEnabled(true); } }
void TabPrinter::restoreDefaults(struct ApplicationPrefs *prefsData) { docUnitIndex = prefsData->docUnitIndex; unitRatio = unitGetRatioFromIndex(docUnitIndex); int decimals = unitGetPrecisionFromIndex(docUnitIndex); QString unitSuffix = unitGetSuffixFromIndex(docUnitIndex); bleedTop->setDecimals( decimals ); bleedTop->setMinimum(0.0); bleedTop->setMaximum(3000*unitRatio); bleedTop->setSuffix(unitSuffix); bleedBottom->setDecimals( decimals ); bleedBottom->setMinimum(0.0); bleedBottom->setMaximum(3000*unitRatio); bleedBottom->setSuffix(unitSuffix); bleedLeft->setDecimals( decimals ); bleedLeft->setMinimum(0.0); bleedLeft->setMaximum(3000*unitRatio); bleedLeft->setSuffix(unitSuffix); bleedRight->setDecimals( decimals ); bleedRight->setMinimum(0.0); bleedRight->setMaximum(3000*unitRatio); bleedRight->setSuffix(unitSuffix); offsetValue->setDecimals( decimals ); offsetValue->setMinimum(0.0); offsetValue->setMaximum(3000*unitRatio); offsetValue->setSuffix(unitSuffix); defaultPrinter->setMinimumSize( QSize( 250, 22 ) ); defaultPrinter->setMaximumSize( QSize( 260, 30 ) ); defaultPrinter->setEditable(false); QString Pcap; QString printerName; QStringList printerNames = PrinterUtil::getPrinterNames(); int numPrinters = printerNames.count(); for( int i = 0; i < numPrinters; i++) { printerName = printerNames[i]; defaultPrinter->addItem(printerName); } defaultPrinter->addItem( tr("File")); prefs = PrefsManager::instance()->prefsFile->getContext("print_options"); QString selectedDest = prefs->get("CurrentPrn", ""); int prnIndex = defaultPrinter->findText(selectedDest); if ((prnIndex > -1) && (prnIndex < defaultPrinter->count())) defaultPrinter->setCurrentIndex(prnIndex); useAltPrintCommand->setChecked(prefs->getBool("OtherCom", false)); if (useAltPrintCommand->isChecked()) { defaultPrinter->setEnabled(false); printerCommand->setEnabled(true); } else { defaultPrinter->setEnabled(true); printerCommand->setEnabled(false); } printerCommand->setText(prefs->get("Command", "")); bool iccInUse = prefs->getBool("ICCinUse", false); bool psPrinter = PrinterUtil::isPostscriptPrinter(defaultPrinter->currentText()); useICC->setChecked( psPrinter ? iccInUse : false ); useICC->setEnabled( psPrinter ); bool seps = static_cast<bool>(prefs->getInt("Separations", 0)); buttonNormal->setChecked(!seps); buttonSeparations->setChecked(seps); bool color = static_cast<bool>(prefs->getInt("PrintColor", 0)); printGray->setChecked(color); printColor->setChecked(!color); psLevel->setCurrentIndex(prefs->getInt("PSLevel", 3)-1); mirrorH->setChecked(prefs->getBool("MirrorH", false)); mirrorV->setChecked(prefs->getBool("MirrorV", false)); setMedia->setChecked(prefs->getBool("doDev", false)); doGCR->setChecked(prefs->getBool("DoGCR", false)); setClip->setChecked(prefs->getBool("Clip", false)); convertSpots->setChecked(!prefs->getBool("doSpot", true)); bleedTop->setValue(prefs->getDouble("BleedTop",0.0)*unitRatio); bleedBottom->setValue(prefs->getDouble("BleedBottom",0.0)*unitRatio); bleedRight->setValue(prefs->getDouble("BleedRight",0.0)*unitRatio); bleedLeft->setValue(prefs->getDouble("BleedLeft",0.0)*unitRatio); offsetValue->setValue(prefs->getDouble("markOffset",0.0)*unitRatio); cropMarks->setChecked(prefs->getBool("cropMarks", false)); bleedMarks->setChecked(prefs->getBool("bleedMarks", false)); registrationMarks->setChecked(prefs->getBool("registrationMarks", false)); colorMarks->setChecked(prefs->getBool("colorMarks", false)); usePDFMarks->setChecked(prefs->getBool("includePDFMarks", true)); }
InsertAFrame::InsertAFrame(QWidget* parent, ScribusDoc *doc) : QDialog(parent), m_Doc(doc) { setupUi(this); //Hide some unused items for now // radioButtonTable->setShown(false); // radioButtonShape->setShown(false); // radioButtonPolygon->setShown(false); placementPagesRangeButton->setIcon(QIcon(loadIcon("ellipsis.png"))); //set tab order QWidget::setTabOrder(radioButtonCustomPosition, xPosScrSpinBox); QWidget::setTabOrder(xPosScrSpinBox, yPosScrSpinBox); QWidget::setTabOrder(radioButtonCustomSize, widthScrSpinBox); QWidget::setTabOrder(widthScrSpinBox, heightScrSpinBox); QWidget::setTabOrder(textColumnCountSpinBox, textColumnGapScrSpinBox); typeButtonGroup = new QButtonGroup(typeGroupBox); typeButtonGroup->addButton(radioButtonTextFrame,0); typeButtonGroup->addButton(radioButtonImageFrame,1); pagePlacementButtonGroup = new QButtonGroup(pagePlacementGroupBox); pagePlacementButtonGroup->addButton(radioButtonCurrentPage,0); pagePlacementButtonGroup->addButton(radioButtonAllPages,1); pagePlacementButtonGroup->addButton(radioButtonRangeOfPages,2); framePositionButtonGroup = new QButtonGroup(framePositionGroupBox); framePositionButtonGroup->addButton(radioButtonTopLeftOfMargins,0); framePositionButtonGroup->addButton(radioButtonTopLeftOfPage,1); framePositionButtonGroup->addButton(radioButtonTopLeftOfBleed,2); framePositionButtonGroup->addButton(radioButtonCustomPosition,3); sizeButtonGroup = new QButtonGroup(sizeGroupBox); sizeButtonGroup->addButton(radioButtonPageMarginSize,0); sizeButtonGroup->addButton(radioButtonPageSize,1); sizeButtonGroup->addButton(radioButtonBleedSize,2); sizeButtonGroup->addButton(radioButtonImageSize,3); sizeButtonGroup->addButton(radioButtonCustomSize,4); radioButtonTextFrame->setChecked(true); radioButtonCurrentPage->setChecked(true); radioButtonTopLeftOfMargins->setChecked(true); radioButtonPageMarginSize->setChecked(true); slotSelectType(0); slotSelectPagePlacement(0); slotSelectPosition(0); slotSelectSize(0); int docUnitIndex = m_Doc ? m_Doc->unitIndex() : SC_PT; int decimals = unitGetPrecisionFromIndex(docUnitIndex); QString unitSuffix(unitGetSuffixFromIndex(docUnitIndex)); xPosScrSpinBox->setNewUnit(docUnitIndex); yPosScrSpinBox->setNewUnit(docUnitIndex); widthScrSpinBox->setNewUnit(docUnitIndex); heightScrSpinBox->setNewUnit(docUnitIndex); xPosScrSpinBox->setValues(0.0, 1000.0, decimals, 0.0); yPosScrSpinBox->setValues(0.0, 1000.0, decimals, 0.0); widthScrSpinBox->setValues(0.0, 1000.0, decimals, 0.0); heightScrSpinBox->setValues(0.0, 1000.0, decimals, 0.0); textColumnGapScrSpinBox->setValues(0.0, 1000.0, decimals, 0.0); xPosScrSpinBox->setSuffix(unitSuffix); yPosScrSpinBox->setSuffix(unitSuffix); widthScrSpinBox->setSuffix(unitSuffix); heightScrSpinBox->setSuffix(unitSuffix); textColumnGapScrSpinBox->setSuffix(unitSuffix); sourceDocLineEdit->setText(""); if (m_Doc!=0) { pageItemMap=m_Doc->getDocItemNames(PageItem::TextFrame); comboBoxLinkToExistingFrameName->addItems(pageItemMap.values()); } if (comboBoxLinkToExistingFrameName->count()==0) checkBoxLinkToExistingFrame->setEnabled(false); connect(typeButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(slotSelectType(int))); connect(pagePlacementButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(slotSelectPagePlacement(int))); connect(placementPagesRangeButton, SIGNAL(clicked()), this, SLOT(slotCreatePageNumberRange())); connect(framePositionButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(slotSelectPosition(int))); connect(sizeButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(slotSelectSize(int))); connect(selectImageFileButton, SIGNAL(clicked()), this, SLOT(locateImageFile())); connect(selectDocFileButton, SIGNAL(clicked()), this, SLOT(locateDocFile())); connect(checkBoxLinkToExistingFrame, SIGNAL(stateChanged(int)), this, SLOT(slotLinkToExistingFrame(int))); }
Tabruler::Tabruler( QWidget* parent, bool haveFirst, int dEin, QList<ParagraphStyle::TabRecord> Tabs, double wid ) : QWidget( parent ), firstLineLabel(0), leftIndentLabel(0), rightIndentLabel(0), firstLineData(0), leftIndentData(0), rightIndentData(0) { docUnitRatio=unitGetRatioFromIndex(dEin); double ww = (wid < 0) ? 4000 : wid; tabrulerLayout = new QVBoxLayout( this ); tabrulerLayout->setMargin(0); tabrulerLayout->setSpacing(5); layout2 = new QHBoxLayout; layout2->setMargin(0); layout2->setSpacing(5); rulerScrollL = new QToolButton(this); rulerScrollL->setArrowType(Qt::LeftArrow); rulerScrollL->setAutoRepeat( true ); layout2->addWidget( rulerScrollL ); ruler = new RulerT( this, dEin, Tabs, haveFirst, wid ); ruler->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); layout2->addWidget( ruler ); rulerScrollR = new QToolButton(this); rulerScrollR->setArrowType(Qt::RightArrow); rulerScrollR->setAutoRepeat( true ); layout2->addWidget( rulerScrollR ); layout1 = new QHBoxLayout; layout1->setMargin(0); layout1->setSpacing(5); layout1->setAlignment( Qt::AlignTop ); typeCombo = new QComboBox(this); typeCombo->setEditable(false); typeCombo->clear(); typeCombo->addItem( tr( "Left" ) ); typeCombo->addItem( tr( "Right" ) ); typeCombo->addItem( tr( "Period" ) ); typeCombo->addItem( tr( "Comma" ) ); typeCombo->addItem( tr( "Center" ) ); layout1->addWidget( typeCombo ); tabData = new ScrSpinBox( 0, ww / docUnitRatio, this, dEin ); tabData->setValue(0); positionLabel = new QLabel( tr("&Position:"), this ); positionLabel->setBuddy(tabData); layout1->addWidget( positionLabel ); layout1->addWidget( tabData ); tabFillCombo = new QComboBox(this); tabFillCombo->setEditable(false); tabFillCombo->addItem( tr("None", "tab fill")); tabFillCombo->addItem( tr("Dot")); tabFillCombo->addItem( tr("Hyphen")); tabFillCombo->addItem( tr("Underscore")); tabFillCombo->addItem( tr("Custom")); tabFillComboT = new QLabel( tr( "Fill Char:" ), this ); tabFillComboT->setBuddy(tabFillCombo); layout1->addWidget( tabFillComboT ); layout1->addWidget( tabFillCombo ); layout4 = new QHBoxLayout; layout4->setMargin(0); layout4->setSpacing(5); indentLayout = new QHBoxLayout; indentLayout->setMargin(0); indentLayout->setSpacing(5); if (haveFirst) { firstLineData = new ScrSpinBox( -3000, ww / docUnitRatio, this, dEin); firstLineData->setValue(0); firstLineLabel = new QLabel(this); firstLineLabel->setText(""); firstLineLabel->setPixmap(IconManager::instance()->loadPixmap("firstline.png")); indentLayout->addWidget( firstLineLabel ); indentLayout->addWidget( firstLineData ); leftIndentData = new ScrSpinBox( 0, ww / docUnitRatio, this, dEin ); leftIndentData->setValue(0); leftIndentLabel = new QLabel(this); leftIndentLabel->setText(""); leftIndentLabel->setPixmap(IconManager::instance()->loadPixmap("leftindent.png")); layout4->addWidget( leftIndentLabel ); layout4->addWidget( leftIndentData ); layout4->addStretch(10); rightIndentLabel = new QLabel(this); rightIndentLabel->setText(""); rightIndentLabel->setPixmap(IconManager::instance()->loadPixmap("rightindent.png")); rightIndentData = new ScrSpinBox(0, ww / docUnitRatio, this, dEin); rightIndentData->setValue(0); indentLayout->addWidget(rightIndentLabel); indentLayout->addWidget(rightIndentData); } clearButton = new QPushButton( this ); clearButton->setText( tr( "Delete All" ) ); indentLayout->addSpacing(20); indentLayout->addWidget( clearButton); clearOneButton = new QPushButton( this ); clearOneButton->setText( tr( "Delete Selected" ) ); indentLayout->addWidget( clearOneButton); indentLayout->addStretch(10); if (!haveFirst) { QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); layout1->addItem( spacer ); } layout1->addStretch( 10 ); tabrulerLayout->addLayout( layout1 ); tabrulerLayout->addLayout( layout2 ); indentLayout->addStretch( 10 ); tabrulerLayout->addLayout( indentLayout ); tabrulerLayout->addLayout(layout4); tabData->setEnabled(false); tabFillCombo->setEnabled(false); typeCombo->setEnabled(false); if (Tabs.count() == 0) clearButton->setEnabled(false); clearOneButton->setEnabled(false); resize( minimumSizeHint() ); connect(rulerScrollL, SIGNAL(clicked()), ruler, SLOT(decreaseOffset())); connect(rulerScrollR, SIGNAL(clicked()), ruler, SLOT(increaseOffset())); connect(rulerScrollL, SIGNAL(released()), this, SLOT(resetOFfL())); connect(rulerScrollR, SIGNAL(released()), this, SLOT(resetOFfR())); connect(ruler, SIGNAL(typeChanged(int)) , this, SLOT(setTabType(int))); connect(ruler, SIGNAL(fillCharChanged(QChar)) , this, SLOT(setTabFillChar(QChar))); connect(typeCombo, SIGNAL(activated(int)), this, SLOT(setType())); connect(tabFillCombo, SIGNAL(activated(int)), this, SLOT(setFillChar())); connect(tabFillCombo, SIGNAL(editTextChanged(const QString &)), this, SLOT(setCustomFillChar(const QString &))); connect(ruler, SIGNAL(tabMoved(double)) , this, SLOT(setTabData(double))); connect(ruler, SIGNAL(tabSelected()), this, SLOT(tabAdded())); connect(ruler, SIGNAL(newTab()), this, SLOT(tabAdded())); connect(ruler, SIGNAL(noTabs()), this, SLOT(lastTabRemoved())); connect(tabData, SIGNAL(valueChanged(double)), this, SLOT(setTab())); connect(clearButton, SIGNAL(clicked()), this, SLOT(clearAll())); connect(clearOneButton, SIGNAL(clicked()), this, SLOT(clearOne())); tabFillCombo->setToolTip( tr( "Fill Character of Tab" ) ); typeCombo->setToolTip( tr( "Type/Orientation of Tab" ) ); tabData->setToolTip( tr( "Position of Tab" ) ); if (haveFirst) { connect(ruler, SIGNAL(firstLineMoved(double)) , this, SLOT(setFirstLineData(double))); connect(ruler, SIGNAL(leftIndentMoved(double)) , this, SLOT(setLeftIndentData(double))); connect(ruler, SIGNAL(mouseReleased()), this, SIGNAL(tabrulerChanged())); connect(ruler, SIGNAL(mouseReleased()), this, SLOT(slotMouseReleased())); connect(firstLineData, SIGNAL(valueChanged(double)), this, SLOT(setFirstLine())); connect(leftIndentData, SIGNAL(valueChanged(double)), this, SLOT(setLeftIndent())); connect(rightIndentData, SIGNAL(valueChanged(double)), this, SLOT(setRightIndent())); firstLineData->setToolTip( tr( "Indentation for first line of the paragraph" ) ); leftIndentData->setToolTip( tr( "Indentation from the left for the whole paragraph" ) ); rightIndentData->setToolTip( tr( "Indentation from the right for the whole paragraph" ) ); firstLineLabel->setToolTip(firstLineData->toolTip()); leftIndentLabel->setToolTip(leftIndentData->toolTip()); rightIndentLabel->setToolTip(rightIndentData->toolTip()); } clearButton->setToolTip( tr( "Delete all Tabulators" ) ); clearOneButton->setToolTip( tr("Delete selected Tabulator")); QString ein = unitGetSuffixFromIndex(dEin); if (dEin == 2) { if (haveFirst) { firstLineData->setDecimals(4); leftIndentData->setDecimals(4); rightIndentData->setDecimals(4); } tabData->setDecimals(4); } if (haveFirst) { firstLineData->setSuffix(ein); leftIndentData->setSuffix(ein); rightIndentData->setSuffix(ein); } tabData->setSuffix(ein); haveF = haveFirst; }
void SMPStyleWidget::languageChange() { /***********************************/ /* Begin Tooltips */ /***********************************/ // These are for the paragraph style parentCombo->setToolTip( tr("Parent Style")); lineSpacingMode_->setToolTip( tr("Line Spacing Mode")); lineSpacing_->setToolTip( tr("Line Spacing")); spaceAbove_->setToolTip( tr("Space Above")); spaceBelow_->setToolTip( tr("Space Below")); lineSpacingLabel->setToolTip(lineSpacing_->toolTip()); spaceAboveLabel->setToolTip(spaceAbove_->toolTip()); spaceBelowLabel->setToolTip(spaceBelow_->toolTip()); // optMarginCombo->setToolTip(tr("Activate an optical margins layout")); // optMarginLabel->setToolTip(optMarginCombo->toolTip()); //CB Unneeded, gets in the way of single widget tooltips //dropCapsBox->setToolTip( tr("Enable or disable drop cap")); dropCapLines_->setToolTip( tr("Drop Cap Lines")); dropCapOffset_->setToolTip( tr("Drop Cap Offset")); alignement_->setToolTip( tr("Alignment")); tabList_->first_->setToolTip( tr("First Line Indent")); tabList_->left_->setToolTip( tr("Left Indent")); tabList_->right_->setToolTip( tr("Right Indent")); //CB Unneeded, gets in the way of single widget tooltips //tabList_->setToolTip( tr("Tabulators")); minSpaceSpin->setToolTip(tr("Maximum white space compression allowed.\nExpressed as a percentage of the current white space value.")); minSpaceLabel->setToolTip(minSpaceSpin->toolTip()); minGlyphExtSpin->setToolTip(tr("Maximum compression of glyphs")); minGlyphExtLabel->setToolTip(minGlyphExtSpin->toolTip()); maxGlyphExtSpin->setToolTip(tr("Maximum extension of glyphs")); maxGlyphExtLabel->setToolTip(maxGlyphExtSpin->toolTip()); /***********************************/ /* End Tooltips */ /***********************************/ lineSpacingMode_->clear(); lineSpacingMode_->addItem( tr("Fixed Linespacing")); lineSpacingMode_->addItem( tr("Automatic Linespacing")); lineSpacingMode_->addItem( tr("Align to Baseline Grid")); // optMarginCombo->clear(); // optMarginCombo->addItem(tr("None"), ParagraphStyle::OM_None); // optMarginCombo->addItem(tr("Left Protruding"), ParagraphStyle::OM_LeftProtruding); // optMarginCombo->addItem(tr("Right Protruding"), ParagraphStyle::OM_RightProtruding); // optMarginCombo->addItem(tr("Left Hanging Punctuation"), ParagraphStyle::OM_LeftHangingPunct); // optMarginCombo->addItem(tr("Right Hanging Punctuation"), ParagraphStyle::OM_RightHangingPunct); // optMarginCombo->addItem(tr("Default"), ParagraphStyle::OM_Default); // // optMarginLabel->setText(tr("Optical Margins:")); lineSpacing_->setSuffix(unitGetSuffixFromIndex(0)); spaceAbove_->setSuffix(unitGetSuffixFromIndex(0)); spaceBelow_->setSuffix(unitGetSuffixFromIndex(0)); parentLabel->setText( tr("Based On:")); distancesBox->setTitle( tr("Distances and Alignment")); dropCapsBox->setTitle( tr("Drop Caps")); tabsBox->setTitle( tr("Tabulators and Indentation")); tabWidget->setTabText(0, tr("Properties")); tabWidget->setTabText(1, tr("Character Style")); minSpaceLabel->setText(tr("Min. Space Width:")); glyphExtensionLabel->setText(tr("Glyph Extension")); minGlyphExtLabel->setText(tr("Min:", "Glyph Extension")); maxGlyphExtLabel->setText(tr("Max:", "Glyph Extension")); }
Imposition::Imposition(QWidget* parent, ScribusDoc* doc) : QDialog(parent) { UndoManager::instance()->setUndoEnabled(false); setupUi(this); setModal(true); languageChange(); this->parent = parent; this->srcDoc = doc; //get units unitIndex = doc->unitIndex(); unitRatio = unitGetRatioFromIndex(unitIndex); unitSuffix = unitGetSuffixFromIndex(unitIndex); //set units in page settings pageWidthBox->setSuffix(unitSuffix); pageHeightBox->setSuffix(unitSuffix); //fill Page Size combobox PageSize ps( tr(doc->m_pageSize.toLocal8Bit().constData())); pageSizeComboBox->addItems(ps.sizeTRList()); pageSizeComboBox->addItem( CommonStrings::trCustomPageSize); QStringList pageSizes=ps.sizeList(); int sizeIndex=pageSizes.indexOf(ps.nameTR()); if (sizeIndex!=-1) pageSizeComboBox->setCurrentIndex(sizeIndex); else pageSizeComboBox->setCurrentIndex(pageSizeComboBox->count()-1); pageOrientationComboBox->addItem( tr( "Portrait" ) ); pageOrientationComboBox->addItem( tr( "Landscape" ) ); //put page dimensions to boxes pageWidthBox->setValue(ps.width() * unitRatio); pageHeightBox->setValue(ps.height() * unitRatio); //fill grid pages boxes with pagelists for (int i = 1; i <= (int)(doc->Pages->count()); i++) { cbFront->addItem(QString::number(i)); cbBack->addItem(QString::number(i)); } //fill folds pages boxes with pagelists foldFrontPage->addItem(QString::number(1)); foldBackPage->addItem(QString::number(1)); for (int i = 1; i < (int)(srcDoc->Pages->count()); i++) { if (srcDoc->locationOfPage(i) == LeftPage) { foldFrontPage->addItem(QString::number(i+1)); foldBackPage->addItem(QString::number(i+1)); } } isEdited = true; isOK = verifyPage(); btnGo->setEnabled(isOK); btnPreview->setEnabled(isOK); //connect slots and signals connect(pageSizeComboBox, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(setPageSize(const QString &))); connect(pageWidthBox, SIGNAL(valueChanged(double)), this, SLOT(customizeSize())); connect(pageHeightBox, SIGNAL(valueChanged(double)), this, SLOT(customizeSize())); connect(chb2Sides, SIGNAL(stateChanged(int)), this, SLOT(change2SidesBox(int))); connect(foldIsBackSide, SIGNAL(stateChanged(int)), this, SLOT(changeFoldBackPage(int))); connect(this, SIGNAL(accepted()), this, SLOT(accepted())); //document changing slots connect(impositionTabWidget, SIGNAL(currentChanged(int)), this, SLOT(changeTab(int))); connect(pageWidthBox, SIGNAL(valueChanged(double)), this, SLOT(verifyPage())); connect(pageHeightBox, SIGNAL(valueChanged(double)), this, SLOT(verifyPage())); connect(cbFront, SIGNAL(currentIndexChanged(QString)), this, SLOT(verifyPage())); connect(cbBack, SIGNAL(currentIndexChanged(QString)), this, SLOT(verifyPage())); connect(cbLayout, SIGNAL(currentIndexChanged(QString)), this, SLOT(verifyPage())); }
void Prefs_Display::restoreDefaults(struct ApplicationPrefs *prefsData) { docUnitIndex = prefsData->docSetupPrefs.docUnitIndex; double unitRatio = unitGetRatioFromIndex(docUnitIndex); QString unitSuffix = unitGetSuffixFromIndex(docUnitIndex); showImagesCheckBox->setChecked(prefsData->guidesPrefs.showPic); showControlCharsCheckBox->setChecked(prefsData->guidesPrefs.showControls); showRulersCheckBox->setChecked(prefsData->guidesPrefs.rulersShown); showRulersRelativeToPageCheckBox->setChecked(prefsData->guidesPrefs.rulerMode); showTextChainsCheckBox->setChecked(prefsData->guidesPrefs.linkShown); showFramesCheckBox->setChecked(prefsData->guidesPrefs.framesShown); showLayerIndicatorsCheckBox->setChecked(prefsData->guidesPrefs.layerMarkersShown); showUnprintableAreaInMarginColorCheckBox->setChecked(prefsData->displayPrefs.marginColored); showBleedAreaCheckBox->setChecked(prefsData->guidesPrefs.showBleed); showPageShadowCheckBox->setChecked(prefsData->displayPrefs.showPageShadow); showVerifierWarningsOnCanvasCheckBox->setChecked(prefsData->displayPrefs.showVerifierWarningsOnCanvas); scratchSpaceLeftSpinBox->setMaximum(1000); scratchSpaceRightSpinBox->setMaximum(1000); scratchSpaceTopSpinBox->setMaximum(1000); scratchSpaceBottomSpinBox->setMaximum(1000); pageGapHorizontalSpinBox->setMaximum(1000); pageGapVerticalSpinBox->setMaximum(1000); scratchSpaceLeftSpinBox->setNewUnit(docUnitIndex); scratchSpaceRightSpinBox->setNewUnit(docUnitIndex); scratchSpaceTopSpinBox->setNewUnit(docUnitIndex); scratchSpaceBottomSpinBox->setNewUnit(docUnitIndex); pageGapHorizontalSpinBox->setNewUnit(docUnitIndex); pageGapVerticalSpinBox->setNewUnit(docUnitIndex); scratchSpaceLeftSpinBox->setValue(prefsData->displayPrefs.scratch.Left * unitRatio); scratchSpaceRightSpinBox->setValue(prefsData->displayPrefs.scratch.Right * unitRatio); scratchSpaceTopSpinBox->setValue(prefsData->displayPrefs.scratch.Top * unitRatio); scratchSpaceBottomSpinBox->setValue(prefsData->displayPrefs.scratch.Bottom * unitRatio); pageGapHorizontalSpinBox->setValue(prefsData->displayPrefs.pageGapHorizontal); pageGapVerticalSpinBox->setValue(prefsData->displayPrefs.pageGapVertical); QPixmap pm(100, 30); pm.fill(prefsData->displayPrefs.paperColor); colorPaper = prefsData->displayPrefs.paperColor; pageFillColorButton->setText( QString::null ); pageFillColorButton->setIcon(pm); pm.fill(prefsData->displayPrefs.frameColor); colorFrame = prefsData->displayPrefs.frameColor; frameSelectedColorButton->setText( QString::null ); frameSelectedColorButton->setIcon(pm); pm.fill(prefsData->displayPrefs.frameNormColor); colorFrameNorm = prefsData->displayPrefs.frameNormColor; frameColorButton->setText( QString::null ); frameColorButton->setIcon(pm); pm.fill(prefsData->displayPrefs.frameGroupColor); colorFrameGroup = prefsData->displayPrefs.frameGroupColor; frameGroupedColorButton->setText( QString::null ); frameGroupedColorButton->setIcon(pm); pm.fill(prefsData->displayPrefs.frameLinkColor); colorFrameLinked = prefsData->displayPrefs.frameLinkColor; frameLinkedColorButton->setText( QString::null ); frameLinkedColorButton->setIcon(pm); pm.fill(prefsData->displayPrefs.frameLockColor); colorFrameLocked = prefsData->displayPrefs.frameLockColor; frameLockedColorButton->setText( QString::null ); frameLockedColorButton->setIcon(pm); pm.fill(prefsData->displayPrefs.frameAnnotationColor); colorFrameAnnotation = prefsData->displayPrefs.frameAnnotationColor; frameAnnotationColorButton->setText( QString::null ); frameAnnotationColorButton->setIcon(pm); pm.fill(prefsData->displayPrefs.pageBorderColor); colorPageBorder = prefsData->displayPrefs.pageBorderColor; selectedPageBorderButton->setText( QString::null ); selectedPageBorderButton->setIcon(pm); pm.fill(prefsData->displayPrefs.controlCharColor); colorControlChars = prefsData->displayPrefs.controlCharColor; textControlCharsButton->setText( QString::null ); textControlCharsButton->setIcon(pm); displayScale=prefsData->displayPrefs.displayScale; adjustDisplaySlider->setValue(qRound(100 * displayScale) - 150); displayDPI->setText(QString::number(qRound(displayScale*72.0))+ tr(" dpi")); rulerUnitComboBox->clear(); rulerUnitComboBox->addItems(unitGetTextUnitList()); rulerUnitComboBox->setCurrentIndex(docUnitIndex); drawRuler(); }
NewDoc::NewDoc( QWidget* parent, const QStringList& recentDocs, bool startUp, QString lang ) : QDialog( parent ) { setObjectName(QString::fromLocal8Bit("NewDocumentWindow")); setModal(true); prefsManager=PrefsManager::instance(); m_tabSelected = 0; m_onStartup = startUp; m_unitIndex = prefsManager->appPrefs.docUnitIndex; m_unitRatio = unitGetRatioFromIndex(m_unitIndex); m_unitSuffix = unitGetSuffixFromIndex(m_unitIndex); m_orientation = prefsManager->appPrefs.pageOrientation; setWindowTitle( tr( "New Document" ) ); setWindowIcon(QIcon(loadIcon("AppIcon.png"))); TabbedNewDocLayout = new QVBoxLayout( this ); TabbedNewDocLayout->setMargin(10); TabbedNewDocLayout->setSpacing(5); if (startUp) tabWidget = new QTabWidget( this ); createNewDocPage(); if (startUp) { tabWidget->addTab(newDocFrame, tr("&New Document")); createNewFromTempPage(); nftGui->setupSettings(lang); tabWidget->addTab(newFromTempFrame, tr("New &from Template")); createOpenDocPage(); tabWidget->addTab(openDocFrame, tr("Open &Existing Document")); recentDocList=recentDocs; createRecentDocPage(); tabWidget->addTab(recentDocFrame, tr("Open Recent &Document")); TabbedNewDocLayout->addWidget(tabWidget); } else TabbedNewDocLayout->addWidget(newDocFrame); Layout1 = new QHBoxLayout; Layout1->setSpacing( 5 ); Layout1->setMargin( 0 ); if (startUp) { startUpDialog = new QCheckBox( tr( "Do not show this dialog again" ), this ); startUpDialog->setChecked(!prefsManager->appPrefs.showStartupDialog); Layout1->addWidget( startUpDialog ); } QSpacerItem* spacer = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum ); Layout1->addItem( spacer ); OKButton = new QPushButton( CommonStrings::tr_OK, this ); OKButton->setDefault( true ); Layout1->addWidget( OKButton ); CancelB = new QPushButton( CommonStrings::tr_Cancel, this ); CancelB->setAutoDefault( false ); Layout1->addWidget( CancelB ); TabbedNewDocLayout->addLayout( Layout1 ); //tooltips pageSizeComboBox->setToolTip( tr( "Document page size, either a standard size or a custom size" ) ); pageOrientationComboBox->setToolTip( tr( "Orientation of the document's pages" ) ); widthSpinBox->setToolTip( tr( "Width of the document's pages, editable if you have chosen a custom page size" ) ); heightSpinBox->setToolTip( tr( "Height of the document's pages, editable if you have chosen a custom page size" ) ); pageCountSpinBox->setToolTip( tr( "Initial number of pages of the document" ) ); unitOfMeasureComboBox->setToolTip( tr( "Default unit of measurement for document editing" ) ); autoTextFrame->setToolTip( tr( "Create text frames automatically when new pages are added" ) ); numberOfCols->setToolTip( tr( "Number of columns to create in automatically created text frames" ) ); Distance->setToolTip( tr( "Distance between automatically created columns" ) ); // signals and slots connections connect( OKButton, SIGNAL( clicked() ), this, SLOT( ExitOK() ) ); connect( CancelB, SIGNAL( clicked() ), this, SLOT( reject() ) ); connect(pageSizeComboBox, SIGNAL(activated(const QString &)), this, SLOT(setPageSize(const QString &))); connect(pageOrientationComboBox, SIGNAL(activated(int)), this, SLOT(setOrientation(int))); connect(unitOfMeasureComboBox, SIGNAL(activated(int)), this, SLOT(setUnit(int))); connect(Distance, SIGNAL(valueChanged(double)), this, SLOT(setDistance(double))); connect(autoTextFrame, SIGNAL(clicked()), this, SLOT(handleAutoFrame())); connect(layoutsView, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(itemSelected(QListWidgetItem* ))); connect(layoutsView, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(itemSelected(QListWidgetItem* ))); connect(layoutsView, SIGNAL(itemActivated(QListWidgetItem *)), this, SLOT(itemSelected(QListWidgetItem* ))); connect(layoutsView, SIGNAL(itemPressed(QListWidgetItem *)), this, SLOT(itemSelected(QListWidgetItem* ))); if (startUp) { connect(nftGui, SIGNAL(leaveOK()), this, SLOT(ExitOK())); connect(recentDocListBox, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(recentDocListBox_doubleClicked())); } // setMinimumSize(minimumSizeHint()); // setMaximumSize(minimumSizeHint()); // resize(minimumSizeHint()); }
TabGuides::TabGuides( QWidget* parent, struct GuidesPrefs *prefsData, struct TypoPrefs *prefsData2, int unitIndex) : QWidget( parent ) { double unitRatio = unitGetRatioFromIndex(unitIndex); QString unit = unitGetSuffixFromIndex(unitIndex); tabGuidesLayout = new QVBoxLayout( this ); tabGuidesLayout->setMargin(0); tabGuidesLayout->setSpacing(5); commonBox = new QGroupBox( this ); commonBox->setTitle( tr( "Common Settings" ) ); commonBoxLayout = new QHBoxLayout( commonBox ); commonBoxLayout->setMargin(10); commonBoxLayout->setSpacing(5); buttonGroup1 = new QGroupBox( commonBox ); buttonGroup1->setTitle( tr( "Placing in Documents" ) ); buttonGroup1Layout = new QVBoxLayout( buttonGroup1 ); buttonGroup1Layout->setMargin(10); buttonGroup1Layout->setSpacing(5); buttonGroup1Layout->setAlignment( Qt::AlignTop ); inBackground = new QRadioButton( buttonGroup1 ); inBackground->setText( tr( "In the Background" ) ); buttonGroup1Layout->addWidget( inBackground ); inForeground = new QRadioButton( buttonGroup1 ); inForeground->setText( tr( "In the Foreground" ) ); buttonGroup1Layout->addWidget( inForeground ); commonBoxLayout->addWidget( buttonGroup1 ); snapBox = new QGroupBox( commonBox ); snapBox->setTitle( tr( "Snapping" ) ); snapBoxLayout = new QGridLayout( snapBox ); snapBoxLayout->setMargin(10); snapBoxLayout->setSpacing(5); textLabel8 = new QLabel( snapBox ); textLabel8->setText( tr( "Snap Distance:" ) ); snapBoxLayout->addWidget( textLabel8, 0, 0 ); snapDistance = new QSpinBox( snapBox ); snapDistance->setMaximum( 1000 ); snapDistance->setMinimum( 1 ); snapDistance->setSingleStep( 1 ); snapBoxLayout->addWidget( snapDistance, 0, 1 ); textLabel82 = new QLabel( snapBox ); textLabel82->setText( tr( "Grab Radius:" ) ); snapBoxLayout->addWidget( textLabel82, 1, 0 ); grabDistance = new QSpinBox( snapBox ); grabDistance->setMaximum( 1000 ); grabDistance->setMinimum( 1 ); grabDistance->setSingleStep( 1 ); snapBoxLayout->addWidget( grabDistance, 1, 1 ); commonBoxLayout->addWidget( snapBox ); tabGuidesLayout->addWidget( commonBox ); layout9 = new QHBoxLayout; layout9->setMargin(0); layout9->setSpacing(5); guideBox = new QGroupBox( this ); guideBox->setTitle( tr( "Show Guides" ) ); guideBox->setCheckable( true ); guideBoxLayout = new QHBoxLayout( guideBox ); guideBoxLayout->setMargin(10); guideBoxLayout->setSpacing(5); checkGuides = new QLabel( guideBox ); checkGuides->setText( tr( "Color:" ) ); guideBoxLayout->addWidget( checkGuides ); guideColor = new QPushButton( guideBox ); guideColor->setMinimumSize( QSize( 60, 20 ) ); guideColor->setMaximumSize( QSize( 60, 20 ) ); guideColor->setFlat( false ); guideColor->setAutoDefault( false ); guideColor->setText( QString::null ); guideBoxLayout->addWidget( guideColor ); layout9->addWidget( guideBox ); marginBox = new QGroupBox( this ); marginBox->setCheckable( true ); marginBox->setTitle( tr( "Show Margins" ) ); marginBoxLayout = new QHBoxLayout( marginBox ); marginBoxLayout->setMargin(10); marginBoxLayout->setSpacing(5); checkMargin = new QLabel( marginBox ); checkMargin->setText( tr( "Color:" ) ); marginBoxLayout->addWidget( checkMargin ); marginColor = new QPushButton( marginBox ); marginColor->setMinimumSize( QSize( 60, 20 ) ); marginColor->setMaximumSize( QSize( 60, 20 ) ); marginColor->setAutoDefault( false ); marginColor->setFlat( false ); marginColor->setText( QString::null ); marginBoxLayout->addWidget( marginColor ); layout9->addWidget( marginBox ); tabGuidesLayout->addLayout( layout9 ); checkGrid = new QGroupBox( this ); checkGrid->setTitle( tr( "Show Page Grid" ) ); checkGrid->setCheckable( true ); checkGridLayout = new QGridLayout( checkGrid ); checkGridLayout->setMargin(10); checkGridLayout->setSpacing(5); checkGridLayout->setAlignment( Qt::AlignTop ); groupBox1 = new QGroupBox( checkGrid ); groupBox1->setTitle( tr( "Major Grid" ) ); groupBox1Layout = new QGridLayout( groupBox1 ); groupBox1Layout->setMargin(10); groupBox1Layout->setSpacing(5); groupBox1Layout->setAlignment( Qt::AlignTop ); majorGridColor = new QPushButton( groupBox1 ); majorGridColor->setMinimumSize( QSize( 60, 20 ) ); majorGridColor->setMaximumSize( QSize( 60, 20 ) ); majorGridColor->setFlat( false ); majorGridColor->setAutoDefault( false ); majorGridColor->setText( QString::null ); groupBox1Layout->addWidget( majorGridColor, 1, 1 ); textLabel4 = new QLabel( groupBox1 ); textLabel4->setText( tr( "Color:" ) ); groupBox1Layout->addWidget( textLabel4, 1, 0 ); textLabel6 = new QLabel( groupBox1 ); textLabel6->setText( tr( "Spacing:" ) ); groupBox1Layout->addWidget( textLabel6, 0, 0 ); majorSpace = new ScrSpinBox( 10 * unitRatio, 1000 * unitRatio, groupBox1, unitIndex ); groupBox1Layout->addWidget( majorSpace, 0, 1 ); checkGridLayout->addWidget( groupBox1, 0, 0 ); groupBox2 = new QGroupBox( checkGrid ); groupBox2->setTitle( tr( "Minor Grid" ) ); groupBox2Layout = new QGridLayout( groupBox2 ); groupBox2Layout->setMargin(10); groupBox2Layout->setSpacing(5); groupBox2Layout->setAlignment( Qt::AlignTop ); textLabel5 = new QLabel( groupBox2 ); textLabel5->setText( tr( "Color:" ) ); groupBox2Layout->addWidget( textLabel5, 1, 0 ); minorGridColor = new QPushButton( groupBox2 ); minorGridColor->setMinimumSize( QSize( 60, 20 ) ); minorGridColor->setMaximumSize( QSize( 60, 20 ) ); minorGridColor->setFlat( false ); minorGridColor->setAutoDefault( false ); minorGridColor->setText( QString::null ); groupBox2Layout->addWidget( minorGridColor, 1, 1 ); textLabel7 = new QLabel( groupBox2 ); textLabel7->setText( tr( "Spacing:" ) ); groupBox2Layout->addWidget( textLabel7, 0, 0 ); minorSpace = new ScrSpinBox( unitRatio, 1000 * unitRatio, groupBox2, unitIndex ); groupBox2Layout->addWidget( minorSpace, 0, 1 ); checkGridLayout->addWidget( groupBox2, 0, 1 ); tabGuidesLayout->addWidget( checkGrid ); layout9a = new QHBoxLayout; layout9a->setMargin(0); layout9a->setSpacing(5); baselineBox = new QGroupBox( this ); baselineBox->setTitle( tr( "Show Baseline Grid" ) ); baselineBox->setCheckable( true ); baselineBoxLayout = new QGridLayout( baselineBox ); baselineBoxLayout->setMargin(10); baselineBoxLayout->setSpacing(5); baselineBoxLayout->setAlignment( Qt::AlignTop ); checkBaseline = new QLabel( baselineBox ); checkBaseline->setText( tr( "Color:" ) ); baselineBoxLayout->addWidget( checkBaseline, 0, 0 ); baselineColor = new QPushButton( baselineBox ); baselineColor->setMinimumSize( QSize( 60, 20 ) ); baselineColor->setMaximumSize( QSize( 60, 20 ) ); baselineColor->setFlat( false ); baselineColor->setAutoDefault( false ); baselineColor->setText( QString::null ); baselineBoxLayout->addWidget( baselineColor, 0, 1 ); layout9a->addWidget( baselineBox ); baseGridBox = new QGroupBox( this ); baseGridBox->setTitle( tr( "Baseline Settings" ) ); baseGridBoxLayout = new QGridLayout( baseGridBox ); baseGridBoxLayout->setMargin(10); baseGridBoxLayout->setSpacing(5); baseGridBoxLayout->setAlignment( Qt::AlignTop ); baseGrid = new ScrSpinBox( 1.0, 1000.0, baseGridBox, 0 ); baseGridBoxLayout->addWidget( baseGrid, 0, 1 ); textLabel6a = new QLabel( tr( "Baseline &Grid:" ), baseGridBox); textLabel6a->setBuddy(baseGrid); baseGridBoxLayout->addWidget( textLabel6a, 0, 0 ); baseOffset = new ScrSpinBox( 0.0, 1000.0, baseGridBox, 0 ); baseGridBoxLayout->addWidget( baseOffset, 1, 1 ); textLabel7a = new QLabel( tr( "Baseline &Offset:" ), baseGridBox ); textLabel7a->setBuddy(baseOffset); baseGridBoxLayout->addWidget( textLabel7a, 1, 0 ); layout9a->addWidget( baseGridBox ); tabGuidesLayout->addLayout( layout9a ); // switched off as it's called in main prefs classes - PV //restoreDefaults(prefsData, prefsData2, unitIndex); connect(majorGridColor, SIGNAL(clicked()), this, SLOT(changeMajorColor())); connect(minorGridColor, SIGNAL(clicked()), this, SLOT(changeMinorColor())); connect(baselineColor, SIGNAL(clicked()), this, SLOT(changeBaselineColor())); connect(guideColor, SIGNAL(clicked()), this, SLOT(changeGuideColor())); connect(marginColor, SIGNAL(clicked()), this, SLOT(changeMarginColor())); inBackground->setToolTip( tr( "Guides are not visible through objects on the page" ) ); inForeground->setToolTip( tr( "Guides are visible above all objects on the page" ) ); minorSpace->setToolTip( tr( "Distance between the minor grid lines" ) ); majorSpace->setToolTip( tr( "Distance between the major grid lines" ) ); snapDistance->setToolTip( "<qt>" + tr( "Distance within which an object will snap to your placed guides. After setting this you will need to restart Scribus to set this setting." ) + "</qt>"); grabDistance->setToolTip( "<qt>" + tr( "Radius of the area where Scribus will allow you to grab an objects handles.After setting this you will need to restart Scribus to set this setting." ) + "</qt>"); minorGridColor->setToolTip( tr( "Color of the minor grid lines" ) ); majorGridColor->setToolTip( tr( "Color of the major grid lines" ) ); guideColor->setToolTip( tr( "Color of the guide lines you insert" ) ); marginColor->setToolTip( tr( "Color for the margin lines" ) ); baselineColor->setToolTip( tr( "Color for the baseline grid" ) ); baselineBox->setToolTip( tr("Turns the basegrid on or off")); baseGrid->setToolTip( tr("Distance between the lines of the baseline grid")); baseOffset->setToolTip( tr("Distance from the top of the page for the first baseline")); checkGrid->setToolTip( tr("Turns the gridlines on or off")); guideBox->setToolTip( tr("Turns the guides on or off")); marginBox->setToolTip( tr("Turns the margins on or off")); }