Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 715 → Rev 716

/branches/Version13x/Scribus/scribus/gtaction.cpp
302,7 → 302,7
vg.SShade = font->getStrokeShade();
vg.BaseAdj = pstyle->isAdjToBaseline();
textFrame->Doc->Vorlagen.append(vg);
ScApp->Mpal->Spal->updateFList();
ScApp->Mpal->Spal->updateFormatList();
}
 
void gtAction::removeParagraphStyle(const QString& name)
/branches/Version13x/Scribus/scribus/mpalette.cpp
10,6 → 10,7
#include "tabmanager.h"
#include "scribus.h"
#include "styleselect.h"
#include "spalette.h"
 
using namespace std;
 
/branches/Version13x/Scribus/scribus/spalette.cpp
15,6 → 15,8
* *
***************************************************************************/
 
#include <qlistbox.h>
#include "scribusdoc.h"
#include "spalette.h"
#include "spalette.moc"
 
25,14 → 27,14
// sizePolicy().hasHeightForWidth() ) );
setEditable(false);
insertItem( tr("No Style"));
doc = 0;
currentDoc = NULL;
connect(this, SIGNAL(activated(int)), this, SLOT(selFormat(int)));
}
 
void Spalette::SetFormats(ScribusDoc *dd)
void Spalette::setFormats(ScribusDoc *newCurrentDoc)
{
doc = dd;
updateFList();
currentDoc = newCurrentDoc;
updateFormatList();
}
 
void Spalette::setFormat(int e)
40,20 → 42,20
if (e < 5)
setCurrentItem(0);
else
setCurrentText(doc->Vorlagen[e].Vname);
setCurrentText(currentDoc->Vorlagen[e].Vname);
}
 
