Subversion Repositories Scribus

Rev

Details | 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.,                                       *
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19
 ***************************************************************************/
20
 
21
#ifndef PAGEITEMSETTERSMANAGER_H
22
#define PAGEITEMSETTERSMANAGER_H
23
 
24
#include <QObject>
25
#include <QList>
26
#include <QUuid>
27
 
28
class PageItemSetterBase;
29
class PageItem;
30
class Selection;
31
class ScribusDoc;
32
 
33
/**
34
  PageItemSettersManager acts as a registry for page item setters.
35
  Notifying setters of document changes (selection, units, etc.).
36
  */
37
 
38
class PageItemSettersManager : public QObject
39
{
40
        Q_OBJECT
41
 
42
        static PageItemSettersManager * instance;
43
        static PageItemSettersManager * that();
44
 
45
        PageItemSettersManager(QObject * parent = 0);
46
 
47
        QList<PageItemSetterBase*> setters;
48
        Selection * selection;
49
        ScribusDoc * doc;
50
 
51
public:
52
        static void registerSetter(PageItemSetterBase* base);
53
        static void setSelection(Selection* selection);
54
        static PageItemSetterBase* getClone(const QUuid& uuid);
55
 
56
private slots:
57
        void UnRegisterSetter();
58
        void rotationModeChanged(int);
59
        void updateSelection();
60
 
61
};
62
 
63
#endif // PAGEITEMSETTERSMANAGER_H