Exemple #1
0
void OnButtonSelPattern( GtkButton* button, int index_operation )
{
    gchar * pattern = NewPattern();
	if(pattern)
	{
		Panels[ActivePanel]->UnSelectAll();
		Panels[ActivePanel]->SelectPattern(pattern);
		g_free(pattern);
	}	
}
void PropertiesPalette_Group::setDoc(ScribusDoc *d)
{
	if((d == (ScribusDoc*) m_doc) || (m_ScMW && m_ScMW->scriptIsRunning()))
		return;

	if (m_doc)
	{
		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
	}
	
	disconnect(this->transPalWidget, SIGNAL(NewTrans(double)), 0, 0);
	disconnect(this->transPalWidget, SIGNAL(NewBlend(int)), 0, 0);
	disconnect(this->transPalWidget, SIGNAL(NewGradient(int)), 0, 0);
	disconnect(this->transPalWidget, SIGNAL(NewPattern(QString)), 0, 0);
	disconnect(this->transPalWidget, SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)), 0, 0);

	m_doc  = d;
	m_item = NULL;
	m_unitRatio   = m_doc->unitRatio();
	m_unitIndex   = m_doc->unitIndex();

	transPalWidget->setDocument(m_doc);
	transPalWidget->setCurrentItem(NULL);

	m_haveDoc  = true;
	m_haveItem = false;

	connect(this->transPalWidget, SIGNAL(NewTrans(double))   , this, SLOT(handleGroupTransparency(double)));
	connect(this->transPalWidget, SIGNAL(NewBlend(int))      , this, SLOT(handleGroupBlending(int)));
	connect(this->transPalWidget, SIGNAL(NewGradient(int))   , this, SLOT(handleGroupGradMask(int)));
	connect(this->transPalWidget, SIGNAL(NewPattern(QString)), this, SLOT(handleGroupPatternMask(QString)));
	connect(this->transPalWidget, SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)), this, SLOT(handleGroupPatternMaskProps(double, double, double, double, double, double, double, bool, bool)));

	connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
	connect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
}
	bool mirrorX, mirrorY;
	currentItem->maskTransform(patternScaleX, patternScaleY, patternOffsetX, patternOffsetY, patternRotation, patternSkewX, patternSkewY);
	currentItem->maskFlip(mirrorX, mirrorY);
	setActPattern(currentItem->patternMask(), patternScaleX, patternScaleY, patternOffsetX, patternOffsetY, patternRotation, patternSkewX, patternSkewY, mirrorX, mirrorY);

	connectSignals();
}

void Tpalette::setDocument(ScribusDoc* doc)
{
	disconnect(this, SIGNAL(NewTrans(double)), 0, 0);
	disconnect(this, SIGNAL(NewTransS(double)), 0, 0);
	disconnect(this, SIGNAL(NewGradient(int)), 0, 0);
	disconnect(this, SIGNAL(NewBlend(int)), 0, 0);
	disconnect(this, SIGNAL(NewBlendS(int)), 0, 0);
	disconnect(this, SIGNAL(NewPattern(QString)), 0, 0);
	disconnect(this, SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)), 0, 0);
	
	if (currentDoc)
	{
		disconnect(currentDoc->scMW(), SIGNAL(UpdateRequest(int)), this, 0);
	}

	currentDoc = doc;

	if (doc != NULL)
	{
		gradEdit->setColors(doc->PageColors);
		currentUnit = doc->unitIndex();

		updateColorList();