void Spalette::updateFList()
void Spalette::updateFormatList()
{
disconnect(this, SIGNAL(activated(int)), this, SLOT(selFormat(int)));
clear();
if (doc != 0)
if (currentDoc != NULL)
{
QStringList st;
st.clear();
insertItem( tr("No Style"));
for (uint x = 5; x < doc->Vorlagen.count(); ++x)
st.append(doc->Vorlagen[x].Vname);
for (uint x = 5; x < currentDoc->Vorlagen.count(); ++x)
st.append(currentDoc->Vorlagen[x].Vname);
st.sort();
insertStringList(st);
}
64,16 → 66,16
void Spalette::selFormat(int e)
{
if (e == 0)
{
emit NewStyle(0);
{
emit newStyle(0);
return;
}
for (uint x = 5; x < doc->Vorlagen.count(); ++x)
}
for (uint x = 5; x < currentDoc->Vorlagen.count(); ++x)
{
if (currentDoc->Vorlagen[x].Vname == currentText())
{
if (doc->Vorlagen[x].Vname == currentText())
{
emit NewStyle(x);
emit newStyle(x);
break;
}
}
}
}
/branches/Version13x/Scribus/scribus/spalette.h
18,10 → 18,9
#ifndef SPALETTE_H
#define SPALETTE_H
 
#include <qlistbox.h>
#include <qcombobox.h>
#include <qlayout.h>
#include "scribusdoc.h"
class ScribusDoc;
 
/**
*@author Franz Schmid
35,17 → 34,17
Spalette(QWidget* parent);
~Spalette() {};
ScribusDoc *doc;
ScribusDoc *currentDoc;
public slots:
void SetFormats(ScribusDoc *dd);
void setFormats(ScribusDoc *newCurrentDoc);
void setFormat(int e);
void updateFList();
void updateFormatList();
void selFormat(int e);
signals:
void NewStyle(int);
void EditSt();
void newStyle(int);
void editStyle();
};
 
#endif
/branches/Version13x/Scribus/scribus/story.cpp
51,7 → 51,7
CurrentPar = editor->paragraphAt(QPoint(2, m->y()+offs));
pmen = new QPopupMenu();
Spalette* Spal = new Spalette(this);
Spal->SetFormats(editor->doc);
Spal->setFormats(editor->doc);
if ((CurrentPar < static_cast<int>(editor->StyledText.count())) && (editor->StyledText.count() != 0))
{
if (editor->StyledText.at(CurrentPar)->count() > 0)
61,7 → 61,7
}
else
Spal->setFormat(0);
connect(Spal, SIGNAL(NewStyle(int)), this, SLOT(setPStyle(int)));
connect(Spal, SIGNAL(newStyle(int)), this, SLOT(setPStyle(int)));
pmen->insertItem(Spal);
pmen->exec(QCursor::pos());
delete pmen;
1351,7 → 1351,7
Extra->setValues( -300, 300, 10, 0);
Extra->setSuffix( tr( " pt" ) );
QToolTip::add( Extra, tr( "Manual Kerning" ) );
connect(SeStyle, SIGNAL(State(int)), this, SIGNAL(NewStyle(int)));
connect(SeStyle, SIGNAL(State(int)), this, SIGNAL(newStyle(int)));
connect(Extra, SIGNAL(valueChanged(int)), this, SLOT(newKernHandler()));
}
 
1362,9 → 1362,9
 
void SToolBStyle::SetStyle(int s)
{
disconnect(SeStyle, SIGNAL(State(int)), this, SIGNAL(NewStyle(int)));
disconnect(SeStyle, SIGNAL(State(int)), this, SIGNAL(newStyle(int)));
SeStyle->setStyle(s);
connect(SeStyle, SIGNAL(State(int)), this, SIGNAL(NewStyle(int)));
connect(SeStyle, SIGNAL(State(int)), this, SIGNAL(newStyle(int)));
}
 
void SToolBStyle::SetKern(double k)
1380,7 → 1380,7
GroupAlign = new AlignSelect(this);
Spal = new Spalette(this);
QToolTip::add( Spal, tr( "Style of current paragraph" ) );
connect(Spal, SIGNAL(NewStyle(int)), this, SLOT(newStyleHandler(int )));
connect(Spal, SIGNAL(newStyle(int)), this, SLOT(newStyleHandler(int )));
connect(GroupAlign, SIGNAL(State(int)), this, SIGNAL(NewAlign(int )));
}
 
1390,12 → 1390,12
GroupAlign->setEnabled(false);
else
GroupAlign->setEnabled(true);
emit NewStyle(s);
emit newStyle(s);
}
 
void SToolBAlign::SetAlign(int s)
{
disconnect(Spal, SIGNAL(NewStyle(int)), this, SLOT(newStyleHandler(int )));
disconnect(Spal, SIGNAL(newStyle(int)), this, SLOT(newStyleHandler(int )));
disconnect(GroupAlign, SIGNAL(State(int)), this, SIGNAL(NewAlign(int )));
if (s < 5)
{
1406,7 → 1406,7
GroupAlign->setEnabled(false);
Spal->setFormat(s);
connect(GroupAlign, SIGNAL(State(int)), this, SIGNAL(NewAlign(int )));
connect(Spal, SIGNAL(NewStyle(int)), this, SLOT(newStyleHandler(int )));
connect(Spal, SIGNAL(newStyle(int)), this, SLOT(newStyleHandler(int )));
}
 
/* Toolbar for Font related Settings */
1524,7 → 1524,7
setDockEnabled(AlignTools, DockLeft, false);
setDockEnabled(AlignTools, DockRight, false);
setDockEnabled(AlignTools, DockBottom, false);
AlignTools->Spal->SetFormats(doc);
AlignTools->Spal->setFormats(doc);
StyleTools = new SToolBStyle(this);
setDockEnabled(StyleTools, DockLeft, false);
setDockEnabled(StyleTools, DockRight, false);
1640,7 → 1640,7
// 10/12/2004 - pv - #1203: wrong selection on double click
connect(Editor, SIGNAL(doubleClicked(int, int)), this, SLOT(doubleClick(int, int)));
connect(EditorBar, SIGNAL(ChangeStyle(int, int )), this, SLOT(changeAlignSB(int, int )));
connect(AlignTools, SIGNAL(NewStyle(int)), this, SLOT(newAlign(int)));
connect(AlignTools, SIGNAL(newStyle(int)), this, SLOT(newAlign(int)));
connect(AlignTools, SIGNAL(NewAlign(int)), this, SLOT(newAlign(int)));
connect(FillTools, SIGNAL(NewColor(int, int)), this, SLOT(newTxFill(int, int)));
connect(StrokeTools, SIGNAL(NewColor(int, int)), this, SLOT(newTxStroke(int, int)));
1648,7 → 1648,7
connect(FontTools, SIGNAL(NewFont(const QString& )), this, SLOT(newTxFont(const QString& )));
connect(FontTools, SIGNAL(NewScale(int )), this, SLOT(newTxScale(int )));
connect(StyleTools, SIGNAL(NewKern(double )), this, SLOT(newTxKern(double )));
connect(StyleTools, SIGNAL(NewStyle(int )), this, SLOT(newTxStyle(int )));
connect(StyleTools, SIGNAL(newStyle(int )), this, SLOT(newTxStyle(int )));
Editor->setFocus();
}
2236,12 → 2236,12
int p, i;
Editor->getCursorPosition(&p, &i);
disconnect(Editor, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(updateProps(int, int)));
disconnect(AlignTools, SIGNAL(NewStyle(int)), this, SLOT(newAlign(int)));
disconnect(AlignTools, SIGNAL(newStyle(int)), this, SLOT(newAlign(int)));
disconnect(AlignTools, SIGNAL(NewAlign(int)), this, SLOT(newAlign(int)));
emit EditSt();
AlignTools->Spal->SetFormats(doc);
AlignTools->Spal->setFormats(doc);
AlignTools->SetAlign(Editor->CurrentABStil);
connect(AlignTools, SIGNAL(NewStyle(int)), this, SLOT(newAlign(int)));
connect(AlignTools, SIGNAL(newStyle(int)), this, SLOT(newAlign(int)));
connect(AlignTools, SIGNAL(NewAlign(int)), this, SLOT(newAlign(int)));
Editor->setCursorPosition(p, i);
updateProps(p, i);
/branches/Version13x/Scribus/scribus/scribus.cpp
540,7 → 540,7
connect(Tpal, SIGNAL(SelectElement(int, int)), this, SLOT(SelectFromOutl(int, int)));
connect(Tpal, SIGNAL(SelectSeite(int)), this, SLOT(SelectFromOutlS(int)));
connect(Tpal, SIGNAL(ToggleAllPalettes()), this, SLOT(ToggleAllPalettes()));
connect(Mpal->Spal, SIGNAL(NewStyle(int)), this, SLOT(setNewAbStyle(int)));
connect(Mpal->Spal, SIGNAL(newStyle(int)), this, SLOT(setNewAbStyle(int)));
connect(Mpal, SIGNAL(EditLSt()), this, SLOT(slotEditLineStyles()));
connect(Mpal, SIGNAL(ToggleAllPalettes()), this, SLOT(ToggleAllPalettes()));
connect(Mpal, SIGNAL(CloseTpal()), this, SLOT(ToggleTpal()));
2503,7 → 2503,7
Mpal->SetDoc(doc);
Mpal->updateCList();
Sepal->SetView(view);
Mpal->Spal->SetFormats(doc);
Mpal->Spal->setFormats(doc);
Mpal->SetLineFormats(doc);
Lpal->setLayers(&doc->Layers, &doc->ActiveLayer);
view->LaMenu();
2631,7 → 2631,7
Mpal->SetDoc(doc);
Mpal->updateCList();
Sepal->SetView(view);
Mpal->Spal->SetFormats(doc);
Mpal->Spal->setFormats(doc);
Mpal->SetLineFormats(doc);
Lpal->setLayers(&doc->Layers, &doc->ActiveLayer);
view->LaMenu();
3303,7 → 3303,7
}
Mpal->Cpal->SetColors(doc->PageColors);
Mpal->updateCList();
Mpal->Spal->SetFormats(doc);
Mpal->Spal->setFormats(doc);
Mpal->SetLineFormats(doc);
if (!Mpa)
{
3882,7 → 3882,7
Mpal->UnsetDoc();
Sepal->Vie = 0;
Sepal->Rebuild();
Mpal->Spal->SetFormats(0);
Mpal->Spal->setFormats(0);
Mpal->SetLineFormats(0);
if (doc->EditClip)
Npal->doc = 0;
6143,7 → 6143,7
}
}
}
Mpal->Spal->updateFList();
Mpal->Spal->updateFormatList();
view->DrawNew();
slotDocCh();
}
7529,7 → 7529,7
BuildFontMenu();
Mpal->Cpal->SetColors(docc->PageColors);
Mpal->updateCList();
Mpal->Spal->updateFList();
Mpal->Spal->updateFormatList();
Mpal->SetLineFormats(docc);
Tpal->BuildTree(view);
Tpal->reopenTree(doc->OpenNodes);
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
144,7 → 144,7
{
Carrier->Mpal->SetDoc(Carrier->doc);
Carrier->Mpal->updateCList();
Carrier->Mpal->Spal->SetFormats(Carrier->doc);
Carrier->Mpal->Spal->setFormats(Carrier->doc);
Carrier->Mpal->SetLineFormats(Carrier->doc);
Carrier->Mpal->Cpal->SetColors(Carrier->doc->PageColors);
Carrier->Lpal->setLayers(&Carrier->doc->Layers, &Carrier->doc->ActiveLayer);
/branches/Version13x/Scribus/scribus/story.h
210,7 → 210,7
 
signals:
void NewKern(double);
void NewStyle(int);
void newStyle(int);
};
 
class SToolBAlign : public QToolBar
229,7 → 229,7
 
signals:
void NewAlign(int);
void NewStyle(int);
void newStyle(int);
};
 
class SToolBFont : public QToolBar