/trunk/Scribus/scribus/fpointarray.cpp |
---|
304,7 → 304,7 |
bool FPointArray::hasLastQuadPoint(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) const |
{ |
int i = QVector<FPoint>::count()-4; |
int i = QVector<FPoint>::count() - 4; |
if (i < 0) |
return false; |
ConstIterator p = begin(); |
431,11 → 431,11 |
void FPointArray::pointDerivativesAt(int seg, double t, FPoint* p, FPoint* d1, FPoint* d2) const |
{ |
// Copy points. |
FPoint* q = new FPoint[ 4 ]; |
FPoint q[ 4 ]; |
q[ 0 ] = point(seg); |
q[ 1 ] = point(seg+1); |
q[ 3 ] = point(seg+2); |
q[ 2 ] = point(seg+3); |
q[ 1 ] = point(seg + 1); |
q[ 3 ] = point(seg + 2); |
q[ 2 ] = point(seg + 3); |
// The De Casteljau algorithm. |
for (unsigned short j = 1; j <= 3; j++) |
{ |
459,7 → 459,6 |
// Save point. |
if (p) |
*p = q[ 0 ]; |
delete[] (q); |
} |
bool FPointArray::isBezierClosed() const |
544,7 → 543,7 |
QPainterPath FPointArray::toQPainterPath(bool closed) const |
{ |
QPainterPath m_path = QPainterPath(); |
QPainterPath m_path; |
bool nPath = true; |
bool first = true; |
FPoint np, np1, np2, np3, np4, firstP; |
648,12 → 647,12 |
m_svgState->WasM = false; |
if (size() > 3) |
{ |
FPoint b1 = point(size()-4); |
FPoint b2 = point(size()-3); |
FPoint b3 = point(size()-2); |
FPoint b4 = point(size()-1); |
FPoint n1 = FPoint(m_svgState->CurrX, m_svgState->CurrY); |
FPoint n2 = FPoint(x1, y1); |
FPoint b1 = point(size() - 4); |
FPoint b2 = point(size() - 3); |
FPoint b3 = point(size() - 2); |
FPoint b4 = point(size() - 1); |
FPoint n1(m_svgState->CurrX, m_svgState->CurrY); |
FPoint n2(x1, y1); |
if ((b1 == n1) && (b2 == n1) && (b3 == n2) && (b4 == n2)) |
return; |
} |
675,14 → 674,14 |
m_svgState->WasM = false; |
if (m_svgState->PathLen > 3) |
{ |
FPoint b1 = point(size()-4); |
FPoint b2 = point(size()-3); |
FPoint b3 = point(size()-2); |
FPoint b4 = point(size()-1); |
FPoint n1 = FPoint(m_svgState->CurrX, m_svgState->CurrY); |
FPoint n2 = FPoint(x1, y1); |
FPoint n3 = FPoint(x3, y3); |
FPoint n4 = FPoint(x2, y2); |
FPoint b1 = point(size() - 4); |
FPoint b2 = point(size() - 3); |
FPoint b3 = point(size() - 2); |
FPoint b4 = point(size() - 1); |
FPoint n1(m_svgState->CurrX, m_svgState->CurrY); |
FPoint n2(x1, y1); |
FPoint n3(x3, y3); |
FPoint n4(x2, y2); |
if ((b1 == n1) && (b2 == n2) && (b3 == n3) && (b4 == n4)) |
return; |
} |
/trunk/Scribus/scribus/prefsmanager.cpp |
---|
550,7 → 550,7 |
void PrefsManager::applyLoadedShortCuts() |
{ |
QMap<QString, QPointer<ScrAction> > &actions = ScCore->primaryMainWindow()->scrActions; |
const auto &actions = ScCore->primaryMainWindow()->scrActions; |
for (auto it = appPrefs.keyShortcutPrefs.KeyActions.begin(); it != appPrefs.keyShortcutPrefs.KeyActions.end(); ++it) |
{ |
775,36 → 775,43 |
//Move to using the ScPaths default prefs location/scribus.* from ~/.scribus.* |
QString oldPR = QDir::toNativeSeparators(QDir::homePath() + "/.scribus.rc"); |
QFileInfo oldPi = QFileInfo(oldPR); |
QFileInfo oldPi(oldPR); |
if (oldPi.exists()) |
moveFile(oldPR, m_prefsLocation + "scribus.rc"); |
QString oldPR2 = QDir::toNativeSeparators(QDir::homePath() + "/.scribusfont.rc"); |
QFileInfo oldPi2 = QFileInfo(oldPR2); |
QFileInfo oldPi2(oldPR2); |
if (oldPi2.exists()) |
moveFile(oldPR2, m_prefsLocation + "scribusfont.rc"); |
QString oldPR3 = QDir::toNativeSeparators(QDir::homePath() + "/.scribusscrap.scs"); |
QFileInfo oldPi3 = QFileInfo(oldPR3); |
QFileInfo oldPi3(oldPR3); |
if (oldPi3.exists()) |
moveFile(oldPR3, m_prefsLocation + "scrap.scs"); |
QString oldPrefsLocation(ScPaths::oldApplicationDataDir()); |
QString oldPR4 = QDir::toNativeSeparators(oldPrefsLocation + "scribus150.rc"); |
QFileInfo oldPi4 = QFileInfo(oldPR4); |
QFileInfo oldPi4(oldPR4); |
if (oldPi4.exists()) |
moveFile(oldPR4, m_prefsLocation + "scribus150.rc"); |
QString oldPR5 = QDir::toNativeSeparators(oldPrefsLocation + "scrap150.scs"); |
QFileInfo oldPi5 = QFileInfo(oldPR5); |
QFileInfo oldPi5(oldPR5); |
if (oldPi5.exists()) |
moveFile(oldPR5, m_prefsLocation + "scrap150.scs"); |
QString oldPR6 = QDir::toNativeSeparators(oldPrefsLocation + "prefs150.xml"); |
QFileInfo oldPi6 = QFileInfo(oldPR6); |
QFileInfo oldPi6(oldPR6); |
if (oldPi6.exists()) |
moveFile(oldPR6, m_prefsLocation + "prefs150.xml"); |
QString oldPR7 = QDir::toNativeSeparators(oldPrefsLocation + "scripter150.rc"); |
QFileInfo oldPi7 = QFileInfo(oldPR7); |
QFileInfo oldPi7(oldPR7); |
if (oldPi7.exists()) |
moveFile(oldPR7, m_prefsLocation + "scripter150.rc"); |
QString oldPR8 = QDir::toNativeSeparators(oldPrefsLocation + "checkfonts.xml"); |
QFileInfo oldPi8 = QFileInfo(oldPR8); |
QFileInfo oldPi8(oldPR8); |
if (oldPi8.exists()) |
moveFile(oldPR8, m_prefsLocation + "checkfonts150.xml"); |
1152,7 → 1159,7 |
appPrefs.uiPrefs.showStartupDialog=showDialog; |
} |
const ColorList& PrefsManager::colorSet() |
const ColorList& PrefsManager::colorSet() const |
{ |
return appPrefs.colorPrefs.DColors; |
} |
1162,12 → 1169,12 |
return &appPrefs.colorPrefs.DColors; |
} |
const QString& PrefsManager::colorSetName() |
const QString& PrefsManager::colorSetName() const |
{ |
return appPrefs.colorPrefs.DColorSet; |
} |
bool PrefsManager::isToolColor(const QString& name) |
bool PrefsManager::isToolColor(const QString& name) const |
{ |
return isToolColor(appPrefs.itemToolPrefs, name); |
} |
1199,7 → 1206,7 |
return false; |
} |
QStringList PrefsManager::toolColorNames() |
QStringList PrefsManager::toolColorNames() const |
{ |
return toolColorNames(appPrefs.itemToolPrefs); |
} |
2419,7 → 2426,7 |
if (!m_importingFrom12 && dc.tagName() == "Shortcut") |
{ |
appPrefs.keyShortcutPrefs.KeyActions[dc.attribute("Action")].actionName = dc.attribute("Action"); |
QKeySequence newKeySequence = QKeySequence(dc.attribute("KeySequence")); |
QKeySequence newKeySequence(dc.attribute("KeySequence")); |
appPrefs.keyShortcutPrefs.KeyActions[dc.attribute("Action")].keySequence = newKeySequence; |
} |
if (dc.tagName() == "Recent") |
2602,7 → 2609,7 |
appPrefs.colorPrefs.DColors.clear(); |
appPrefs.colorPrefs.DColors.insert("White", ScColor(0, 0, 0, 0)); |
appPrefs.colorPrefs.DColors.insert("Black", ScColor(0, 0, 0, 255)); |
ScColor cc = ScColor(255, 255, 255, 255); |
ScColor cc(255, 255, 255, 255); |
cc.setRegistrationColor(true); |
appPrefs.colorPrefs.DColors.insert("Registration", cc); |
appPrefs.colorPrefs.DColors.insert("Blue", ScColor(255, 255, 0, 0)); |
/trunk/Scribus/scribus/prefsmanager.h |
---|
165,16 → 165,16 |
//! \brief Sets the preferences' color set name |
void setColorSetName(const QString&); |
//! \brief Returns the preferences' color set |
const ColorList& colorSet(); |
const ColorList& colorSet() const; |
//! \brief Returns a pointer to the preferences' color set. Needed for now until colors are better defined |
ColorList* colorSetPtr(); |
//! \brief Returns the preferences' color set name |
const QString& colorSetName(); |
const QString& colorSetName() const; |
/*! \brief Return if a color belongs to tools prefs colors */ |
bool isToolColor(const QString& name); |
bool isToolColor(const QString& name) const; |
static bool isToolColor(const struct ItemToolPrefs& settings, const QString& name); |
/*! \brief Return the list of used colors in tool prefs */ |
QStringList toolColorNames(); |
QStringList toolColorNames() const; |
static QStringList toolColorNames(const struct ItemToolPrefs& settings); |
/*! \brief Replace used colors in tool prefs */ |
void replaceToolColors(const QMap<QString, QString>& replaceMap); |
/trunk/Scribus/scribus/ui/dcolor.cpp |
---|
40,8 → 40,6 |
PrefsManager& prefsManager = PrefsManager::instance(); |
bool isToolColor = prefsManager.isToolColor(colorName); |
replaceLabel = nullptr; |
replacementColData = nullptr; |
if (haveDoc || isToolColor) |
{ |
replaceLabel = new QLabel( tr( "Replace With:" ), this ); |
80,7 → 78,7 |
replacementColor = replacementColData->itemText(id); |
} |
const QString& DelColor::getReplacementColor() |
const QString& DelColor::getReplacementColor() const |
{ |
return replacementColor; |
} |
/trunk/Scribus/scribus/ui/dcolor.h |
---|
25,23 → 25,25 |
public: |
DelColor(QWidget* parent, const ColorList& colorList, const QString& colorName, bool haveDoc ); |
~DelColor() {}; |
const QString &getReplacementColor(); |
const QString &getReplacementColor() const; |
private: |
QLabel* deleteLabel; |
QLabel* colorToDelLabel; |
QLabel* replaceLabel; |
QPushButton* okButton; |
QPushButton* cancelButton; |
ColorCombo* replacementColData; |
QVBoxLayout* dialogLayout; |
QGridLayout* delColorLayout; |
QHBoxLayout* okCancelLayout; |
QLabel* deleteLabel { nullptr }; |
QLabel* colorToDelLabel { nullptr }; |
QLabel* replaceLabel { nullptr }; |
QPushButton* okButton { nullptr }; |
QPushButton* cancelButton { nullptr }; |
ColorCombo* replacementColData { nullptr }; |
QVBoxLayout* dialogLayout { nullptr }; |
QGridLayout* delColorLayout { nullptr }; |
QHBoxLayout* okCancelLayout { nullptr }; |
QString replacementColor; |
ColorList cList; |
private slots: |
virtual void ReplaceColor(int); |
virtual void ReplaceColor(int); |
}; |
#endif // DELCOLOR_H |
/trunk/Scribus/scribus/ui/effectsdialog.cpp |
---|
42,15 → 42,16 |
EffectsDialog::EffectsDialog( QWidget* parent, PageItem* item, ScribusDoc* docc ) : QDialog( parent ) |
EffectsDialog::EffectsDialog( QWidget* parent, PageItem* item, ScribusDoc* docc ) |
: QDialog( parent ), |
m_doc(docc), |
m_item(item) |
{ |
setModal(true); |
setWindowTitle( tr( "Image Effects" ) ); |
setWindowIcon(IconManager::instance().loadIcon("AppIcon.png")); |
m_item = item; |
effectsList = m_item->effectsInUse; |
m_doc = docc; |
currentOptions = nullptr; |
// CMSettings cms(docc, "", Intent_Perceptual); |
// cms.allowColorManagement(false); |
61,7 → 62,6 |
m_image.loadPicture(m_item->Pfile, m_item->pixm.imgInfo.actualPageNumber, cms, ScImage::RGBData, 72, &mode); |
int iw = m_image.width(); |
int ih = m_image.height(); |
m_imageScale = 1.0; |
if ((iw > 220) || (ih > 220)) |
{ |
double sx = iw / 220.0; |
755,9 → 755,9 |
m_time.start(); |
} |
void EffectsDialog::saveValues(bool final) |
void EffectsDialog::saveValues(bool finalValues) |
{ |
selectEffectHelper(final); |
selectEffectHelper(finalValues); |
effectsList.clear(); |
struct ImageEffect ef; |
for (int e = 0; e < usedEffects->count(); ++e) |
795,7 → 795,7 |
if (usedEffects->item(e)->text() == tr("Blur")) |
{ |
ef.effectCode = ImageEffect::EF_BLUR; |
if (final) |
if (finalValues) |
ef.effectParameters = QString("%1 1.0").arg(blRadius->value() * m_imageScale); |
else |
ef.effectParameters = QString("%1 1.0").arg(blRadius->value()); |
1394,7 → 1394,7 |
connect( usedEffects, SIGNAL( itemActivated(QListWidgetItem*) ), this, SLOT( selectEffect(QListWidgetItem*) ) ); |
} |
void EffectsDialog::selectEffectHelper(bool final) |
void EffectsDialog::selectEffectHelper(bool finalValues) |
{ |
if (currentOptions != nullptr) |
{ |
1432,7 → 1432,7 |
{ |
QString efval; |
QString tmp; |
if (!final) |
if (!finalValues) |
tmp.setNum(blRadius->value()); |
else |
tmp.setNum(blRadius->value()*m_imageScale); |
/trunk/Scribus/scribus/ui/effectsdialog.h |
---|
45,125 → 45,126 |
public: |
EffectsDialog( QWidget* parent, PageItem* item, ScribusDoc* docc ); |
~EffectsDialog() {}; |
void selectEffectHelper(bool final = false); |
void selectEffectHelper(bool finalValues = false); |
void setItemSelectable(QListWidget* widget, int itemNr, bool enable); |
QLabel* pixmapLabel1; |
QLabel* textLabel1; |
QLabel* textLabel2; |
QLabel* textLabel3; |
QLabel* textLabel4; |
QLabel* textLabel5; |
QLabel* textLabel6; |
QLabel* textLabel7; |
QLabel* textLabel8; |
QLabel* textLabel9; |
QLabel* textLabel10; |
QLabel* textLabel11; |
QLabel* textLabel12; |
QLabel* textLabel14; |
QLabel* textLabel15; |
QStackedWidget* optionStack; |
QWidget* WStackPage; |
QWidget* WStackPage_2; |
ColorCombo* colData; |
ShadeButton *shade; |
QWidget* WStackPage_3; |
QSlider* brightnessSlider; |
QWidget* WStackPage_4; |
QSlider* contrastSlider; |
QWidget* WStackPage_5; |
ScrSpinBox* shRadius; |
ScrSpinBox* shValue; |
QWidget* WStackPage_6; |
ScrSpinBox* blRadius; |
QWidget* WStackPage_7; |
QSlider* solarizeSlider; |
QWidget* WStackPage_8; |
QLabel* textLabel1d; |
ColorCombo* colData1; |
ShadeButton *shade1; |
CurveWidget *CurveD1; |
QToolButton *CurveD1Button; |
QMenu *CurveD1Pop; |
QWidgetAction* CurveD1Act; |
QLabel* textLabel2d; |
ColorCombo* colData2; |
ShadeButton *shade2; |
CurveWidget *CurveD2; |
QToolButton *CurveD2Button; |
QMenu *CurveD2Pop; |
QWidgetAction* CurveD2Act; |
QLabel* pixmapLabel1 { nullptr }; |
QLabel* textLabel1 { nullptr }; |
QLabel* textLabel2 { nullptr }; |
QLabel* textLabel3 { nullptr }; |
QLabel* textLabel4 { nullptr }; |
QLabel* textLabel5 { nullptr }; |
QLabel* textLabel6 { nullptr }; |
QLabel* textLabel7 { nullptr }; |
QLabel* textLabel8 { nullptr }; |
QLabel* textLabel9 { nullptr }; |
QLabel* textLabel10 { nullptr }; |
QLabel* textLabel11 { nullptr }; |
QLabel* textLabel12 { nullptr }; |
QLabel* textLabel14 { nullptr }; |
QLabel* textLabel15 { nullptr }; |
QStackedWidget* optionStack { nullptr }; |
QWidget* WStackPage { nullptr }; |
QWidget* WStackPage_2 { nullptr }; |
ColorCombo* colData { nullptr }; |
ShadeButton *shade { nullptr }; |
QWidget* WStackPage_3 { nullptr }; |
QSlider* brightnessSlider { nullptr }; |
QWidget* WStackPage_4 { nullptr }; |
QSlider* contrastSlider { nullptr }; |
QWidget* WStackPage_5 { nullptr }; |
ScrSpinBox* shRadius { nullptr }; |
ScrSpinBox* shValue { nullptr }; |
QWidget* WStackPage_6 { nullptr }; |
ScrSpinBox* blRadius { nullptr }; |
QWidget* WStackPage_7 { nullptr }; |
QSlider* solarizeSlider { nullptr }; |
QWidget* WStackPage_8 { nullptr }; |
QLabel* textLabel1d { nullptr }; |
ColorCombo* colData1 { nullptr }; |
ShadeButton *shade1 { nullptr }; |
CurveWidget *CurveD1 { nullptr }; |
QToolButton *CurveD1Button { nullptr }; |
QMenu *CurveD1Pop { nullptr }; |
QWidgetAction* CurveD1Act { nullptr }; |
QLabel* textLabel2d { nullptr }; |
ColorCombo* colData2 { nullptr }; |
ShadeButton *shade2 { nullptr }; |
CurveWidget *CurveD2 { nullptr }; |
QToolButton *CurveD2Button { nullptr }; |
QMenu *CurveD2Pop { nullptr }; |
QWidgetAction* CurveD2Act { nullptr }; |
QWidget* WStackPage_9; |
QLabel* textLabel1t; |
ColorCombo* colDatat1; |
ShadeButton *shadet1; |
CurveWidget *CurveT1; |
QToolButton *CurveT1Button; |
QMenu *CurveT1Pop; |
QWidgetAction* CurveT1Act; |
QLabel* textLabel2t; |
ColorCombo* colDatat2; |
ShadeButton *shadet2; |
CurveWidget *CurveT2; |
QToolButton *CurveT2Button; |
QMenu *CurveT2Pop; |
QWidgetAction* CurveT2Act; |
QLabel* textLabel3t; |
ColorCombo* colDatat3; |
ShadeButton *shadet3; |
CurveWidget *CurveT3; |
QToolButton *CurveT3Button; |
QMenu *CurveT3Pop; |
QWidgetAction* CurveT3Act; |
QWidget* WStackPage_9 { nullptr }; |
QLabel* textLabel1t { nullptr }; |
ColorCombo* colDatat1 { nullptr }; |
ShadeButton *shadet1 { nullptr }; |
CurveWidget *CurveT1 { nullptr }; |
QToolButton *CurveT1Button { nullptr }; |
QMenu *CurveT1Pop { nullptr }; |
QWidgetAction* CurveT1Act { nullptr }; |
QLabel* textLabel2t { nullptr }; |
ColorCombo* colDatat2 { nullptr }; |
ShadeButton *shadet2 { nullptr }; |
CurveWidget *CurveT2 { nullptr }; |
QToolButton *CurveT2Button { nullptr }; |
QMenu *CurveT2Pop { nullptr }; |
QWidgetAction* CurveT2Act { nullptr }; |
QLabel* textLabel3t { nullptr }; |
ColorCombo* colDatat3 { nullptr }; |
ShadeButton *shadet3 { nullptr }; |
CurveWidget *CurveT3 { nullptr }; |
QToolButton *CurveT3Button { nullptr }; |
QMenu *CurveT3Pop { nullptr }; |
QWidgetAction* CurveT3Act { nullptr }; |
QWidget* WStackPage_10; |
QLabel* textLabel1q; |
ColorCombo* colDataq1; |
ShadeButton *shadeq1; |
CurveWidget *CurveQ1; |
QToolButton *CurveQ1Button; |
QMenu *CurveQ1Pop; |
QWidgetAction* CurveQ1Act; |
QLabel* textLabel2q; |
ColorCombo* colDataq2; |
ShadeButton *shadeq2; |
CurveWidget *CurveQ2; |
QToolButton *CurveQ2Button; |
QMenu *CurveQ2Pop; |
QWidgetAction* CurveQ2Act; |
QLabel* textLabel3q; |
ColorCombo* colDataqc3; |
ShadeButton *shadeqc3; |
CurveWidget *CurveQc3; |
QToolButton *CurveQc3Button; |
QMenu *CurveQc3Pop; |
QWidgetAction* CurveQc3Act; |
QLabel* textLabel4q; |
ColorCombo* colDataq4; |
ShadeButton *shadeq4; |
CurveWidget *CurveQ4; |
QToolButton *CurveQ4Button; |
QMenu *CurveQ4Pop; |
QWidgetAction* CurveQ4Act; |
QWidget* WStackPage_10 { nullptr }; |
QLabel* textLabel1q { nullptr }; |
ColorCombo* colDataq1 { nullptr }; |
ShadeButton *shadeq1 { nullptr }; |
CurveWidget *CurveQ1 { nullptr }; |
QToolButton *CurveQ1Button { nullptr }; |
QMenu *CurveQ1Pop { nullptr }; |
QWidgetAction* CurveQ1Act { nullptr }; |
QLabel* textLabel2q { nullptr }; |
ColorCombo* colDataq2 { nullptr }; |
ShadeButton *shadeq2 { nullptr }; |
CurveWidget *CurveQ2 { nullptr }; |
QToolButton *CurveQ2Button { nullptr }; |
QMenu *CurveQ2Pop { nullptr }; |
QWidgetAction* CurveQ2Act { nullptr }; |
QLabel* textLabel3q { nullptr }; |
ColorCombo* colDataqc3 { nullptr }; |
ShadeButton *shadeqc3 { nullptr }; |
CurveWidget *CurveQc3 { nullptr }; |
QToolButton *CurveQc3Button { nullptr }; |
QMenu *CurveQc3Pop { nullptr }; |
QWidgetAction* CurveQc3Act { nullptr }; |
QLabel* textLabel4q { nullptr }; |
ColorCombo* colDataq4 { nullptr }; |
ShadeButton *shadeq4 { nullptr }; |
CurveWidget *CurveQ4 { nullptr }; |
QToolButton *CurveQ4Button { nullptr }; |
QMenu *CurveQ4Pop { nullptr }; |
QWidgetAction* CurveQ4Act { nullptr }; |
QWidget* WStackPage_11; |
CurveWidget *Kdisplay; |
QWidget* WStackPage_11 { nullptr }; |
CurveWidget *Kdisplay { nullptr }; |
QListWidget* usedEffects; |
QPushButton* effectUp; |
QPushButton* effectDown; |
QPushButton* toEffects; |
QPushButton* fromEffects; |
QListWidget* availableEffects; |
QPushButton* okButton; |
QPushButton* cancelButton; |
QListWidgetItem* currentOptions; |
QListWidget* usedEffects { nullptr }; |
QPushButton* effectUp { nullptr }; |
QPushButton* effectDown { nullptr }; |
QPushButton* toEffects { nullptr }; |
QPushButton* fromEffects { nullptr }; |
QListWidget* availableEffects { nullptr }; |
QPushButton* okButton { nullptr }; |
QPushButton* cancelButton { nullptr }; |
QListWidgetItem* currentOptions { nullptr }; |
QGroupBox *groupBox; |
QSpacerItem* spacer; |
QSpacerItem* spacer3; |
QGroupBox *groupBox { nullptr }; |
QSpacerItem* spacer { nullptr }; |
QSpacerItem* spacer3 { nullptr }; |
ScImageEffectList effectsList; |
173,7 → 174,7 |
virtual void updateContrast(int val); |
virtual void updateBright(int val); |
virtual void createPreview(); |
virtual void saveValues(bool final); |
virtual void saveValues(bool finalValues); |
virtual void moveToEffects(); |
virtual void moveFromEffects(); |
virtual void moveEffectUp(); |
187,34 → 188,34 |
PageItem* m_item {nullptr}; |
ScImage m_image; |
double m_imageScale; |
double m_imageScale { 1.0 }; |
QElapsedTimer m_time; |
QMap<QListWidgetItem*, QString> m_effectValMap; |
QGridLayout* layoutGrid; |
QVBoxLayout* EffectsDialogLayout; |
QVBoxLayout* WStackPageLayout; |
QVBoxLayout* WStackPage3Layout; |
QHBoxLayout* layout20; |
QVBoxLayout* WStackPage4Layout; |
QHBoxLayout* layout21; |
QVBoxLayout* WStackPage5Layout; |
QHBoxLayout* layout22; |
QHBoxLayout* layout23; |
QVBoxLayout* WStackPage6Layout; |
QHBoxLayout* layout24; |
QVBoxLayout* WStackPage7Layout; |
QGridLayout* WStackPage8Layout; |
QGridLayout* WStackPage9Layout; |
QGridLayout* WStackPage10Layout; |
QVBoxLayout* WStackPage11Layout; |
QHBoxLayout* layout26; |
QHBoxLayout* layout17; |
QHBoxLayout* layout19; |
QVBoxLayout* layout8; |
QHBoxLayout* layout7; |
QHBoxLayout* layoutDialogButtonBox; |
QGridLayout* layoutGrid { nullptr }; |
QVBoxLayout* EffectsDialogLayout { nullptr }; |
QVBoxLayout* WStackPageLayout { nullptr }; |
QVBoxLayout* WStackPage3Layout { nullptr }; |
QHBoxLayout* layout20 { nullptr }; |
QVBoxLayout* WStackPage4Layout { nullptr }; |
QHBoxLayout* layout21 { nullptr }; |
QVBoxLayout* WStackPage5Layout { nullptr }; |
QHBoxLayout* layout22 { nullptr }; |
QHBoxLayout* layout23 { nullptr }; |
QVBoxLayout* WStackPage6Layout { nullptr }; |
QHBoxLayout* layout24 { nullptr }; |
QVBoxLayout* WStackPage7Layout { nullptr }; |
QGridLayout* WStackPage8Layout { nullptr }; |
QGridLayout* WStackPage9Layout { nullptr }; |
QGridLayout* WStackPage10Layout { nullptr }; |
QVBoxLayout* WStackPage11Layout { nullptr }; |
QHBoxLayout* layout26 { nullptr }; |
QHBoxLayout* layout17 { nullptr }; |
QHBoxLayout* layout19 { nullptr }; |
QVBoxLayout* layout8 { nullptr }; |
QHBoxLayout* layout7 { nullptr }; |
QHBoxLayout* layoutDialogButtonBox { nullptr }; |
}; |
#endif // EFFECTSDIALOG_H |
/trunk/Scribus/scribus/ui/fontcombo.cpp |
---|
28,6 → 28,7 |
#include <QGridLayout> |
#include <QLabel> |
#include <QPixmap> |
#include <QPixmapCache> |
#include <QStringList> |
#include <QToolTip> |
111,7 → 112,6 |
prefsManager(PrefsManager::instance()), |
showLabels(labels) |
{ |
currDoc = nullptr; |
ttfFont = IconManager::instance().loadPixmap("font_truetype16.png"); |
otfFont = IconManager::instance().loadPixmap("font_otf16.png"); |
psFont = IconManager::instance().loadPixmap("font_type1_16.png"); |
200,7 → 200,7 |
emit fontSelected(fontFamily->currentText() + " " + fontStyle->itemText(id)); |
} |
QString FontComboH::currentFont() |
QString FontComboH::currentFont() const |
{ |
return fontFamily->currentText() + " " + fontStyle->currentText(); |
} |
495,9 → 495,8 |
FontFamilyDelegate::FontFamilyDelegate(QObject *parent) |
: QAbstractItemDelegate(parent) |
, writingSystem(QFontDatabase::Any) |
{ |
pixmapCache.setCacheLimit(64*1024); |
QPixmapCache::setCacheLimit(64 * 1024); |
} |
void FontFamilyDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
511,13 → 510,13 |
QString cacheKey = text + wh; |
if (option.state & QStyle::State_Selected) |
cacheKey += "-selected"; |
if (pixmapCache.find(cacheKey, &cachedPixmap)) |
if (QPixmapCache::find(cacheKey, &cachedPixmap)) |
{ |
painter->drawPixmap(option.rect.x(), option.rect.y(), cachedPixmap); |
return; |
} |
QFontDatabase& fontDb = ScQApp->qtFontDatabase(); |
const QFontDatabase& fontDb = ScQApp->qtFontDatabase(); |
const ScFace& scFace = getScFace(this->parent()->metaObject()->className(), text); |
QPixmap pixmap(pixmapW, pixmapH); |
591,7 → 590,7 |
int w = pixPainter.fontMetrics().horizontalAdvance(text + QLatin1String(" ")); |
pixPainter.setFont(font2); |
invpixPainter.setFont(font2); |
QString sample = fontDb.writingSystemSample(system); |
QString sample = QFontDatabase::writingSystemSample(system); |
if (system == QFontDatabase::Arabic) |
sample = "أبجدية عربية"; |
626,8 → 625,8 |
painter->drawPixmap(option.rect.x(), option.rect.y(), invPixmap); |
else |
painter->drawPixmap(option.rect.x(), option.rect.y(), pixmap); |
pixmapCache.insert(cacheKey, pixmap); |
pixmapCache.insert(cacheKey+"-selected", invPixmap); |
QPixmapCache::insert(cacheKey, pixmap); |
QPixmapCache::insert(cacheKey + "-selected", invPixmap); |
} |
bool FontFamilyDelegate::helpEvent(QHelpEvent * event, QAbstractItemView * view, |
/trunk/Scribus/scribus/ui/fontcombo.h |
---|
27,7 → 27,6 |
#include <QWidget> |
#include <QComboBox> |
#include <QFontDatabase> |
#include <QPixmapCache> |
#include <QValidator> |
#include "scribusapi.h" |
74,7 → 73,7 |
FontComboH(QWidget* parent, bool labels=false); |
~FontComboH() {} |
QString currentFont(); |
QString currentFont() const; |
void rebuildList(ScribusDoc *currentDoc, bool forAnnotation = false, bool forSubstitute = false); |
public slots: |
125,11 → 124,10 |
QSize sizeHint(const QStyleOptionViewItem &option, |
const QModelIndex &index) const Q_DECL_OVERRIDE; |
QFontDatabase::WritingSystem writingSystem; |
QFontDatabase::WritingSystem writingSystem { QFontDatabase::Any }; |
protected: |
QFont m_font; |
static QPixmapCache pixmapCache; |
}; |
class FontComboValidator : public QValidator |
/trunk/Scribus/scribus/ui/fontembeddingcombo.cpp |
---|
13,7 → 13,6 |
#ifdef Q_OS_MAC |
// setStyle( new FontEmbeddingCombo::ScMacStyle() ); |
#endif |
m_allowNoFontEmbedding = true; |
m_fontEmbeddingModel = new FontEmbeddingModel(this); |
setEditable(false); |
/trunk/Scribus/scribus/ui/fontembeddingcombo.h |
---|
32,8 → 32,8 |
void setNoEmbeddingEnabled(bool enabled); |
private: |
bool m_allowNoFontEmbedding; |
FontEmbeddingModel* m_fontEmbeddingModel; |
bool m_allowNoFontEmbedding { true }; |
FontEmbeddingModel* m_fontEmbeddingModel { nullptr }; |
}; |
#endif |