summaryrefslogtreecommitdiffstats
path: root/scribus/pagelayout.h
blob: 142154937f6c562406e7874e674cc703e2edd463 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
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 PAGELAYOUT_H
#define PAGELAYOUT_H

#include <QGroupBox>
#include <QListWidget>
#include <QList>
class QVBoxLayout;
class QListWidgetItem;
class QLabel;

#include "scribusapi.h"
#include "scribusstructs.h"
class ScComboBox;


/*! \brief A widget containing pages layout schema */
class SCRIBUS_API PageListWidget : public QListWidget
{
	Q_OBJECT

public:
	PageListWidget(QWidget* parent);
	~PageListWidget() {};
	void arrangeIcons();
};


/*! \brief A widget for changing pages layout.
User can change layouts on-the-fly changing widget's
comboboxes. */
class SCRIBUS_API PageLayouts : public QGroupBox
{
	Q_OBJECT

public:
	PageLayouts( QWidget* parent, QList<PageSet> pSets, bool mode = true );
	~PageLayouts() {};
	void updateLayoutSelector(QList<PageSet> pSets);
	void selectFirstP(int nr);
	void selectItem(uint nr);
	PageListWidget* layoutsView;
	ScComboBox* layoutsCombo;
	QLabel* layoutLabel1;
	ScComboBox* firstPage;
	QList<PageSet> pageSets;

public slots:
	void itemSelected(QListWidgetItem* ic);
	void itemSelected(int ic);

signals:
	void selectedLayout(int);
	void selectedFirstPage(int);

private:
	void itemSelectedPost(int choosen);
	bool modus;

protected:
	QVBoxLayout* layoutGroupLayout;

protected slots:
	virtual void languageChange();

};

#endif // PAGELAYOUT_H