Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 10647 → Rev 10648

/trunk/Scribus/scribus/tabdocument.cpp
28,6 → 28,7
#include "sccombobox.h"
#include "prefsfile.h"
#include "scribusdoc.h"
#include "util.h"
 
 
TabDocument::TabDocument(QWidget* parent, const char* name, const bool reform)
213,9 → 214,9
 
// setSize(prefsData->pageSize);
if (prefsData->pageSize == CommonStrings::customPageSize)
pageSizeComboBox->setItemText(pageSizeComboBox->currentIndex(), CommonStrings::trCustomPageSize);
setCurrentComboItem(pageSizeComboBox, CommonStrings::trCustomPageSize);
else
pageSizeComboBox->setItemText(pageSizeComboBox->currentIndex(), prefsData->pageSize);
setCurrentComboItem(pageSizeComboBox, prefsData->pageSize);
prefsPageSizeName = prefsData->pageSize;
// setOrien(prefsData->pageOrientation);
 
249,9 → 250,9
 
// setSize(prefsData->m_pageSize);
if (prefsData->m_pageSize == CommonStrings::customPageSize)
pageSizeComboBox->setItemText(pageSizeComboBox->currentIndex(), CommonStrings::trCustomPageSize);
setCurrentComboItem(pageSizeComboBox, CommonStrings::trCustomPageSize);
else
pageSizeComboBox->setItemText(pageSizeComboBox->currentIndex(), prefsData->m_pageSize);
setCurrentComboItem(pageSizeComboBox, prefsData->m_pageSize);
prefsPageSizeName = prefsData->m_pageSize;
// setOrien(prefsData->PageOri);
 
/trunk/Scribus/scribus/util.cpp
907,3 → 907,12
}
return ret.trimmed();
}
 
void setCurrentComboItem(QComboBox *box, QString text)
{
box->blockSignals(true);
int ind = box->findText(text);
if (ind > -1)
box->setCurrentIndex(ind);
box->blockSignals(false);
}
/trunk/Scribus/scribus/checkDocument.cpp
24,6 → 24,7
#include "page.h"
#include "documentchecker.h"
#include "util_icon.h"
#include "util.h"
 
 
static const unsigned char image0_data[] =
237,7 → 238,7
CheckerPrefsList::Iterator itend=doc->checkerProfiles.end();
for (it = doc->checkerProfiles.begin(); it != itend ; ++it)
curCheckProfile->addItem(it.key());
curCheckProfile->setItemText(curCheckProfile->currentIndex(), doc->curCheckProfile);
setCurrentComboItem(curCheckProfile, doc->curCheckProfile);
 
int minRes = qRound(doc->checkerProfiles[doc->curCheckProfile].minResolution);
int maxRes = qRound(doc->checkerProfiles[doc->curCheckProfile].maxResolution);
/trunk/Scribus/scribus/smlinestylewidget.cpp
13,6 → 13,7
#include "scrspinbox.h"
#include "util_color.h"
#include "util_icon.h"
#include "util.h"
 
 
SMLineStyleWidget::SMLineStyleWidget() : QWidget()
92,7 → 93,7
return;
 
lineWidth->setValue(currentStyle[i].Width);
colorCombo->setItemText(colorCombo->currentIndex(), currentStyle[i].Color);
setCurrentComboItem(colorCombo, currentStyle[i].Color);
shadeBox->setValue(currentStyle[i].Shade);
switch (static_cast<Qt::PenStyle>(currentStyle[i].Dash))
/trunk/Scribus/scribus/tabruler.cpp
26,6 → 26,7
#include "scribusstructs.h"
#include "scrspinbox.h"
#include "util_icon.h"
#include "util.h"
 
RulerT::RulerT(QWidget *pa, int ein, QList<ParagraphStyle::TabRecord> Tabs, bool ind, double wid) : QWidget(pa)
{
701,7 → 702,7
break;
case 4:
tabFillCombo->setEditable(true);
tabFillCombo->setItemText(tabFillCombo->currentIndex(), CommonStrings::trCustomTabFill);
setCurrentComboItem(tabFillCombo, CommonStrings::trCustomTabFill);
break;
}
if (tabFillCombo->currentIndex() != 4)
748,7 → 749,7
{
tabFillCombo->setCurrentIndex(4);
tabFillCombo->setEditable(true);
tabFillCombo->setItemText(tabFillCombo->currentIndex(), CommonStrings::trCustomTabFill+QString(t));
setCurrentComboItem(tabFillCombo, CommonStrings::trCustomTabFill+QString(t));
}
emit tabrulerChanged();
emit tabsChanged();
/trunk/Scribus/scribus/extimageprops.cpp
29,6 → 29,7
#include "scribusview.h"
#include "util_icon.h"
#include "util_math.h"
#include "util.h"
 
