~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to src/ipe/props.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2009-12-11 21:22:35 UTC
  • mfrom: (4.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20091211212235-5iio4nzpra64snab
Tags: 7.0.10-1
* New upstream.  Closes: #551192.
  - New build-depends: libcairo2-dev, liblua5.1-0-dev, gsfonts
  - patches/config.diff: Remove.  Upstream build system replaced.
  - Runtime lib package changed to libipe7.0.10 from libipe1c2a
  - Devel package renamed to libipe-dev (from libipe1-dev)
  - Package ipe depends on lua5.1 due to ipe-update-master.

* rules: Re-write to use dh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- C++ -*-
2
 
// --------------------------------------------------------------------
3
 
// Popup menu with object attributes
4
 
// --------------------------------------------------------------------
5
 
/*
6
 
 
7
 
    This file is part of the extensible drawing editor Ipe.
8
 
    Copyright (C) 1993-2007  Otfried Cheong
9
 
 
10
 
    Ipe is free software; you can redistribute it and/or modify it
11
 
    under the terms of the GNU General Public License as published by
12
 
    the Free Software Foundation; either version 2 of the License, or
13
 
    (at your option) any later version.
14
 
 
15
 
    As a special exception, you have permission to link Ipe with the
16
 
    CGAL library and distribute executables, as long as you follow the
17
 
    requirements of the Gnu General Public License in regard to all of
18
 
    the software in the executable aside from CGAL.
19
 
 
20
 
    Ipe is distributed in the hope that it will be useful, but WITHOUT
21
 
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22
 
    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
23
 
    License for more details.
24
 
 
25
 
    You should have received a copy of the GNU General Public License
26
 
    along with Ipe; if not, you can find it at
27
 
    "http://www.gnu.org/copyleft/gpl.html", or write to the Free
28
 
    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29
 
 
30
 
*/
31
 
 
32
 
#ifndef PROPS_H
33
 
#define PROPS_H
34
 
 
35
 
#include "ipevisitor.h"
36
 
#include "ipeobj.h"
37
 
#include "ipepage.h"
38
 
 
39
 
#include <QString>
40
 
#include <QPixmap>
41
 
#include <QMenu>
42
 
 
43
 
// --------------------------------------------------------------------
44
 
 
45
 
class IpeStyleSheet;
46
 
class IpeCanvas;
47
 
class IpeOverlayServices;
48
 
class IpeAction;
49
 
 
50
 
class AttributePopup : public QObject, public IpeVisitor {
51
 
  Q_OBJECT
52
 
public:
53
 
  AttributePopup(IpePage::iterator it, IpePage *page,
54
 
                 IpeCanvas *canvas, int layer,
55
 
                 const IpeStyleSheet *sheet,
56
 
                 const IpeAttributeSeq *syms,
57
 
                 IpeOverlayServices *services);
58
 
 
59
 
  virtual void VisitGroup(const IpeGroup *obj);
60
 
  virtual void VisitPath(const IpePath *obj);
61
 
  virtual void VisitMark(const IpeMark *obj);
62
 
  virtual void VisitText(const IpeText *obj);
63
 
  virtual void VisitImage(const IpeImage *obj);
64
 
  virtual void VisitReference(const IpeReference *obj);
65
 
 
66
 
  void Exec();
67
 
 
68
 
private slots:
69
 
  void SetStroke(int id);
70
 
  void SetFill(int id);
71
 
  void SetLineWidth(int id);
72
 
  void SetDashStyle(int id);
73
 
  void SetTextSize(int id);
74
 
  void SetTextStyle(int id);
75
 
  void SetMarkShape(int id);
76
 
  void SetMarkSize(int id);
77
 
  void SetForwardArrow(int id);
78
 
  void SetBackwardArrow(int id);
79
 
  void SetLayer(int id);
80
 
  void setPinned(int id);
81
 
  void SetCap(int id);
82
 
  void SetJoin(int id);
83
 
  void SetWindRule(int id);
84
 
  void SetTransformable(int id);
85
 
  void SetVAlign(int id);
86
 
  void SetHAlign(int id);
87
 
  void SetParagraph(int id);
88
 
 
89
 
  void Edit();
90
 
  void Ungroup();
91
 
  void DecomposePath();
92
 
  void UseScissors();
93
 
  void ChangeWidth();
94
 
 
95
 
private:
96
 
  QString String(IpeAttribute attr) const;
97
 
  void connect(IpeAction *a, const char *receiver);
98
 
 
99
 
  void SetTitle(QString str);
100
 
  void AddComment(QString str);
101
 
  void InsertLayer(int layer);
102
 
  void InsertColor(QString str, IpeAttribute color, bool fill = false);
103
 
  void InsertAttribute(QString str, IpeKind kind, IpeAttribute attr);
104
 
  void InsertArrow(QString str, IpeAttribute arr, bool backw);
105
 
  void InsertStrokeStyle(IpeStrokeStyle attr);
106
 
  void insertPinned(IpeObject::TPinned pin);
107
 
  void InsertEdit();
108
 
 
109
 
private:
110
 
  QMenu *iMenu;
111
 
  IpeCanvas *iCanvas;
112
 
  IpeOverlayServices *iServices;
113
 
  const IpeStyleSheet *iStyleSheet;
114
 
  const IpeAttributeSeq *iSyms;
115
 
  IpePage *iPage;
116
 
  IpePage::iterator iIt;
117
 
  IpeObject *iObject;
118
 
  IpePgObject iOriginal;
119
 
  int iLayer;
120
 
  bool iLayerLocked;
121
 
  bool iChanged;
122
 
};
123
 
 
124
 
// --------------------------------------------------------------------
125
 
#endif