r18330 by jghali - #11586: refactoring ScribusDoc* data members to m_Doc, second part
scribus-commit
scribus-commit at lists.scribus.net
Wed Jun 19 19:46:22 UTC 2013
Author: jghali
Date: Wed Jun 19 19:46:21 2013
New Revision: 18330
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18330
Log:
#11586: refactoring ScribusDoc* data members to m_Doc, second part
Modified:
trunk/Scribus/scribus/hyphenator.cpp
trunk/Scribus/scribus/hyphenator.h
trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.h
trunk/Scribus/scribus/text/storytext.cpp
trunk/Scribus/scribus/text/storytext.h
trunk/Scribus/scribus/ui/effectsdialog.cpp
trunk/Scribus/scribus/ui/effectsdialog.h
trunk/Scribus/scribus/ui/nodeeditpalette.cpp
trunk/Scribus/scribus/ui/nodeeditpalette.h
trunk/Scribus/scribus/ui/search.cpp
trunk/Scribus/scribus/ui/search.h
trunk/Scribus/scribus/ui/storyeditor.cpp
trunk/Scribus/scribus/ui/storyeditor.h
trunk/Scribus/scribus/ui/symbolpalette.cpp
trunk/Scribus/scribus/ui/symbolpalette.h
trunk/Scribus/scribus/ui/tabpdfoptions.cpp
trunk/Scribus/scribus/ui/tabpdfoptions.h
Modified: trunk/Scribus/scribus/hyphenator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/hyphenator.cpp
==============================================================================
--- trunk/Scribus/scribus/hyphenator.cpp (original)
+++ trunk/Scribus/scribus/hyphenator.cpp Wed Jun 19 19:46:21 2013
@@ -43,44 +43,44 @@
#include "text/nlsconfig.h"
Hyphenator::Hyphenator(QWidget* parent, ScribusDoc *dok) : QObject( parent ),
- doc(dok),
- hdict(0),
- usable(false),
- codec(0),
- MinWordLen(doc->hyphMinimumWordLength()),
- HyCount(doc->hyphConsecutiveLines()),
- Automatic(doc->hyphAutomatic()),
- AutoCheck(doc->hyphAutoCheck())
+ m_doc(dok),
+ m_hdict(0),
+ m_usable(false),
+ m_codec(0),
+ MinWordLen(m_doc->hyphMinimumWordLength()),
+ HyCount(m_doc->hyphConsecutiveLines()),
+ Automatic(m_doc->hyphAutomatic()),
+ AutoCheck(m_doc->hyphAutoCheck())
{
//FIXME:av pick up language from charstyle
LanguageManager * lmgr(LanguageManager::instance());
- if (!lmgr->getHyphFilename(doc->hyphLanguage()).isEmpty() )
- Language = doc->hyphLanguage();
+ if (!lmgr->getHyphFilename(m_doc->hyphLanguage()).isEmpty() )
+ Language = m_doc->hyphLanguage();
else
{
Language = PrefsManager::instance()->appPrefs.hyphPrefs.Language;
- doc->setHyphLanguage(Language);
- }
- QString pfad = lmgr->getHyphFilename(doc->hyphLanguage());
+ m_doc->setHyphLanguage(Language);
+ }
+ QString pfad = lmgr->getHyphFilename(m_doc->hyphLanguage());
QFile f(pfad);
if (f.open(QIODevice::ReadOnly))
{
QTextStream st(&f);
QString line;
line = st.readLine();
- codec = QTextCodec::codecForName(line.toUtf8());
+ m_codec = QTextCodec::codecForName(line.toUtf8());
f.close();
}
else
{
- usable = false;
- hdict = NULL;
+ m_usable = false;
+ m_hdict = NULL;
return;
}
QByteArray fn = pfad.toLocal8Bit();
const char * filename = fn.data();
- hdict = hnj_hyphen_load(filename);
- usable = hdict == NULL ? false : true;
+ m_hdict = hnj_hyphen_load(filename);
+ m_usable = m_hdict == NULL ? false : true;
rememberedWords.clear();
/* Add reading these special lists from prefs or doc here */
ignoredWords.clear();
@@ -89,8 +89,8 @@
Hyphenator::~Hyphenator()
{
- if (hdict)
- hnj_hyphen_free(hdict);
+ if (m_hdict)
+ hnj_hyphen_free(m_hdict);
}
void Hyphenator::NewDict(const QString& name)
@@ -107,8 +107,8 @@
char *filename = NULL;
QString pfad = LanguageManager::instance()->getHyphFilename(Language);
- if (hdict != NULL)
- hnj_hyphen_free(hdict);
+ if (m_hdict != NULL)
+ hnj_hyphen_free(m_hdict);
QFile f(pfad);
if (f.open(QIODevice::ReadOnly))
@@ -116,19 +116,19 @@
QTextStream st(&f);
QString line;
line = st.readLine();
- codec = QTextCodec::codecForName(line.toUtf8());
+ m_codec = QTextCodec::codecForName(line.toUtf8());
f.close();
}
else
{
- usable = false;
- hdict = NULL;
+ m_usable = false;
+ m_hdict = NULL;
return;
}
QByteArray fn = pfad.toLocal8Bit();
filename = fn.data();
- hdict = hnj_hyphen_load(filename);
- usable = hdict == NULL ? false : true;
+ m_hdict = hnj_hyphen_load(filename);
+ m_usable = m_hdict == NULL ? false : true;
}
}
@@ -138,15 +138,15 @@
Automatic = Autom;
AutoCheck = ACheck;
HyCount = Num;
- doc->setHyphMinimumWordLength(Wordlen);
- doc->setHyphAutomatic(Autom);
- doc->setHyphAutoCheck(AutoCheck);
- doc->setHyphConsecutiveLines(Num);
+ m_doc->setHyphMinimumWordLength(Wordlen);
+ m_doc->setHyphAutomatic(Autom);
+ m_doc->setHyphAutoCheck(AutoCheck);
+ m_doc->setHyphConsecutiveLines(Num);
}
void Hyphenator::slotHyphenateWord(PageItem* it, const QString& text, int firstC)
{
- if ((!usable))//FIXME:av || (!ScMW->Sprachen.contains(it->Language)))
+ if ((!m_usable))//FIXME:av || (!ScMW->Sprachen.contains(it->Language)))
return;
const char *word;
char *buffer;
@@ -161,7 +161,7 @@
else if (signed(found.length()) >= MinWordLen)
{
NewDict(it->itemText.charStyle(firstC).language());
- te = codec->fromUnicode( found );
+ te = m_codec->fromUnicode( found );
word = te.data();
int wordlen = strlen(word);
buffer = static_cast<char*>(malloc(wordlen+BORDER+3));
@@ -170,7 +170,7 @@
char ** rep = NULL;
int * pos = NULL;
int * cut = NULL;
- if (!hnj_hyphen_hyphenate2(hdict, word, wordlen, buffer, NULL, &rep, &pos, &cut))
+ if (!hnj_hyphen_hyphenate2(m_hdict, word, wordlen, buffer, NULL, &rep, &pos, &cut))
{
//uint i = 0;
buffer[wordlen] = '\0';
@@ -195,9 +195,9 @@
void Hyphenator::slotHyphenate(PageItem* it)
{
- if ((!usable) || !(it->asTextFrame()) || (it->itemText.length() == 0))
- return;
- doc->DoDrawing = false;
+ if ((!m_usable) || !(it->asTextFrame()) || (it->itemText.length() == 0))
+ return;
+ m_doc->DoDrawing = false;
const char *word;
char *buffer;
@@ -254,7 +254,7 @@
NewDict(it->itemText.charStyle(firstC).language());
- te = codec->fromUnicode( found );
+ te = m_codec->fromUnicode( found );
word = te.data();
int wordlen = strlen(word);
buffer = static_cast<char*>(malloc(wordlen+BORDER+3));
@@ -263,7 +263,7 @@
char ** rep = NULL;
int * pos = NULL;
int * cut = NULL;
- if (!hnj_hyphen_hyphenate2(hdict, word, wordlen, buffer, NULL, &rep, &pos, &cut))
+ if (!hnj_hyphen_hyphenate2(m_hdict, word, wordlen, buffer, NULL, &rep, &pos, &cut))
{
int i = 0;
buffer[wordlen] = '\0';
@@ -421,7 +421,7 @@
Ccount++;
}
qApp->restoreOverrideCursor();
- doc->DoDrawing = true;
+ m_doc->DoDrawing = true;
rememberedWords.clear();
}
@@ -439,5 +439,5 @@
uint a = it->itemText.length();
it->itemText.hyphenateWord(0, a, NULL);
}
- doc->DoDrawing = true;
-}
+ m_doc->DoDrawing = true;
+}
Modified: trunk/Scribus/scribus/hyphenator.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/hyphenator.h
==============================================================================
--- trunk/Scribus/scribus/hyphenator.h (original)
+++ trunk/Scribus/scribus/hyphenator.h Wed Jun 19 19:46:21 2013
@@ -46,14 +46,14 @@
private:
/*! Embeded reference to the \see ScribusDoc filled by \a dok */
- ScribusDoc *doc;
+ ScribusDoc *m_doc;
/*! Reference to the hyphen dictionary structure. */
- HyphenDict *hdict;
+ HyphenDict *m_hdict;
/*! Flag - if is the dictionary without errors etc. If is it 'false'
hyphen aborted. */
- bool usable;
+ bool m_usable;
/*! Qt text codec which handles local characters. */
- QTextCodec *codec;
+ QTextCodec *m_codec;
/*!
\brief Loads dictionary and fills parameters like \a useAble, \a codec, \a hdict.
Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp Wed Jun 19 19:46:21 2013
@@ -151,32 +151,32 @@
bool PathAlongPathPlugin::run(ScribusDoc* doc, QString)
{
firstUpdate = true;
- currDoc = doc;
+ m_doc = doc;
originalPathG.clear();
originalRotG.clear();
originalXPosG.clear();
originalYPosG.clear();
patternItemG.clear();
- if (currDoc == 0)
- currDoc = ScCore->primaryMainWindow()->doc;
- if (currDoc->m_Selection->count() > 1)
- {
- if ((currDoc->m_Selection->itemAt(0)->isGroup()) || (currDoc->m_Selection->itemAt(1)->isGroup()))
+ if (m_doc == 0)
+ m_doc = ScCore->primaryMainWindow()->doc;
+ if (m_doc->m_Selection->count() > 1)
+ {
+ if ((m_doc->m_Selection->itemAt(0)->isGroup()) || (m_doc->m_Selection->itemAt(1)->isGroup()))
{
selOffs = 0;
- selCount = currDoc->m_Selection->count() - 1;
- if (!currDoc->m_Selection->itemAt(0)->isGroup())
- {
- pathItem = currDoc->m_Selection->itemAt(0);
+ selCount = m_doc->m_Selection->count() - 1;
+ if (!m_doc->m_Selection->itemAt(0)->isGroup())
+ {
+ pathItem = m_doc->m_Selection->itemAt(0);
selOffs = 1;
}
else
- pathItem = currDoc->m_Selection->itemAt(selCount);
+ pathItem = m_doc->m_Selection->itemAt(selCount);
effectPath = pathItem->PoLine.copy();
QTransform mp;
mp.rotate(pathItem->rotation());
effectPath.map(mp);
- PageItem* bxi = currDoc->m_Selection->itemAt(selOffs);
+ PageItem* bxi = m_doc->m_Selection->itemAt(selOffs);
bxi->asGroupFrame()->adjustXYPosition();
originalPathG.append(bxi->PoLine.copy());
originalXPosG.append(bxi->xPos());
@@ -206,28 +206,28 @@
patternItemG.append(cIte);
}
QPainterPath tmpPath = effectPath.toQPainterPath(false);
- PathDialog *dia = new PathDialog(currDoc->scMW(), currDoc->unitIndex(), tmpPath.length(), true);
+ PathDialog *dia = new PathDialog(m_doc->scMW(), m_doc->unitIndex(), tmpPath.length(), true);
connect(dia, SIGNAL(updateValues(int, double, double, double, int)), this, SLOT(updateEffectG(int, double, double, double, int)));
if (dia->exec())
{
updateEffectG(dia->effectType, dia->offset, dia->offsetY, dia->gap, dia->rotate);
- currDoc->changed();
+ m_doc->changed();
}
else
{
updateEffectG(-1, dia->offset, dia->offsetY, dia->gap, dia->rotate);
- currDoc->view()->DrawNew();
+ m_doc->view()->DrawNew();
}
delete dia;
}
else
{
- patternItem = currDoc->m_Selection->itemAt(0);
- pathItem = currDoc->m_Selection->itemAt(1);
+ patternItem = m_doc->m_Selection->itemAt(0);
+ pathItem = m_doc->m_Selection->itemAt(1);
if (pathItem->itemType() != PageItem::PolyLine)
{
- patternItem = currDoc->m_Selection->itemAt(1);
- pathItem = currDoc->m_Selection->itemAt(0);
+ patternItem = m_doc->m_Selection->itemAt(1);
+ pathItem = m_doc->m_Selection->itemAt(0);
}
effectPath = pathItem->PoLine.copy();
QTransform mp;
@@ -238,13 +238,13 @@
originalYPos = patternItem->yPos();
originalRot = patternItem->rotation();
QPainterPath tmpPath = effectPath.toQPainterPath(false);
- PathDialog *dia = new PathDialog(currDoc->scMW(), currDoc->unitIndex(), tmpPath.length(), false);
+ PathDialog *dia = new PathDialog(m_doc->scMW(), m_doc->unitIndex(), tmpPath.length(), false);
connect(dia, SIGNAL(updateValues(int, double, double, double, int)), this, SLOT(updateEffect(int, double, double, double, int)));
if (dia->exec())
{
updateEffect(dia->effectType, dia->offset, dia->offsetY, dia->gap, dia->rotate);
patternItem->ContourLine = patternItem->PoLine.copy();
- currDoc->changed();
+ m_doc->changed();
}
else
{
@@ -253,11 +253,11 @@
patternItem->FrameType = 3;
patternItem->setXYPos(originalXPos, originalYPos);
patternItem->setRotation(originalRot);
- currDoc->AdjustItemSize(patternItem);
+ m_doc->AdjustItemSize(patternItem);
patternItem->OldB2 = patternItem->width();
patternItem->OldH2 = patternItem->height();
patternItem->updateClip();
- currDoc->view()->DrawNew();
+ m_doc->view()->DrawNew();
}
delete dia;
}
@@ -298,7 +298,7 @@
patternpwd2 = FPointArray2Piecewise(originalPathG[0], false);
else
patternpwd2 = FPointArray2Piecewise(originalPathG[0], true);
- setUpEffect(originaldpwd2, patternpwd2, effectType, offset / currDoc->unitRatio(), offsetY / currDoc->unitRatio(), gap / currDoc->unitRatio(), rotate);
+ setUpEffect(originaldpwd2, patternpwd2, effectType, offset / m_doc->unitRatio(), offsetY / m_doc->unitRatio(), gap / m_doc->unitRatio(), rotate);
for (int bx = 0; bx < patternItemG.count(); ++bx)
{
PageItem* bxi = patternItemG[bx];
@@ -325,7 +325,7 @@
bxi->setXYPos(pathItem->xPos()+deltaX, pathItem->yPos()+deltaY, true);
double oW = bxi->width();
double oH = bxi->height();
- currDoc->AdjustItemSize(bxi, true);
+ m_doc->AdjustItemSize(bxi, true);
bxi->OldB2 = bxi->width();
bxi->OldH2 = bxi->height();
if (bxi->isGroup())
@@ -339,14 +339,14 @@
}
qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
if (firstUpdate)
- currDoc->view()->DrawNew();
+ m_doc->view()->DrawNew();
else
{
double gx, gy, gh, gw;
- currDoc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
+ m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
QRectF oldR(pathItem->getBoundingRect());
QRectF newR = QRectF(gx, gy, gw, gh);
- currDoc->regionsChanged()->update(newR.united(oldR));
+ m_doc->regionsChanged()->update(newR.united(oldR));
}
if (effectType != -1)
firstUpdate = false;
@@ -371,24 +371,24 @@
patternpwd2 = FPointArray2Piecewise(originalPath, false);
else
patternpwd2 = FPointArray2Piecewise(originalPath, true);
- setUpEffect(originaldpwd2, patternpwd2, effectType, offset / currDoc->unitRatio(), offsetY / currDoc->unitRatio(), gap / currDoc->unitRatio(), rotate);
+ setUpEffect(originaldpwd2, patternpwd2, effectType, offset / m_doc->unitRatio(), offsetY / m_doc->unitRatio(), gap / m_doc->unitRatio(), rotate);
patternItem->PoLine = doEffect_pwd2(patternpwd2);
patternItem->ClipEdited = true;
patternItem->FrameType = 3;
patternItem->setXYPos(pathItem->xPos(), pathItem->yPos());
patternItem->setRotation(0);
}
- currDoc->AdjustItemSize(patternItem, true);
+ m_doc->AdjustItemSize(patternItem, true);
patternItem->OldB2 = patternItem->width();
patternItem->OldH2 = patternItem->height();
patternItem->updateClip();
if (firstUpdate)
- currDoc->view()->DrawNew();
+ m_doc->view()->DrawNew();
else
{
QRectF oldR(pathItem->getBoundingRect());
QRectF newR(patternItem->getBoundingRect());
- currDoc->regionsChanged()->update(newR.united(oldR));
+ m_doc->regionsChanged()->update(newR.united(oldR));
}
if (effectType != -1)
firstUpdate = false;
Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.h
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.h (original)
+++ trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.h Wed Jun 19 19:46:21 2013
@@ -77,7 +77,7 @@
double originalRot;
double originalXPos;
double originalYPos;
- ScribusDoc* currDoc;
+ ScribusDoc* m_doc;
bool firstUpdate;
Geom::Piecewise<Geom::D2<Geom::SBasis> > uskeleton;
Geom::Piecewise<Geom::D2<Geom::SBasis> > n;
Modified: trunk/Scribus/scribus/text/storytext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/text/storytext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/storytext.cpp (original)
+++ trunk/Scribus/scribus/text/storytext.cpp Wed Jun 19 19:46:21 2013
@@ -40,21 +40,21 @@
#include "desaxe/simple_actions.h"
-StoryText::StoryText(ScribusDoc * doc_) : doc(doc_)
+StoryText::StoryText(ScribusDoc * doc_) : m_doc(doc_)
{
if (doc_) {
d = new ScText_Shared(&doc_->paragraphStyles());
- doc->paragraphStyles().connect(this, SLOT(invalidateAll()));
- doc->charStyles().connect(this, SLOT(invalidateAll()));
+ m_doc->paragraphStyles().connect(this, SLOT(invalidateAll()));
+ m_doc->charStyles().connect(this, SLOT(invalidateAll()));
}
else {
d = new ScText_Shared(NULL);
}
- selFirst = 0;
- selLast = -1;
-
- firstFrameItem = 0;
- lastFrameItem = -1;
+ m_selFirst = 0;
+ m_selLast = -1;
+
+ m_firstFrameItem = 0;
+ m_lastFrameItem = -1;
m_magicX = 0.0;
m_lastMagicPos = -1;
@@ -62,34 +62,34 @@
invalidateAll();
}
-StoryText::StoryText() : doc(NULL)
+StoryText::StoryText() : m_doc(NULL)
{
d = new ScText_Shared(NULL);
- selFirst = 0;
- selLast = -1;
-
- firstFrameItem = 0;
- lastFrameItem = -1;
+ m_selFirst = 0;
+ m_selLast = -1;
+
+ m_firstFrameItem = 0;
+ m_lastFrameItem = -1;
m_magicX = 0.0;
m_lastMagicPos = -1;
}
-StoryText::StoryText(const StoryText & other) : QObject(), SaxIO(), doc(other.doc)
+StoryText::StoryText(const StoryText & other) : QObject(), SaxIO(), m_doc(other.m_doc)
{
d = other.d;
d->refs++;
- if(doc) {
- doc->paragraphStyles().connect(this, SLOT(invalidateAll()));
- doc->charStyles().connect(this, SLOT(invalidateAll()));
- }
-
- selFirst = 0;
- selLast = -1;
-
- firstFrameItem = 0;
- lastFrameItem = -1;
+ if (m_doc) {
+ m_doc->paragraphStyles().connect(this, SLOT(invalidateAll()));
+ m_doc->charStyles().connect(this, SLOT(invalidateAll()));
+ }
+
+ m_selFirst = 0;
+ m_selLast = -1;
+
+ m_firstFrameItem = 0;
+ m_lastFrameItem = -1;
m_magicX = 0.0;
m_lastMagicPos = -1;
@@ -116,12 +116,12 @@
void StoryText::setDoc(ScribusDoc *docin)
{
- doc = docin;
+ m_doc = docin;
}
StoryText StoryText::copy() const
{
- StoryText result(doc);
+ StoryText result(m_doc);
*(result.d) = *d;
return result;
}
@@ -136,24 +136,24 @@
delete d;
}
- if(doc) {
- doc->paragraphStyles().disconnect(this, SLOT(invalidateAll()));
- doc->charStyles().disconnect(this, SLOT(invalidateAll()));
- }
-
- doc = other.doc;
+ if (m_doc) {
+ m_doc->paragraphStyles().disconnect(this, SLOT(invalidateAll()));
+ m_doc->charStyles().disconnect(this, SLOT(invalidateAll()));
+ }
+
+ m_doc = other.m_doc;
d = other.d;
- if (doc) {
- doc->paragraphStyles().connect(this, SLOT(invalidateAll()));
- doc->charStyles().connect(this, SLOT(invalidateAll()));
- }
-
- selFirst = 0;
- selLast = -1;
-
- firstFrameItem = 0;
- lastFrameItem = -1;
+ if (m_doc) {
+ m_doc->paragraphStyles().connect(this, SLOT(invalidateAll()));
+ m_doc->charStyles().connect(this, SLOT(invalidateAll()));
+ }
+
+ m_selFirst = 0;
+ m_selLast = -1;
+
+ m_firstFrameItem = 0;
+ m_lastFrameItem = -1;
invalidateLayout();
return *this;
@@ -183,11 +183,11 @@
void StoryText::clear()
{
- selFirst = 0;
- selLast = -1;
-
- firstFrameItem = 0;
- lastFrameItem = -1;
+ m_selFirst = 0;
+ m_selLast = -1;
+
+ m_firstFrameItem = 0;
+ m_lastFrameItem = -1;
d->defaultStyle.erase();
d->trailingStyle.erase();
@@ -420,19 +420,19 @@
d->takeAt(i);
d->len--;
delete it;
- // #9592 : adjust selFirst and selLast, those values have to be
+ // #9592 : adjust m_selFirst and m_selLast, those values have to be
// consistent in functions such as select()
- if (i <= selLast) --selLast;
- if (i < selFirst) --selFirst;
+ if (i <= m_selLast) --m_selLast;
+ if (i < m_selFirst) --m_selFirst;
if ((i + 1 ) <= d->cursorPosition && d->cursorPosition > 0) d->cursorPosition -= 1;
}
d->len = d->count();
d->cursorPosition = qMin(d->cursorPosition, d->len);
- if (selFirst > selLast)
- {
- selFirst = 0;
- selLast = -1;
+ if (m_selFirst > m_selLast)
+ {
+ m_selFirst = 0;
+ m_selLast = -1;
}
invalidate(pos, length());
}
@@ -631,8 +631,8 @@
insertChars(pos, SpecialChars::OBJECT);
const_cast<StoryText *>(this)->d->at(pos)->embedded = ob;
- doc->FrameItems[ob]->isEmbedded = true; // this might not be enough...
- doc->FrameItems[ob]->OwnPage = -1; // #10379: OwnPage is not meaningful for inline object
+ m_doc->FrameItems[ob]->isEmbedded = true; // this might not be enough...
+ m_doc->FrameItems[ob]->OwnPage = -1; // #10379: OwnPage is not meaningful for inline object
}
void StoryText::insertMark(Mark* Mark, int pos)
@@ -653,8 +653,8 @@
replaceChar(pos, SpecialChars::OBJECT);
const_cast<StoryText *>(this)->d->at(pos)->embedded = ob;
- doc->FrameItems[ob]->isEmbedded = true; // this might not be enough...
- doc->FrameItems[ob]->OwnPage = -1; // #10379: OwnPage is not meaningful for inline object
+ m_doc->FrameItems[ob]->isEmbedded = true; // this might not be enough...
+ m_doc->FrameItems[ob]->OwnPage = -1; // #10379: OwnPage is not meaningful for inline object
}
@@ -759,7 +759,7 @@
StoryText* that = const_cast<StoryText *>(this);
if (that->d->at(pos)->ch == SpecialChars::OBJECT)
- return that->d->at(pos)->hasObject(doc);
+ return that->d->at(pos)->hasObject(m_doc);
return false;
}
@@ -772,7 +772,7 @@
assert(pos < length());
StoryText* that = const_cast<StoryText *>(this);
- return that->d->at(pos)->getItem(doc);
+ return that->d->at(pos)->getItem(m_doc);
}
bool StoryText::hasMark(int pos) const
@@ -1462,7 +1462,7 @@
return ls2.lastItem;
}
}
- return firstFrameItem;
+ return m_firstFrameItem;
}
int StoryText::nextLine(int pos)
@@ -1496,46 +1496,46 @@
return ls2.lastItem + 1;
}
}
- return lastFrameItem;
+ return m_lastFrameItem;
}
int StoryText::startOfFrame(int pos)
{
- return firstFrameItem;
+ return m_firstFrameItem;
}
int StoryText::endOfFrame(int pos)
{
- return lastFrameItem + 1;
+ return m_lastFrameItem + 1;
}
// selection
int StoryText::startOfSelection() const
{
- return selFirst <= selLast? selFirst : 0;
+ return m_selFirst <= m_selLast? m_selFirst : 0;
}
int StoryText::endOfSelection() const
{
- return selFirst <= selLast? selLast + 1 : -1;
+ return m_selFirst <= m_selLast? m_selLast + 1 : -1;
}
int StoryText::lengthOfSelection() const
{
//FIX ME - sometimes I saw values equal or greater than length of text
- int last = selLast;
- if (selFirst >= length())
+ int last = m_selLast;
+ if (m_selFirst >= length())
return 0;
- if (selLast >= length())
+ if (m_selLast >= length())
last = length() -1;
- return selFirst <= last? last - selFirst + 1 : 0;
+ return m_selFirst <= last? last - m_selFirst + 1 : 0;
}
bool StoryText::selected(int pos) const
{
- return (selFirst <= pos && pos <= selLast)
+ return (m_selFirst <= pos && pos <= m_selLast)
// || (pos >= 0 && pos < length() && const_cast<StoryText*>(this)->d->at(pos)->cselect)
;
}
@@ -1574,7 +1574,7 @@
assert( pos >= 0 );
assert( pos + signed(len) <= length() );
-// qDebug("old selection: %d - %d", selFirst, selLast);
+// qDebug("old selection: %d - %d", m_selFirst, m_selLast);
// StoryText* that = const_cast<StoryText *>(this);
// for (int i=pos; i < pos+signed(len); ++i)
@@ -1583,43 +1583,43 @@
if (on) {
// extend if possible
if (selected(pos - 1))
- selLast = qMax(selLast, pos + static_cast<int>(len) - 1);
+ m_selLast = qMax(m_selLast, pos + static_cast<int>(len) - 1);
else if (selected(pos + len))
- selFirst = qMin(selFirst, pos);
+ m_selFirst = qMin(m_selFirst, pos);
else {
- selFirst = pos;
- selLast = pos + len - 1;
+ m_selFirst = pos;
+ m_selLast = pos + len - 1;
}
}
else {
- if (pos <= selFirst && selLast < pos + signed(len))
+ if (pos <= m_selFirst && m_selLast < pos + signed(len))
deselectAll();
// shrink
else if (!selected(pos - 1) && selected(pos + len - 1))
- selFirst = pos + len;
+ m_selFirst = pos + len;
else if (selected(pos) && !selected(pos + len))
- selLast = pos - 1;
+ m_selLast = pos - 1;
else if (selected(pos) || selected(pos + len - 1))
// Grr, deselection splits selection
- selLast = pos - 1;
- }
-
-// qDebug("new selection: %d - %d", selFirst, selLast);
+ m_selLast = pos - 1;
+ }
+
+// qDebug("new selection: %d - %d", m_selFirst, m_selLast);
}
void StoryText::extendSelection(int oldPos, int newPos)
{
- if (selFirst <= selLast)
+ if (m_selFirst <= m_selLast)
{
// have selection
- if (selLast == oldPos - 1)
- {
- selLast = newPos - 1;
+ if (m_selLast == oldPos - 1)
+ {
+ m_selLast = newPos - 1;
return;
}
- else if (selFirst == oldPos)
- {
- selFirst = newPos;
+ else if (m_selFirst == oldPos)
+ {
+ m_selFirst = newPos;
return;
}
// can't extend, fall through
@@ -1627,13 +1627,13 @@
// no previous selection
if (newPos > oldPos)
{
- selFirst = oldPos;
- selLast = newPos - 1;
+ m_selFirst = oldPos;
+ m_selLast = newPos - 1;
}
else
{
- selFirst = newPos;
- selLast = oldPos - 1;
+ m_selFirst = newPos;
+ m_selLast = oldPos - 1;
}
}
@@ -1646,8 +1646,8 @@
that->next();
}
*/
- selFirst = 0;
- selLast = length() - 1;
+ m_selFirst = 0;
+ m_selLast = length() - 1;
}
void StoryText::deselectAll()
@@ -1659,20 +1659,20 @@
that->next();
}
*/
- selFirst = 0;
- selLast = -1;
+ m_selFirst = 0;
+ m_selLast = -1;
}
void StoryText::removeSelection()
{
-// qDebug("removeSelection: %d - %d", selFirst, selLast);
- if (selFirst > selLast)
+// qDebug("removeSelection: %d - %d", m_selFirst, m_selLast);
+ if (m_selFirst > m_selLast)
return;
- assert( selFirst >= 0 );
- assert( selLast < length() );
-
- removeChars(selFirst, selLast - selFirst+1);
+ assert( m_selFirst >= 0 );
+ assert( m_selLast < length() );
+
+ removeChars(m_selFirst, m_selLast - m_selFirst+1);
deselectAll();
}
@@ -1747,11 +1747,11 @@
if (xpos + 1.0 > coord.x()) // allow 1pt after end of line
return ls.lastItem + 1;
else if (coord.x() <= ls.x + ls.width) // last line of paragraph?
- return ((ls.lastItem == lastFrameItem) ? (ls.lastItem + 1) : ls.lastItem);
+ return ((ls.lastItem == m_lastFrameItem) ? (ls.lastItem + 1) : ls.lastItem);
else if (xpos < ls.x + 0.01 && maxx >= coord.x()) // check for empty line
return ls.firstItem;
}
- return qMax(lastFrameItem+1, firstFrameItem);
+ return qMax(m_lastFrameItem+1, m_firstFrameItem);
}
@@ -1938,8 +1938,8 @@
else if (hasMark(i))
{
Mark* mrk = mark(i);
- if ((doc->m_Selection->itemAt(0)->isNoteFrame() && mrk->isType(MARKNoteMasterType))
- || (!doc->m_Selection->itemAt(0)->isTextFrame() && mrk->isType(MARKNoteFrameType))
+ if ((m_doc->m_Selection->itemAt(0)->isNoteFrame() && mrk->isType(MARKNoteMasterType))
+ || (!m_doc->m_Selection->itemAt(0)->isTextFrame() && mrk->isType(MARKNoteFrameType))
|| mrk->isType(MARKBullNumType))
continue; //do not insert notes marks into text frames nad vice versa
Xml_attr mark_attr;
@@ -1972,7 +1972,7 @@
QString l;
MarkType t;
mrk->getMark(l, t);
- if (doc->getMarkDefinied(l,t) != NULL)
+ if (m_doc->getMarkDefinied(l,t) != NULL)
{
mark_attr.insert("mark_l", l);
mark_attr.insert("mark_t", QString::number((int) t));
Modified: trunk/Scribus/scribus/text/storytext.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/text/storytext.h
==============================================================================
--- trunk/Scribus/scribus/text/storytext.h (original)
+++ trunk/Scribus/scribus/text/storytext.h Wed Jun 19 19:46:21 2013
@@ -306,13 +306,13 @@
assert( ls.lastItem >= 0 && ls.firstItem - ls.lastItem < 1 );
assert( ls.lastItem < length() );
m_lines.append(ls);
- if (lastFrameItem < firstFrameItem) {
- firstFrameItem = ls.firstItem;
- lastFrameItem = ls.lastItem;
+ if (m_lastFrameItem < m_firstFrameItem) {
+ m_firstFrameItem = ls.firstItem;
+ m_lastFrameItem = ls.lastItem;
}
else {
- firstFrameItem = qMin(firstFrameItem, ls.firstItem);
- lastFrameItem = qMax(lastFrameItem, ls.lastItem);
+ m_firstFrameItem = qMin(m_firstFrameItem, ls.firstItem);
+ m_lastFrameItem = qMax(m_lastFrameItem, ls.lastItem);
}
}
@@ -326,24 +326,24 @@
return;
}
// fix lastFrameItem
- if (lastFrameItem != last.lastItem) return;
- lastFrameItem = m_lines.last().lastItem;
+ if (m_lastFrameItem != last.lastItem) return;
+ m_lastFrameItem = m_lines.last().lastItem;
}
void clearLines()
{
m_lines.clear();
- firstFrameItem = 0;
- lastFrameItem = -1;
+ m_firstFrameItem = 0;
+ m_lastFrameItem = -1;
}
- int firstInFrame() { return firstFrameItem; }
- int lastInFrame() { return lastFrameItem; }
+ int firstInFrame() { return m_firstFrameItem; }
+ int lastInFrame() { return m_lastFrameItem; }
private:
- ScribusDoc * doc;
- int selFirst, selLast;
- int firstFrameItem, lastFrameItem;
+ ScribusDoc * m_doc;
+ int m_selFirst, m_selLast;
+ int m_firstFrameItem, m_lastFrameItem;
QList<LineSpec> m_lines;
bool m_validLayout;
qreal m_magicX;
Modified: trunk/Scribus/scribus/ui/effectsdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/effectsdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/effectsdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/effectsdialog.cpp Wed Jun 19 19:46:21 2013
@@ -44,30 +44,30 @@
setModal(true);
setWindowTitle( tr( "Image Effects" ) );
setWindowIcon(QIcon(loadIcon ( "AppIcon.png" )));
- currItem = item;
- effectsList = currItem->effectsInUse;
- doc = docc;
+ m_item = item;
+ effectsList = m_item->effectsInUse;
+ m_doc = docc;
currentOptions = 0;
// CMSettings cms(docc, "", Intent_Perceptual);
// cms.allowColorManagement(false);
bool mode = false;
- CMSettings cms(doc, currItem->IProfile, currItem->IRender);
- cms.setUseEmbeddedProfile(currItem->UseEmbedded);
+ CMSettings cms(m_doc, m_item->IProfile, m_item->IRender);
+ cms.setUseEmbeddedProfile(m_item->UseEmbedded);
cms.allowSoftProofing(true);
- image.loadPicture(currItem->Pfile, currItem->pixm.imgInfo.actualPageNumber, cms, ScImage::RGBData, 72, &mode);
- int ix = image.width();
- int iy = image.height();
- imageScale = 1.0;
+ m_image.loadPicture(m_item->Pfile, m_item->pixm.imgInfo.actualPageNumber, cms, ScImage::RGBData, 72, &mode);
+ int ix = m_image.width();
+ int iy = m_image.height();
+ m_imageScale = 1.0;
if ((ix > 220) || (iy > 220))
{
double sx = ix / 220.0;
double sy = iy / 220.0;
if (sy < sx)
- image.createLowRes(sx);
+ m_image.createLowRes(sx);
else
- image.createLowRes(sy);
- imageScale = qMin(sx, sy);
+ m_image.createLowRes(sy);
+ m_imageScale = qMin(sx, sy);
}
EffectsDialogLayout = new QHBoxLayout( this );
EffectsDialogLayout->setMargin(10);
@@ -105,7 +105,7 @@
layout17->addWidget( textLabel3 );
colData = new ColorCombo(false, WStackPage_2);
- colData->insertItems(doc->PageColors, ColorCombo::fancyPixmaps);
+ colData->insertItems(m_doc->PageColors, ColorCombo::fancyPixmaps);
layout17->addWidget( colData );
WStackPageLayout->addLayout( layout17 );
@@ -241,7 +241,7 @@
textLabel1d = new QLabel( tr( "Color 1:" ), WStackPage_8 );
WStackPage8Layout->addWidget( textLabel1d, 0, 0 );
colData1 = new ColorCombo(false, WStackPage_8);
- colData1->insertItems(doc->PageColors, ColorCombo::fancyPixmaps);
+ colData1->insertItems(m_doc->PageColors, ColorCombo::fancyPixmaps);
WStackPage8Layout->addWidget( colData1, 0, 1, 1, 2);
shade1 = new ShadeButton(WStackPage_8);
shade1->setValue(100);
@@ -262,7 +262,7 @@
textLabel2d = new QLabel( tr( "Color 2:" ), WStackPage_8 );
WStackPage8Layout->addWidget( textLabel2d, 2, 0 );
colData2 = new ColorCombo(false, WStackPage_8);
- colData2->insertItems(doc->PageColors, ColorCombo::fancyPixmaps);
+ colData2->insertItems(m_doc->PageColors, ColorCombo::fancyPixmaps);
WStackPage8Layout->addWidget( colData2, 2, 1, 1, 2);
shade2 = new ShadeButton(WStackPage_8);
shade2->setValue(100);
@@ -291,7 +291,7 @@
textLabel1t = new QLabel( tr( "Color 1:" ), WStackPage_9 );
WStackPage9Layout->addWidget( textLabel1t, 0, 0 );
colDatat1 = new ColorCombo(false, WStackPage_9);
- colDatat1->insertItems(doc->PageColors, ColorCombo::fancyPixmaps);
+ colDatat1->insertItems(m_doc->PageColors, ColorCombo::fancyPixmaps);
WStackPage9Layout->addWidget( colDatat1, 0, 1, 1, 2 );
shadet1 = new ShadeButton(WStackPage_9);
shadet1->setValue(100);
@@ -311,7 +311,7 @@
textLabel2t = new QLabel( tr( "Color 2:" ), WStackPage_9 );
WStackPage9Layout->addWidget( textLabel2t, 2, 0 );
colDatat2 = new ColorCombo(false, WStackPage_9);
- colDatat2->insertItems(doc->PageColors, ColorCombo::fancyPixmaps);
+ colDatat2->insertItems(m_doc->PageColors, ColorCombo::fancyPixmaps);
WStackPage9Layout->addWidget( colDatat2, 2, 1, 1, 2 );
shadet2 = new ShadeButton(WStackPage_9);
shadet2->setValue(100);
@@ -331,7 +331,7 @@
textLabel3t = new QLabel( tr( "Color 3:" ), WStackPage_9 );
WStackPage9Layout->addWidget( textLabel3t, 4, 0 );
colDatat3 = new ColorCombo(false, WStackPage_9);
- colDatat3->insertItems(doc->PageColors, ColorCombo::fancyPixmaps);
+ colDatat3->insertItems(m_doc->PageColors, ColorCombo::fancyPixmaps);
WStackPage9Layout->addWidget( colDatat3, 4, 1, 1, 2 );
shadet3 = new ShadeButton(WStackPage_9);
shadet3->setValue(100);
@@ -357,7 +357,7 @@
textLabel1q = new QLabel( tr( "Color 1:" ), WStackPage_10 );
WStackPage10Layout->addWidget( textLabel1q, 0, 0 );
colDataq1 = new ColorCombo(false, WStackPage_10);
- colDataq1->insertItems(doc->PageColors, ColorCombo::fancyPixmaps);
+ colDataq1->insertItems(m_doc->PageColors, ColorCombo::fancyPixmaps);
WStackPage10Layout->addWidget( colDataq1, 0, 1, 1, 2 );
shadeq1 = new ShadeButton(WStackPage_10);
shadeq1->setValue(100);
@@ -377,7 +377,7 @@
textLabel2q = new QLabel( tr( "Color 2:" ), WStackPage_10 );
WStackPage10Layout->addWidget( textLabel2q, 2, 0 );
colDataq2 = new ColorCombo(false, WStackPage_10);
- colDataq2->insertItems(doc->PageColors, ColorCombo::fancyPixmaps);
+ colDataq2->insertItems(m_doc->PageColors, ColorCombo::fancyPixmaps);
WStackPage10Layout->addWidget( colDataq2, 2, 1, 1, 2 );
shadeq2 = new ShadeButton(WStackPage_10);
shadeq2->setValue(100);
@@ -397,7 +397,7 @@
textLabel3q = new QLabel( tr( "Color 3:" ), WStackPage_10 );
WStackPage10Layout->addWidget( textLabel3q, 4, 0 );
colDataqc3 = new ColorCombo(false, WStackPage_10);
- colDataqc3->insertItems(doc->PageColors, ColorCombo::fancyPixmaps);
+ colDataqc3->insertItems(m_doc->PageColors, ColorCombo::fancyPixmaps);
WStackPage10Layout->addWidget( colDataqc3, 4, 1, 1, 2 );
shadeqc3 = new ShadeButton(WStackPage_10);
shadeqc3->setValue(100);
@@ -417,7 +417,7 @@
textLabel4q = new QLabel( tr( "Color 4:" ), WStackPage_10 );
WStackPage10Layout->addWidget( textLabel4q, 6, 0 );
colDataq4 = new ColorCombo(false, WStackPage_10);
- colDataq4->insertItems(doc->PageColors, ColorCombo::fancyPixmaps);
+ colDataq4->insertItems(m_doc->PageColors, ColorCombo::fancyPixmaps);
WStackPage10Layout->addWidget( colDataq4, 6, 1, 1, 2 );
shadeq4 = new ShadeButton(WStackPage_10);
shadeq4->setValue(100);
@@ -505,23 +505,23 @@
usedEffects = new QListWidget( this );
usedEffects->setMinimumSize(fontMetrics().width( tr( "Available Effects" ))+40, 180);
usedEffects->clear();
- effectValMap.clear();
+ m_effectValMap.clear();
for (int a = 0; a < effectsList.count(); ++a)
{
if (effectsList.at(a).effectCode == ScImage::EF_INVERT)
{
usedEffects->addItem( tr("Invert"));
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), "");
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), "");
}
if (effectsList.at(a).effectCode == ScImage::EF_GRAYSCALE)
{
usedEffects->addItem( tr("Grayscale"));
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), "");
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), "");
}
if (effectsList.at(a).effectCode == ScImage::EF_COLORIZE)
{
usedEffects->addItem( tr("Colorize"));
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
setItemSelectable(availableEffects, 2, false);
setItemSelectable(availableEffects, 3, false);
setItemSelectable(availableEffects, 4, false);
@@ -530,17 +530,17 @@
if (effectsList.at(a).effectCode == ScImage::EF_BRIGHTNESS)
{
usedEffects->addItem( tr("Brightness"));
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
}
if (effectsList.at(a).effectCode == ScImage::EF_CONTRAST)
{
usedEffects->addItem( tr("Contrast"));
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
}
if (effectsList.at(a).effectCode == ScImage::EF_SHARPEN)
{
usedEffects->addItem( tr("Sharpen"));
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
}
if (effectsList.at(a).effectCode == ScImage::EF_BLUR)
{
@@ -549,18 +549,18 @@
double radius;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> radius; // has to be read from stream, as two numbers are stored in effectParameters
- blRadius->setValue(radius / imageScale);
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), QString("%1 1.0").arg(radius / imageScale));
+ blRadius->setValue(radius / m_imageScale);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), QString("%1 1.0").arg(radius / m_imageScale));
}
if (effectsList.at(a).effectCode == ScImage::EF_SOLARIZE)
{
usedEffects->addItem( tr("Posterize"));
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
}
if (effectsList.at(a).effectCode == ScImage::EF_DUOTONE)
{
usedEffects->addItem( tr("Duotone"));
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
setItemSelectable(availableEffects, 2, false);
setItemSelectable(availableEffects, 3, false);
setItemSelectable(availableEffects, 4, false);
@@ -569,7 +569,7 @@
if (effectsList.at(a).effectCode == ScImage::EF_TRITONE)
{
usedEffects->addItem( tr("Tritone"));
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
setItemSelectable(availableEffects, 2, false);
setItemSelectable(availableEffects, 3, false);
setItemSelectable(availableEffects, 4, false);
@@ -578,7 +578,7 @@
if (effectsList.at(a).effectCode == ScImage::EF_QUADTONE)
{
usedEffects->addItem( tr("Quadtone"));
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
setItemSelectable(availableEffects, 2, false);
setItemSelectable(availableEffects, 3, false);
setItemSelectable(availableEffects, 4, false);
@@ -587,7 +587,7 @@
if (effectsList.at(a).effectCode == ScImage::EF_GRADUATE)
{
usedEffects->addItem( tr("Curves"));
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), effectsList.at(a).effectParameters);
}
}
layout8->addWidget( usedEffects );
@@ -631,9 +631,9 @@
usedEffects->clearSelection();
availableEffects->clearSelection();
resize( minimumSizeHint() );
- ScImage im(image);
+ ScImage im(m_image);
saveValues(false);
- im.applyEffect(effectsList, doc->PageColors, false);
+ im.applyEffect(effectsList, m_doc->PageColors, false);
QPixmap Bild = QPixmap(pixmapLabel1->width(), pixmapLabel1->height());
int x = (pixmapLabel1->width() - im.qImage().width()) / 2;
int y = (pixmapLabel1->height() - im.qImage().height()) / 2;
@@ -695,7 +695,7 @@
connect( CurveQ2->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
connect( CurveQc3->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
connect( CurveQ4->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
- tim.start();
+ m_time.start();
}
void EffectsDialog::setItemSelectable(QListWidget* widget, int itemNr, bool enable)
@@ -738,11 +738,11 @@
void EffectsDialog::createPreview()
{
- if (tim.elapsed() < 50)
+ if (m_time.elapsed() < 50)
return;
- ScImage im(image);
+ ScImage im(m_image);
saveValues(false);
- im.applyEffect(effectsList, doc->PageColors, false);
+ im.applyEffect(effectsList, m_doc->PageColors, false);
QPixmap Bild = QPixmap(pixmapLabel1->width(), pixmapLabel1->height());
int x = (pixmapLabel1->width() - im.qImage().width()) / 2;
int y = (pixmapLabel1->height() - im.qImage().height()) / 2;
@@ -753,7 +753,7 @@
p.drawImage(x, y, im.qImage());
p.end();
pixmapLabel1->setPixmap( Bild );
- tim.start();
+ m_time.start();
}
void EffectsDialog::saveValues(bool final)
@@ -776,55 +776,55 @@
if (usedEffects->item(e)->text() == tr("Colorize"))
{
ef.effectCode = ScImage::EF_COLORIZE;
- ef.effectParameters = effectValMap[usedEffects->item(e)];
+ ef.effectParameters = m_effectValMap[usedEffects->item(e)];
}
if (usedEffects->item(e)->text() == tr("Brightness"))
{
ef.effectCode = ScImage::EF_BRIGHTNESS;
- ef.effectParameters = effectValMap[usedEffects->item(e)];
+ ef.effectParameters = m_effectValMap[usedEffects->item(e)];
}
if (usedEffects->item(e)->text() == tr("Contrast"))
{
ef.effectCode = ScImage::EF_CONTRAST;
- ef.effectParameters = effectValMap[usedEffects->item(e)];
+ ef.effectParameters = m_effectValMap[usedEffects->item(e)];
}
if (usedEffects->item(e)->text() == tr("Sharpen"))
{
ef.effectCode = ScImage::EF_SHARPEN;
- ef.effectParameters = effectValMap[usedEffects->item(e)];
+ ef.effectParameters = m_effectValMap[usedEffects->item(e)];
}
if (usedEffects->item(e)->text() == tr("Blur"))
{
ef.effectCode = ScImage::EF_BLUR;
if (final)
- ef.effectParameters = QString("%1 1.0").arg(blRadius->value() * imageScale);
+ ef.effectParameters = QString("%1 1.0").arg(blRadius->value() * m_imageScale);
else
ef.effectParameters = QString("%1 1.0").arg(blRadius->value());
}
if (usedEffects->item(e)->text() == tr("Posterize"))
{
ef.effectCode = ScImage::EF_SOLARIZE;
- ef.effectParameters = effectValMap[usedEffects->item(e)];
+ ef.effectParameters = m_effectValMap[usedEffects->item(e)];
}
if (usedEffects->item(e)->text() == tr("Duotone"))
{
ef.effectCode = ScImage::EF_DUOTONE;
- ef.effectParameters = effectValMap[usedEffects->item(e)];
+ ef.effectParameters = m_effectValMap[usedEffects->item(e)];
}
if (usedEffects->item(e)->text() == tr("Tritone"))
{
ef.effectCode = ScImage::EF_TRITONE;
- ef.effectParameters = effectValMap[usedEffects->item(e)];
+ ef.effectParameters = m_effectValMap[usedEffects->item(e)];
}
if (usedEffects->item(e)->text() == tr("Quadtone"))
{
ef.effectCode = ScImage::EF_QUADTONE;
- ef.effectParameters = effectValMap[usedEffects->item(e)];
+ ef.effectParameters = m_effectValMap[usedEffects->item(e)];
}
if (usedEffects->item(e)->text() == tr("Curves"))
{
ef.effectCode = ScImage::EF_GRADUATE;
- ef.effectParameters = effectValMap[usedEffects->item(e)];
+ ef.effectParameters = m_effectValMap[usedEffects->item(e)];
}
effectsList.append(ef);
}
@@ -846,25 +846,25 @@
disconnect( usedEffects, SIGNAL( itemActivated(QListWidgetItem*) ), this, SLOT( selectEffect(QListWidgetItem*) ) );
usedEffects->addItem(availableEffects->currentItem()->text());
if (availableEffects->currentItem()->text() == tr("Invert"))
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), "");
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), "");
if (availableEffects->currentItem()->text() == tr("Grayscale"))
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), "");
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), "");
if (availableEffects->currentItem()->text() == tr("Brightness"))
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), "0");
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), "0");
if (availableEffects->currentItem()->text() == tr("Contrast"))
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), "0");
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), "0");
if (availableEffects->currentItem()->text() == tr("Sharpen"))
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), "0 1");
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), "0 1");
if (availableEffects->currentItem()->text() == tr("Blur"))
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), "0 1");
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), "0 1");
if (availableEffects->currentItem()->text() == tr("Posterize"))
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), "255");
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), "255");
if (availableEffects->currentItem()->text() == tr("Colorize"))
{
ColorList::Iterator it;
- it = doc->PageColors.begin();
+ it = m_doc->PageColors.begin();
QString efval = it.key()+"\n100";
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), efval);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), efval);
setItemSelectable(availableEffects, 2, false);
setItemSelectable(availableEffects, 3, false);
setItemSelectable(availableEffects, 4, false);
@@ -873,9 +873,9 @@
if (availableEffects->currentItem()->text() == tr("Duotone"))
{
ColorList::Iterator it;
- it = doc->PageColors.begin();
+ it = m_doc->PageColors.begin();
QString efval = it.key()+"\n"+it.key()+"\n100 100 2 0.0 0.0 1.0 1.0 0 2 0.0 0.0 1.0 1.0 0";
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), efval);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), efval);
setItemSelectable(availableEffects, 2, false);
setItemSelectable(availableEffects, 3, false);
setItemSelectable(availableEffects, 4, false);
@@ -884,9 +884,9 @@
if (availableEffects->currentItem()->text() == tr("Tritone"))
{
ColorList::Iterator it;
- it = doc->PageColors.begin();
+ it = m_doc->PageColors.begin();
QString efval = it.key()+"\n"+it.key()+"\n"+it.key()+"\n100 100 100 2 0.0 0.0 1.0 1.0 0 2 0.0 0.0 1.0 1.0 0 2 0.0 0.0 1.0 1.0 0";
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), efval);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), efval);
setItemSelectable(availableEffects, 2, false);
setItemSelectable(availableEffects, 3, false);
setItemSelectable(availableEffects, 4, false);
@@ -895,16 +895,16 @@
if (availableEffects->currentItem()->text() == tr("Quadtone"))
{
ColorList::Iterator it;
- it = doc->PageColors.begin();
+ it = m_doc->PageColors.begin();
QString efval = it.key()+"\n"+it.key()+"\n"+it.key()+"\n"+it.key()+"\n100 100 100 100 2 0.0 0.0 1.0 1.0 0 2 0.0 0.0 1.0 1.0 0 2 0.0 0.0 1.0 1.0 0 2 0.0 0.0 1.0 1.0 0";
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), efval);
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), efval);
setItemSelectable(availableEffects, 2, false);
setItemSelectable(availableEffects, 3, false);
setItemSelectable(availableEffects, 4, false);
setItemSelectable(availableEffects, 5, false);
}
if (availableEffects->currentItem()->text() == tr("Curves"))
- effectValMap.insert(usedEffects->item(usedEffects->count()-1), "2 0.0 0.0 1.0 1.0 0");
+ m_effectValMap.insert(usedEffects->item(usedEffects->count()-1), "2 0.0 0.0 1.0 1.0 0");
usedEffects->setCurrentItem(usedEffects->item(usedEffects->count()-1));
selectEffect(usedEffects->item(usedEffects->count()-1));
connect( usedEffects, SIGNAL( itemActivated(QListWidgetItem*) ), this, SLOT( selectEffect(QListWidgetItem*) ) );
@@ -921,7 +921,7 @@
setItemSelectable(availableEffects, 4, true);
setItemSelectable(availableEffects, 5, true);
}
- effectValMap.remove(usedEffects->currentItem());
+ m_effectValMap.remove(usedEffects->currentItem());
int curr = usedEffects->currentRow();
QListWidgetItem *it = usedEffects->takeItem(curr);
delete it;
@@ -1005,7 +1005,7 @@
{
disconnect( colData, SIGNAL(activated(int)), this, SLOT( createPreview()));
disconnect( shade, SIGNAL(clicked()), this, SLOT(createPreview()));
- QString tmpstr = effectValMap[c];
+ QString tmpstr = m_effectValMap[c];
QString col;
int shading;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
@@ -1026,7 +1026,7 @@
disconnect( shade2, SIGNAL(clicked()), this, SLOT(createPreview()));
disconnect( CurveD1->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
disconnect( CurveD2->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
- QString tmpstr = effectValMap[c];
+ QString tmpstr = m_effectValMap[c];
QString col1, col2;
int shading1, shading2;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
@@ -1087,7 +1087,7 @@
disconnect( CurveT1->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
disconnect( CurveT2->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
disconnect( CurveT3->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
- QString tmpstr = effectValMap[c];
+ QString tmpstr = m_effectValMap[c];
QString col1, col2, col3;
int shading1, shading2, shading3;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
@@ -1171,7 +1171,7 @@
disconnect( CurveQ2->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
disconnect( CurveQc3->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
disconnect( CurveQ4->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
- QString tmpstr = effectValMap[c];
+ QString tmpstr = m_effectValMap[c];
QString col1, col2, col3, col4;
int shading1, shading2, shading3, shading4;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
@@ -1265,7 +1265,7 @@
{
disconnect( brightnessSlider, SIGNAL(valueChanged(int)), this, SLOT(updateBright(int)));
disconnect( brightnessSlider, SIGNAL(sliderReleased()), this, SLOT(createPreview()));
- QString tmpstr = effectValMap[c];
+ QString tmpstr = m_effectValMap[c];
int brightness;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> brightness;
@@ -1281,7 +1281,7 @@
{
disconnect( contrastSlider, SIGNAL(valueChanged(int)), this, SLOT(updateContrast(int)));
disconnect( contrastSlider, SIGNAL(sliderReleased()), this, SLOT(createPreview()));
- QString tmpstr = effectValMap[c];
+ QString tmpstr = m_effectValMap[c];
int contrast;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> contrast;
@@ -1297,7 +1297,7 @@
{
disconnect( shRadius, SIGNAL(valueChanged(double)), this, SLOT(createPreview()));
disconnect( shValue, SIGNAL(valueChanged(double)), this, SLOT(createPreview()));
- QString tmpstr = effectValMap[c];
+ QString tmpstr = m_effectValMap[c];
double radius, sigma;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> s;
@@ -1313,7 +1313,7 @@
else if (c->text() == tr("Blur"))
{
disconnect( blRadius, SIGNAL(valueChanged(double)), this, SLOT(createPreview()));
- QString tmpstr = effectValMap[c];
+ QString tmpstr = m_effectValMap[c];
double radius;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> s;
@@ -1326,7 +1326,7 @@
{
disconnect( solarizeSlider, SIGNAL(valueChanged(int)), this, SLOT(updateSolarize(int)));
disconnect( solarizeSlider, SIGNAL(sliderReleased()), this, SLOT(createPreview()));
- QString tmpstr = effectValMap[c];
+ QString tmpstr = m_effectValMap[c];
int solarize;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> solarize;
@@ -1341,7 +1341,7 @@
else if (c->text() == tr("Curves"))
{
disconnect( Kdisplay->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
- QString tmpstr = effectValMap[c];
+ QString tmpstr = m_effectValMap[c];
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
int numVals;
double xval, yval;
@@ -1408,19 +1408,19 @@
QString tmp;
tmp.setNum(shade->getValue());
efval += "\n"+tmp;
- effectValMap[currentOptions] = efval;
+ m_effectValMap[currentOptions] = efval;
}
if (currentOptions->text() == tr("Brightness"))
{
QString tmp;
tmp.setNum(brightnessSlider->value());
- effectValMap[currentOptions] = tmp;
+ m_effectValMap[currentOptions] = tmp;
}
if (currentOptions->text() == tr("Contrast"))
{
QString tmp;
tmp.setNum(contrastSlider->value());
- effectValMap[currentOptions] = tmp;
+ m_effectValMap[currentOptions] = tmp;
}
if (currentOptions->text() == tr("Sharpen"))
{
@@ -1430,7 +1430,7 @@
efval += tmp;
tmp.setNum(shValue->value());
efval += " "+tmp;
- effectValMap[currentOptions] = efval;
+ m_effectValMap[currentOptions] = efval;
}
if (currentOptions->text() == tr("Blur"))
{
@@ -1439,17 +1439,17 @@
if (!final)
tmp.setNum(blRadius->value());
else
- tmp.setNum(blRadius->value()*imageScale);
+ tmp.setNum(blRadius->value()*m_imageScale);
efval += tmp;
tmp.setNum(1.0);
efval += " "+tmp;
- effectValMap[currentOptions] = efval;
+ m_effectValMap[currentOptions] = efval;
}
if (currentOptions->text() == tr("Posterize"))
{
QString tmp;
tmp.setNum(solarizeSlider->value());
- effectValMap[currentOptions] = tmp;
+ m_effectValMap[currentOptions] = tmp;
}
if (currentOptions->text() == tr("Duotone"))
{
@@ -1485,7 +1485,7 @@
efval += " 1";
else
efval += " 0";
- effectValMap[currentOptions] = efval;
+ m_effectValMap[currentOptions] = efval;
}
if (currentOptions->text() == tr("Tritone"))
{
@@ -1536,7 +1536,7 @@
efval += " 1";
else
efval += " 0";
- effectValMap[currentOptions] = efval;
+ m_effectValMap[currentOptions] = efval;
}
if (currentOptions->text() == tr("Quadtone"))
{
@@ -1602,7 +1602,7 @@
efval += " 1";
else
efval += " 0";
- effectValMap[currentOptions] = efval;
+ m_effectValMap[currentOptions] = efval;
}
if (currentOptions->text() == tr("Curves"))
{
@@ -1620,7 +1620,7 @@
efval += " 1";
else
efval += " 0";
- effectValMap[currentOptions] = efval;
+ m_effectValMap[currentOptions] = efval;
}
}
}
Modified: trunk/Scribus/scribus/ui/effectsdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/effectsdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/effectsdialog.h (original)
+++ trunk/Scribus/scribus/ui/effectsdialog.h Wed Jun 19 19:46:21 2013
@@ -156,14 +156,9 @@
QListWidget* availableEffects;
QPushButton* okButton;
QPushButton* cancelButton;
+ QListWidgetItem* currentOptions;
+
ScImageEffectList effectsList;
- QMap<QListWidgetItem*, QString> effectValMap;
- QListWidgetItem* currentOptions;
- ScribusDoc* doc;
- PageItem* currItem;
- ScImage image;
- QTime tim;
- double imageScale;
public slots:
virtual void leaveOK();
@@ -181,6 +176,15 @@
virtual void selectAvailEffectDbl(QListWidgetItem* c);
protected:
+ ScribusDoc* m_doc;
+ PageItem* m_item;
+
+ ScImage m_image;
+ double m_imageScale;
+
+ QTime m_time;
+ QMap<QListWidgetItem*, QString> m_effectValMap;
+
QHBoxLayout* EffectsDialogLayout;
QVBoxLayout* WStackPageLayout;
QVBoxLayout* WStackPage3Layout;
Modified: trunk/Scribus/scribus/ui/nodeeditpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/nodeeditpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/nodeeditpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/nodeeditpalette.cpp Wed Jun 19 19:46:21 2013
@@ -20,7 +20,7 @@
NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase( parent, "nodePalette", false, 0)
{
QSize iconSize = QSize(22, 22);
- doc=0;
+ m_doc=0;
unitRatio=1.0;
vboxLayout = new QVBoxLayout(this);
vboxLayout->setSpacing(2);
@@ -376,20 +376,20 @@
void NodePalette::setDoc(ScribusDoc *dc, ScribusView *vi)
{
- doc = dc;
- view = vi;
+ m_doc = dc;
+ m_view = vi;
unitChange();
disconnect(EditCont, SIGNAL(clicked()), this, SLOT(ToggleConMode()));
disconnect(AbsMode, SIGNAL(clicked()), this, SLOT(ToggleAbsMode()));
- if (doc!=0)
- {
- YSpin->setNewUnit(doc->unitIndex());
- XSpin->setNewUnit(doc->unitIndex());
+ if (m_doc!=0)
+ {
+ YSpin->setNewUnit(m_doc->unitIndex());
+ XSpin->setNewUnit(m_doc->unitIndex());
}
AbsMode->setChecked(false);
EditCont->setChecked(false);
- if (doc==0)
+ if (m_doc==0)
disconnectSignals();
else
connectSignals();
@@ -397,16 +397,16 @@
void NodePalette::SplitPoly()
{
- if (doc==0)
+ if (m_doc==0)
return;
MoveN();
- doc->nodeEdit.submode = NodeEditContext::SPLIT_PATH;
+ m_doc->nodeEdit.submode = NodeEditContext::SPLIT_PATH;
PolySplit->setChecked(true);
}
void NodePalette::IsOpen()
{
- if (doc==0)
+ if (m_doc==0)
return;
PolySplit->setChecked(false);
BezierClose->setEnabled(true);
@@ -416,7 +416,7 @@
void NodePalette::PolyStatus(int typ, uint size)
{
- if (doc==0)
+ if (m_doc==0)
return;
bool setter;
switch (typ)
@@ -439,13 +439,13 @@
void NodePalette::CloseBezier()
{
- if (doc==0)
+ if (m_doc==0)
return;
MoveN();
- PageItem *currItem = doc->m_Selection->itemAt(0);
- PageItem* newItem = doc->convertItemTo(currItem, PageItem::Polygon);
- doc->m_Selection->clear();
- doc->m_Selection->addItem(newItem);
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
+ PageItem* newItem = m_doc->convertItemTo(currItem, PageItem::Polygon);
+ m_doc->m_Selection->clear();
+ m_doc->m_Selection->addItem(newItem);
newItem->update();
BezierClose->setEnabled(false);
PolySplit->setEnabled(true);
@@ -454,181 +454,181 @@
void NodePalette::doRotCCW()
{
- if (doc != 0)
- view->TransformPoly(0, RotVal->value());
+ if (m_doc != 0)
+ m_view->TransformPoly(0, RotVal->value());
}
void NodePalette::doRotCW()
{
- if (doc != 0)
- view->TransformPoly(1, RotVal->value());
+ if (m_doc != 0)
+ m_view->TransformPoly(1, RotVal->value());
}
void NodePalette::doShrink()
{
- if (doc != 0)
- view->TransformPoly(2, 1, scalePercentage->value());
+ if (m_doc != 0)
+ m_view->TransformPoly(2, 1, scalePercentage->value());
}
void NodePalette::doExpand()
{
- if (doc != 0)
- view->TransformPoly(3, 1, scalePercentage->value());
+ if (m_doc != 0)
+ m_view->TransformPoly(3, 1, scalePercentage->value());
}
void NodePalette::doReduce()
{
- if (doc != 0)
- view->TransformPoly(8, 1, value2pts(scaleDistance->value(),doc->unitIndex()));
+ if (m_doc != 0)
+ m_view->TransformPoly(8, 1, value2pts(scaleDistance->value(),m_doc->unitIndex()));
}
void NodePalette::doEnlarge()
{
- if (doc != 0)
- view->TransformPoly(9, 1, value2pts(scaleDistance->value(),doc->unitIndex()));
+ if (m_doc != 0)
+ m_view->TransformPoly(9, 1, value2pts(scaleDistance->value(),m_doc->unitIndex()));
}
void NodePalette::ShearR()
{
- if (doc != 0)
- view->TransformPoly(5);
+ if (m_doc != 0)
+ m_view->TransformPoly(5);
}
void NodePalette::ShearL()
{
- if (doc != 0)
- view->TransformPoly(4);
+ if (m_doc != 0)
+ m_view->TransformPoly(4);
}
void NodePalette::ShearU()
{
- if (doc != 0)
- view->TransformPoly(6);
+ if (m_doc != 0)
+ m_view->TransformPoly(6);
}
void NodePalette::ShearD()
{
- if (doc != 0)
- view->TransformPoly(7);
+ if (m_doc != 0)
+ m_view->TransformPoly(7);
}
void NodePalette::MirrorH()
{
- if (doc != 0)
- doc->MirrorPolyH(doc->m_Selection->itemAt(0));
+ if (m_doc != 0)
+ m_doc->MirrorPolyH(m_doc->m_Selection->itemAt(0));
}
void NodePalette::MirrorV()
{
- if (doc != 0)
- doc->MirrorPolyV(doc->m_Selection->itemAt(0));
+ if (m_doc != 0)
+ m_doc->MirrorPolyV(m_doc->m_Selection->itemAt(0));
}
void NodePalette::ResetControl()
{
- if (doc != 0)
- doc->nodeEdit.resetControl(doc->m_Selection->itemAt(0));
+ if (m_doc != 0)
+ m_doc->nodeEdit.resetControl(m_doc->m_Selection->itemAt(0));
}
void NodePalette::Reset1Control()
{
- if (doc != 0)
- doc->nodeEdit.reset1Control(doc->m_Selection->itemAt(0));
+ if (m_doc != 0)
+ m_doc->nodeEdit.reset1Control(m_doc->m_Selection->itemAt(0));
}
void NodePalette::ResetContour()
{
- if (doc != 0)
- {
- PageItem *currItem = doc->m_Selection->itemAt(0);
+ if (m_doc != 0)
+ {
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
if (UndoManager::undoEnabled())
{
ScItemState<FPointArray> *is = new ScItemState<FPointArray>(Um::ResetContourLine, "",Um::IBorder);
is->set("RESET_CONTOUR", "reset_contour");
- is->setItem(doc->m_Selection->itemAt(0)->ContourLine);
+ is->setItem(m_doc->m_Selection->itemAt(0)->ContourLine);
UndoManager::instance()->action(currItem, is);
}
//FIXME make an internal item copy poline to contourline member
currItem->ContourLine = currItem->PoLine.copy();
currItem->ClipEdited = true;
- view->DrawNew();
+ m_view->DrawNew();
emit DocChanged();
}
}
void NodePalette::ResetContourToImageClip()
{
- if (doc != 0)
- {
- PageItem *currItem = doc->m_Selection->itemAt(0);
+ if (m_doc != 0)
+ {
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
currItem->ContourLine = currItem->imageClip.copy();
currItem->ClipEdited = true;
- view->DrawNew();
+ m_view->DrawNew();
emit DocChanged();
}
}
void NodePalette::ResetShapeToImageClip()
{
- if (doc != 0)
- {
- PageItem *currItem = doc->m_Selection->itemAt(0);
+ if (m_doc != 0)
+ {
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
currItem->PoLine = currItem->imageClip.copy();
currItem->ClipEdited = true;
currItem->FrameType = 3;
- doc->AdjustItemSize(currItem);
+ m_doc->AdjustItemSize(currItem);
if (currItem->itemType() == PageItem::PathText)
currItem->updatePolyClip();
- doc->regionsChanged()->update(QRectF());
+ m_doc->regionsChanged()->update(QRectF());
emit DocChanged();
}
}
void NodePalette::MovePoint()
{
- if (doc==0)
- return;
- if (doc->nodeEdit.submode == NodeEditContext::MOVE_POINT)
- {
- PageItem *currItem = doc->m_Selection->itemAt(0);
+ if (m_doc==0)
+ return;
+ if (m_doc->nodeEdit.submode == NodeEditContext::MOVE_POINT)
+ {
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
FPoint zp;
- FPoint np(XSpin->value()/doc->unitRatio(), YSpin->value()/doc->unitRatio());
+ FPoint np(XSpin->value()/m_doc->unitRatio(), YSpin->value()/m_doc->unitRatio());
if (AbsMode->isChecked())
{
if (absToCanvas->isChecked())
zp = FPoint(currItem->xPos(), currItem->yPos());
else
- zp = FPoint(currItem->xPos() - doc->currentPage()->xOffset(), currItem->yPos() - doc->currentPage()->yOffset());
+ zp = FPoint(currItem->xPos() - m_doc->currentPage()->xOffset(), currItem->yPos() - m_doc->currentPage()->yOffset());
np -= zp;
}
- doc->nodeEdit.moveClipPoint(currItem, np);
- doc->AdjustItemSize(currItem, true, true);
+ m_doc->nodeEdit.moveClipPoint(currItem, np);
+ m_doc->AdjustItemSize(currItem, true, true);
if (currItem->itemType() == PageItem::PathText)
currItem->updatePolyClip();
- doc->regionsChanged()->update(QRectF());
+ m_doc->regionsChanged()->update(QRectF());
emit DocChanged();
}
}
void NodePalette::SetSym()
{
- if (doc != 0)
- doc->nodeEdit.MoveSym = true;
+ if (m_doc != 0)
+ m_doc->nodeEdit.MoveSym = true;
SymMove->setChecked(true);
AsymMove->setChecked(false);
}
void NodePalette::SetAsym()
{
- if (doc != 0)
- doc->nodeEdit.MoveSym = false;
+ if (m_doc != 0)
+ m_doc->nodeEdit.MoveSym = false;
SymMove->setChecked(false);
AsymMove->setChecked(true);
}
void NodePalette::SetXY(double x, double y)
{
- if (doc==0)
+ if (m_doc==0)
return;
FPoint zp(0.0, 0.0);
disconnect(XSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
@@ -636,19 +636,19 @@
if (AbsMode->isChecked())
{
if (absToCanvas->isChecked())
- zp = FPoint(doc->m_Selection->itemAt(0)->xPos(), doc->m_Selection->itemAt(0)->yPos());
+ zp = FPoint(m_doc->m_Selection->itemAt(0)->xPos(), m_doc->m_Selection->itemAt(0)->yPos());
else
- zp = FPoint(doc->m_Selection->itemAt(0)->xPos() - doc->currentPage()->xOffset(), doc->m_Selection->itemAt(0)->yPos() - doc->currentPage()->yOffset());
- }
- XSpin->setValue((x + zp.x())*doc->unitRatio());
- YSpin->setValue((y + zp.y())*doc->unitRatio());
+ zp = FPoint(m_doc->m_Selection->itemAt(0)->xPos() - m_doc->currentPage()->xOffset(), m_doc->m_Selection->itemAt(0)->yPos() - m_doc->currentPage()->yOffset());
+ }
+ XSpin->setValue((x + zp.x()) * m_doc->unitRatio());
+ YSpin->setValue((y + zp.y()) * m_doc->unitRatio());
connect(XSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
connect(YSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
}
void NodePalette::ToggleAbsMode()
{
- if (doc==0)
+ if (m_doc == 0)
return;
FPoint zp(0.0, 0.0);
disconnect(XSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
@@ -656,27 +656,27 @@
FPointArray Clip;
FPoint np(0.0, 0.0);
if (EditCont->isChecked())
- Clip = doc->m_Selection->itemAt(0)->ContourLine;
+ Clip = m_doc->m_Selection->itemAt(0)->ContourLine;
else
- Clip = doc->m_Selection->itemAt(0)->PoLine;
- if (doc->nodeEdit.SelNode.count() != 0)
- np = Clip.point(doc->nodeEdit.SelNode.at(0));
+ Clip = m_doc->m_Selection->itemAt(0)->PoLine;
+ if (m_doc->nodeEdit.SelNode.count() != 0)
+ np = Clip.point(m_doc->nodeEdit.SelNode.at(0));
if (AbsMode->isChecked())
{
XSpin->setMinimum(-16777215);
YSpin->setMinimum(-16777215);
if (absToCanvas->isChecked())
- zp = FPoint(doc->m_Selection->itemAt(0)->xPos(), doc->m_Selection->itemAt(0)->yPos());
+ zp = FPoint(m_doc->m_Selection->itemAt(0)->xPos(), m_doc->m_Selection->itemAt(0)->yPos());
else
- zp = FPoint(doc->m_Selection->itemAt(0)->xPos() - doc->currentPage()->xOffset(), doc->m_Selection->itemAt(0)->yPos() - doc->currentPage()->yOffset());
+ zp = FPoint(m_doc->m_Selection->itemAt(0)->xPos() - m_doc->currentPage()->xOffset(), m_doc->m_Selection->itemAt(0)->yPos() - m_doc->currentPage()->yOffset());
}
else
{
XSpin->setMinimum(0);
YSpin->setMinimum(0);
}
- XSpin->setValue((np.x() + zp.x())*doc->unitRatio());
- YSpin->setValue((np.y() + zp.y())*doc->unitRatio());
+ XSpin->setValue((np.x() + zp.x()) * m_doc->unitRatio());
+ YSpin->setValue((np.y() + zp.y()) * m_doc->unitRatio());
connect(XSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
connect(YSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
}
@@ -685,9 +685,9 @@
{
disconnect(XSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
disconnect(YSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
- if (doc != 0)
- {
- doc->nodeEdit.isContourLine = EditCont->isChecked();
+ if (m_doc != 0)
+ {
+ m_doc->nodeEdit.isContourLine = EditCont->isChecked();
if (EditCont->isChecked())
{
BezierClose->setEnabled(false);
@@ -714,7 +714,7 @@
YSpin->setMinimum(0);
}
}
- view->DrawNew();
+ m_view->DrawNew();
}
connect(XSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
connect(YSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
@@ -722,10 +722,10 @@
void NodePalette::HaveNode(bool have, bool mov)
{
- if (doc==0)
+ if (m_doc==0)
return;
bool setter = have ? true : false;
- if (doc->nodeEdit.SelNode.count() > 1)
+ if (m_doc->nodeEdit.SelNode.count() > 1)
{
XSpin->setEnabled(false);
YSpin->setEnabled(false);
@@ -737,7 +737,7 @@
}
if (setter == true)
{
- if (doc->nodeEdit.EdPoints)
+ if (m_doc->nodeEdit.EdPoints)
ResNode->setEnabled(setter);
else
Res1Node->setEnabled(setter);
@@ -747,7 +747,7 @@
ResNode->setEnabled(setter);
Res1Node->setEnabled(setter);
}
- if (doc->nodeEdit.submode == NodeEditContext::MOVE_POINT)
+ if (m_doc->nodeEdit.submode == NodeEditContext::MOVE_POINT)
{
disconnect(AsymMove, SIGNAL(clicked()), this, SLOT(SetAsym()));
disconnect(SymMove, SIGNAL(clicked()), this, SLOT(SetSym()));
@@ -764,12 +764,12 @@
connect(AsymMove, SIGNAL(clicked()), this, SLOT(SetAsym()));
connect(SymMove, SIGNAL(clicked()), this, SLOT(SetSym()));
}
- if (doc->nodeEdit.submode == NodeEditContext::DEL_POINT)
+ if (m_doc->nodeEdit.submode == NodeEditContext::DEL_POINT)
{
uint cc;
bool leaveEd = false;
- PageItem*currItem=doc->m_Selection->itemAt(0);
- if (doc->nodeEdit.isContourLine)
+ PageItem*currItem=m_doc->m_Selection->itemAt(0);
+ if (m_doc->nodeEdit.isContourLine)
cc = currItem->ContourLine.size();
else
cc = currItem->PoLine.size();
@@ -793,16 +793,16 @@
void NodePalette::MoveK()
{
- if (doc==0)
- return;
- doc->nodeEdit.submode = NodeEditContext::MOVE_POINT;
- doc->nodeEdit.EdPoints = false;
- doc->nodeEdit.ClRe = -1;
- doc->nodeEdit.ClRe2 = -1;
- doc->nodeEdit.SegP1 = -1;
- doc->nodeEdit.SegP2 = -1;
- if (doc->m_Selection->count() > 0)
- doc->m_Selection->itemAt(0)->update();
+ if (m_doc==0)
+ return;
+ m_doc->nodeEdit.submode = NodeEditContext::MOVE_POINT;
+ m_doc->nodeEdit.EdPoints = false;
+ m_doc->nodeEdit.ClRe = -1;
+ m_doc->nodeEdit.ClRe2 = -1;
+ m_doc->nodeEdit.SegP1 = -1;
+ m_doc->nodeEdit.SegP2 = -1;
+ if (m_doc->m_Selection->count() > 0)
+ m_doc->m_Selection->itemAt(0)->update();
SymMove->setEnabled(true);
AsymMove->setEnabled(true);
Res1Node->setEnabled(true);
@@ -817,16 +817,16 @@
void NodePalette::MoveN()
{
- if (doc==0)
- return;
- doc->nodeEdit.submode = NodeEditContext::MOVE_POINT;
- doc->nodeEdit.EdPoints = true;
- doc->nodeEdit.ClRe = -1;
- doc->nodeEdit.ClRe2 = -1;
- doc->nodeEdit.SegP1 = -1;
- doc->nodeEdit.SegP2 = -1;
- if (doc->m_Selection->count() > 0)
- doc->m_Selection->itemAt(0)->update();
+ if (m_doc==0)
+ return;
+ m_doc->nodeEdit.submode = NodeEditContext::MOVE_POINT;
+ m_doc->nodeEdit.EdPoints = true;
+ m_doc->nodeEdit.ClRe = -1;
+ m_doc->nodeEdit.ClRe2 = -1;
+ m_doc->nodeEdit.SegP1 = -1;
+ m_doc->nodeEdit.SegP2 = -1;
+ if (m_doc->m_Selection->count() > 0)
+ m_doc->m_Selection->itemAt(0)->update();
ResNode->setEnabled(true);
AddNode->setEnabled(true);
DeleteNode->setEnabled(true);
@@ -841,10 +841,10 @@
void NodePalette::AddN()
{
- if (doc==0)
- return;
- doc->nodeEdit.submode = NodeEditContext::ADD_POINT;
- doc->nodeEdit.EdPoints = true;
+ if (m_doc==0)
+ return;
+ m_doc->nodeEdit.submode = NodeEditContext::ADD_POINT;
+ m_doc->nodeEdit.EdPoints = true;
SymMove->setEnabled(false);
AsymMove->setEnabled(false);
ResNode->setEnabled(false);
@@ -855,10 +855,10 @@
void NodePalette::DelN()
{
- if (doc==0)
- return;
- doc->nodeEdit.submode = NodeEditContext::DEL_POINT;
- doc->nodeEdit.EdPoints = true;
+ if (m_doc==0)
+ return;
+ m_doc->nodeEdit.submode = NodeEditContext::DEL_POINT;
+ m_doc->nodeEdit.EdPoints = true;
SymMove->setEnabled(false);
AsymMove->setEnabled(false);
ResNode->setEnabled(false);
@@ -869,15 +869,15 @@
void NodePalette::closeEvent(QCloseEvent *ce)
{
- if (doc != 0)
+ if (m_doc != 0)
{
MoveN();
- doc->nodeEdit.ClRe = -1;
- doc->nodeEdit.ClRe2 = -1;
- doc->nodeEdit.SegP1 = -1;
- doc->nodeEdit.SegP2 = -1;
- doc->nodeEdit.SelNode.clear();
- PageItem *currItem = doc->m_Selection->itemAt(0);
+ m_doc->nodeEdit.ClRe = -1;
+ m_doc->nodeEdit.ClRe2 = -1;
+ m_doc->nodeEdit.SegP1 = -1;
+ m_doc->nodeEdit.SegP2 = -1;
+ m_doc->nodeEdit.SelNode.clear();
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
if (currItem->itemType() == PageItem::PathText)
currItem->updatePolyClip();
}
@@ -889,17 +889,17 @@
void NodePalette::EndEdit()
{
- if (doc != 0)
+ if (m_doc != 0)
{
MoveN();
- doc->nodeEdit.ClRe = -1;
- doc->nodeEdit.ClRe2 = -1;
- doc->nodeEdit.SegP1 = -1;
- doc->nodeEdit.SegP2 = -1;
- doc->nodeEdit.SelNode.clear();
+ m_doc->nodeEdit.ClRe = -1;
+ m_doc->nodeEdit.ClRe2 = -1;
+ m_doc->nodeEdit.SegP1 = -1;
+ m_doc->nodeEdit.SegP2 = -1;
+ m_doc->nodeEdit.SelNode.clear();
EditCont->setChecked(false);
ToggleConMode();
- PageItem *currItem = doc->m_Selection->itemAt(0);
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
if (currItem->itemType() == PageItem::PathText)
currItem->updatePolyClip();
}
@@ -911,21 +911,21 @@
void NodePalette::CancelEdit()
{
- if (doc != 0)
+ if (m_doc != 0)
{
MoveN();
- doc->nodeEdit.ClRe = -1;
- doc->nodeEdit.ClRe2 = -1;
- doc->nodeEdit.SegP1 = -1;
- doc->nodeEdit.SegP2 = -1;
- doc->nodeEdit.SelNode.clear();
+ m_doc->nodeEdit.ClRe = -1;
+ m_doc->nodeEdit.ClRe2 = -1;
+ m_doc->nodeEdit.SegP1 = -1;
+ m_doc->nodeEdit.SegP2 = -1;
+ m_doc->nodeEdit.SelNode.clear();
EditCont->setChecked(false);
ToggleConMode();
- PageItem *currItem = doc->m_Selection->itemAt(0);
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
currItem->setXYPos(xPos, yPos, true);
currItem->ContourLine = itemContourPath.copy();
currItem->PoLine = itemPath.copy();
- doc->AdjustItemSize(currItem);
+ m_doc->AdjustItemSize(currItem);
if (currItem->itemType() == PageItem::PathText)
currItem->updatePolyClip();
}
@@ -937,21 +937,21 @@
void NodePalette::ResetToEditDefaults()
{
- if (doc != 0)
- {
- doc->nodeEdit.ClRe = -1;
- doc->nodeEdit.ClRe2 = -1;
- doc->nodeEdit.SegP1 = -1;
- doc->nodeEdit.SegP2 = -1;
- doc->nodeEdit.SelNode.clear();
- PageItem *currItem = doc->m_Selection->itemAt(0);
+ if (m_doc != 0)
+ {
+ m_doc->nodeEdit.ClRe = -1;
+ m_doc->nodeEdit.ClRe2 = -1;
+ m_doc->nodeEdit.SegP1 = -1;
+ m_doc->nodeEdit.SegP2 = -1;
+ m_doc->nodeEdit.SelNode.clear();
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
if (EditCont->isChecked())
currItem->ContourLine = itemContourPath.copy();
else
{
currItem->setXYPos(xPos, yPos, true);
currItem->PoLine = itemPath.copy();
- doc->AdjustItemSize(currItem);
+ m_doc->AdjustItemSize(currItem);
}
if (currItem->itemType() == PageItem::PathText)
currItem->updatePolyClip();
@@ -1029,13 +1029,13 @@
void NodePalette::unitChange()
{
- if (doc==0)
- return;
- unitRatio = doc->unitRatio();
- scaleDistance->setNewUnit(doc->unitIndex());
+ if (m_doc==0)
+ return;
+ unitRatio = m_doc->unitRatio();
+ scaleDistance->setNewUnit(m_doc->unitIndex());
}
ScribusDoc* NodePalette::currentDocument() const
{
- return doc;
-}
+ return m_doc;
+}
Modified: trunk/Scribus/scribus/ui/nodeeditpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/nodeeditpalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/nodeeditpalette.h (original)
+++ trunk/Scribus/scribus/ui/nodeeditpalette.h Wed Jun 19 19:46:21 2013
@@ -82,8 +82,6 @@
QPushButton* resetDefaultButton;
void setDoc(ScribusDoc *dc, ScribusView *vi);
ScribusDoc* currentDocument() const;
- ScribusDoc *doc;
- ScribusView *view;
private slots:
void closeEvent(QCloseEvent *);
@@ -135,6 +133,9 @@
QGridLayout *gridLayout;
QGridLayout *gridLayout1;
QGridLayout *gridLayout2;
+
+ ScribusDoc *m_doc;
+ ScribusView *m_view;
double unitRatio;
double xPos;
Modified: trunk/Scribus/scribus/ui/search.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/search.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/search.cpp (original)
+++ trunk/Scribus/scribus/ui/search.cpp Wed Jun 19 19:46:21 2013
@@ -41,14 +41,15 @@
: QDialog( parent ),
matchesFound(0)
{
+ m_item = ite;
+ m_doc = doc;
+ m_notFound = false;
+ m_itemMode = mode;
+
setModal(true);
setWindowTitle( tr( "Search/Replace" ) );
setWindowIcon(QIcon(loadIcon ( "AppIcon.png" )));
- ColorList::Iterator it;
- Item = ite;
- Doc = doc;
- NotFound = false;
- SMode = mode;
+
SearchReplaceLayout = new QVBoxLayout( this );
SearchReplaceLayout->setMargin(10);
SearchReplaceLayout->setSpacing(5);
@@ -352,37 +353,37 @@
setTabOrder( DoReplace, AllReplace );
setTabOrder( AllReplace, Leave );
- prefs = PrefsManager::instance()->prefsFile->getContext("SearchReplace");
+ m_prefs = PrefsManager::instance()->prefsFile->getContext("SearchReplace");
readPrefs();
}
void SearchReplace::slotSearch()
{
-// if (SMode)
-// Doc->view()->slotDoCurs(false);
+// if (m_itemMode)
+// m_doc->view()->slotDoCurs(false);
slotDoSearch();
- if (SMode)
+ if (m_itemMode)
{
-// Doc->view()->slotDoCurs(true);
- Item->update();
+// m_doc->view()->slotDoCurs(true);
+ m_item->update();
}
}
void SearchReplace::slotDoSearch()
{
- int maxChar = Item->itemText.length() - 1;
+ int maxChar = m_item->itemText.length() - 1;
DoReplace->setEnabled(false);
AllReplace->setEnabled(false);
- if (SMode)
+ if (m_itemMode)
{
- Item->itemText.deselectAll();
- Item->HasSel = false;
+ m_item->itemText.deselectAll();
+ m_item->HasSel = false;
}
QString fCol = "";
QString sCol = "";
QString sFont = "";
QString sText = "";
- NotFound = true;
+ m_notFound = true;
int sStyle = 0;
int sAlign = 0;
int sSize = 0;
@@ -420,122 +421,122 @@
if (sText.length() > 0)
found = false;
- uint as = Item->itemText.cursorPosition();
- ReplStart = as;
+ uint as = m_item->itemText.cursorPosition();
+ m_replStart = as;
int a;
- if (SMode)
+ if (m_itemMode)
{
Qt::CaseSensitivity cs = Qt::CaseSensitive;
if (CaseIgnore->isChecked())
cs = Qt::CaseInsensitive;
- for (a = as; a < Item->itemText.length(); ++a)
+ for (a = as; a < m_item->itemText.length(); ++a)
{
found = true;
if (SText->isChecked())
{
- a = Item->itemText.indexOf(sText, a, cs);
+ a = m_item->itemText.indexOf(sText, a, cs);
found = (a >= 0);
if (!found) break;
- if (Word->isChecked() && (a > 0) && !Item->itemText.text(a - 1).isSpace())
+ if (Word->isChecked() && (a > 0) && !m_item->itemText.text(a - 1).isSpace())
found = false;
if (Word->isChecked())
{
int lastChar = qMin(a + sText.length(), maxChar);
- found = ((lastChar == maxChar) || Item->itemText.text(lastChar).isSpace());
+ found = ((lastChar == maxChar) || m_item->itemText.text(lastChar).isSpace());
}
if (!found) continue;
}
if (SSize->isChecked())
{
- if (Item->itemText.charStyle(a).fontSize() != sSize)
+ if (m_item->itemText.charStyle(a).fontSize() != sSize)
found = false;
}
if (SFont->isChecked())
{
- if (Item->itemText.charStyle(a).font().scName() != sFont)
+ if (m_item->itemText.charStyle(a).font().scName() != sFont)
found = false;
}
#ifndef NLS_PROTO
if (SStyle->isChecked())
{
- if (Item->itemText.paragraphStyle(a).parent() != Doc->paragraphStyles()[sStyle].name())
+ if (m_item->itemText.paragraphStyle(a).parent() != m_doc->paragraphStyles()[sStyle].name())
found = false;
}
#endif
if (SAlign->isChecked())
{
- if (Item->itemText.paragraphStyle(a).alignment() != sAlign)
+ if (m_item->itemText.paragraphStyle(a).alignment() != sAlign)
found = false;
}
if (SStroke->isChecked())
{
- if (Item->itemText.charStyle(a).strokeColor() != sCol)
+ if (m_item->itemText.charStyle(a).strokeColor() != sCol)
found = false;
}
if (SStrokeS->isChecked())
{
- if (Item->itemText.charStyle(a).strokeShade() != sStrokeSh)
+ if (m_item->itemText.charStyle(a).strokeShade() != sStrokeSh)
found = false;
}
if (SFillS->isChecked())
{
- if (Item->itemText.charStyle(a).fillShade() != sFillSh)
+ if (m_item->itemText.charStyle(a).fillShade() != sFillSh)
found = false;
}
if (SEffect->isChecked())
{
- if ((Item->itemText.charStyle(a).effects() & 1919) != sEff)
+ if ((m_item->itemText.charStyle(a).effects() & 1919) != sEff)
found = false;
}
if (SFill->isChecked())
{
- if (Item->itemText.charStyle(a).fillColor() != fCol)
+ if (m_item->itemText.charStyle(a).fillColor() != fCol)
found = false;
}
if (found)
{
- Item->itemText.select(a, sText.length());
- Item->HasSel = true;
+ m_item->itemText.select(a, sText.length());
+ m_item->HasSel = true;
if (rep)
{
DoReplace->setEnabled(true);
AllReplace->setEnabled(true);
}
- Item->itemText.setCursorPosition(a + sText.length());
+ m_item->itemText.setCursorPosition(a + sText.length());
if (!SText->isChecked())
break;
- ReplStart = a;
+ m_replStart = a;
break;
}
else
{
if (SText->isChecked())
{
- for (int xx = ReplStart; xx < a+1; ++xx)
- Item->itemText.select(qMin(xx, maxChar), 1, false);
- Item->HasSel = false;
+ for (int xx = m_replStart; xx < a+1; ++xx)
+ m_item->itemText.select(qMin(xx, maxChar), 1, false);
+ m_item->HasSel = false;
}
}
}
- if ((!found) || (a == Item->itemText.length()))
+ if ((!found) || (a == m_item->itemText.length()))
{
- Doc->DoDrawing = true;
- Item->update();
+ m_doc->DoDrawing = true;
+ m_item->update();
DoReplace->setEnabled(false);
AllReplace->setEnabled(false);
QMessageBox::information(this, tr("Search/Replace"), tr("Search finished"), CommonStrings::tr_OK);
- Item->itemText.setCursorPosition(0);
- NotFound = false;
+ m_item->itemText.setCursorPosition(0);
+ m_notFound = false;
}
}
- else if (Doc->scMW()->CurrStED != NULL)
+ else if (m_doc->scMW()->CurrStED != NULL)
{
found = false;
- SEditor* storyTextEdit = Doc->scMW()->CurrStED->Editor;
+ SEditor* storyTextEdit = m_doc->scMW()->CurrStED->Editor;
if (storyTextEdit->StyledText.length() == 0)
return;
@@ -560,7 +561,7 @@
found = false;
if (SFont->isChecked() && (charStyle.font().scName() != sFont))
found = false;
- if (SStyle->isChecked() && (parStyle.parent() != Doc->paragraphStyles()[sStyle].name()))
+ if (SStyle->isChecked() && (parStyle.parent() != m_doc->paragraphStyles()[sStyle].name()))
found = false;
if (SAlign->isChecked() && (parStyle.alignment() != sAlign))
found = false;
@@ -592,7 +593,7 @@
found = false;
if (SFont->isChecked() && (charStyle.font().scName() != sFont))
found = false;
- if (SStyle->isChecked() && (parStyle.parent() != Doc->paragraphStyles()[sStyle].name()))
+ if (SStyle->isChecked() && (parStyle.parent() != m_doc->paragraphStyles()[sStyle].name()))
found = false;
if (SAlign->isChecked() && (parStyle.alignment() != sAlign))
found = false;
@@ -631,7 +632,7 @@
}
if (found)
{
- // Doc->scMW()->CurrStED->updateProps(); FIXME
+ // m_doc->scMW()->CurrStED->updateProps(); FIXME
if (rep)
{
DoReplace->setEnabled(true);
@@ -645,7 +646,7 @@
tr("Search finished, found %1 matches").arg(matchesFound),
CommonStrings::tr_OK);
matchesFound = 0;
- NotFound = false;
+ m_notFound = false;
QTextCursor cursor = storyTextEdit->textCursor();
cursor.clearSelection();
cursor.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor);
@@ -656,19 +657,19 @@
void SearchReplace::slotReplace()
{
-// if (SMode)
-// Doc->view()->slotDoCurs(false);
+// if (m_itemMode)
+// m_doc->view()->slotDoCurs(false);
slotDoReplace();
- if (SMode)
+ if (m_itemMode)
{
-// Doc->view()->slotDoCurs(true);
- Item->update();
+// m_doc->view()->slotDoCurs(true);
+ m_item->update();
}
}
void SearchReplace::slotDoReplace()
{
- if (SMode)
+ if (m_itemMode)
{
QString repl, sear;
int cs, cx;
@@ -680,74 +681,74 @@
if (sear.length() == repl.length())
{
for (cs = 0; cs < sear.length(); ++cs)
- Item->itemText.replaceChar(ReplStart+cs, repl[cs]);
+ m_item->itemText.replaceChar(m_replStart+cs, repl[cs]);
}
else
{
if (sear.length() < repl.length())
{
for (cs = 0; cs < sear.length(); ++cs)
- Item->itemText.replaceChar(ReplStart+cs, repl[cs]);
+ m_item->itemText.replaceChar(m_replStart+cs, repl[cs]);
for (cx = cs; cx < repl.length(); ++cx)
- Item->itemText.insertChars(ReplStart+cx, repl.mid(cx,1), true);
+ m_item->itemText.insertChars(m_replStart+cx, repl.mid(cx,1), true);
// FIXME:NLS also replace styles!!
}
else
{
for (cs = 0; cs < repl.length(); ++cs)
- Item->itemText.replaceChar(ReplStart+cs, repl[cs]);
- Item->itemText.removeChars(ReplStart+cs, sear.length() - cs);
+ m_item->itemText.replaceChar(m_replStart+cs, repl[cs]);
+ m_item->itemText.removeChars(m_replStart+cs, sear.length() - cs);
}
}
}
if (RStyle->isChecked())
{
- int oldMode = Doc->appMode;
- Doc->appMode = modeEdit;
- Doc->itemSelection_SetNamedParagraphStyle(Doc->paragraphStyles()[RStyleVal->currentIndex()].name());
- Doc->appMode = oldMode;
+ int oldMode = m_doc->appMode;
+ m_doc->appMode = modeEdit;
+ m_doc->itemSelection_SetNamedParagraphStyle(m_doc->paragraphStyles()[RStyleVal->currentIndex()].name());
+ m_doc->appMode = oldMode;
}
if (RAlign->isChecked())
{
- int oldMode = Doc->appMode;
- Doc->appMode = modeEdit;
- Doc->itemSelection_SetAlignment(RAlignVal->currentIndex());
- Doc->appMode = oldMode;
+ int oldMode = m_doc->appMode;
+ m_doc->appMode = modeEdit;
+ m_doc->itemSelection_SetAlignment(RAlignVal->currentIndex());
+ m_doc->appMode = oldMode;
}
if (RFill->isChecked())
- Doc->itemSelection_SetFillColor(RFillVal->currentText());
+ m_doc->itemSelection_SetFillColor(RFillVal->currentText());
if (RFillS->isChecked())
- Doc->itemSelection_SetFillShade(RFillSVal->getValue());
+ m_doc->itemSelection_SetFillShade(RFillSVal->getValue());
if (RStroke->isChecked())
- Doc->itemSelection_SetStrokeColor(RStrokeVal->currentText());
+ m_doc->itemSelection_SetStrokeColor(RStrokeVal->currentText());
if (RStrokeS->isChecked())
- Doc->itemSelection_SetStrokeShade(RStrokeSVal->getValue());
+ m_doc->itemSelection_SetStrokeShade(RStrokeSVal->getValue());
if (RFont->isChecked())
- Doc->itemSelection_SetFont(RFontVal->currentText());
+ m_doc->itemSelection_SetFont(RFontVal->currentText());
if (RSize->isChecked())
- Doc->itemSelection_SetFontSize(qRound(RSizeVal->value() * 10.0));
+ m_doc->itemSelection_SetFontSize(qRound(RSizeVal->value() * 10.0));
if (REffect->isChecked())
{
#ifndef NLS_PROTO
int s = REffVal->getStyle();
- Doc->currentStyle.charStyle().setFeatures(static_cast<StyleFlag>(s).featureList()); // ???
- for (int a = 0; a < Item->itemText.length(); ++a)
- {
- if (Item->itemText.selected(a))
+ m_doc->currentStyle.charStyle().setFeatures(static_cast<StyleFlag>(s).featureList()); // ???
+ for (int a = 0; a < m_item->itemText.length(); ++a)
+ {
+ if (m_item->itemText.selected(a))
{
- StyleFlag fl = Item->itemText.item(a)->effects();
+ StyleFlag fl = m_item->itemText.item(a)->effects();
fl &= static_cast<StyleFlag>(~1919);
fl |= static_cast<StyleFlag>(s);
- Item->itemText.item(a)->setFeatures(fl.featureList());
+ m_item->itemText.item(a)->setFeatures(fl.featureList());
}
}
#endif
}
- Item->itemText.deselectAll();
+ m_item->itemText.deselectAll();
}
- else if (Doc->scMW()->CurrStED != NULL)
+ else if (m_doc->scMW()->CurrStED != NULL)
{
- StoryEditor* se=Doc->scMW()->CurrStED;
+ StoryEditor* se = m_doc->scMW()->CurrStED;
if (RText->isChecked())
{
disconnect(se->Editor, SIGNAL(cursorPositionChanged()), se, SLOT(updateProps()));
@@ -771,7 +772,7 @@
// se->newAlign(se->Editor->currentParaStyle);
}
if (RStyle->isChecked())
- se->newStyle(Doc->paragraphStyles()[RStyleVal->currentIndex()].name());
+ se->newStyle(m_doc->paragraphStyles()[RStyleVal->currentIndex()].name());
if (RAlign->isChecked())
se->newAlign(RAlignVal->currentIndex());
if (RFill->isChecked())
@@ -803,22 +804,22 @@
void SearchReplace::slotReplaceAll()
{
- if (SMode)
+ if (m_itemMode)
{
-// Doc->view()->slotDoCurs(false);
- Doc->DoDrawing = false;
+// m_doc->view()->slotDoCurs(false);
+ m_doc->DoDrawing = false;
}
do
{
slotDoReplace();
// slotDoSearch();
}
- while (NotFound);
- if (SMode)
+ while (m_notFound);
+ if (m_itemMode)
{
- Doc->DoDrawing = true;
-// Doc->view()->slotDoCurs(true);
- Item->update();
+ m_doc->DoDrawing = true;
+// m_doc->view()->slotDoCurs(true);
+ m_item->update();
}
}
@@ -943,13 +944,13 @@
SEffect->setChecked(false);
REffect->setChecked(false);
STextVal->setText("");
- int currentParaStyle = findParagraphStyle(Doc, Doc->currentStyle);
+ int currentParaStyle = findParagraphStyle(m_doc, m_doc->currentStyle);
SStyleVal->setCurrentIndex(currentParaStyle);
- RAlignVal->setCurrentIndex(Doc->currentStyle.alignment());
- 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);
+ RAlignVal->setCurrentIndex(m_doc->currentStyle.alignment());
+ setCurrentComboItem(SFontVal, m_doc->currentStyle.charStyle().font().scName());
+ setCurrentComboItem(SFillVal, m_doc->currentStyle.charStyle().fillColor());
+ setCurrentComboItem(SStrokeVal, m_doc->currentStyle.charStyle().strokeColor());
+ SSizeVal->setValue(m_doc->currentStyle.charStyle().fontSize() / 10.0);
RStroke->setChecked(false);
RStrokeS->setChecked(false);
RFill->setChecked(false);
@@ -960,11 +961,11 @@
RText->setChecked(false);
RTextVal->setText("");
RStyleVal->setCurrentIndex(currentParaStyle);
- RAlignVal->setCurrentIndex(Doc->currentStyle.alignment());
- 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);
+ RAlignVal->setCurrentIndex(m_doc->currentStyle.alignment());
+ setCurrentComboItem(RFontVal, m_doc->currentStyle.charStyle().font().scName());
+ setCurrentComboItem(RFillVal, m_doc->currentStyle.charStyle().fillColor());
+ setCurrentComboItem(RStrokeVal, m_doc->currentStyle.charStyle().strokeColor());
+ RSizeVal->setValue(m_doc->currentStyle.charStyle().fontSize() / 10.0);
Word->setChecked(false);
CaseIgnore->setChecked(false);
enableTxSearch();
@@ -989,54 +990,54 @@
void SearchReplace::readPrefs()
{
- SStroke->setChecked(prefs->getBool("SStroke", false));
- SFill->setChecked(prefs->getBool("SFill", false));
- SStrokeS->setChecked(prefs->getBool("SStrokeS", false));
- SFillS->setChecked(prefs->getBool("SFillS", false));
- SSize->setChecked(prefs->getBool("SSize", false));
- SFont->setChecked(prefs->getBool("SFont", false));
- SStyle->setChecked(prefs->getBool("SStyle", false));
- SAlign->setChecked(prefs->getBool("SAlign", false));
- SText->setChecked(prefs->getBool("SText", false));
- SEffect->setChecked(prefs->getBool("SEffect", false));
- REffect->setChecked(prefs->getBool("REffect", false));
- STextVal->setText(prefs->get("STextVal", ""));
- int tmp = prefs->getInt("SStyleVal", findParagraphStyle(Doc, Doc->currentStyle));
+ SStroke->setChecked(m_prefs->getBool("SStroke", false));
+ SFill->setChecked(m_prefs->getBool("SFill", false));
+ SStrokeS->setChecked(m_prefs->getBool("SStrokeS", false));
+ SFillS->setChecked(m_prefs->getBool("SFillS", false));
+ SSize->setChecked(m_prefs->getBool("SSize", false));
+ SFont->setChecked(m_prefs->getBool("SFont", false));
+ SStyle->setChecked(m_prefs->getBool("SStyle", false));
+ SAlign->setChecked(m_prefs->getBool("SAlign", false));
+ SText->setChecked(m_prefs->getBool("SText", false));
+ SEffect->setChecked(m_prefs->getBool("SEffect", false));
+ REffect->setChecked(m_prefs->getBool("REffect", false));
+ STextVal->setText(m_prefs->get("STextVal", ""));
+ int tmp = m_prefs->getInt("SStyleVal", findParagraphStyle(m_doc, m_doc->currentStyle));
if (tmp < 0 || tmp >= SStyleVal->count())
tmp = 0;
SStyleVal->setCurrentIndex(tmp);
- tmp = prefs->getInt("SAlignVal", Doc->currentStyle.alignment());
+ tmp = m_prefs->getInt("SAlignVal", m_doc->currentStyle.alignment());
if (tmp < 0 || tmp >= SAlignVal->count())
tmp = 0;
SAlignVal->setCurrentIndex(tmp);
- 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));
- RFill->setChecked(prefs->getBool("RFill", false));
- RFillS->setChecked(prefs->getBool("RFillS", false));
- RSize->setChecked(prefs->getBool("RSize", false));
- RFont->setChecked(prefs->getBool("RFont", false));
- RStyle->setChecked(prefs->getBool("RStyle", false));
- RAlign->setChecked(prefs->getBool("RAlign", false));
- RText->setChecked(prefs->getBool("RText", false));
- RTextVal->setText(prefs->get("RTextVal", ""));
- tmp = prefs->getInt("RStyleVal", findParagraphStyle(Doc, Doc->currentStyle));
+ setCurrentComboItem(SFontVal, m_prefs->get("SFontVal", m_doc->currentStyle.charStyle().font().scName()));
+ setCurrentComboItem(SFillVal, m_prefs->get("SFillVal", m_doc->currentStyle.charStyle().fillColor()));
+ setCurrentComboItem(SStrokeVal, m_prefs->get("SStrokeVal", m_doc->currentStyle.charStyle().strokeColor()));
+ SSizeVal->setValue(m_prefs->getDouble("SSizeVal", m_doc->currentStyle.charStyle().fontSize() / 10.0));
+ RStroke->setChecked(m_prefs->getBool("RStroke", false));
+ RStrokeS->setChecked(m_prefs->getBool("RStrokeS", false));
+ RFill->setChecked(m_prefs->getBool("RFill", false));
+ RFillS->setChecked(m_prefs->getBool("RFillS", false));
+ RSize->setChecked(m_prefs->getBool("RSize", false));
+ RFont->setChecked(m_prefs->getBool("RFont", false));
+ RStyle->setChecked(m_prefs->getBool("RStyle", false));
+ RAlign->setChecked(m_prefs->getBool("RAlign", false));
+ RText->setChecked(m_prefs->getBool("RText", false));
+ RTextVal->setText(m_prefs->get("RTextVal", ""));
+ tmp = m_prefs->getInt("RStyleVal", findParagraphStyle(m_doc, m_doc->currentStyle));
if (tmp < 0 || tmp >= RStyleVal->count())
tmp = 0;
RStyleVal->setCurrentIndex(tmp);
- tmp = prefs->getInt("RAlignVal", Doc->currentStyle.alignment());
+ tmp = m_prefs->getInt("RAlignVal", m_doc->currentStyle.alignment());
if (tmp < 0 || tmp >= RAlignVal->count())
tmp = 0;
RAlignVal->setCurrentIndex(tmp);
- 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));
+ setCurrentComboItem(RFontVal, m_prefs->get("RFontVal", m_doc->currentStyle.charStyle().font().scName()));
+ setCurrentComboItem(RFillVal, m_prefs->get("RFillVal", m_doc->currentStyle.charStyle().fillColor()));
+ setCurrentComboItem(RStrokeVal, m_prefs->get("RStrokeVal", m_doc->currentStyle.charStyle().strokeColor()));
+ RSizeVal->setValue(m_prefs->getDouble("RSizeVal", m_doc->currentStyle.charStyle().fontSize() / 10.0));
+ Word->setChecked(m_prefs->getBool("Word", false));
+ CaseIgnore->setChecked(m_prefs->getBool("CaseIgnore", false));
enableTxSearch();
enableStyleSearch();
enableAlignSearch();
@@ -1061,41 +1062,41 @@
void SearchReplace::writePrefs()
{
- prefs->set("SStroke", SStroke->isChecked());
- prefs->set("SFill", SFill->isChecked());
- prefs->set("SStrokeS", SStrokeS->isChecked());
- prefs->set("SFillS", SFillS->isChecked());
- prefs->set("SSize", SSize->isChecked());
- prefs->set("SFont", SFont->isChecked());
- prefs->set("SStyle", SStyle->isChecked());
- prefs->set("SAlign", SAlign->isChecked());
- prefs->set("SText", SText->isChecked());
- prefs->set("SEffect", SEffect->isChecked());
- prefs->set("REffect", REffect->isChecked());
- prefs->set("STextVal", STextVal->text());
- prefs->set("SStyleVal", SStyleVal->currentIndex());
- prefs->set("SAlignVal", SAlignVal->currentIndex());
- prefs->set("SFontVal", SFontVal->currentText());
- prefs->set("SSizeVal", SSizeVal->value());
- prefs->set("SFillVal", SFillVal->currentText());
- prefs->set("SStrokeVal", SStrokeVal->currentText());
- prefs->set("RStroke", RStroke->isChecked());
- prefs->set("RStrokeS", RStrokeS->isChecked());
- prefs->set("RFill", RFill->isChecked());
- prefs->set("RFillS", RFillS->isChecked());
- prefs->set("RSize", RSize->isChecked());
- prefs->set("RFont", RFont->isChecked());
- prefs->set("RStyle", RStyle->isChecked());
- prefs->set("RAlign", RAlign->isChecked());
- prefs->set("RText", RText->isChecked());
- prefs->set("RTextVal", RTextVal->text());
- prefs->set("RStyleVal", RStyleVal->currentText());
- prefs->set("RAlignVal", RAlignVal->currentIndex());
- prefs->set("RFontVal", RFontVal->currentText());
- prefs->set("RSizeVal", RSizeVal->value());
- prefs->set("RFillVal", RFillVal->currentText());
- prefs->set("RStrokeVal", RStrokeVal->currentText());
- prefs->set("Word", Word->isChecked());
- prefs->set("CaseIgnore", CaseIgnore->isChecked());
+ m_prefs->set("SStroke", SStroke->isChecked());
+ m_prefs->set("SFill", SFill->isChecked());
+ m_prefs->set("SStrokeS", SStrokeS->isChecked());
+ m_prefs->set("SFillS", SFillS->isChecked());
+ m_prefs->set("SSize", SSize->isChecked());
+ m_prefs->set("SFont", SFont->isChecked());
+ m_prefs->set("SStyle", SStyle->isChecked());
+ m_prefs->set("SAlign", SAlign->isChecked());
+ m_prefs->set("SText", SText->isChecked());
+ m_prefs->set("SEffect", SEffect->isChecked());
+ m_prefs->set("REffect", REffect->isChecked());
+ m_prefs->set("STextVal", STextVal->text());
+ m_prefs->set("SStyleVal", SStyleVal->currentIndex());
+ m_prefs->set("SAlignVal", SAlignVal->currentIndex());
+ m_prefs->set("SFontVal", SFontVal->currentText());
+ m_prefs->set("SSizeVal", SSizeVal->value());
+ m_prefs->set("SFillVal", SFillVal->currentText());
+ m_prefs->set("SStrokeVal", SStrokeVal->currentText());
+ m_prefs->set("RStroke", RStroke->isChecked());
+ m_prefs->set("RStrokeS", RStrokeS->isChecked());
+ m_prefs->set("RFill", RFill->isChecked());
+ m_prefs->set("RFillS", RFillS->isChecked());
+ m_prefs->set("RSize", RSize->isChecked());
+ m_prefs->set("RFont", RFont->isChecked());
+ m_prefs->set("RStyle", RStyle->isChecked());
+ m_prefs->set("RAlign", RAlign->isChecked());
+ m_prefs->set("RText", RText->isChecked());
+ m_prefs->set("RTextVal", RTextVal->text());
+ m_prefs->set("RStyleVal", RStyleVal->currentText());
+ m_prefs->set("RAlignVal", RAlignVal->currentIndex());
+ m_prefs->set("RFontVal", RFontVal->currentText());
+ m_prefs->set("RSizeVal", RSizeVal->value());
+ m_prefs->set("RFillVal", RFillVal->currentText());
+ m_prefs->set("RStrokeVal", RStrokeVal->currentText());
+ m_prefs->set("Word", Word->isChecked());
+ m_prefs->set("CaseIgnore", CaseIgnore->isChecked());
accept();
}
Modified: trunk/Scribus/scribus/ui/search.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/search.h
==============================================================================
--- trunk/Scribus/scribus/ui/search.h (original)
+++ trunk/Scribus/scribus/ui/search.h Wed Jun 19 19:46:21 2013
@@ -89,12 +89,6 @@
QPushButton* AllReplace;
QPushButton* clearButton;
QPushButton* Leave;
- PageItem* Item;
- ScribusDoc* Doc;
- uint ReplStart;
- PrefsContext* prefs;
- bool NotFound;
- bool SMode;
public slots:
virtual void slotSearch();
@@ -128,6 +122,14 @@
void NewAbs(int);
protected:
+ PageItem* m_item;
+ ScribusDoc* m_doc;
+
+ uint m_replStart;
+ PrefsContext* m_prefs;
+ bool m_notFound;
+ bool m_itemMode;
+
QVBoxLayout* SearchReplaceLayout;
QHBoxLayout* SelLayout;
QGridLayout* SearchLayout;
Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp Wed Jun 19 19:46:21 2013
@@ -1507,25 +1507,25 @@
// : QMainWindow(parent, "StoryEditor", WType_TopLevel) // WType_Dialog) //WShowModal |
// {
// prefsManager=PrefsManager::instance();
-// currDoc = docc;
+// m_doc = docc;
// seMenuMgr=NULL;
// buildGUI();
// currItem = ite;
// // charSelect = NULL;
-// firstSet = false;
+// m_firstSet = false;
// activFromApp = true;
// Editor->loadItemText(ite);
-// Editor->getCursorPosition(&CurrPara, &CurrChar);
+// Editor->getCursorPosition(&m_currPara, &m_currChar);
// EditorBar->setRepaint(true);
// EditorBar->doRepaint();
-// updateProps(CurrPara, CurrChar);
+// updateProps(m_currPara, m_currChar);
// updateStatus();
-// textChanged = false;
+// m_textChanged = false;
// disconnectSignals();
// connectSignals();
// Editor->setFocus();
// Editor->setColor(false);
-// blockUpdate = false;
+// m_blockUpdate = false;
// loadPrefs();
// // hack to keep charPalette visible. See destructor too - PV
// ScCore->primaryMainWindow()->charPalette->reparent(this, QPoint(0, 0));
@@ -1534,13 +1534,13 @@
/* Main Story Editor Class, no current document */
StoryEditor::StoryEditor(QWidget* parent) : QMainWindow(parent, Qt::Window), // WType_Dialog) //WShowModal |
activFromApp(true),
- currDoc(NULL),
- currItem(NULL),
- textChanged(false),
- firstSet(false),
- blockUpdate(false),
- CurrPara(0),
- CurrChar(0),
+ m_doc(NULL),
+ m_item(NULL),
+ m_textChanged(false),
+ m_firstSet(false),
+ m_blockUpdate(false),
+ m_currPara(0),
+ m_currChar(0),
charSelect(NULL),
charSelectUsed(false)
{
@@ -1572,8 +1572,8 @@
connect(charSelect, SIGNAL(insertSpecialChar()), this, SLOT(slot_insertSpecialChar()));
connect(charSelect, SIGNAL(insertUserSpecialChar(QChar, QString)), this, SLOT(slot_insertUserSpecialChar(QChar, QString)));
- smartSelection=prefsManager->appPrefs.storyEditorPrefs.smartTextSelection;
- seActions["settingsSmartTextSelection"]->setChecked(smartSelection);
+ m_smartSelection = prefsManager->appPrefs.storyEditorPrefs.smartTextSelection;
+ seActions["settingsSmartTextSelection"]->setChecked(m_smartSelection);
}
void StoryEditor::hideEvent(QHideEvent *)
@@ -1695,7 +1695,7 @@
seActions.insert("settingsBackground", new ScrAction("", QKeySequence(), this));
seActions.insert("settingsDisplayFont", new ScrAction("", QKeySequence(), this));
seActions.insert("settingsSmartTextSelection", new ScrAction("", QKeySequence(), this));
- seActions["settingsSmartTextSelection"]->setChecked(smartSelection);
+ seActions["settingsSmartTextSelection"]->setChecked(m_smartSelection);
seActions["settingsSmartTextSelection"]->setToggleAction(true);
connect( seActions["settingsBackground"], SIGNAL(triggered()), this, SLOT(setBackPref()) );
@@ -1821,7 +1821,7 @@
{
unicodeCharActionNames.clear();
seActions.clear();
- smartSelection=prefsManager->appPrefs.storyEditorPrefs.smartTextSelection;
+ m_smartSelection = prefsManager->appPrefs.storyEditorPrefs.smartTextSelection;
initActions();
ActionManager::initUnicodeActions(&seActions, this, &unicodeCharActionNames);
seActions["unicodeSoftHyphen"]->setEnabled(false);//CB TODO doesnt work in SE yet.
@@ -1863,7 +1863,7 @@
AlignTools->setAllowedAreas(Qt::RightToolBarArea);
AlignTools->setAllowedAreas(Qt::BottomToolBarArea);
AlignTools->setAllowedAreas(Qt::TopToolBarArea);
- AlignTools->paraStyleCombo->setDoc(currDoc);
+ AlignTools->paraStyleCombo->setDoc(m_doc);
StyleTools = new SToolBStyle(this);
StyleTools->setIconSize(QSize(16,16));
StyleTools->setObjectName("Style");
@@ -1871,7 +1871,7 @@
StyleTools->setAllowedAreas(Qt::RightToolBarArea);
StyleTools->setAllowedAreas(Qt::BottomToolBarArea);
StyleTools->setAllowedAreas(Qt::TopToolBarArea);
- StrokeTools = new SToolBColorS(this, currDoc);
+ StrokeTools = new SToolBColorS(this, m_doc);
StrokeTools->setIconSize(QSize(16,16));
StrokeTools->setObjectName("Strok");
StrokeTools->setAllowedAreas(Qt::LeftToolBarArea);
@@ -1880,7 +1880,7 @@
StrokeTools->setAllowedAreas(Qt::TopToolBarArea);
StrokeTools->TxStroke->setEnabled(false);
StrokeTools->PM1->setEnabled(false);
- FillTools = new SToolBColorF(this, currDoc);
+ FillTools = new SToolBColorF(this, m_doc);
FillTools->setIconSize(QSize(16,16));
FillTools->setObjectName("Fill");
FillTools->setAllowedAreas(Qt::LeftToolBarArea);
@@ -1902,7 +1902,7 @@
EditorBar = new SideBar(this);
EdSplit->addWidget(EditorBar);
/* Editor Widget, subclass of QTextEdit */
- Editor = new SEditor(this, currDoc, this);
+ Editor = new SEditor(this, m_doc, this);
EdSplit->addWidget(Editor);
StoryEd2Layout->addWidget( EdSplit );
@@ -2083,19 +2083,19 @@
void StoryEditor::setCurrentDocumentAndItem(ScribusDoc *doc, PageItem *item)
{
disconnectSignals();
- currDoc=doc;
- textChanged=false;
- AlignTools->paraStyleCombo->setDoc(currDoc);
- StrokeTools->setCurrentDocument(currDoc);
- FillTools->setCurrentDocument(currDoc);
- Editor->setCurrentDocument(currDoc);
- currItem = item;
- if (currItem!=NULL)
- {
- setWindowTitle( tr("Story Editor - %1").arg(currItem->itemName()));
- firstSet = false;
- FontTools->Fonts->RebuildList(currDoc, currItem->isAnnotation());
- Editor->loadItemText(currItem);
+ m_doc=doc;
+ m_textChanged=false;
+ AlignTools->paraStyleCombo->setDoc(m_doc);
+ StrokeTools->setCurrentDocument(m_doc);
+ FillTools->setCurrentDocument(m_doc);
+ Editor->setCurrentDocument(m_doc);
+ m_item = item;
+ if (m_item != NULL)
+ {
+ setWindowTitle( tr("Story Editor - %1").arg(m_item->itemName()));
+ m_firstSet = false;
+ FontTools->Fonts->RebuildList(m_doc, m_item->isAnnotation());
+ Editor->loadItemText(m_item);
Editor->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor);
Editor->repaint();
EditorBar->offs = 0;
@@ -2131,7 +2131,7 @@
{
int indexFrom=0, indexTo=0;
QString selText = Editor->textCursor().selectedText();
- if (selText.length() == 0 || !smartSelection)
+ if (selText.length() == 0 || !m_smartSelection)
{
updateProps(para, position);
return;
@@ -2147,14 +2147,14 @@
void StoryEditor::setSmart(bool newSmartSelection)
{
- smartSelection = newSmartSelection;
+ m_smartSelection = newSmartSelection;
}
void StoryEditor::closeEvent(QCloseEvent *e)
{
- if (textChanged)
- {
- blockUpdate = true;
+ if (m_textChanged)
+ {
+ m_blockUpdate = true;
int t = QMessageBox::warning(this, CommonStrings::trWarning,
tr("Do you want to save your changes?"),
QMessageBox::Yes|QMessageBox::Default,
@@ -2164,25 +2164,25 @@
if (t == QMessageBox::Yes)
{
updateTextFrame();
- result = QDialog::Accepted;
+ m_result = QDialog::Accepted;
}
else if (t == QMessageBox::Cancel)
{
e->ignore();
- blockUpdate = false;
+ m_blockUpdate = false;
return;
}
else if (t == QMessageBox::No)
- result = QDialog::Rejected;
+ m_result = QDialog::Rejected;
}
else
- result = QDialog::Rejected;
+ m_result = QDialog::Rejected;
setCurrentDocumentAndItem(NULL, NULL);
savePrefs();
// if (charSelect != NULL)
// charSelect->close();
hide();
- blockUpdate = false;
+ m_blockUpdate = false;
}
void StoryEditor::keyPressEvent (QKeyEvent * e)
@@ -2202,21 +2202,21 @@
{
if ( ev->type() == QEvent::WindowDeactivate )
{
- if ((currItem!=NULL) && (!blockUpdate))
+ if ((m_item != NULL) && (!m_blockUpdate))
updateTextFrame();
activFromApp = false;
- // Editor->getCursorPosition(&CurrPara, &CurrChar);
+ // Editor->getCursorPosition(&m_currPara, &m_currChar);
}
if ( ev->type() == QEvent::WindowActivate )
{
- if ((!activFromApp) && (!textChanged) && (!blockUpdate))
+ if ((!activFromApp) && (!m_textChanged) && (!m_blockUpdate))
{
activFromApp = true;
- if (currItem!=NULL)
+ if (m_item != NULL)
{
//set to false otherwise some dialog properties wont be set correctly
- if (currItem->itemText.length() == 0)
- firstSet = false;
+ if (m_item->itemText.length() == 0)
+ m_firstSet = false;
disconnectSignals();
Editor->setUndoRedoEnabled(false);
Editor->setUndoRedoEnabled(true);
@@ -2225,12 +2225,12 @@
seActions["editCopy"]->setEnabled(false);
seActions["editCut"]->setEnabled(false);
seActions["editClear"]->setEnabled(false);
- textChanged = false;
- FontTools->Fonts->RebuildList(currDoc, currItem->isAnnotation());
- Editor->loadItemText(currItem);
- // Editor->getCursorPosition(&CurrPara, &CurrChar);
+ m_textChanged = false;
+ FontTools->Fonts->RebuildList(m_doc, m_item->isAnnotation());
+ Editor->loadItemText(m_item);
+ // Editor->getCursorPosition(&m_currPara, &m_currChar);
updateStatus();
- textChanged = false;
+ m_textChanged = false;
Editor->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor);
Editor->repaint();
EditorBar->offs = 0;
@@ -2248,7 +2248,7 @@
void StoryEditor::setBackPref()
{
- blockUpdate = true;
+ m_blockUpdate = true;
QColor newColor(QColorDialog::getColor(Editor->palette().color(QPalette::Base), this));
if (newColor.isValid())
{
@@ -2259,16 +2259,16 @@
Editor->setPalette(pal);
prefsManager->appPrefs.storyEditorPrefs.guiFontColorBackground = newColor;
}
- blockUpdate = false;
+ m_blockUpdate = false;
}
void StoryEditor::setFontPref()
{
- blockUpdate = true;
+ m_blockUpdate = true;
Editor->setFont( QFontDialog::getFont( 0, Editor->font(), this ) );
prefsManager->appPrefs.storyEditorPrefs.guiFont = Editor->font().toString();
EditorBar->doRepaint();
- blockUpdate = false;
+ m_blockUpdate = false;
}
void StoryEditor::newTxFill(int c, int s)
@@ -2301,10 +2301,10 @@
void StoryEditor::newTxFont(const QString &f)
{
- if(!currDoc->UsedFonts.contains(f)) {
- if (!currDoc->AddFont(f)) {
+ if(!m_doc->UsedFonts.contains(f)) {
+ if (!m_doc->AddFont(f)) {
//, prefsManager->appPrefs.AvailFonts[f]->Font)) {
- FontTools->Fonts->RebuildList(currDoc);
+ FontTools->Fonts->RebuildList(m_doc);
return;
};
}
@@ -2312,7 +2312,7 @@
Editor->CurrFont = f;
updateUnicodeActions();
CharStyle charStyle;
- charStyle.setFont((*currDoc->AllFonts)[Editor->CurrFont]);
+ charStyle.setFont((*m_doc->AllFonts)[Editor->CurrFont]);
Editor->updateSel(charStyle);
modifiedText();
Editor->setFocus();
@@ -2441,13 +2441,13 @@
ColorList::Iterator it;
int c = 0;
- if ((p >= static_cast<int>(Editor->StyledText.nrOfParagraphs())) || (Editor->StyledText.length() == 0) || (!firstSet))
+ if ((p >= static_cast<int>(Editor->StyledText.nrOfParagraphs())) || (Editor->StyledText.length() == 0) || (!m_firstSet))
{
int pos = Editor->StyledText.startOfParagraph(p) + ch;
- if (!firstSet)
- {
- const CharStyle& curstyle(pos < Editor->StyledText.length()? currItem->itemText.charStyle(pos) : currItem->itemText.defaultStyle().charStyle());
- const ParagraphStyle parStyle(pos < Editor->StyledText.length()? currItem->itemText.paragraphStyle(pos) : currItem->itemText.defaultStyle());
+ if (!m_firstSet)
+ {
+ const CharStyle& curstyle(pos < Editor->StyledText.length()? m_item->itemText.charStyle(pos) : m_item->itemText.defaultStyle().charStyle());
+ const ParagraphStyle parStyle(pos < Editor->StyledText.length()? m_item->itemText.paragraphStyle(pos) : m_item->itemText.defaultStyle());
Editor->currentParaStyle = parStyle.parent();
Editor->CurrAlign = parStyle.alignment();
Editor->CurrTextFill = curstyle.fillColor();
@@ -2476,7 +2476,7 @@
if ((b != CommonStrings::None) && (!b.isEmpty()))
{
c++;
- for (it = currDoc->PageColors.begin(); it != currDoc->PageColors.end(); ++it)
+ for (it = m_doc->PageColors.begin(); it != m_doc->PageColors.end(); ++it)
{
if (it.key() == b)
break;
@@ -2489,7 +2489,7 @@
if ((b != CommonStrings::None) && (!b.isEmpty()))
{
c++;
- for (it = currDoc->PageColors.begin(); it != currDoc->PageColors.end(); ++it)
+ for (it = m_doc->PageColors.begin(); it != m_doc->PageColors.end(); ++it)
{
if (it.key() == b)
break;
@@ -2521,7 +2521,7 @@
StrokeTools->PM1->setEnabled(false);
}
Editor->setEffects(Editor->CurrentEffects);
- firstSet = true;
+ m_firstSet = true;
updateUnicodeActions();
return;
}
@@ -2597,7 +2597,7 @@
if ((b != CommonStrings::None) && (!b.isEmpty()))
{
c++;
- for (it = currDoc->PageColors.begin(); it != currDoc->PageColors.end(); ++it)
+ for (it = m_doc->PageColors.begin(); it != m_doc->PageColors.end(); ++it)
{
if (it.key() == b)
break;
@@ -2610,7 +2610,7 @@
if ((b != CommonStrings::None) && (!b.isEmpty()))
{
c++;
- for (it = currDoc->PageColors.begin(); it != currDoc->PageColors.end(); ++it)
+ for (it = m_doc->PageColors.begin(); it != m_doc->PageColors.end(); ++it)
{
if (it.key() == b)
break;
@@ -2684,38 +2684,38 @@
if (charSelect->isVisible())
return;
charSelect->setEnabled(true, 0);
- charSelect->setDoc(currDoc);
+ charSelect->setDoc(m_doc);
charSelect->show();
}
void StoryEditor::insertSampleText()
{
- LoremManager dia(currDoc, this);
+ LoremManager dia(m_doc, this);
if (!dia.exec())
return;
- blockUpdate = true;
+ m_blockUpdate = true;
Editor->insertChars(dia.loremIpsum());
- blockUpdate = false;
+ m_blockUpdate = false;
}
void StoryEditor::slot_insertSpecialChar()
{
- blockUpdate = true;
+ m_blockUpdate = true;
if (!charSelect->getCharacters().isEmpty())
Editor->insertPlainText(charSelect->getCharacters());
- blockUpdate = false;
+ m_blockUpdate = false;
}
void StoryEditor::slot_insertUserSpecialChar(QChar c, QString)
{
- blockUpdate = true;
+ m_blockUpdate = true;
Editor->insertPlainText(c);
- blockUpdate = false;
+ m_blockUpdate = false;
}
void StoryEditor::Do_fontPrev()
{
- blockUpdate = true;
+ m_blockUpdate = true;
QString retval;
ScActionPlugin* plugin;
bool result = false;
@@ -2724,7 +2724,7 @@
{
plugin = dynamic_cast<ScActionPlugin*>(PluginManager::instance().getPlugin("fontpreview", false));
if (plugin)
- result = plugin->run(this, currDoc, Editor->CurrFont);
+ result = plugin->run(this, m_doc, Editor->CurrFont);
if (result)
{
retval = plugin->runResult();
@@ -2735,59 +2735,59 @@
}
}
}
- blockUpdate = false;
+ m_blockUpdate = false;
}
void StoryEditor::Do_leave2()
{
updateTextFrame();
- result = QDialog::Accepted;
- setCurrentDocumentAndItem(currDoc, NULL);
+ m_result = QDialog::Accepted;
+ setCurrentDocumentAndItem(m_doc, NULL);
hide();
- blockUpdate = false;
+ m_blockUpdate = false;
}
void StoryEditor::Do_leave()
{
- if (textChanged)
- {
- blockUpdate = true;
+ if (m_textChanged)
+ {
+ m_blockUpdate = true;
int t = QMessageBox::warning(this, CommonStrings::trWarning,
tr("Do you really want to lose all your changes?"),
QMessageBox::Yes, QMessageBox::No | QMessageBox::Default);
qApp->processEvents();
if (t == QMessageBox::No)
{
- blockUpdate = false;
+ m_blockUpdate = false;
return;
}
}
- result = QDialog::Rejected;
- setCurrentDocumentAndItem(currDoc, NULL);
+ m_result = QDialog::Rejected;
+ setCurrentDocumentAndItem(m_doc, NULL);
hide();
- blockUpdate = false;
+ m_blockUpdate = false;
}
void StoryEditor::Do_saveDocument()
{
- blockUpdate = true;
+ m_blockUpdate = true;
if (ScCore->primaryMainWindow()->slotFileSave())
updateTextFrame();
- blockUpdate = false;
+ m_blockUpdate = false;
}
bool StoryEditor::Do_new()
{
if (!Editor->document()->isEmpty())
{
- blockUpdate = true;
+ m_blockUpdate = true;
int t = QMessageBox::warning(this, CommonStrings::trWarning,
tr("Do you really want to clear all your text?"),
QMessageBox::Yes, QMessageBox::No | QMessageBox::Default);
qApp->processEvents();
if (t == QMessageBox::No)
{
- blockUpdate = false;
+ m_blockUpdate = false;
return false;
}
}
@@ -2800,12 +2800,12 @@
seActions["editCopy"]->setEnabled(false);
seActions["editCut"]->setEnabled(false);
seActions["editClear"]->setEnabled(false);
-// textChanged = false;
+// m_textChanged = false;
EditorBar->setRepaint(true);
EditorBar->doRepaint();
updateProps(0, 0);
updateStatus();
- blockUpdate = false;
+ m_blockUpdate = false;
return true;
}
@@ -2813,8 +2813,8 @@
{
if (Do_new())
{
- Editor->loadItemText(currItem);
-// Editor->getCursorPosition(&CurrPara, &CurrChar);
+ Editor->loadItemText(m_item);
+// Editor->getCursorPosition(&m_currPara, &m_currChar);
updateStatus();
EditorBar->setRepaint(true);
EditorBar->doRepaint();
@@ -2882,11 +2882,11 @@
void StoryEditor::updateTextFrame()
{
//Return immediately if we dont have to update the frame
- if (!textChanged)
+ if (!m_textChanged)
return;
- PageItem *nextItem = currItem;
+ PageItem *nextItem = m_item;
#if 0
- if (currItem->asTextFrame())
+ if (m_item->asTextFrame())
{
while (nextItem != 0)
{
@@ -2897,11 +2897,11 @@
}
}
#endif
- currItem->invalidateLayout();
+ m_item->invalidateLayout();
PageItem* nb2 = nextItem;
nb2->itemText.clear();
#if 0
- if (currItem->asTextFrame())
+ if (m_item->asTextFrame())
{
while (nb2 != 0)
{
@@ -2931,7 +2931,7 @@
}
for (uint em = 0; em < emG.count(); ++em)
{
- currDoc->FrameItems.remove(emG.at(em));
+ m_doc->FrameItems.remove(emG.at(em));
}
}
}
@@ -2952,7 +2952,7 @@
FrameItemsDel.setAutoDelete(true);
for (uint a = 0; a < Editor->FrameItems.count(); ++a)
{
- if (currDoc->FrameItems.findRef(Editor->FrameItems.at(a)) == -1)
+ if (m_doc->FrameItems.findRef(Editor->FrameItems.at(a)) == -1)
FrameItemsDel.append(Editor->FrameItems.at(a));
}
for (uint a = 0; a < FrameItemsDel.count(); ++a)
@@ -2974,7 +2974,7 @@
}
#endif
ScCore->primaryMainWindow()->view->DrawNew();
- textChanged = false;
+ m_textChanged = false;
seActions["fileRevert"]->setEnabled(false);
seActions["editUpdateFrame"]->setEnabled(false);
emit DocChanged();
@@ -2982,13 +2982,13 @@
void StoryEditor::SearchText()
{
- blockUpdate = true;
+ m_blockUpdate = true;
EditorBar->setRepaint(false);
- SearchReplace* dia = new SearchReplace(this, currDoc, currItem, false);
+ SearchReplace* dia = new SearchReplace(this, m_doc, m_item, false);
dia->exec();
delete dia;
qApp->processEvents();
- blockUpdate = false;
+ m_blockUpdate = false;
EditorBar->setRepaint(true);
EditorBar->doRepaint();
}
@@ -3056,20 +3056,20 @@
else
{
Editor->prevFont = Editor->CurrFont;
- Editor->CurrFont = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().font().scName();
- Editor->CurrFontSize = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fontSize();
- Editor->CurrentEffects = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().effects();
- Editor->CurrTextFill = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fillColor();
- Editor->CurrTextFillSh = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fillShade();
- Editor->CurrTextStroke = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strokeColor();
- Editor->CurrTextStrokeSh = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strokeShade();
- Editor->CurrTextShadowX = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().shadowXOffset();
- Editor->CurrTextShadowY = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().shadowYOffset();
- Editor->CurrTextOutline = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().outlineWidth();
- Editor->CurrTextUnderPos = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().underlineOffset();
- Editor->CurrTextUnderWidth = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().underlineWidth();
- Editor->CurrTextStrikePos = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strikethruOffset();
- Editor->CurrTextStrikeWidth = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strikethruWidth();
+ Editor->CurrFont = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().font().scName();
+ Editor->CurrFontSize = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fontSize();
+ Editor->CurrentEffects = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().effects();
+ Editor->CurrTextFill = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fillColor();
+ Editor->CurrTextFillSh = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fillShade();
+ Editor->CurrTextStroke = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strokeColor();
+ Editor->CurrTextStrokeSh = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strokeShade();
+ Editor->CurrTextShadowX = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().shadowXOffset();
+ Editor->CurrTextShadowY = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().shadowYOffset();
+ Editor->CurrTextOutline = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().outlineWidth();
+ Editor->CurrTextUnderPos = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().underlineOffset();
+ Editor->CurrTextUnderWidth = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().underlineWidth();
+ Editor->CurrTextStrikePos = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strikethruOffset();
+ Editor->CurrTextStrikeWidth = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strikethruWidth();
Editor->setEffects(Editor->CurrentEffects);
if ((Editor->CurrentEffects & ScStyle_Outline) || (Editor->CurrentEffects & ScStyle_Shadowed))
@@ -3144,20 +3144,20 @@
else
{
Editor->prevFont = Editor->CurrFont;
- Editor->CurrFont = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().font().scName();
- Editor->CurrFontSize = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fontSize();
- Editor->CurrentEffects = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().effects();
- Editor->CurrTextFill = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fillColor();
- Editor->CurrTextFillSh = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fillShade();
- Editor->CurrTextStroke = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strokeColor();
- Editor->CurrTextStrokeSh = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strokeShade();
- Editor->CurrTextShadowX = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().shadowXOffset();
- Editor->CurrTextShadowY = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().shadowYOffset();
- Editor->CurrTextOutline = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().outlineWidth();
- Editor->CurrTextUnderPos = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().underlineOffset();
- Editor->CurrTextUnderWidth = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().underlineWidth();
- Editor->CurrTextStrikePos = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strikethruOffset();
- Editor->CurrTextStrikeWidth = currDoc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strikethruWidth();
+ Editor->CurrFont = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().font().scName();
+ Editor->CurrFontSize = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fontSize();
+ Editor->CurrentEffects = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().effects();
+ Editor->CurrTextFill = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fillColor();
+ Editor->CurrTextFillSh = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().fillShade();
+ Editor->CurrTextStroke = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strokeColor();
+ Editor->CurrTextStrokeSh = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strokeShade();
+ Editor->CurrTextShadowX = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().shadowXOffset();
+ Editor->CurrTextShadowY = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().shadowYOffset();
+ Editor->CurrTextOutline = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().outlineWidth();
+ Editor->CurrTextUnderPos = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().underlineOffset();
+ Editor->CurrTextUnderWidth = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().underlineWidth();
+ Editor->CurrTextStrikePos = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strikethruOffset();
+ Editor->CurrTextStrikeWidth = m_doc->paragraphStyles().get(Editor->currentParaStyle).charStyle().strikethruWidth();
Editor->setEffects(Editor->CurrentEffects);
if ((Editor->CurrentEffects & ScStyle_Outline) || (Editor->CurrentEffects & ScStyle_Shadowed))
@@ -3235,8 +3235,8 @@
void StoryEditor::modifiedText()
{
- textChanged = true;
- firstSet = true;
+ m_textChanged = true;
+ m_firstSet = true;
seActions["fileRevert"]->setEnabled(true);
seActions["editUpdateFrame"]->setEnabled(true);
// seActions["editPaste"]->setEnabled(Editor->tBuffer.length() != 0);
@@ -3267,7 +3267,7 @@
{
txt.replace(QRegExp("\r"), "");
txt.replace(QRegExp("\n"), QChar(13));
- Editor->loadText(txt, currItem);
+ Editor->loadText(txt, m_item);
seActions["editPaste"]->setEnabled(false);
seActions["editCopy"]->setEnabled(false);
seActions["editCut"]->setEnabled(false);
@@ -3282,7 +3282,7 @@
void StoryEditor::SaveTextFile()
{
- blockUpdate = true;
+ m_blockUpdate = true;
QString LoadEnc = "";
QString fileName = "";
PrefsContext* dirs = prefsManager->prefsFile->getContext("dirs");
@@ -3291,7 +3291,7 @@
qApp->processEvents();
if (dia.exec() != QDialog::Accepted)
{
- blockUpdate = false;
+ m_blockUpdate = false;
return;
}
LoadEnc = dia.TxCodeM->currentText();
@@ -3303,22 +3303,22 @@
dirs->set("story_save", fileName.left(fileName.lastIndexOf("/")));
Serializer::writeWithEncoding(fileName, LoadEnc, Editor->StyledText.plainText());
}
- blockUpdate = false;
+ m_blockUpdate = false;
}
bool StoryEditor::textDataChanged() const
{
- return textChanged;
+ return m_textChanged;
}
PageItem* StoryEditor::currentItem() const
{
- return currItem;
+ return m_item;
}
ScribusDoc* StoryEditor::currentDocument() const
{
- return currDoc;
+ return m_doc;
}
void StoryEditor::specialActionKeyEvent(const QString& /*actionName*/, int unicodevalue)
Modified: trunk/Scribus/scribus/ui/storyeditor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/storyeditor.h
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.h (original)
+++ trunk/Scribus/scribus/ui/storyeditor.h Wed Jun 19 19:46:21 2013
@@ -412,22 +412,21 @@
private:
//int exec();
void changeAlign(int align);
- int result;
bool textDataChanged() const;
/*! \brief Enables/disables the "smart" selection (#1203) - 10/16/2004 pv */
- bool smartSelection;
- int smartSel;
-
- ScribusDoc* currDoc;
- PageItem* currItem;
-
- bool textChanged;
- bool firstSet;
-
- bool blockUpdate;
- int CurrPara;
- int CurrChar;
+ bool m_smartSelection;
+
+ ScribusDoc* m_doc;
+ PageItem* m_item;
+
+ bool m_blockUpdate;
+ bool m_firstSet;
+ bool m_textChanged;
+
+ int m_result;
+ int m_currPara;
+ int m_currChar;
protected slots:
void setBackPref();
@@ -506,6 +505,7 @@
CharSelect *charSelect;
//! True when there were some glyphs inserted via charSelect
bool charSelectUsed;
+
void showEvent(QShowEvent *);
void hideEvent(QHideEvent *);
Modified: trunk/Scribus/scribus/ui/symbolpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/symbolpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/symbolpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/symbolpalette.cpp Wed Jun 19 19:46:21 2013
@@ -200,24 +200,24 @@
void SymbolPalette::setDoc(ScribusDoc *newDoc)
{
if (m_scMW == NULL)
- currDoc = NULL;
- else
- currDoc = newDoc;
- if (currDoc == NULL)
+ m_doc = NULL;
+ else
+ m_doc = newDoc;
+ if (m_doc == NULL)
{
SymbolViewWidget->clear();
setEnabled(true);
}
else
{
- setEnabled(!currDoc->drawAsPreview);
+ setEnabled(!m_doc->drawAsPreview);
updateSymbolList();
}
}
void SymbolPalette::unsetDoc()
{
- currDoc = NULL;
+ m_doc = NULL;
SymbolViewWidget->clear();
setEnabled(true);
}
@@ -232,11 +232,11 @@
{
SymbolViewWidget->clear();
SymbolViewWidget->setWordWrap(true);
- QStringList patK = currDoc->docPatterns.keys();
+ QStringList patK = m_doc->docPatterns.keys();
qSort(patK);
for (int a = 0; a < patK.count(); a++)
{
- ScPattern sp = currDoc->docPatterns.value(patK[a]);
+ ScPattern sp = m_doc->docPatterns.value(patK[a]);
QPixmap pm;
if (sp.getPattern()->width() >= sp.getPattern()->height())
pm = QPixmap::fromImage(sp.getPattern()->scaledToWidth(48, Qt::SmoothTransformation));
Modified: trunk/Scribus/scribus/ui/symbolpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/symbolpalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/symbolpalette.h (original)
+++ trunk/Scribus/scribus/ui/symbolpalette.h Wed Jun 19 19:46:21 2013
@@ -98,7 +98,7 @@
protected:
SymbolView *SymbolViewWidget;
QVBoxLayout* PaletteLayout;
- ScribusDoc *currDoc;
+ ScribusDoc *m_doc;
ScribusMainWindow *m_scMW;
QStringList editItemNames;
};
Modified: trunk/Scribus/scribus/ui/tabpdfoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/tabpdfoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabpdfoptions.cpp (original)
+++ trunk/Scribus/scribus/ui/tabpdfoptions.cpp Wed Jun 19 19:46:21 2013
@@ -238,11 +238,9 @@
precision(unitGetPrecisionFromIndex(unitIndex)),
unitRatio(unitGetRatioFromIndex(unitIndex)),
pdfExport(exporting),
- doc(mdoc),
+ m_Doc(mdoc),
AllFonts(AllFonts),
Opts(Optionen),
- pageH(PageH),
- pageB(PageB),
cms(false)
{
@@ -320,7 +318,7 @@
PDFVersionCombo->addItem("PDF 1.3 (Acrobat 4)");
PDFVersionCombo->addItem("PDF 1.4 (Acrobat 5)");
PDFVersionCombo->addItem("PDF 1.5 (Acrobat 6)");
- cms = doc ? (ScCore->haveCMS() && doc->HasCMS) : false;
+ cms = m_Doc ? (ScCore->haveCMS() && m_Doc->HasCMS) : false;
if (cms && (!PDFXProfiles.isEmpty()))
{
PDFVersionCombo->addItem("PDF/X-1a");
@@ -400,7 +398,7 @@
CBoxLayout->addWidget( ValC, 2, 1, Qt::AlignLeft );
tabLayout->addWidget( CBox );
addTab(tabGeneral, tr( "&General" ));
- if (doc != 0 && exporting)
+ if (m_Doc != 0 && exporting)
{
tabFonts = new QWidget( this );
tabLayout_3 = new QVBoxLayout( tabFonts );
@@ -728,7 +726,7 @@
tabColorLayout->addWidget( LPIgroup );
SelLPIcolor = LPIcolor->currentText();
- if (doc==0)
+ if (m_Doc==0)
{
UseLPI->hide();
LPIgroup->hide();
@@ -894,9 +892,9 @@
BleedLeft->setMinimum(0);
BleedLeft->setMaximum(3000*unitRatio);
- restoreDefaults(Optionen, AllFonts, PDFXProfiles, DocFonts, Eff, unitIndex, PageH, PageB, doc, pdfExport);
-
- if (doc != 0 && exporting)
+ restoreDefaults(Optionen, AllFonts, PDFXProfiles, DocFonts, Eff, unitIndex, PageH, PageB, m_Doc, pdfExport);
+
+ if (m_Doc != 0 && exporting)
{
connect(EmbedFonts, SIGNAL(clicked()), this, SLOT(EmbedAll()));
connect(AvailFlist, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(SelAFont(QListWidgetItem*)));
@@ -1084,7 +1082,7 @@
// Build a list of all Fonts used in Annotations;
PageItem *pgit;
QList<PageItem*> allItems;
- for (QHash<int, PageItem*>::iterator it = doc->FrameItems.begin(); it != doc->FrameItems.end(); ++it)
+ for (QHash<int, PageItem*>::iterator it = m_Doc->FrameItems.begin(); it != m_Doc->FrameItems.end(); ++it)
{
PageItem *currItem = it.value();
if (currItem->isGroup())
@@ -1104,9 +1102,9 @@
}
allItems.clear();
}
- for (int a = 0; a < doc->MasterItems.count(); ++a)
- {
- PageItem *currItem = doc->MasterItems.at(a);
+ for (int a = 0; a < m_Doc->MasterItems.count(); ++a)
+ {
+ PageItem *currItem = m_Doc->MasterItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
@@ -1124,9 +1122,9 @@
}
allItems.clear();
}
- for (int a = 0; a < doc->DocItems.count(); ++a)
- {
- PageItem *currItem = doc->DocItems.at(a);
+ for (int a = 0; a < m_Doc->DocItems.count(); ++a)
+ {
+ PageItem *currItem = m_Doc->DocItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
@@ -1206,7 +1204,7 @@
struct PDFPresentationData ef;
if (EffVal.count() != 0)
{
- for (int pg2 = 0; pg2 < doc->Pages->count(); ++pg2)
+ for (int pg2 = 0; pg2 < m_Doc->Pages->count(); ++pg2)
{
Pages->addItem( tr("Page")+" "+tmp.setNum(pg2+1));
if (EffVal.count()-1 < pg2)
@@ -1223,7 +1221,7 @@
}
else
{
- for (int pg = 0; pg < doc->Pages->count(); ++pg)
+ for (int pg = 0; pg < m_Doc->Pages->count(); ++pg)
{
Pages->addItem( tr("Page")+" "+tmp.setNum(pg+1));
ef.pageEffectDuration = 1;
@@ -1252,9 +1250,9 @@
QMap<QString,QString>::Iterator itja;
actionCombo->clear();
actionCombo->addItem( tr("No Script"));
- for (itja = doc->JavaScripts.begin(); itja != doc->JavaScripts.end(); ++itja)
+ for (itja = m_Doc->JavaScripts.begin(); itja != m_Doc->JavaScripts.end(); ++itja)
actionCombo->addItem(itja.key());
- if (doc->JavaScripts.contains(Opts.openAction))
+ if (m_Doc->JavaScripts.contains(Opts.openAction))
setCurrentComboItem(actionCombo, Opts.openAction);
if (Opts.PageLayout == PDFOptions::SinglePage)
singlePage->setChecked(true);
@@ -1574,10 +1572,10 @@
Opts.bleeds.Bottom = BleedBottom->value() / unitRatio;
Opts.bleeds.Right = BleedRight->value() / unitRatio;
Opts.bleeds.Left = BleedLeft->value() / unitRatio;
- BleedTop->setValue(doc->bleeds()->Top*unitRatio);
- BleedBottom->setValue(doc->bleeds()->Bottom*unitRatio);
- BleedRight->setValue(doc->bleeds()->Right*unitRatio);
- BleedLeft->setValue(doc->bleeds()->Left*unitRatio);
+ BleedTop->setValue(m_Doc->bleeds()->Top*unitRatio);
+ BleedBottom->setValue(m_Doc->bleeds()->Bottom*unitRatio);
+ BleedRight->setValue(m_Doc->bleeds()->Right*unitRatio);
+ BleedLeft->setValue(m_Doc->bleeds()->Left*unitRatio);
BleedTop->setEnabled(false);
BleedBottom->setEnabled(false);
BleedRight->setEnabled(false);
@@ -1638,7 +1636,7 @@
useLayers->setEnabled((a == 2) || (a == 5));
if (useLayers2)
useLayers2->setEnabled((a == 2) || (a == 5));
- if (doc != 0 && pdfExport)
+ if (m_Doc != 0 && pdfExport)
{
int currentEff = EffectType->currentIndex();
disconnect(EffectType, SIGNAL(activated(int)), this, SLOT(SetEffOpts(int)));
@@ -1665,7 +1663,7 @@
currentEff = 0;
EffectType->setCurrentIndex(0);
SetEffOpts(0);
- for (int pg = 0; pg < doc->Pages->count(); ++pg)
+ for (int pg = 0; pg < m_Doc->Pages->count(); ++pg)
{
if (EffVal[pg].effectType > 6)
EffVal[pg].effectType = 0;
@@ -1684,7 +1682,7 @@
EmbedProfs->setEnabled(true);
EmbedProfs2->setEnabled(true);
emit hasInfo();
- if (doc != 0 && pdfExport)
+ if (m_Doc != 0 && pdfExport)
{
CheckBox10->setEnabled(true);
EmbedFonts->setEnabled(true);
@@ -1713,7 +1711,7 @@
EmbedProfs2->setChecked(true);
EmbedProfs2->setEnabled(false);
}
- if (doc != 0 && pdfExport)
+ if (m_Doc != 0 && pdfExport)
{
// EmbedFonts->setChecked(true);
EmbedAll();
@@ -1795,8 +1793,8 @@
QString tp = Opts.SolidProf;
if (!ScCore->InputProfiles.contains(tp))
{
- if (doc != 0)
- tp = doc->cmsSettings().DefaultSolidColorRGBProfile;
+ if (m_Doc != 0)
+ tp = m_Doc->cmsSettings().DefaultSolidColorRGBProfile;
else
tp = PrefsManager::instance()->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
}
@@ -1817,8 +1815,8 @@
QString tp1 = Opts.ImageProf;
if (!ScCore->InputProfiles.contains(tp1))
{
- if (doc != 0)
- tp1 = doc->cmsSettings().DefaultSolidColorRGBProfile;
+ if (m_Doc != 0)
+ tp1 = m_Doc->cmsSettings().DefaultSolidColorRGBProfile;
else
tp1 = PrefsManager::instance()->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
}
@@ -1847,7 +1845,7 @@
ProfsGroup->hide();
}
useSpot->show();
- if (doc!=0)
+ if (m_Doc!=0)
{
UseLPI->show();
if (UseLPI->isChecked())
@@ -1866,7 +1864,7 @@
void TabPDFOptions::EnableLPI2()
{
- if (doc!=0)
+ if (m_Doc!=0)
{
if (UseLPI->isChecked())
LPIgroup->show();
@@ -1898,7 +1896,7 @@
void TabPDFOptions::EffectOnAll()
{
- for (int pg = 0; pg < doc->Pages->count(); ++pg)
+ for (int pg = 0; pg < m_Doc->Pages->count(); ++pg)
{
EffVal[pg].pageViewDuration = PageTime->value();
EffVal[pg].pageEffectDuration = EffectTime->value();
@@ -2033,9 +2031,9 @@
Pages->clear();
if (PagePrev->isChecked())
{
- for (int pg = 0; pg < doc->Pages->count(); ++pg)
- {
- pm=QPixmap::fromImage(doc->view()->PageToPixmap(pg, 70));
+ for (int pg = 0; pg < m_Doc->Pages->count(); ++pg)
+ {
+ pm=QPixmap::fromImage(m_Doc->view()->PageToPixmap(pg, 70));
pgMaxX = qMax(pgMaxX, pm.width());
pgMaxY = qMax(pgMaxY, pm.height());
new QListWidgetItem( pm, tr("Page")+" "+tmp.setNum(pg+1), Pages);
@@ -2044,7 +2042,7 @@
}
else
{
- for (int pg = 0; pg < doc->Pages->count(); ++pg)
+ for (int pg = 0; pg < m_Doc->Pages->count(); ++pg)
{
new QListWidgetItem( tr("Page")+" "+tmp.setNum(pg+1), Pages);
}
@@ -2333,9 +2331,9 @@
void TabPDFOptions::createPageNumberRange( )
{
- if (doc!=0)
- {
- CreateRange cr(PageNr->text(), doc->DocPages.count(), this);
+ if (m_Doc!=0)
+ {
+ CreateRange cr(PageNr->text(), m_Doc->DocPages.count(), this);
if (cr.exec())
{
CreateRangeData crData;
Modified: trunk/Scribus/scribus/ui/tabpdfoptions.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18330&path=/trunk/Scribus/scribus/ui/tabpdfoptions.h
==============================================================================
--- trunk/Scribus/scribus/ui/tabpdfoptions.h (original)
+++ trunk/Scribus/scribus/ui/tabpdfoptions.h Wed Jun 19 19:46:21 2013
@@ -318,11 +318,9 @@
int precision;
double unitRatio;
bool pdfExport;
- ScribusDoc* const doc;
+ ScribusDoc* const m_Doc;
const SCFonts & AllFonts;
PDFOptions & Opts;
- double pageH;
- double pageB;
bool cms;
QMap<QString, QString> AnnotationFonts;
More information about the scribus-commit
mailing list