ExtImageProps::ExtImageProps( QWidget* parent, ImageInfoRecord *info, PageItem *item, ScribusView *view ) : QDialog( parent )
{
149,12 → 150,12
if ((info->isRequest) && (info->RequestProps.contains(0)))
{
opacitySpinBox->setValue(qRound(info->RequestProps[0].opacity / 255.0 * 100));
blendMode->setItemText(blendMode->currentIndex(), blendModes[info->RequestProps[0].blend]);
setCurrentComboItem(blendMode, blendModes[info->RequestProps[0].blend]);
}
else
{
opacitySpinBox->setValue(qRound(info->layerInfo[0].opacity / 255.0 * 100));
blendMode->setItemText(blendMode->currentIndex(), blendModes[info->layerInfo[0].blend]);
setCurrentComboItem(blendMode, blendModes[info->layerInfo[0].blend]);
}
opacitySpinBox->setEnabled(true);
blendMode->setEnabled(true);
309,12 → 310,12
if ((currentItem->pixm.imgInfo.isRequest) && (currentItem->pixm.imgInfo.RequestProps.contains(layerTable->rowCount() - layer - 1)))
{
opacitySpinBox->setValue(qRound(currentItem->pixm.imgInfo.RequestProps[layerTable->rowCount() - layer - 1].opacity / 255.0 * 100));
blendMode->setItemText(blendMode->currentIndex(), blendModes[currentItem->pixm.imgInfo.RequestProps[layerTable->rowCount() - layer - 1].blend]);
setCurrentComboItem(blendMode, blendModes[currentItem->pixm.imgInfo.RequestProps[layerTable->rowCount() - layer - 1].blend]);
}
else
{
opacitySpinBox->setValue(qRound(currentItem->pixm.imgInfo.layerInfo[layerTable->rowCount() - layer - 1].opacity / 255.0 * 100));
blendMode->setItemText(blendMode->currentIndex(), blendModes[currentItem->pixm.imgInfo.layerInfo[layerTable->rowCount() - layer - 1].blend]);
setCurrentComboItem(blendMode, blendModes[currentItem->pixm.imgInfo.layerInfo[layerTable->rowCount() - layer - 1].blend]);
}
opacitySpinBox->setEnabled(true);
blendMode->setEnabled(true);
/trunk/Scribus/scribus/scribusview.cpp
3331,7 → 3331,7
{
disconnect(layerMenu, SIGNAL(activated(int)), this, SLOT(GotoLa(int)));
if (layerMenu->count() != 0)
layerMenu->setItemText(layerMenu->currentIndex(), layerName);
setCurrentComboItem(layerMenu, layerName);
connect(layerMenu, SIGNAL(activated(int)), this, SLOT(GotoLa(int)));
}
 
/trunk/Scribus/scribus/missing.cpp
19,6 → 19,7
#include "prefsmanager.h"
#include "commonstrings.h"
#include "util_icon.h"
#include "util.h"
 
static const char* const image100_data[] =
{
323,12 → 324,12
replaceFontCombo = new FontCombo(this);
if (doc != 0)
{
replaceFontCombo->setItemText(replaceFontCombo->currentIndex(), doc->toolSettings.defFont);
setCurrentComboItem(replaceFontCombo, doc->toolSettings.defFont);
replacementFont = doc->toolSettings.defFont;
}
else
{
replaceFontCombo->setItemText(replaceFontCombo->currentIndex(), PrefsManager::instance()->appPrefs.toolSettings.defFont);
setCurrentComboItem(replaceFontCombo, PrefsManager::instance()->appPrefs.toolSettings.defFont);
replacementFont = PrefsManager::instance()->appPrefs.toolSettings.defFont;
}
missingFontGridLayout->addWidget( replaceFontCombo, 1, 2 );
/trunk/Scribus/scribus/fontcombo.cpp
35,6 → 35,7
#include "page.h"
#include "prefsmanager.h"
#include "util_icon.h"
#include "util.h"
 
FontCombo::FontCombo(QWidget* pa) : QComboBox(pa)
{
147,11 → 148,11
slist.sort();
fontStyle->addItems(slist);
if (slist.contains(curr))
fontStyle->setItemText(fontStyle->currentIndex(), curr);
setCurrentComboItem(fontStyle, curr);
else if (slist.contains("Regular"))
fontStyle->setItemText(fontStyle->currentIndex(), "Regular");
setCurrentComboItem(fontStyle, "Regular");
else if (slist.contains("Roman"))
fontStyle->setItemText(fontStyle->currentIndex(), "Roman");
setCurrentComboItem(fontStyle, "Roman");
emit fontSelected(fontFamily->itemText(id) + " " + fontStyle->currentText());
connect(fontStyle, SIGNAL(activated(int)), this, SLOT(styleSelected(int)));
}
172,7 → 173,7
disconnect(fontStyle, SIGNAL(activated(int)), this, SLOT(styleSelected(int)));
QString family = prefsManager->appPrefs.AvailFonts[f].family();
QString style = prefsManager->appPrefs.AvailFonts[f].style();
fontFamily->setItemText(fontFamily->currentIndex(), family);
setCurrentComboItem(fontFamily, family);
fontStyle->clear();
QStringList slist = prefsManager->appPrefs.AvailFonts.fontMap[family];
slist.sort();
189,7 → 190,7
}
else
fontStyle->addItems(slist);
fontStyle->setItemText(fontStyle->currentIndex(), style);
setCurrentComboItem(fontStyle, style);
connect(fontFamily, SIGNAL(activated(int)), this, SLOT(familySelected(int)));
connect(fontStyle, SIGNAL(activated(int)), this, SLOT(styleSelected(int)));
}
/trunk/Scribus/scribus/scribus.cpp
3646,7 → 3646,7
}
outlinePalette->setDoc(doc);
fileLoader->informReplacementFonts();
view->unitSwitcher->setItemText(view->unitSwitcher->currentIndex(), unitGetStrFromIndex(doc->unitIndex()));
setCurrentComboItem(view->unitSwitcher, unitGetStrFromIndex(doc->unitIndex()));
view->unitChange();
ScriptRunning = false;
view->Deselect(true);
7863,7 → 7863,7
}
doc->setUnitIndex(unitIndex);
view->unitSwitcher->setItemText(view->unitSwitcher->currentIndex(), unitGetStrFromIndex(doc->unitIndex()));
setCurrentComboItem(view->unitSwitcher, unitGetStrFromIndex(doc->unitIndex()));
propertiesPalette->unitChange();
nodePalette->unitChange();
alignDistributePalette->unitChange();
/trunk/Scribus/scribus/util.h
11,6 → 11,7
 
