summaryrefslogtreecommitdiffstats
path: root/scribus/smlinestylewidget.h
blob: d0cc05eeaa0775d9eaf437ff933b3579f8f05da4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
For general Scribus (>=1.3.2) copyright and licensing information please refer
to the COPYING file provided with the program. Following this notice may exist
a copyright and/or license notice that predates the release of Scribus 1.3.2
for which a new license (GPL+exception) is in place.
*/

#ifndef SMLINESTYLEWIDGET_H
#define SMLINESTYLEWIDGET_H

class QEvent;

#include "scribusstructs.h"
#include "styleitem.h"
#include "ui_smlinestylewidget.h"

class LineCombo;
class ColorCombo;
class ScrSpinBox;

class SMLineStyleWidget : public QWidget, Ui::SMLineStyleWidget
{
	Q_OBJECT
public:
	SMLineStyleWidget();
	~SMLineStyleWidget();
	
	virtual void changeEvent(QEvent *e);
	
	void showStyle(const multiLine &lineStyle, ColorList &colorList, int subLine = 0);
	void languageChange();
	void unitChange(double oldRatio, double newRatio, int unitIndex);

private:
	LineCombo *dashCombo;
	ScrSpinBox  *lineWidth;
	ColorCombo *colorCombo;
	multiLine  currentStyle;
	ColorList  colors;

	void updateLineList();
	QColor getColor(const QString &name, int shade);

	friend class SMLineStyle;

protected slots:
	void slotEditNewLine(int i);

};

#endif