summaryrefslogtreecommitdiffstats
path: root/src/gui/orientationwidget.h
blob: 6a6b6ce4c0932c660a0fd2678f5150a03af839c0 (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
/***************************************************************************
 *   Copyright (C) 2003-2004 by David Saxton                               *
 *   [email protected]                                                    *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/

#ifndef ORIENTATIONWIDGET_H
#define ORIENTATIONWIDGET_H

#include <qguardedptr.h>
#include <qwidget.h>

class CNItem;
class CNItemGroup;
class FlowPart;
class QPushButton;

/**
@author David Saxton
*/
class OrientationWidget : public QWidget
{
Q_OBJECT
public:
	OrientationWidget( QWidget *parent = 0l, const char *name = 0l );
	~OrientationWidget();

public slots:
	void slotUpdate( CNItem *item );
	void slotClear();
	
	void set_cio_noflip_0();
	void set_cio_noflip_90();
	void set_cio_noflip_180();
	void set_cio_noflip_270();
	void set_cio_flip_0();
	void set_cio_flip_90();
	void set_cio_flip_180();
	void set_cio_flip_270();
	
signals:
	void orientationSelected( uint orientation );
	
protected:
	void initFromComponent( Component *component );
	void initFromFlowPart( FlowPart *flowPart );
	
	QPushButton *m_toolBtn[2][4];
	QGuardedPtr<FlowPart> p_activeFlowPart;
};

#endif