Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1382 → Rev 1383

/branches/Version13x/Scribus/scribus/undomanager.h
434,6 → 434,7
static const QString Cut;
static const QString Transparency;
static const QString LineTransparency;
static const QString LineStyle;
/*@}*/
 
/**
467,6 → 468,7
static QPixmap *IPaste;
static QPixmap *ICut;
static QPixmap *ITransparency;
static QPixmap *ILineStyle;
/*@}*/
 
protected:
/branches/Version13x/Scribus/scribus/pageitem.h
378,7 → 378,12
* @param newTransparency transparency of the line color
*/
void setLineTransparency(double newTransparency);
 
/**
* @brief Set the style of line.
* @param newStyle style of line
* @sa Qt::PenStyle
*/
void setLineStyle(PenStyle newStyle);
/** @brief Flip an image horizontally. */
void flipImageH();
/** @brief Flip an image vertically */
435,6 → 440,7
void restoreName(SimpleState *state, bool isUndo);
void restoreFillTP(SimpleState *state, bool isUndo);
void restoreLineTP(SimpleState *state, bool isUndo);
void restoreLineStyle(SimpleState *state, bool isUndo);
/*@}*/
 
/**
/branches/Version13x/Scribus/scribus/pageitem.cpp
2392,6 → 2392,19
TranspStroke = newTransparency;
}
 
void PageItem::setLineStyle(PenStyle newStyle)
{
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::LineStyle,"",Um::ILineStyle);
ss->set("LINE_STYLE", "line_style");
ss->set("OLD_STYLE", static_cast<int>(PLineArt));
ss->set("NEW_STYLE", static_cast<int>(newStyle));
undoManager->action(this, ss);
}
PLineArt = newStyle;
}
 
void PageItem::flipImageH()
{
if (UndoManager::undoEnabled())
2620,6 → 2633,8
restoreFillTP(ss, isUndo);
else if (ss->contains("LINE_TRANSPARENCY"))
restoreLineTP(ss, isUndo);
else if (ss->contains("LINE_STYLE"))
restoreLineStyle(ss, isUndo);
}
}
 
2768,6 → 2783,16
ScApp->SetTransparS(tp);
}
 
 
void PageItem::restoreLineStyle(SimpleState *state, bool isUndo)
{
PenStyle ps = static_cast<PenStyle>(state->getInt("OLD_STYLE"));
if (!isUndo)
ps = static_cast<PenStyle>(state->getInt("NEW_STYLE"));
select();
ScApp->view->ChLineArt(ps);
}
 
void PageItem::restoreName(SimpleState *state, bool isUndo)
{
QString oldName = state->get("OLD_NAME");
/branches/Version13x/Scribus/scribus/scribusview.cpp
9367,11 → 9367,16
{
if (SelItem.count() != 0)
{
if (SelItem.count() > 1)
undoManager->beginTransaction(Um::SelectionGroup,
Um::IGroup, Um::LineStyle, "", Um::ILineStyle);
for (uint a = 0; a < SelItem.count(); ++a)
{
SelItem.at(a)->PLineArt = w;
SelItem.at(a)->setLineStyle(w);
RefreshItem(SelItem.at(a));
}
if (SelItem.count() > 1)
undoManager->commit();
}
}
 
/branches/Version13x/Scribus/scribus/undomanager.cpp
614,6 → 614,7
UndoManager::IPaste = new QPixmap(iconDir + "editpaste.png");
UndoManager::ICut = new QPixmap(iconDir + "u_cut.png");
UndoManager::ITransparency = new QPixmap(iconDir + "u_transp.png");
UndoManager::ILineStyle = new QPixmap(iconDir + "u_line.png");
}
 
const QString UndoManager::AddVGuide = tr("Add vertical guide");
659,6 → 660,7
const QString UndoManager::Cut = tr("Cut");
const QString UndoManager::Transparency = tr("Set fill color transparency");
const QString UndoManager::LineTransparency = tr("Set line color transparency");
const QString UndoManager::LineStyle = tr("Set line style");
 
/*** Icons for UndoObjects *******************************************/
QPixmap *UndoManager::IImageFrame = NULL;
686,3 → 688,4
QPixmap *UndoManager::IPaste = NULL;
QPixmap *UndoManager::ICut = NULL;
QPixmap *UndoManager::ITransparency = NULL;
QPixmap *UndoManager::ILineStyle = NULL;