#include <QByteArray>
#include <QColor>
#include <QComboBox>
#include <QDir>
#include <QList>
#include <QPainterPath>
139,5 → 140,6
 
 
QString SCRIBUS_API readLinefromDataStream(QDataStream &s);
void SCRIBUS_API setCurrentComboItem(QComboBox *box, QString text);
 
#endif
/trunk/Scribus/scribus/fontreplacedialog.cpp
21,6 → 21,7
#include "fontcombo.h"
#include "commonstrings.h"
#include "util_icon.h"
#include "util.h"
#include "scribusstructs.h"
 
FontReplaceDialog::FontReplaceDialog( QWidget* parent, QMap<QString, QString> *RList) : QDialog( parent )
58,7 → 59,7
{
replacementTable->setItem(a, 0, new QTableWidgetItem(itfsu.key()));
FontCombo* item = new FontCombo(this);
item->setItemText(item->currentIndex(), itfsu.value());
setCurrentComboItem(item, itfsu.value());
replacementTable->setCellWidget(a, 1, item);
a++;
}
/trunk/Scribus/scribus/smcstylewidget.cpp
494,7 → 494,7
else
{
Q_ASSERT(langMap_.contains(s));
language_->setItemText(language_->currentIndex(), langMap_[s]);
setCurrentComboItem(language_, langMap_[s]);
}
}
 
/trunk/Scribus/scribus/smcolorcombo.cpp
6,6 → 6,7
*/
 
#include "smcolorcombo.h"
#include "util.h"
 
 
SMColorCombo::SMColorCombo(QWidget *parent)
55,7 → 56,8
hasParent_ = false;
pItem_ = -1;
pText_ = s;
ColorCombo::setItemText(ColorCombo::currentIndex(), s);
setCurrentComboItem(this, s);
connect(this, SIGNAL(highlighted(int)), this, SLOT(currentChanged()));
}
 
