Rev 4430 | Rev 8195 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4430 | cbradney | 1 | /* |
2 | For general Scribus (>=1.3.2) copyright and licensing information please refer |
||
3 | to the COPYING file provided with the program. Following this notice may exist |
||
4 | a copyright and/or license notice that predates the release of Scribus 1.3.2 |
||
5 | for which a new license (GPL+exception) is in place. |
||
6 | */ |
||
1111 | tsoots | 7 | /*************************************************************************** |
8 | * Copyright (C) 2005 by Riku Leino * |
||
5116 | tsoots | 9 | * riku@scribus.info * |
1111 | tsoots | 10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * |
||
12 | * it under the terms of the GNU General Public License as published by * |
||
13 | * the Free Software Foundation; either version 2 of the License, or * |
||
14 | * (at your option) any later version. * |
||
15 | * * |
||
16 | * This program is distributed in the hope that it will be useful, * |
||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
19 | * GNU General Public License for more details. * |
||
20 | * * |
||
21 | * You should have received a copy of the GNU General Public License * |
||
22 | * along with this program; if not, write to the * |
||
23 | * Free Software Foundation, Inc., * |
||
24 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
||
25 | ***************************************************************************/ |
||
26 | |||
27 | #include "undoobject.h" |
||
28 | |||
5116 | tsoots | 29 | ulong UndoObject::nextId_ = 1; |
1111 | tsoots | 30 | |
31 | |||
32 | UndoObject::UndoObject() |
||
33 | { |
||
5116 | tsoots | 34 | id_ = nextId_; |
35 | ++nextId_; |
||
36 | uname_ = ""; |
||
37 | upixmap_ = NULL; |
||
1111 | tsoots | 38 | } |
39 | |||
1250 | tsoots | 40 | UndoObject::UndoObject(const QString &objectName, QPixmap *objectIcon) |
1111 | tsoots | 41 | { |
5116 | tsoots | 42 | id_ = nextId_; |
43 | ++nextId_; |
||
44 | uname_ = objectName; |
||
45 | upixmap_ = objectIcon; |
||
1111 | tsoots | 46 | } |
47 | |||
48 | ulong UndoObject::getUId() |
||
49 | { |
||
5116 | tsoots | 50 | return id_; |
1111 | tsoots | 51 | } |
52 | |||
53 | QString UndoObject::getUName() |
||
54 | { |
||
5116 | tsoots | 55 | return uname_; |
1111 | tsoots | 56 | } |
57 | |||
58 | void UndoObject::setUName(QString newUName) |
||
59 | { |
||
5116 | tsoots | 60 | uname_ = newUName; |
1111 | tsoots | 61 | } |
1250 | tsoots | 62 | |
63 | QPixmap* UndoObject::getUPixmap() |
||
64 | { |
||
5116 | tsoots | 65 | return upixmap_; |
1250 | tsoots | 66 | } |
67 | |||
68 | void UndoObject::setUPixmap(QPixmap *newUPixmap) |
||
69 | { |
||
5116 | tsoots | 70 | upixmap_ = newUPixmap; |
1250 | tsoots | 71 | } |