Rev 13809 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
13808 | pierre | 1 | /*************************************************************************** |
2 | * Copyright (C) 2009 by Pierre Marchand * |
||
3 | * pierre@oep-h.com * |
||
4 | * * |
||
5 | * This program is free software; you can redistribute it and/or modify * |
||
6 | * it under the terms of the GNU General Public License as published by * |
||
7 | * the Free Software Foundation; either version 2 of the License, or * |
||
8 | * (at your option) any later version. * |
||
9 | * * |
||
10 | * This program is distributed in the hope that it will be useful, * |
||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
13 | * GNU General Public License for more details. * |
||
14 | * * |
||
15 | * You should have received a copy of the GNU General Public License * |
||
16 | * along with this program; if not, write to the * |
||
17 | * Free Software Foundation, Inc., * |
||
18122 | mrdocs | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * |
13808 | pierre | 19 | ***************************************************************************/ |
20 | |||
21 | #ifndef PAGEITEMPOSITIONSETTER_H |
||
22 | #define PAGEITEMPOSITIONSETTER_H |
||
23 | |||
24 | #include "pageitemsetterbase.h" |
||
25 | #include "ui_positionsetter.h" |
||
26 | |||
27 | #include <QRectF> |
||
28 | |||
29 | class PageItem; |
||
30 | |||
31 | class PageItemPositionSetter : public PageItemSetterBase, private Ui::PositionSetterWidget |
||
32 | { |
||
33 | Q_OBJECT |
||
34 | |||
35 | Selection* m_select; |
||
36 | |||
37 | public: |
||
38 | PageItemPositionSetter(QWidget * parent = 0); |
||
39 | |||
40 | void changeItem(Selection* sel); |
||
41 | PageItemSetterBase* clone(); |
||
42 | |||
43 | private: |
||
44 | void refineSetup(); |
||
45 | |||
46 | void createConnections(); |
||
47 | void removeConnections(); |
||
48 | PageItem * connectedItem; |
||
49 | bool hasConnections; |
||
50 | |||
51 | void updateCanvas(QRectF rect); |
||
52 | |||
53 | void adjustBase(double &baseAdjustX , double &baseAdjustY, QRectF bb); |
||
54 | int rotmode; |
||
55 | |||
56 | private slots: |
||
57 | void updateValues(); |
||
58 | void captureChanges(double, double); |
||
59 | void modXpos(double val); |
||
60 | void modYpos(double val); |
||
61 | void modWidth(double val); |
||
62 | void modHeight(double val); |
||
63 | |||
64 | }; |
||
65 | |||
66 | #endif // PAGEITEMPOSITIONSETTER_H |