void SMColorCombo::setCurrentText(const QString &s, bool isParentValue)
64,7 → 66,7
hasParent_ = true;
pItem_ = -1;
pText_ = s;
ColorCombo::setItemText(ColorCombo::currentIndex(), s);
setCurrentComboItem(this, s);
setFont(!isParentValue);
connect(this, SIGNAL(highlighted(int)), this, SLOT(currentChanged()));
}
/trunk/Scribus/scribus/druck.cpp
45,6 → 45,7
#endif
#include "util_printer.h"
#include "util_icon.h"
#include "util.h"
#include "units.h"
#include "usertaskstructs.h"
#include "scrspinbox.h"
578,9 → 579,9
else
{
psLevel->setEnabled( false );
PrintSep->setItemText(PrintSep->currentIndex(), tr("Print Normal"));
setCurrentComboItem(PrintSep, tr("Print Normal"));
PrintSep->setEnabled( false );
SepArt->setItemText(SepArt->currentIndex(), tr("All"));
setCurrentComboItem(SepArt, tr("All"));
SepArt->setEnabled( false );
ToSeparation = false;
if (m_doc->HasCMS)
/trunk/Scribus/scribus/spalette.cpp
27,6 → 27,7
#include <QListView>
 
#include "page.h"
#include "util.h"
 
ParaStyleComboBox::ParaStyleComboBox(QWidget* parent) : QComboBox(parent)
{
47,7 → 48,7
 
void ParaStyleComboBox::setFormat(QString name)
{
setItemText(currentIndex(), name.isEmpty() ? tr("No Style") : name);
setCurrentComboItem(this, name.isEmpty() ? tr("No Style") : name);
}
 
void ParaStyleComboBox::updateFormatList()
103,7 → 104,7
 
void CharStyleComboBox::setFormat(QString name)
{
setItemText(currentIndex(), name.isEmpty() ? tr("No Style") : name);
setCurrentComboItem(this, name.isEmpty() ? tr("No Style") : name);
}
 
void CharStyleComboBox::updateFormatList()
/trunk/Scribus/scribus/search.cpp
110,7 → 110,7
SearchLayout->addWidget( SStyleVal, 1, 1 );
SFontVal = new FontCombo(Search);
SFontVal->setMaximumSize(190, 30);
SFontVal->setItemText(SFontVal->currentIndex(), doc->currentStyle.charStyle().font().scName());
setCurrentComboItem(SFontVal, doc->currentStyle.charStyle().font().scName());
SFontVal->setEnabled(false);
SearchLayout->addWidget( SFontVal, 2, 1 );
SSizeVal = new ScrSpinBox( 0.5, 2048, Search, 1 );
125,7 → 125,7
SFillVal->setEditable(false);
SFillVal->updateBox(doc->PageColors, ColorCombo::widePixmaps, true);
SFillVal->setMinimumWidth(SFillVal->view()->maximumViewportSize().width() + 24);
SFillVal->setItemText(SFillVal->currentIndex(), doc->currentStyle.charStyle().fillColor());
setCurrentComboItem(SFillVal, doc->currentStyle.charStyle().fillColor());
SFillVal->setEnabled(false);
SearchLayout->addWidget( SFillVal, 5, 1 );
SFillSVal = new ShadeButton(Search);
135,7 → 135,7
SStrokeVal->setEditable(false);
SStrokeVal->updateBox(doc->PageColors, ColorCombo::widePixmaps, true);
SStrokeVal->view()->setMinimumWidth(SStrokeVal->view()->maximumViewportSize().width() + 24);
SStrokeVal->setItemText(SStrokeVal->currentIndex(), doc->currentStyle.charStyle().strokeColor());
setCurrentComboItem(SStrokeVal, doc->currentStyle.charStyle().strokeColor());
SStrokeVal->setEnabled(false);
SearchLayout->addWidget( SStrokeVal, 7, 1 );
SStrokeSVal = new ShadeButton(Search);
197,7 → 197,7
ReplaceLayout->addWidget( RStyleVal, 1, 1 );
RFontVal = new FontCombo(Replace);
RFontVal->setMaximumSize(190, 30);
RFontVal->setItemText(RFontVal->currentIndex(), doc->currentStyle.charStyle().font().scName());
setCurrentComboItem(RFontVal, doc->currentStyle.charStyle().font().scName());
RFontVal->setEnabled(false);
ReplaceLayout->addWidget( RFontVal, 2, 1 );
RSizeVal = new ScrSpinBox( 0.5, 2048, Replace, 1 );
212,7 → 212,7
RFillVal->setEditable(false);
RFillVal->updateBox(doc->PageColors, ColorCombo::widePixmaps, true);
RFillVal->view()->setMinimumWidth(RFillVal->view()->maximumViewportSize().width() + 24);
RFillVal->setItemText(RFillVal->currentIndex(), doc->currentStyle.charStyle().fillColor());
setCurrentComboItem(RFillVal, doc->currentStyle.charStyle().fillColor());
RFillVal->setEnabled(false);
ReplaceLayout->addWidget( RFillVal, 5, 1 );
RFillSVal = new ShadeButton(Replace);
222,7 → 222,7
RStrokeVal->setEditable(false);
RStrokeVal->updateBox(doc->PageColors, ColorCombo::widePixmaps, true);
RStrokeVal->view()->setMinimumWidth(RStrokeVal->view()->maximumViewportSize().width() + 24);
RStrokeVal->setItemText(RStrokeVal->currentIndex(), doc->currentStyle.charStyle().strokeColor());
setCurrentComboItem(RStrokeVal, doc->currentStyle.charStyle().strokeColor());
RStrokeVal->setEnabled(false);
ReplaceLayout->addWidget( RStrokeVal, 7, 1 );
RStrokeSVal = new ShadeButton(Replace);;
957,9 → 957,9
STextVal->setText("");
int currentParaStyle = findParagraphStyle(Doc, Doc->currentStyle);
SStyleVal->setCurrentIndex(currentParaStyle);
SFontVal->setItemText(SFontVal->currentIndex(), Doc->currentStyle.charStyle().font().scName());
SFillVal->setItemText(SFillVal->currentIndex(), Doc->currentStyle.charStyle().fillColor());
SStrokeVal->setItemText(SStrokeVal->currentIndex(), Doc->currentStyle.charStyle().strokeColor());
setCurrentComboItem(SFontVal, Doc->currentStyle.charStyle().font().scName());
setCurrentComboItem(SFillVal, Doc->currentStyle.charStyle().fillColor());
setCurrentComboItem(SStrokeVal, Doc->currentStyle.charStyle().strokeColor());
SSizeVal->setValue(Doc->currentStyle.charStyle().fontSize() / 10.0);
RStroke->setChecked(false);
RStrokeS->setChecked(false);
971,9 → 971,9
RText->setChecked(false);
RTextVal->setText("");
RStyleVal->setCurrentIndex(currentParaStyle);
RFontVal->setItemText(RFontVal->currentIndex(), Doc->currentStyle.charStyle().font().scName());
RFillVal->setItemText(RFillVal->currentIndex(), Doc->currentStyle.charStyle().fillColor());
RStrokeVal->setItemText(RStrokeVal->currentIndex(), Doc->currentStyle.charStyle().strokeColor());
setCurrentComboItem(RFontVal, Doc->currentStyle.charStyle().font().scName());
setCurrentComboItem(RFillVal, Doc->currentStyle.charStyle().fillColor());
setCurrentComboItem(RStrokeVal, Doc->currentStyle.charStyle().strokeColor());
RSizeVal->setValue(Doc->currentStyle.charStyle().fontSize() / 10.0);
Word->setChecked(false);
CaseIgnore->setChecked(false);
1016,9 → 1016,9
else
SStyleVal->setCurrentIndex(tmp);
 
SFontVal->setItemText(SFontVal->currentIndex(), prefs->get("SFontVal", Doc->currentStyle.charStyle().font().scName()));
SFillVal->setItemText(SFillVal->currentIndex(), prefs->get("SFillVal", Doc->currentStyle.charStyle().fillColor()));
SStrokeVal->setItemText(SStrokeVal->currentIndex(), prefs->get("SStrokeVal", Doc->currentStyle.charStyle().strokeColor()));
setCurrentComboItem(SFontVal, prefs->get("SFontVal", Doc->currentStyle.charStyle().font().scName()));
setCurrentComboItem(SFillVal, prefs->get("SFillVal", Doc->currentStyle.charStyle().fillColor()));
setCurrentComboItem(SStrokeVal, prefs->get("SStrokeVal", Doc->currentStyle.charStyle().strokeColor()));
SSizeVal->setValue(prefs->getDouble("SSizeVal", Doc->currentStyle.charStyle().fontSize() / 10.0));
RStroke->setChecked(prefs->getBool("RStroke", false));
RStrokeS->setChecked(prefs->getBool("RStrokeS", false));
1034,9 → 1034,9
RStyleVal->setCurrentIndex(0);
else
RStyleVal->setCurrentIndex(tmp);
RFontVal->setItemText(RFontVal->currentIndex(), prefs->get("RFontVal", Doc->currentStyle.charStyle().font().scName()));
RFillVal->setItemText(RFillVal->currentIndex(), prefs->get("RFillVal", Doc->currentStyle.charStyle().fillColor()));
RStrokeVal->setItemText(RStrokeVal->currentIndex(), prefs->get("RStrokeVal", Doc->currentStyle.charStyle().strokeColor()));
setCurrentComboItem(RFontVal, prefs->get("RFontVal", Doc->currentStyle.charStyle().font().scName()));
setCurrentComboItem(RFillVal, prefs->get("RFillVal", Doc->currentStyle.charStyle().fillColor()));
setCurrentComboItem(RStrokeVal, prefs->get("RStrokeVal", Doc->currentStyle.charStyle().strokeColor()));
RSizeVal->setValue(prefs->getDouble("RSizeVal", Doc->currentStyle.charStyle().fontSize() / 10.0));
Word->setChecked(prefs->getBool("Word", false));
CaseIgnore->setChecked(prefs->getBool("CaseIgnore", false));
/trunk/Scribus/scribus/effectsdialog.cpp
35,6 → 35,7
#include "shadebutton.h"
#include "util_color.h"
#include "util_icon.h"
#include "util.h"
 
 
EffectsDialog::EffectsDialog( QWidget* parent, PageItem* item, ScribusDoc* docc ) : QDialog( parent )
983,7 → 984,7
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> col;
fp >> shading;
colData->setItemText(colData->currentIndex(), col);
setCurrentComboItem(colData, col);
shade->setValue(shading);
optionStack->setCurrentIndex(1);
connect( colData, SIGNAL(activated(int)), this, SLOT( createPreview()));
1005,9 → 1006,9
col2 = fp.readLine();
fp >> shading1;
fp >> shading2;
colData1->setItemText(colData1->currentIndex(), col1);
setCurrentComboItem(colData1, col1);
shade1->setValue(shading1);
colData2->setItemText(colData2->currentIndex(), col2);
setCurrentComboItem(colData2, col2);
shade2->setValue(shading2);
int numVals;
double xval, yval;
1064,11 → 1065,11
fp >> shading1;
fp >> shading2;
fp >> shading3;
colDatat1->setItemText(colDatat1->currentIndex(), col1);
setCurrentComboItem(colDatat1, col1);
shadet1->setValue(shading1);
colDatat2->setItemText(colDatat2->currentIndex(), col2);
setCurrentComboItem(colDatat2, col2);
shadet2->setValue(shading2);
colDatat3->setItemText(colDatat3->currentIndex(), col3);
setCurrentComboItem(colDatat3, col3);
shadet3->setValue(shading3);
int numVals;
double xval, yval;
1144,13 → 1145,13
fp >> shading2;
fp >> shading3;
fp >> shading4;
colDataq1->setItemText(colDataq1->currentIndex(), col1);
setCurrentComboItem(colDataq1, col1);
shadeq1->setValue(shading1);
colDataq2->setItemText(colDataq2->currentIndex(), col2);
setCurrentComboItem(colDataq2, col2);
shadeq2->setValue(shading2);
colDataqc3->setItemText(colDataqc3->currentIndex(), col3);
setCurrentComboItem(colDataqc3, col3);
shadeqc3->setValue(shading3);
colDataq4->setItemText(colDataq4->currentIndex(), col4);
setCurrentComboItem(colDataq4, col4);
shadeq4->setValue(shading4);
int numVals;
double xval, yval;
/trunk/Scribus/scribus/tabpdfoptions.cpp
43,6 → 43,7
#include "scrspinbox.h"
#include "util_icon.h"
#include "scribuscore.h"
#include "util.h"
 
TabPDFOptions::TabPDFOptions( QWidget* parent, PDFOptions & Optionen,
const SCFonts &AllFonts,
1169,7 → 1170,7
for (itja = doc->JavaScripts.begin(); itja != doc->JavaScripts.end(); ++itja)
actionCombo->addItem(itja.key());
if (doc->JavaScripts.contains(Opts.openAction))
actionCombo->setItemText(actionCombo->currentIndex(), Opts.openAction);
setCurrentComboItem(actionCombo, Opts.openAction);
if (Opts.PageLayout == PDFOptions::SinglePage)
singlePage->setChecked(true);
else if (Opts.PageLayout == PDFOptions::OneColumn)
/trunk/Scribus/scribus/annot.cpp
51,6 → 51,7
#include "selfield.h"
#include "util_formats.h"
#include "util_icon.h"
#include "util.h"
 
Annot::Annot(QWidget* parent, PageItem *it, int Seite, int b, int h, ColorList Farben, ScribusView* vie)
: QDialog( parent )
1566,7 → 1567,7
}
if (item->annotation().Format() == 3)
{
Format0c->setItemText(Format0c->currentIndex(), pfol[0].remove("\""));
setCurrentComboItem(Format0c, pfol[0].remove("\""));
setDateSample(pfol[0]);
}
if (item->annotation().Format() == 4)
/trunk/Scribus/scribus/charselect.cpp
185,7 → 185,7
m_fontInUse = m_doc->currentStyle.charStyle().font().scName();
if (oldFont != m_fontInUse && !m_fontInUse.isEmpty())
{
fontSelector->setItemText(fontSelector->currentIndex(), m_fontInUse);
setCurrentComboItem(fontSelector, m_fontInUse);
newFont(fontSelector->currentIndex());
unicodeButton->setFont((*m_doc->AllFonts)[m_fontInUse]);
}
/trunk/Scribus/scribus/tabgeneral.cpp
20,6 → 20,7
#include "prefsmanager.h"
#include "scribusapp.h"
#include "scribuscore.h"
#include "util.h"
 
extern ScribusQApp* ScQApp;
 
83,8 → 84,8
void TabGeneral::restoreDefaults(struct ApplicationPrefs *prefsData)
{
selectedGUILang = prefsData->guiLanguage;
guiLangCombo->setItemText(guiLangCombo->currentIndex(), langMgr.getLangFromAbbrev(selectedGUILang));
GUICombo->setItemText(GUICombo->currentIndex(), prefsData->GUI);
setCurrentComboItem(guiLangCombo, langMgr.getLangFromAbbrev(selectedGUILang));
setCurrentComboItem(GUICombo, prefsData->GUI);
GFsize->setValue( prefsData->AppFontSize );
GTFsize->setValue( prefsData->PaletteFontSize); // temp solution
wheelJumpSpin->setValue( prefsData->Wheelval );
/trunk/Scribus/scribus/story.cpp
1263,7 → 1263,7
void SToolBFont::SetFont(QString f)
{
disconnect(Fonts, SIGNAL(activated(const QString &)), this, SIGNAL(NewFont(const QString &)));
Fonts->setItemText(Fonts->currentIndex(), f);
setCurrentComboItem(Fonts, f);
connect(Fonts, SIGNAL(activated(const QString &)), this, SIGNAL(NewFont(const QString &)));
}
 
/trunk/Scribus/scribus/hysettings.cpp
8,6 → 8,7
#include "hyphenator.h"
#include "scribusdoc.h"
#include "util_icon.h"
#include "util.h"
#include "QHeaderView"
#include <QInputDialog>
 
43,7 → 44,7
{
verbose->setChecked(!prefsData->Automatic);
input->setChecked(prefsData->AutoCheck);
language->setItemText(language->currentIndex(), langsMap[prefsData->Language]);
setCurrentComboItem(language, langsMap[prefsData->Language]);
wordLen->setValue(prefsData->MinWordLen);
maxCount->setValue(prefsData->HyCount);
ignoreList->addItems(prefsData->ignoredWords.toList());
56,7 → 57,7
{
verbose->setChecked(!prefsData->Automatic);
input->setChecked(prefsData->AutoCheck);
language->setItemText(language->currentIndex(), langsMap[prefsData->Language]);
setCurrentComboItem(language, langsMap[prefsData->Language]);
wordLen->setValue(prefsData->MinWordLen);
maxCount->setValue(prefsData->HyCount);
ignoreList->addItems(prefsData->docHyphenator->ignoredWords.toList());
/trunk/Scribus/scribus/tocindexprefs.cpp
35,6 → 35,7
#include "page.h"
#include "scribusdoc.h"
#include "commonstrings.h"
#include "util.h"
 
/*!
* \brief Constructs a TOCIndexPrefs as a child of 'parent', with the
114,7 → 115,7
itemNumberPlacementComboBox->addItem(trStrPNEnd);
itemNumberPlacementComboBox->addItem(trStrPNBeginning);
itemNumberPlacementComboBox->addItem(trStrPNNotShown);
itemNumberPlacementComboBox->setItemText(itemNumberPlacementComboBox->currentIndex(), trStrPNEnd);
setCurrentComboItem(itemNumberPlacementComboBox, trStrPNEnd);
numSelected=999;
}
 
169,9 → 170,9
if (numSelected!=999)
{
if (localToCSetupVector[numSelected].itemAttrName==strNone)
itemAttrComboBox->setItemText(itemAttrComboBox->currentIndex(), trStrNone);
setCurrentComboItem(itemAttrComboBox, trStrNone);
else
itemAttrComboBox->setItemText(itemAttrComboBox->currentIndex(), localToCSetupVector[numSelected].itemAttrName);
setCurrentComboItem(itemAttrComboBox, localToCSetupVector[numSelected].itemAttrName);
}
connect( itemAttrComboBox, SIGNAL( activated(const QString&) ), this, SLOT( itemAttributeSelected(const QString&) ) );
}
192,31 → 193,31
disconnect( tocNameLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( setToCName(const QString&) ) );
disconnect( itemListNonPrintingCheckBox, SIGNAL( toggled(bool) ), this, SLOT( nonPrintingFramesSelected(bool) ) );
if (localToCSetupVector[numSelected].itemAttrName==strNone)
itemAttrComboBox->setItemText(itemAttrComboBox->currentIndex(), trStrNone);
setCurrentComboItem(itemAttrComboBox, trStrNone);
else
itemAttrComboBox->setItemText(itemAttrComboBox->currentIndex(), localToCSetupVector[numSelected].itemAttrName);
setCurrentComboItem(itemAttrComboBox, localToCSetupVector[numSelected].itemAttrName);
if (localToCSetupVector[numSelected].pageLocation==NotShown)
itemNumberPlacementComboBox->setItemText(itemNumberPlacementComboBox->currentIndex(), trStrPNNotShown);
setCurrentComboItem(itemNumberPlacementComboBox, trStrPNNotShown);
else
if (localToCSetupVector[numSelected].pageLocation==Beginning)
itemNumberPlacementComboBox->setItemText(itemNumberPlacementComboBox->currentIndex(), trStrPNBeginning);
setCurrentComboItem(itemNumberPlacementComboBox, trStrPNBeginning);
else
itemNumberPlacementComboBox->setItemText(itemNumberPlacementComboBox->currentIndex(), trStrPNEnd);
setCurrentComboItem(itemNumberPlacementComboBox, trStrPNEnd);
 
itemListNonPrintingCheckBox->setChecked(localToCSetupVector[numSelected].listNonPrintingFrames);
if (currDoc!=NULL)
{
if (localToCSetupVector[numSelected].frameName==strNone)
itemDestFrameComboBox->setItemText(itemDestFrameComboBox->currentIndex(), trStrNone);
setCurrentComboItem(itemDestFrameComboBox, trStrNone);
else
itemDestFrameComboBox->setItemText(itemDestFrameComboBox->currentIndex(), localToCSetupVector[numSelected].frameName);
setCurrentComboItem(itemDestFrameComboBox, localToCSetupVector[numSelected].frameName);
 
if (itemParagraphStyleComboBox->count()>0)
{
if (!paragraphStyleList.contains(localToCSetupVector[numSelected].textStyle) || localToCSetupVector[numSelected].textStyle==strNone)
itemParagraphStyleComboBox->setItemText(itemParagraphStyleComboBox->currentIndex(), trStrNone);
setCurrentComboItem(itemParagraphStyleComboBox, trStrNone);
else
itemParagraphStyleComboBox->setItemText(itemParagraphStyleComboBox->currentIndex(), localToCSetupVector[numSelected].textStyle);
setCurrentComboItem(itemParagraphStyleComboBox, localToCSetupVector[numSelected].textStyle);
}
}
 
/trunk/Scribus/scribus/plugins/gettext/textfilter/tffilter.cpp
21,6 → 21,7
#include "prefsmanager.h"
#include "prefsfile.h"
#include "util_icon.h"
#include "util.h"
 
tfFilter::tfFilter(QWidget *parent, const char *name,
int action, QString regExp, QString replace, QString pstyleName,
34,12 → 35,12
firstCombo->setCurrentIndex(action);
if (action == APPLY)
{
thirdCombo->setItemText(thirdCombo->currentIndex(), pstyleName);
setCurrentComboItem(thirdCombo, pstyleName);
fourthChanged(style);
fourthCombo->setCurrentIndex(style);
if (style == STARTS_WITH)
{
fifthCombo->setItemText(fifthCombo->currentIndex(), regExp);
setCurrentComboItem(fifthCombo, regExp);
fifthRegexpCheck->setChecked(regexp);
if (match)
sixthCombo->setCurrentIndex(0);
49,24 → 50,24
else if (style == LESS_THAN)
{
if (less > 0)
fifthCombo->setItemText(fifthCombo->currentIndex(), QString("%1").arg(less));
setCurrentComboItem(fifthCombo, QString("%1").arg(less));
}
else if (style == MORE_THAN)
{
if (more > 0)
fifthCombo->setItemText(fifthCombo->currentIndex(), QString("%1").arg(more));
setCurrentComboItem(fifthCombo, QString("%1").arg(more));
}
}
else if (action == REMOVE)
{
secondCombo->setItemText(secondCombo->currentIndex(), regExp);
setCurrentComboItem(secondCombo, regExp);
secondRegexpCheck->setChecked(regexp);
}
else if (action == REPLACE)
{
secondCombo->setItemText(secondCombo->currentIndex(), regExp);
setCurrentComboItem(secondCombo, regExp);
secondRegexpCheck->setChecked(regexp);
thirdCombo->setItemText(thirdCombo->currentIndex(), replace);
setCurrentComboItem(thirdCombo, replace);
}
enableCheck->setChecked(enabled);
enableToggled(enabled);
/trunk/Scribus/scribus/plugins/gettext/textfilter/tfdia.cpp
24,6 → 24,7
 
#include "commonstrings.h"
#include "util_icon.h"
#include "util.h"
 
tfDia::tfDia() : QDialog()
{
224,8 → 225,7
 
void tfDia::saveTextChanged(const QString& text)
{
filtersCombo->setCurrentIndex(0);
filtersCombo->setItemText(filtersCombo->currentIndex(), text);
setCurrentComboItem(filtersCombo, text);
}
 
void tfDia::clearClicked()
/trunk/Scribus/scribus/plugins/pixmapexport/dialog.cpp
16,6 → 16,7
#include "scrspinbox.h"
#include "usertaskstructs.h"
#include "util_icon.h"
#include "util.h"
#include "commonstrings.h"
 
ExportForm::ExportForm(QWidget* parent, ScribusDoc* doc, int size, int quality, QString type)
31,7 → 32,7
{
bitmapType->addItem(imgs[a]);
}
bitmapType->setItemText(bitmapType->currentIndex(), type.toLower());
setCurrentComboItem(bitmapType, type.toLower());
qualityBox->setValue(quality);
DPIBox->setValue(size);
enlargementBox->setValue(size);
/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
735,7 → 735,7
m_Doc->FirstAuto = m_Doc->FirstAuto->prevInChain();
}
m_View->unitSwitcher->setItemText(m_View->unitSwitcher->currentIndex(), unitGetStrFromIndex(m_Doc->unitIndex()));
setCurrentComboItem(m_View->unitSwitcher, unitGetStrFromIndex(m_Doc->unitIndex()));
if (m_mwProgressBar!=0)
m_mwProgressBar->setValue(DOC.childNodes().count());
return true;
/trunk/Scribus/scribus/fontprefs.cpp
220,7 → 220,7
FlagsRepl.at(b)->clear();
FlagsRepl.at(b)->addItems(UsedFonts);
if (UsedFonts.contains(tmp) != 0)
FlagsRepl.at(b)->setItemText(FlagsRepl.at(b)->currentIndex(), tmp);
setCurrentComboItem(FlagsRepl.at(b), tmp);
else
FlagsRepl.at(b)->setCurrentIndex(0);
}
434,7 → 434,7
ScComboBox *item = new ScComboBox(Table3);
item->setEditable(false);
item->addItems(UsedFonts);
item->setItemText(item->currentIndex(), itfsu.value());
setCurrentComboItem(item, itfsu.value());
Table3->setCellWidget(a, 1, item);
FlagsRepl.append(item);
a++;
/trunk/Scribus/scribus/tabcheckdoc.cpp
18,6 → 18,7
#include <QSpinBox>
 
#include "prefsstructs.h"
#include "util.h"
 
TabCheckDoc::TabCheckDoc( QWidget* parent, CheckerPrefsList prefsData, QString prefProfile ) : QWidget( parent )
{
133,7 → 134,7
curCheckProfile->clear();
for (it = checkerProfile.begin(); it != checkerProfile.end(); ++it)
curCheckProfile->addItem(it.key());
curCheckProfile->setItemText(curCheckProfile->currentIndex(), prefProfile);
setCurrentComboItem(curCheckProfile, prefProfile);
ignoreErrors->setChecked(checkerProfile[prefProfile].ignoreErrors);
automaticCheck->setChecked(checkerProfile[prefProfile].autoCheck);
missingGlyphs->setChecked(checkerProfile[prefProfile].checkGlyphs);
288,7 → 289,7
CheckerPrefsList::Iterator itend=checkerProfile.end();
for (it = checkerProfile.begin(); it != itend; ++it)
curCheckProfile->addItem(it.key());
curCheckProfile->setItemText(curCheckProfile->currentIndex(), currentProfile);
setCurrentComboItem(curCheckProfile, currentProfile);
connect(curCheckProfile, SIGNAL(activated(const QString&)), this, SLOT(setProfile(const QString&)));
connect(curCheckProfile, SIGNAL(textChanged(const QString&)), this, SLOT(setProfile(const QString&)));
if (checkerProfile.count() == 1)
/trunk/Scribus/scribus/pageselector.cpp
19,6 → 19,7
#include <QValidator>
#include "sccombobox.h"
#include "util_icon.h"
#include "util.h"
 
class PageValidator : public QValidator
{
176,7 → 177,7
{
disconnect( PageCombo, SIGNAL( activated(int) ), this, SLOT( GotoPgE(int) ) );
PageCombo->setCurrentIndex(a);
PageCombo->setItemText(PageCombo->currentIndex(), tr( "%1 of %2" ).arg(a+1).arg(LastPG));
setCurrentComboItem(PageCombo, tr( "%1 of %2" ).arg(a+1).arg(LastPG));
APage = a+1;
Back->setEnabled(true);
Start->setEnabled(true);
206,7 → 207,7
{
PageCombo->addItem(tmp.setNum(b+1));
}
PageCombo->setItemText(PageCombo->currentIndex(), tr( "%1 of %2" ).arg(APage).arg(LastPG));
setCurrentComboItem(PageCombo, tr( "%1 of %2" ).arg(APage).arg(LastPG));
connect( PageCombo, SIGNAL( activated(int) ), this, SLOT( GotoPgE(int) ) );
}
 
243,7 → 244,7
void PageSelector::languageChange()
{
disconnect( PageCombo, SIGNAL( activated(int) ), this, SLOT( GotoPgE(int) ) );
PageCombo->setItemText(PageCombo->currentIndex(), tr( "%1 of %2" ).arg(APage).arg(LastPG));
setCurrentComboItem(PageCombo, tr( "%1 of %2" ).arg(APage).arg(LastPG));
connect( PageCombo, SIGNAL( activated(int) ), this, SLOT( GotoPgE(int) ) );
}
 
/trunk/Scribus/scribus/inspage.cpp
20,6 → 20,7
#include "pagesize.h"
#include "commonstrings.h"
#include "util_icon.h"
#include "util.h"
 
InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int maxPages)
: QDialog( parent, 0 )
101,7 → 102,7
}
}
if (currentDoc->MasterNames.contains( CommonStrings::trMasterPageNormalLeft))
pageData->setItemText(pageData->currentIndex(), CommonStrings::trMasterPageNormalLeft);
setCurrentComboItem(pageData, CommonStrings::trMasterPageNormalLeft);
}
else if (mp == 1)
{
119,7 → 120,7
}
}
if (currentDoc->MasterNames.contains( CommonStrings::trMasterPageNormalMiddle))
pageData->setItemText(pageData->currentIndex(), CommonStrings::trMasterPageNormalMiddle);
setCurrentComboItem(pageData, CommonStrings::trMasterPageNormalMiddle);
}
else
{
135,7 → 136,7
}
}
if (currentDoc->MasterNames.contains( CommonStrings::trMasterPageNormalRight))
pageData->setItemText(pageData->currentIndex(), CommonStrings::trMasterPageNormalRight);
setCurrentComboItem(pageData, CommonStrings::trMasterPageNormalRight);
}
}
else if (mp == 2)
154,7 → 155,7
}
}
if (currentDoc->MasterNames.contains( CommonStrings::trMasterPageNormalMiddle))
pageData->setItemText(pageData->currentIndex(), CommonStrings::trMasterPageNormalMiddle);
setCurrentComboItem(pageData, CommonStrings::trMasterPageNormalMiddle);
}
else
{
170,7 → 171,7
}
}
if (currentDoc->MasterNames.contains( CommonStrings::trMasterPageNormalRight))
pageData->setItemText(pageData->currentIndex(), CommonStrings::trMasterPageNormalRight);
setCurrentComboItem(pageData, CommonStrings::trMasterPageNormalRight);
}
}
else if (mp == 3)
187,7 → 188,7
}
}
if (currentDoc->MasterNames.contains( CommonStrings::trMasterPageNormalRight))
pageData->setItemText(pageData->currentIndex(), CommonStrings::trMasterPageNormalRight);
setCurrentComboItem(pageData, CommonStrings::trMasterPageNormalRight);
}
QString transLabel = currentDoc->pageSets[currentDoc->currentPageLayout].pageNames[mp];
QLabel* pageLabel = new QLabel(CommonStrings::translatePageSetLocString(transLabel), masterPageGroup);